aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c6
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_fbo.c5
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_flush.c10
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_flush.h2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_syncobj.c244
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c11
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c44
-rw-r--r--mesalib/src/mesa/state_tracker/st_format.c210
-rw-r--r--mesalib/src/mesa/state_tracker/st_gen_mipmap.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_manager.c4
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.c2
12 files changed, 249 insertions, 293 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index d602c0b41..f49c03b46 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -838,17 +838,17 @@ st_init_bitmap(struct st_context *st)
/* find a usable texture format */
if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_I8_UNORM;
}
else if (screen->is_format_supported(screen, PIPE_FORMAT_A8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_A8_UNORM;
}
else if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_L8_UNORM;
}
else {
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index c5950304f..5c95eddd0 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1332,7 +1332,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
if (screen->is_format_supported(screen, srcFormat, st->internal_target,
sample_count,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
texFormat = srcFormat;
}
else {
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
index 534fa7041..fe67b03b2 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
@@ -431,14 +431,11 @@ static void
st_finish_render_texture(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att)
{
- struct st_context *st = st_context(ctx);
struct st_renderbuffer *strb = st_renderbuffer(att->Renderbuffer);
if (!strb)
return;
- st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL);
-
strb->rtt = NULL;
/*
@@ -488,7 +485,7 @@ st_validate_attachment(struct gl_context *ctx,
return screen->is_format_supported(screen, format,
PIPE_TEXTURE_2D,
- stObj->pt->nr_samples, bindings, 0);
+ stObj->pt->nr_samples, bindings);
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_flush.c b/mesalib/src/mesa/state_tracker/st_cb_flush.c
index 01496ed07..c029fad48 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_flush.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_flush.c
@@ -76,7 +76,7 @@ display_front_buffer(struct st_context *st)
}
-void st_flush( struct st_context *st, uint pipeFlushFlags,
+void st_flush( struct st_context *st,
struct pipe_fence_handle **fence )
{
FLUSH_CURRENT(st->ctx, 0);
@@ -89,7 +89,7 @@ void st_flush( struct st_context *st, uint pipeFlushFlags,
util_blit_flush(st->blit);
util_gen_mipmap_flush(st->gen_mipmap);
- st->pipe->flush( st->pipe, pipeFlushFlags, fence );
+ st->pipe->flush( st->pipe, fence );
}
@@ -100,10 +100,10 @@ void st_finish( struct st_context *st )
{
struct pipe_fence_handle *fence = NULL;
- st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ st_flush(st, &fence);
if(fence) {
- st->pipe->screen->fence_finish(st->pipe->screen, fence, 0,
+ st->pipe->screen->fence_finish(st->pipe->screen, fence,
PIPE_TIMEOUT_INFINITE);
st->pipe->screen->fence_reference(st->pipe->screen, &fence, NULL);
}
@@ -123,7 +123,7 @@ static void st_glFlush(struct gl_context *ctx)
* synchronization issues. Calling finish() here will just hide
* problems that need to be fixed elsewhere.
*/
- st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ st_flush(st, NULL);
if (is_front_buffer_dirty(st)) {
display_front_buffer(st);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_flush.h b/mesalib/src/mesa/state_tracker/st_cb_flush.h
index 234713675..1fd0c56d7 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_flush.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_flush.h
@@ -40,7 +40,7 @@ extern void
st_init_flush_functions(struct dd_function_table *functions);
extern void
-st_flush(struct st_context *st, uint pipeFlushFlags,
+st_flush(struct st_context *st,
struct pipe_fence_handle **fence);
extern void
diff --git a/mesalib/src/mesa/state_tracker/st_cb_syncobj.c b/mesalib/src/mesa/state_tracker/st_cb_syncobj.c
index 85aad08cc..7e243561a 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_syncobj.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_syncobj.c
@@ -1,122 +1,122 @@
-/**************************************************************************
- *
- * Copyright 2011 Marek Olšák <maraeo@gmail.com>
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
- /*
- * Authors:
- * Marek Olšák <maraeo@gmail.com>
- */
-
-#include "main/glheader.h"
-#include "main/macros.h"
-#include "pipe/p_context.h"
-#include "pipe/p_screen.h"
-#include "st_context.h"
-#include "st_cb_syncobj.h"
-
-struct st_sync_object {
- struct gl_sync_object b;
-
- struct pipe_fence_handle *fence;
-};
-
-
-static struct gl_sync_object * st_new_sync_object(struct gl_context *ctx,
- GLenum type)
-{
- if (type == GL_SYNC_FENCE)
- return (struct gl_sync_object*)CALLOC_STRUCT(st_sync_object);
- else
- return NULL;
-}
-
-static void st_delete_sync_object(struct gl_context *ctx,
- struct gl_sync_object *obj)
-{
- struct pipe_screen *screen = st_context(ctx)->pipe->screen;
- struct st_sync_object *so = (struct st_sync_object*)obj;
-
- screen->fence_reference(screen, &so->fence, NULL);
- FREE(so);
-}
-
-static void st_fence_sync(struct gl_context *ctx, struct gl_sync_object *obj,
- GLenum condition, GLbitfield flags)
-{
- struct pipe_context *pipe = st_context(ctx)->pipe;
- struct st_sync_object *so = (struct st_sync_object*)obj;
-
- assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE && flags == 0);
- assert(so->fence == NULL);
-
- pipe->flush(pipe, 0, &so->fence);
-}
-
-static void st_check_sync(struct gl_context *ctx, struct gl_sync_object *obj)
-{
- struct pipe_screen *screen = st_context(ctx)->pipe->screen;
- struct st_sync_object *so = (struct st_sync_object*)obj;
-
- if (so->fence && screen->fence_signalled(screen, so->fence, 0) == 0) {
- screen->fence_reference(screen, &so->fence, NULL);
- so->b.StatusFlag = GL_TRUE;
- }
-}
-
-static void st_client_wait_sync(struct gl_context *ctx,
- struct gl_sync_object *obj,
- GLbitfield flags, GLuint64 timeout)
-{
- struct pipe_screen *screen = st_context(ctx)->pipe->screen;
- struct st_sync_object *so = (struct st_sync_object*)obj;
-
- /* We don't care about GL_SYNC_FLUSH_COMMANDS_BIT, because flush is
- * already called when creating a fence. */
-
- if (so->fence &&
- screen->fence_finish(screen, so->fence, 0, timeout) == 0) {
- screen->fence_reference(screen, &so->fence, NULL);
- so->b.StatusFlag = GL_TRUE;
- }
-}
-
-static void st_server_wait_sync(struct gl_context *ctx,
- struct gl_sync_object *obj,
- GLbitfield flags, GLuint64 timeout)
-{
- /* NO-OP.
- * Neither Gallium nor DRM interfaces support blocking on the GPU. */
-}
-
-void st_init_syncobj_functions(struct dd_function_table *functions)
-{
- functions->NewSyncObject = st_new_sync_object;
- functions->FenceSync = st_fence_sync;
- functions->DeleteSyncObject = st_delete_sync_object;
- functions->CheckSync = st_check_sync;
- functions->ClientWaitSync = st_client_wait_sync;
- functions->ServerWaitSync = st_server_wait_sync;
-}
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@gmail.com>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+ /*
+ * Authors:
+ * Marek Olšák <maraeo@gmail.com>
+ */
+
+#include "main/glheader.h"
+#include "main/macros.h"
+#include "pipe/p_context.h"
+#include "pipe/p_screen.h"
+#include "st_context.h"
+#include "st_cb_syncobj.h"
+
+struct st_sync_object {
+ struct gl_sync_object b;
+
+ struct pipe_fence_handle *fence;
+};
+
+
+static struct gl_sync_object * st_new_sync_object(struct gl_context *ctx,
+ GLenum type)
+{
+ if (type == GL_SYNC_FENCE)
+ return (struct gl_sync_object*)CALLOC_STRUCT(st_sync_object);
+ else
+ return NULL;
+}
+
+static void st_delete_sync_object(struct gl_context *ctx,
+ struct gl_sync_object *obj)
+{
+ struct pipe_screen *screen = st_context(ctx)->pipe->screen;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ screen->fence_reference(screen, &so->fence, NULL);
+ FREE(so);
+}
+
+static void st_fence_sync(struct gl_context *ctx, struct gl_sync_object *obj,
+ GLenum condition, GLbitfield flags)
+{
+ struct pipe_context *pipe = st_context(ctx)->pipe;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE && flags == 0);
+ assert(so->fence == NULL);
+
+ pipe->flush(pipe, &so->fence);
+}
+
+static void st_check_sync(struct gl_context *ctx, struct gl_sync_object *obj)
+{
+ struct pipe_screen *screen = st_context(ctx)->pipe->screen;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ if (so->fence && screen->fence_signalled(screen, so->fence)) {
+ screen->fence_reference(screen, &so->fence, NULL);
+ so->b.StatusFlag = GL_TRUE;
+ }
+}
+
+static void st_client_wait_sync(struct gl_context *ctx,
+ struct gl_sync_object *obj,
+ GLbitfield flags, GLuint64 timeout)
+{
+ struct pipe_screen *screen = st_context(ctx)->pipe->screen;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ /* We don't care about GL_SYNC_FLUSH_COMMANDS_BIT, because flush is
+ * already called when creating a fence. */
+
+ if (so->fence &&
+ screen->fence_finish(screen, so->fence, timeout)) {
+ screen->fence_reference(screen, &so->fence, NULL);
+ so->b.StatusFlag = GL_TRUE;
+ }
+}
+
+static void st_server_wait_sync(struct gl_context *ctx,
+ struct gl_sync_object *obj,
+ GLbitfield flags, GLuint64 timeout)
+{
+ /* NO-OP.
+ * Neither Gallium nor DRM interfaces support blocking on the GPU. */
+}
+
+void st_init_syncobj_functions(struct dd_function_table *functions)
+{
+ functions->NewSyncObject = st_new_sync_object;
+ functions->FenceSync = st_fence_sync;
+ functions->DeleteSyncObject = st_delete_sync_object;
+ functions->CheckSync = st_check_sync;
+ functions->ClientWaitSync = st_client_wait_sync;
+ functions->ServerWaitSync = st_server_wait_sync;
+}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index 17dab2f1a..8bdb3c801 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -217,7 +217,6 @@ default_bindings(struct st_context *st, enum pipe_format format)
{
struct pipe_screen *screen = st->pipe->screen;
const unsigned target = PIPE_TEXTURE_2D;
- const unsigned geom = 0x0;
unsigned bindings;
if (util_format_is_depth_or_stencil(format))
@@ -225,13 +224,13 @@ default_bindings(struct st_context *st, enum pipe_format format)
else
bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
- if (screen->is_format_supported(screen, format, target, 0, bindings, geom))
+ if (screen->is_format_supported(screen, format, target, 0, bindings))
return bindings;
else {
/* Try non-sRGB. */
format = util_format_linear(format);
- if (screen->is_format_supported(screen, format, target, 0, bindings, geom))
+ if (screen->is_format_supported(screen, format, target, 0, bindings))
return bindings;
else
return PIPE_BIND_SAMPLER_VIEW;
@@ -1523,12 +1522,10 @@ st_copy_texsubimage(struct gl_context *ctx,
texBaseFormat != GL_DEPTH_STENCIL &&
screen->is_format_supported(screen, src_format,
PIPE_TEXTURE_2D, sample_count,
- PIPE_BIND_SAMPLER_VIEW,
- 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, dest_format,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET,
- 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
/* draw textured quad to do the copy */
GLint srcY0, srcY1;
struct pipe_surface surf_tmpl;
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 32cbcaec1..5fe516c19 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -366,36 +366,36 @@ void st_init_extensions(struct st_context *st)
*/
if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0) &&
+ PIPE_BIND_DEPTH_STENCIL) &&
screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0) &&
+ PIPE_BIND_DEPTH_STENCIL) &&
screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
/* sRGB support */
if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) ||
+ PIPE_BIND_SAMPLER_VIEW) ||
screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE;
if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0) ||
+ PIPE_BIND_RENDER_TARGET) ||
screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
ctx->Extensions.EXT_framebuffer_sRGB = GL_TRUE;
ctx->Const.sRGBCapable = GL_TRUE;
}
@@ -403,14 +403,14 @@ void st_init_extensions(struct st_context *st)
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.ARB_texture_rg = GL_TRUE;
}
/* s3tc support */
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
ctx->Mesa_DXTn) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
ctx->Extensions.S3_s3tc = GL_TRUE;
@@ -418,48 +418,48 @@ void st_init_extensions(struct st_context *st)
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_SNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_SNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)
+ PIPE_BIND_SAMPLER_VIEW)
) {
ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
}
if (screen->is_format_supported(screen, PIPE_FORMAT_LATC1_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_LATC1_SNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_LATC2_SNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
}
if (screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
}
/* ycbcr support */
if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) ||
+ PIPE_BIND_SAMPLER_VIEW) ||
screen->is_format_supported(screen, PIPE_FORMAT_YUYV,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
}
@@ -490,7 +490,7 @@ void st_init_extensions(struct st_context *st)
/* GL_ARB_half_float_vertex */
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_FLOAT,
PIPE_BUFFER, 0,
- PIPE_BIND_VERTEX_BUFFER, 0)) {
+ PIPE_BIND_VERTEX_BUFFER)) {
ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
}
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c
index 5ac4b9f25..0e67a6bc2 100644
--- a/mesalib/src/mesa/state_tracker/st_format.c
+++ b/mesalib/src/mesa/state_tracker/st_format.c
@@ -432,13 +432,12 @@ find_supported_format(struct pipe_screen *screen,
uint num_formats,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
uint i;
for (i = 0; i < num_formats; i++) {
if (screen->is_format_supported(screen, formats[i], target,
- sample_count, tex_usage, geom_flags)) {
+ sample_count, tex_usage)) {
return formats[i];
}
}
@@ -453,8 +452,7 @@ static enum pipe_format
default_rgba_format(struct pipe_screen *screen,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format colorFormats[] = {
PIPE_FORMAT_B8G8R8A8_UNORM,
@@ -463,7 +461,7 @@ default_rgba_format(struct pipe_screen *screen,
PIPE_FORMAT_B5G6R5_UNORM
};
return find_supported_format(screen, colorFormats, Elements(colorFormats),
- target, sample_count, tex_usage, geom_flags);
+ target, sample_count, tex_usage);
}
@@ -474,8 +472,7 @@ static enum pipe_format
default_rgb_format(struct pipe_screen *screen,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format colorFormats[] = {
PIPE_FORMAT_B8G8R8X8_UNORM,
@@ -487,7 +484,7 @@ default_rgb_format(struct pipe_screen *screen,
PIPE_FORMAT_B5G6R5_UNORM
};
return find_supported_format(screen, colorFormats, Elements(colorFormats),
- target, sample_count, tex_usage, geom_flags);
+ target, sample_count, tex_usage);
}
/**
@@ -497,8 +494,7 @@ static enum pipe_format
default_srgba_format(struct pipe_screen *screen,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format colorFormats[] = {
PIPE_FORMAT_B8G8R8A8_SRGB,
@@ -506,7 +502,7 @@ default_srgba_format(struct pipe_screen *screen,
PIPE_FORMAT_A8B8G8R8_SRGB,
};
return find_supported_format(screen, colorFormats, Elements(colorFormats),
- target, sample_count, tex_usage, geom_flags);
+ target, sample_count, tex_usage);
}
@@ -528,87 +524,71 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
enum pipe_texture_target target, unsigned sample_count,
unsigned bindings)
{
- unsigned geom_flags = 0; /* we don't care about POT vs. NPOT here, yet */
switch (internalFormat) {
case GL_RGB10:
case GL_RGB10_A2:
if (screen->is_format_supported( screen, PIPE_FORMAT_B10G10R10A2_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B10G10R10A2_UNORM;
/* Pass through. */
case 4:
case GL_RGBA:
case GL_RGBA8:
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_BGRA:
if (screen->is_format_supported( screen, PIPE_FORMAT_B8G8R8A8_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B8G8R8A8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case 3:
case GL_RGB:
case GL_RGB8:
- return default_rgb_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgb_format( screen, target, sample_count, bindings);
case GL_RGB12:
case GL_RGB16:
case GL_RGBA12:
case GL_RGBA16:
if (screen->is_format_supported( screen, PIPE_FORMAT_R16G16B16A16_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_R16G16B16A16_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_RGBA4:
case GL_RGBA2:
if (screen->is_format_supported( screen, PIPE_FORMAT_B4G4R4A4_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B4G4R4A4_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_RGB5_A1:
if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B5G5R5A1_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_R3_G3_B2:
if (screen->is_format_supported( screen, PIPE_FORMAT_B2G3R3_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B2G3R3_UNORM;
/* Pass through. */
case GL_RGB5:
case GL_RGB4:
if (screen->is_format_supported( screen, PIPE_FORMAT_B5G6R5_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B5G6R5_UNORM;
if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B5G5R5A1_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_ALPHA12:
case GL_ALPHA16:
if (screen->is_format_supported( screen, PIPE_FORMAT_A16_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_A16_UNORM;
/* Pass through. */
case GL_ALPHA:
@@ -616,15 +596,14 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_ALPHA8:
case GL_COMPRESSED_ALPHA:
if (screen->is_format_supported( screen, PIPE_FORMAT_A8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_A8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_LUMINANCE12:
case GL_LUMINANCE16:
if (screen->is_format_supported( screen, PIPE_FORMAT_L16_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L16_UNORM;
/* Pass through. */
case 1:
@@ -632,16 +611,15 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE4:
case GL_LUMINANCE8:
if (screen->is_format_supported( screen, PIPE_FORMAT_L8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
if (screen->is_format_supported( screen, PIPE_FORMAT_L16A16_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L16A16_UNORM;
/* Pass through. */
case 2:
@@ -649,25 +627,23 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L8A8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_LUMINANCE4_ALPHA4:
if (screen->is_format_supported( screen, PIPE_FORMAT_L4A4_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L4A4_UNORM;
if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L8A8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_INTENSITY12:
case GL_INTENSITY16:
if (screen->is_format_supported( screen, PIPE_FORMAT_I16_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_I16_UNORM;
/* Pass through. */
case GL_INTENSITY:
@@ -675,18 +651,17 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_INTENSITY8:
case GL_COMPRESSED_INTENSITY:
if (screen->is_format_supported( screen, PIPE_FORMAT_I8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_I8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_YCBCR_MESA:
if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY, target,
- sample_count, bindings, geom_flags)) {
+ sample_count, bindings)) {
return PIPE_FORMAT_UYVY;
}
if (screen->is_format_supported(screen, PIPE_FORMAT_YUYV, target,
- sample_count, bindings, geom_flags)) {
+ sample_count, bindings)) {
return PIPE_FORMAT_YUYV;
}
return PIPE_FORMAT_NONE;
@@ -696,39 +671,33 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
if (bindings & ~PIPE_BIND_SAMPLER_VIEW)
return PIPE_FORMAT_NONE;
else if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGB,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT1_RGB;
else
- return default_rgb_format(screen, target, sample_count, bindings,
- geom_flags);
+ return default_rgb_format(screen, target, sample_count, bindings);
case GL_COMPRESSED_RGBA:
/* can only sample from compressed formats */
if (bindings & ~PIPE_BIND_SAMPLER_VIEW)
return PIPE_FORMAT_NONE;
else if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT3_RGBA;
else
- return default_rgba_format(screen, target, sample_count, bindings,
- geom_flags);
+ return default_rgba_format(screen, target, sample_count, bindings);
case GL_RGB_S3TC:
case GL_RGB4_S3TC:
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGB,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT1_RGB;
else
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT1_RGBA;
else
return PIPE_FORMAT_NONE;
@@ -737,16 +706,14 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_RGBA4_S3TC:
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT3_RGBA;
else
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT5_RGBA;
else
return PIPE_FORMAT_NONE;
@@ -760,20 +727,20 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_DEPTH_COMPONENT16:
if (screen->is_format_supported(screen, PIPE_FORMAT_Z16_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_Z16_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT24:
if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
- target, sample_count, bindings, geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_Z24_UNORM_S8_USCALED;
if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
- target, sample_count, bindings, geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_S8_USCALED_Z24_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT32:
if (screen->is_format_supported(screen, PIPE_FORMAT_Z32_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_Z32_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT:
@@ -785,7 +752,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
PIPE_FORMAT_Z16_UNORM
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings, geom_flags);
+ target, sample_count, bindings);
}
case GL_STENCIL_INDEX:
@@ -800,7 +767,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
PIPE_FORMAT_S8_USCALED_Z24_UNORM
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings, geom_flags);
+ target, sample_count, bindings);
}
case GL_DEPTH_STENCIL_EXT:
@@ -811,23 +778,21 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
PIPE_FORMAT_S8_USCALED_Z24_UNORM
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings, geom_flags);
+ target, sample_count, bindings);
}
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_COMPRESSED_SRGB_EXT:
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_SRGB, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_DXT1_SRGB;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
return PIPE_FORMAT_DXT1_SRGBA;
@@ -835,10 +800,9 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_COMPRESSED_SRGB_ALPHA_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_SRGBA, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_DXT3_SRGBA;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
return PIPE_FORMAT_DXT5_SRGBA;
@@ -848,89 +812,87 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_COMPRESSED_SLUMINANCE_EXT:
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_L8A8_SRGB, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_L8A8_SRGB;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_L8_SRGB, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_L8_SRGB;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_RED:
case GL_R8:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8_UNORM;
return PIPE_FORMAT_NONE;
case GL_RG:
case GL_RG8:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8G8_UNORM;
return PIPE_FORMAT_NONE;
case GL_R16:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16_UNORM;
return PIPE_FORMAT_NONE;
case GL_RG16:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16G16_UNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_RED:
case GL_COMPRESSED_RED_RGTC1:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC1_UNORM;
if (screen->is_format_supported(screen, PIPE_FORMAT_R8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8_UNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_SIGNED_RED_RGTC1:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_SNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC1_SNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_RG:
case GL_COMPRESSED_RG_RGTC2:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC2_UNORM;
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8G8_UNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_SIGNED_RG_RGTC2:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_SNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC2_SNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_LUMINANCE:
case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_LATC1_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_LATC1_UNORM;
if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_L8_UNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_LATC1_SNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_LATC1_SNORM;
return PIPE_FORMAT_NONE;
@@ -938,16 +900,16 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
if (screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_LATC2_UNORM;
if (screen->is_format_supported(screen, PIPE_FORMAT_L8A8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_L8A8_UNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_LATC2_SNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_LATC2_SNORM;
return PIPE_FORMAT_NONE;
@@ -974,7 +936,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA8I_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SSCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8G8B8A8_SSCALED;
return PIPE_FORMAT_NONE;
case GL_RGBA16I_EXT:
@@ -985,7 +947,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA16I_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SSCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16G16B16A16_SSCALED;
return PIPE_FORMAT_NONE;
case GL_RGBA32I_EXT:
@@ -997,7 +959,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
/* xxx */
if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_SSCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R32G32B32A32_SSCALED;
return PIPE_FORMAT_NONE;
@@ -1009,7 +971,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA8UI_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_USCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8G8B8A8_USCALED;
return PIPE_FORMAT_NONE;
@@ -1021,7 +983,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA16UI_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_USCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16G16B16A16_USCALED;
return PIPE_FORMAT_NONE;
@@ -1033,7 +995,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA32UI_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_USCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R32G32B32A32_USCALED;
return PIPE_FORMAT_NONE;
diff --git a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
index 34a2e9ebd..2c37c1107 100644
--- a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
@@ -87,7 +87,7 @@ st_render_mipmap(struct st_context *st,
/* XXX should probably kill this and always use util_gen_mipmap
since this implements a sw fallback as well */
if (!screen->is_format_supported(screen, psv->format, psv->texture->target,
- 0, PIPE_BIND_RENDER_TARGET, 0)) {
+ 0, PIPE_BIND_RENDER_TARGET)) {
return FALSE;
}
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c
index ed668d248..e126c0a1e 100644
--- a/mesalib/src/mesa/state_tracker/st_manager.c
+++ b/mesalib/src/mesa/state_tracker/st_manager.c
@@ -502,8 +502,8 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
struct pipe_fence_handle **fence)
{
struct st_context *st = (struct st_context *) stctxi;
- st_flush(st, flags, fence);
- if (flags & PIPE_FLUSH_RENDER_CACHE)
+ st_flush(st, fence);
+ if (flags & ST_FLUSH_FRONT)
st_manager_flush_frontbuffer(st);
}
diff --git a/mesalib/src/mesa/state_tracker/st_texture.c b/mesalib/src/mesa/state_tracker/st_texture.c
index 0d5dc8140..22ec1306c 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_texture.c
@@ -78,7 +78,7 @@ st_texture_create(struct st_context *st,
assert(format);
assert(screen->is_format_supported(screen, format, target, 0,
- PIPE_BIND_SAMPLER_VIEW, 0));
+ PIPE_BIND_SAMPLER_VIEW));
memset(&pt, 0, sizeof(pt));
pt.target = target;