diff options
Diffstat (limited to 'src/gallium')
42 files changed, 89 insertions, 123 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index 76bd7ace526..ff3baf79c26 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -464,11 +464,11 @@ util_blit_pixels_writemask(struct blit_state *ctx, assert(screen->is_format_supported(screen, sampler_view->format, ctx->internal_target, sampler_view->texture->nr_samples, - PIPE_BIND_SAMPLER_VIEW, 0)); + PIPE_BIND_SAMPLER_VIEW)); assert(screen->is_format_supported(screen, dst->format, ctx->internal_target, dst->texture->nr_samples, dst_is_depth ? PIPE_BIND_DEPTH_STENCIL : - PIPE_BIND_RENDER_TARGET, 0)); + PIPE_BIND_RENDER_TARGET)); /* save state (restored below) */ cso_save_blend(ctx->cso); cso_save_depth_stencil_alpha(ctx->cso); @@ -660,8 +660,7 @@ util_blit_pixels_tex(struct blit_state *ctx, assert(ctx->pipe->screen->is_format_supported(ctx->pipe->screen, dst->format, PIPE_TEXTURE_2D, dst->texture->nr_samples, - PIPE_BIND_RENDER_TARGET, - 0)); + PIPE_BIND_RENDER_TARGET)); /* save state (restored below) */ cso_save_blend(ctx->cso); diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index fd1c2b72d04..bdc13b547db 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -772,9 +772,9 @@ void util_blitter_copy_region(struct blitter_context *blitter, /* (assuming copying a stencil buffer is not possible) */ if ((!ignore_stencil && is_stencil) || !screen->is_format_supported(screen, dst->format, dst->target, - dst->nr_samples, bind, 0) || + dst->nr_samples, bind) || !screen->is_format_supported(screen, src->format, src->target, - src->nr_samples, PIPE_BIND_SAMPLER_VIEW, 0)) { + src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) { ctx->base.running = TRUE; util_resource_copy_region(pipe, dst, dstlevel, dstx, dsty, dstz, src, srclevel, srcbox); diff --git a/src/gallium/auxiliary/util/u_caps.c b/src/gallium/auxiliary/util/u_caps.c index e209a98b706..75677b2b133 100644 --- a/src/gallium/auxiliary/util/u_caps.c +++ b/src/gallium/auxiliary/util/u_caps.c @@ -69,8 +69,7 @@ util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out) list[i++], PIPE_TEXTURE_2D, 0, - PIPE_BIND_SAMPLER_VIEW, - 0)) { + PIPE_BIND_SAMPLER_VIEW)) { *out = i - 2; return FALSE; } diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index 2b30d555033..5bf0f53d084 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1539,7 +1539,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx, /* check if we can render in the texture's format */ if (!screen->is_format_supported(screen, psv->format, pt->target, - pt->nr_samples, PIPE_BIND_RENDER_TARGET, 0)) { + pt->nr_samples, PIPE_BIND_RENDER_TARGET)) { fallback_gen_mipmap(ctx, pt, face, baseLevel, lastLevel); return; } diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index 4eddd3f519e..9caf76c802b 100644 --- a/src/gallium/auxiliary/util/u_surface.c +++ b/src/gallium/auxiliary/util/u_surface.c @@ -84,7 +84,7 @@ util_create_rgba_surface(struct pipe_context *pipe, /* Choose surface format */ for (i = 0; rgbaFormats[i]; i++) { if (screen->is_format_supported(screen, rgbaFormats[i], - target, 0, bind, 0)) { + target, 0, bind)) { format = rgbaFormats[i]; break; } diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c index 7d157c99ccc..51bb4b85850 100644 --- a/src/gallium/auxiliary/util/u_vbuf_mgr.c +++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c @@ -87,27 +87,27 @@ static void u_vbuf_mgr_init_format_caps(struct u_vbuf_mgr_priv *mgr) mgr->caps.format_fixed32 = screen->is_format_supported(screen, PIPE_FORMAT_R32_FIXED, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER, 0); + 0, PIPE_BIND_VERTEX_BUFFER); mgr->caps.format_float16 = screen->is_format_supported(screen, PIPE_FORMAT_R16_FLOAT, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER, 0); + 0, PIPE_BIND_VERTEX_BUFFER); mgr->caps.format_float64 = screen->is_format_supported(screen, PIPE_FORMAT_R64_FLOAT, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER, 0); + 0, PIPE_BIND_VERTEX_BUFFER); mgr->caps.format_norm32 = screen->is_format_supported(screen, PIPE_FORMAT_R32_UNORM, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER, 0) && + 0, PIPE_BIND_VERTEX_BUFFER) && screen->is_format_supported(screen, PIPE_FORMAT_R32_SNORM, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER, 0); + 0, PIPE_BIND_VERTEX_BUFFER); mgr->caps.format_scaled32 = screen->is_format_supported(screen, PIPE_FORMAT_R32_USCALED, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER, 0) && + 0, PIPE_BIND_VERTEX_BUFFER) && screen->is_format_supported(screen, PIPE_FORMAT_R32_SSCALED, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER, 0); + 0, PIPE_BIND_VERTEX_BUFFER); } struct u_vbuf_mgr * diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c index 8d2b4b96438..0ee124a24fc 100644 --- a/src/gallium/drivers/cell/ppu/cell_screen.c +++ b/src/gallium/drivers/cell/ppu/cell_screen.c @@ -149,8 +149,7 @@ cell_is_format_supported( struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags ) + unsigned tex_usage) { struct sw_winsys *winsys = cell_screen(screen)->winsys; diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c index 06b6b34b74b..b4edebe4920 100644 --- a/src/gallium/drivers/galahad/glhd_screen.c +++ b/src/gallium/drivers/galahad/glhd_screen.c @@ -106,8 +106,7 @@ galahad_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags) + unsigned tex_usage) { struct galahad_screen *glhd_screen = galahad_screen(_screen); struct pipe_screen *screen = glhd_screen->screen; @@ -120,8 +119,7 @@ galahad_screen_is_format_supported(struct pipe_screen *_screen, format, target, sample_count, - tex_usage, - geom_flags); + tex_usage); } static struct pipe_context * diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 031c9680d2c..c0050bc160c 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -250,8 +250,7 @@ i915_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags) + unsigned tex_usage) { static const enum pipe_format tex_supported[] = { PIPE_FORMAT_B8G8R8A8_UNORM, diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c index b3b88c799d9..25204fd088d 100644 --- a/src/gallium/drivers/i965/brw_screen.c +++ b/src/gallium/drivers/i965/brw_screen.c @@ -278,8 +278,7 @@ brw_is_format_supported(struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags) + unsigned tex_usage) { static const enum pipe_format tex_supported[] = { PIPE_FORMAT_L8_UNORM, diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c index 56e8ac014cf..9bf7fd4c0ee 100644 --- a/src/gallium/drivers/identity/id_screen.c +++ b/src/gallium/drivers/identity/id_screen.c @@ -103,8 +103,7 @@ identity_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags) + unsigned tex_usage) { struct identity_screen *id_screen = identity_screen(_screen); struct pipe_screen *screen = id_screen->screen; @@ -113,8 +112,7 @@ identity_screen_is_format_supported(struct pipe_screen *_screen, format, target, sample_count, - tex_usage, - geom_flags); + tex_usage); } static struct pipe_context * diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 446037c660a..521a52ad3ae 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -225,8 +225,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned bind, - unsigned geom_flags ) + unsigned bind) { struct llvmpipe_screen *screen = llvmpipe_screen(_screen); struct sw_winsys *winsys = screen->winsys; diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c index 90b6ebf36b5..9bcc1e6b45a 100644 --- a/src/gallium/drivers/noop/noop_pipe.c +++ b/src/gallium/drivers/noop/noop_pipe.c @@ -445,8 +445,7 @@ static boolean noop_is_format_supported(struct pipe_screen* screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned usage, - unsigned geom_flags) + unsigned usage) { return true; } diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index d1744a38837..7690c80eef0 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -40,7 +40,7 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned bindings, unsigned geom_flags) + unsigned bindings) { if (sample_count > 1) return FALSE; diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c index 4ce827d33f8..675bbe0fe31 100644 --- a/src/gallium/drivers/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nvc0/nvc0_screen.c @@ -34,7 +34,7 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned bindings, unsigned geom_flags) + unsigned bindings) { if (sample_count > 1) return FALSE; diff --git a/src/gallium/drivers/nvfx/nvfx_miptree.c b/src/gallium/drivers/nvfx/nvfx_miptree.c index 8c043b867ba..1be84b90a90 100644 --- a/src/gallium/drivers/nvfx/nvfx_miptree.c +++ b/src/gallium/drivers/nvfx/nvfx_miptree.c @@ -138,11 +138,11 @@ nvfx_miptree_create_skeleton(struct pipe_screen *pscreen, const struct pipe_reso // on our current driver (and the driver too), format support does not depend on geometry, so don't bother computing it // TODO: may want to revisit this - if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_RENDER_TARGET, 0)) + if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_RENDER_TARGET)) mt->base.base.bind &=~ PIPE_BIND_RENDER_TARGET; - if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_SAMPLER_VIEW, 0)) + if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_SAMPLER_VIEW)) mt->base.base.bind &=~ PIPE_BIND_SAMPLER_VIEW; - if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_DEPTH_STENCIL, 0)) + if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_DEPTH_STENCIL)) mt->base.base.bind &=~ PIPE_BIND_DEPTH_STENCIL; return mt; diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c index aa1e9567d31..9e6b9d6ef8f 100644 --- a/src/gallium/drivers/nvfx/nvfx_screen.c +++ b/src/gallium/drivers/nvfx/nvfx_screen.c @@ -202,7 +202,7 @@ nvfx_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned bind, unsigned geom_flags) + unsigned bind) { struct nvfx_screen *screen = nvfx_screen(pscreen); diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 6682b2bad44..37b635fd120 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -447,11 +447,11 @@ static void r300_resource_copy_region(struct pipe_context *pipe, !pipe->screen->is_format_supported(pipe->screen, src->format, src->target, src->nr_samples, - PIPE_BIND_SAMPLER_VIEW, 0) || + PIPE_BIND_SAMPLER_VIEW) || !pipe->screen->is_format_supported(pipe->screen, dst->format, dst->target, dst->nr_samples, - PIPE_BIND_RENDER_TARGET, 0))) { + PIPE_BIND_RENDER_TARGET))) { switch (util_format_get_blocksize(old_dst.format)) { case 1: new_dst.format = PIPE_FORMAT_I8_UNORM; diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 37ca2295d0a..8a69628c53e 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -306,8 +306,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned usage, - unsigned geom_flags) + unsigned usage) { struct r300_winsys_screen *rws = r300_screen(screen)->rws; uint32_t retval = 0; diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 9964bb39102..d8e057fe5d2 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -417,8 +417,7 @@ static boolean r600_is_format_supported(struct pipe_screen* screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned usage, - unsigned geom_flags) + unsigned usage) { unsigned retval = 0; if (target >= PIPE_MAX_TEXTURE_TYPES) { diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 10b6c0cff70..f527c07adcd 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -299,14 +299,14 @@ static boolean permit_hardware_blit(struct pipe_screen *screen, res->format, res->target, res->nr_samples, - bind, 0)) + bind)) return FALSE; if (!screen->is_format_supported(screen, res->format, res->target, res->nr_samples, - PIPE_BIND_SAMPLER_VIEW, 0)) + PIPE_BIND_SAMPLER_VIEW)) return FALSE; return TRUE; diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c index 4f8b1003dfc..7c8dfdcc12a 100644 --- a/src/gallium/drivers/rbug/rbug_screen.c +++ b/src/gallium/drivers/rbug/rbug_screen.c @@ -106,8 +106,7 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags) + unsigned tex_usage) { struct rbug_screen *rb_screen = rbug_screen(_screen); struct pipe_screen *screen = rb_screen->screen; @@ -116,8 +115,7 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen, format, target, sample_count, - tex_usage, - geom_flags); + tex_usage); } static struct pipe_context * diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 8b693ba9198..48aabc18da3 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -180,8 +180,7 @@ softpipe_is_format_supported( struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned bind, - unsigned geom_flags ) + unsigned bind) { struct sw_winsys *winsys = softpipe_screen(screen)->winsys; const struct util_format_description *format_desc; diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 159758ed8bb..6c987abe056 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -342,8 +342,7 @@ svga_is_format_supported( struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags ) + unsigned tex_usage) { struct svga_winsys_screen *sws = svga_screen(screen)->sws; SVGA3dDevCapIndex index; diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index 282a0dcef82..42180c4f19e 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -158,8 +158,7 @@ trace_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags) + unsigned tex_usage) { struct trace_screen *tr_scr = trace_screen(_screen); struct pipe_screen *screen = tr_scr->screen; @@ -172,10 +171,9 @@ trace_screen_is_format_supported(struct pipe_screen *_screen, trace_dump_arg(int, target); trace_dump_arg(uint, sample_count); trace_dump_arg(uint, tex_usage); - trace_dump_arg(uint, geom_flags); result = screen->is_format_supported(screen, format, target, sample_count, - tex_usage, geom_flags); + tex_usage); trace_dump_ret(bool, result); diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 200ec67834b..a4185f23839 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -337,16 +337,6 @@ enum pipe_transfer_usage { #define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */ -/* These are intended to be used in calls to is_format_supported, but - * no driver actually uses these flags, and only the glx/xlib state - * tracker issues them. - * - * Deprecate? - */ -#define PIPE_TEXTURE_GEOM_NON_SQUARE 0x1 -#define PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO 0x2 - - /** * Flush types: */ diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 9aab5895dfe..a7845dd24d9 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -99,14 +99,12 @@ struct pipe_screen { * Check if the given pipe_format is supported as a texture or * drawing surface. * \param bindings bitmask of PIPE_BIND_* - * \param geom_flags bitmask of PIPE_TEXTURE_GEOM_* */ boolean (*is_format_supported)( struct pipe_screen *, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned bindings, - unsigned geom_flags ); + unsigned bindings ); /** * Create a new texture object, using the given template info. diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h index 9cfdc837d8e..f678ac7f733 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h @@ -299,25 +299,25 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen sampler_view |= D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON; /* TODO: do this properly when Gallium drivers actually support index/vertex format queries */ - if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_VERTEX_BUFFER, 0) - || (screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_INDEX_BUFFER, 0) + if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_VERTEX_BUFFER) + || (screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_INDEX_BUFFER) || format == PIPE_FORMAT_R8_UNORM)) support |= buffer; - if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_STREAM_OUTPUT, 0)) + if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_STREAM_OUTPUT)) support |= buffer | D3D11_FORMAT_SUPPORT_SO_BUFFER; - if(screen->is_format_supported(screen, format, PIPE_TEXTURE_1D, 0, PIPE_BIND_SAMPLER_VIEW, 0)) + if(screen->is_format_supported(screen, format, PIPE_TEXTURE_1D, 0, PIPE_BIND_SAMPLER_VIEW)) support |= D3D11_FORMAT_SUPPORT_TEXTURE1D | sampler_view; - if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW, 0)) + if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW)) support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | sampler_view; - if(screen->is_format_supported(screen, format, PIPE_TEXTURE_CUBE, 0, PIPE_BIND_SAMPLER_VIEW, 0)) + if(screen->is_format_supported(screen, format, PIPE_TEXTURE_CUBE, 0, PIPE_BIND_SAMPLER_VIEW)) support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | sampler_view; - if(screen->is_format_supported(screen, format, PIPE_TEXTURE_3D, 0, PIPE_BIND_SAMPLER_VIEW, 0)) + if(screen->is_format_supported(screen, format, PIPE_TEXTURE_3D, 0, PIPE_BIND_SAMPLER_VIEW)) support |= D3D11_FORMAT_SUPPORT_TEXTURE3D | sampler_view; - if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET, 0)) + if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET)) support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_BLENDABLE; - if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL, 0)) + if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL)) support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_DEPTH_STENCIL; - if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DISPLAY_TARGET, 0)) + if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DISPLAY_TARGET)) support |= D3D11_FORMAT_SUPPORT_DISPLAY; format_support[format] = support; } diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 69c2e7e9ec8..5931df993b0 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -81,34 +81,34 @@ dri_fill_in_modes(struct dri_screen *screen, pf_x8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24X8_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); pf_z24x8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8Z24_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); pf_a8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_RENDER_TARGET, 0); + PIPE_BIND_RENDER_TARGET); pf_x8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8X8_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_RENDER_TARGET, 0); + PIPE_BIND_RENDER_TARGET); pf_r5g6b5 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B5G6R5_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_RENDER_TARGET, 0); + PIPE_BIND_RENDER_TARGET); /* We can only get a 16 or 32 bit depth buffer with getBuffersWithFormat */ if (dri_with_format(screen->sPriv)) { pf_z16 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z16_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); pf_z32 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z32_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); } else { pf_z16 = FALSE; pf_z32 = FALSE; @@ -142,7 +142,7 @@ dri_fill_in_modes(struct dri_screen *screen, for (i = 1; i < 5; i++) { if (p_screen->is_format_supported(p_screen, PIPE_FORMAT_B5G6R5_UNORM, PIPE_TEXTURE_2D, i*2, - PIPE_BIND_RENDER_TARGET, 0)) { + PIPE_BIND_RENDER_TARGET)) { msaa_samples_array[msaa_samples_factor] = i * 2; msaa_samples_factor++; } @@ -161,7 +161,7 @@ dri_fill_in_modes(struct dri_screen *screen, for (i = 1; i < 5; i++) { if (p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM, PIPE_TEXTURE_2D, i*2, - PIPE_BIND_RENDER_TARGET, 0)) { + PIPE_BIND_RENDER_TARGET)) { msaa_samples_array[msaa_samples_factor] = i * 2; msaa_samples_factor++; } @@ -183,7 +183,7 @@ dri_fill_in_modes(struct dri_screen *screen, for (i = 1; i < 5; i++) { if (p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8X8_UNORM, PIPE_TEXTURE_2D, i*2, - PIPE_BIND_RENDER_TARGET, 0)) { + PIPE_BIND_RENDER_TARGET)) { msaa_samples_array[msaa_samples_factor] = i * 2; msaa_samples_factor++; } diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index e60a56074dd..2c7f3bde4f0 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -368,7 +368,7 @@ egl_g3d_fill_depth_stencil_formats(_EGLDisplay *dpy, /* pick the first supported format */ for (i = 0; i < n; i++) { if (screen->is_format_supported(screen, fmt[i], - PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL, 0)) { + PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL)) { formats[count++] = fmt[i]; break; } diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c index cdbb304c5ee..9863329ff40 100644 --- a/src/gallium/state_trackers/egl/drm/native_drm.c +++ b/src/gallium/state_trackers/egl/drm/native_drm.c @@ -43,7 +43,7 @@ drm_display_is_format_supported(struct native_display *ndpy, return ndpy->screen->is_format_supported(ndpy->screen, fmt, PIPE_TEXTURE_2D, 0, (is_color) ? PIPE_BIND_RENDER_TARGET : - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); } static const struct native_config ** diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c index 4a96039ac39..e2fde00e975 100644 --- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c +++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c @@ -422,7 +422,7 @@ fbdev_display_init(struct native_display *ndpy) if (fbdpy->base.screen) { if (!fbdpy->base.screen->is_format_supported(fbdpy->base.screen, fbdpy->config.color_format, PIPE_TEXTURE_2D, 0, - PIPE_BIND_RENDER_TARGET, 0)) { + PIPE_BIND_RENDER_TARGET)) { fbdpy->base.screen->destroy(fbdpy->base.screen); fbdpy->base.screen = NULL; } diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c index 3c2475f84d8..5d0045f92ee 100644 --- a/src/gallium/state_trackers/egl/gdi/native_gdi.c +++ b/src/gallium/state_trackers/egl/gdi/native_gdi.c @@ -285,7 +285,7 @@ fill_color_formats(struct native_display *ndpy, enum pipe_format formats[8]) for (i = 0; i < Elements(candidates); i++) { if (screen->is_format_supported(screen, candidates[i], - PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET, 0)) + PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET)) formats[count++] = candidates[i]; } diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c index b18c3132c57..5afca67a4d4 100644 --- a/src/gallium/state_trackers/egl/x11/native_dri2.c +++ b/src/gallium/state_trackers/egl/x11/native_dri2.c @@ -541,7 +541,7 @@ is_format_supported(struct pipe_screen *screen, { return screen->is_format_supported(screen, fmt, PIPE_TEXTURE_2D, sample_count, (is_color) ? PIPE_BIND_RENDER_TARGET : - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); } static boolean diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index aa8dbf4a4c1..7bfd2c3779d 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -376,8 +376,6 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil) { const enum pipe_texture_target target = PIPE_TEXTURE_2D; const unsigned tex_usage = PIPE_BIND_DEPTH_STENCIL; - const unsigned geom_flags = (PIPE_TEXTURE_GEOM_NON_SQUARE | - PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO); const unsigned sample_count = 0; enum pipe_format formats[8], fmt; int count, i; @@ -403,7 +401,7 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil) for (i = 0; i < count; i++) { if (xmdpy->screen->is_format_supported(xmdpy->screen, formats[i], target, sample_count, - tex_usage, geom_flags)) { + tex_usage)) { fmt = formats[i]; break; } diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c index 2c6dcb146b8..44480876b6e 100644 --- a/src/gallium/state_trackers/vega/image.c +++ b/src/gallium/state_trackers/vega/image.c @@ -257,7 +257,7 @@ struct vg_image * image_create(VGImageFormat format, image->sampler.normalized_coords = 1; assert(screen->is_format_supported(screen, pformat, PIPE_TEXTURE_2D, - 0, PIPE_BIND_SAMPLER_VIEW, 0)); + 0, PIPE_BIND_SAMPLER_VIEW)); memset(&pt, 0, sizeof(pt)); pt.target = PIPE_TEXTURE_2D; diff --git a/src/gallium/state_trackers/vega/renderer.c b/src/gallium/state_trackers/vega/renderer.c index 9de2cb1014d..5715073e2d9 100644 --- a/src/gallium/state_trackers/vega/renderer.c +++ b/src/gallium/state_trackers/vega/renderer.c @@ -140,7 +140,7 @@ static VGboolean renderer_can_support(struct renderer *renderer, struct pipe_screen *screen = renderer->pipe->screen; return screen->is_format_supported(screen, - res->format, res->target, 0, bindings, 0); + res->format, res->target, 0, bindings); } /** @@ -1463,11 +1463,11 @@ void renderer_copy_surface(struct renderer *ctx, } assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_SAMPLER_VIEW, 0)); + 0, PIPE_BIND_SAMPLER_VIEW)); assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_SAMPLER_VIEW, 0)); + 0, PIPE_BIND_SAMPLER_VIEW)); assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_RENDER_TARGET, 0)); + 0, PIPE_BIND_RENDER_TARGET)); /* * XXX for now we're always creating a temporary texture. diff --git a/src/gallium/state_trackers/vega/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c index 83b42609e03..c2ab56455b1 100644 --- a/src/gallium/state_trackers/vega/vg_context.c +++ b/src/gallium/state_trackers/vega/vg_context.c @@ -69,7 +69,7 @@ choose_depth_stencil_format(struct vg_context *ctx) for (fmt = formats; *fmt != PIPE_FORMAT_NONE; fmt++) { if (screen->is_format_supported(screen, *fmt, - PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL, 0)) + PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL)) break; } diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c b/src/gallium/state_trackers/wgl/stw_pixelformat.c index 5ede1d43220..333f50c25f6 100644 --- a/src/gallium/state_trackers/wgl/stw_pixelformat.c +++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c @@ -225,7 +225,7 @@ stw_pixelformat_init( void ) if(!screen->is_format_supported(screen, color->format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET | - PIPE_BIND_DISPLAY_TARGET, 0)) + PIPE_BIND_DISPLAY_TARGET)) continue; for(k = 0; k < Elements(stw_pf_doublebuffer); ++k) { @@ -235,7 +235,7 @@ stw_pixelformat_init( void ) const struct stw_pf_depth_info *depth = &stw_pf_depth_stencil[l]; if(!screen->is_format_supported(screen, depth->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_DEPTH_STENCIL, 0)) + 0, PIPE_BIND_DEPTH_STENCIL)) continue; stw_pixelformat_add( stw_dev, color, depth, 0, doublebuffer, samples ); diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c index 05237028205..edd988f4e09 100644 --- a/src/gallium/state_trackers/xorg/xorg_dri2.c +++ b/src/gallium/state_trackers/xorg/xorg_dri2.c @@ -452,12 +452,12 @@ xorg_dri2_init(ScreenPtr pScreen) ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24X8_UNORM, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); ms->ds_depth_bits_last = ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_TEXTURE_2D, 0, - PIPE_BIND_DEPTH_STENCIL, 0); + PIPE_BIND_DEPTH_STENCIL); return DRI2ScreenInit(pScreen, &dri2info); } diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c index 8767ab94695..2accda1525e 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@ -349,7 +349,7 @@ ExaPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg) if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format, priv->tex->target, 0, - PIPE_BIND_RENDER_TARGET, 0)) { + PIPE_BIND_RENDER_TARGET)) { XORG_FALLBACK("format %s", util_format_name(priv->tex->format)); } @@ -430,12 +430,12 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir, if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format, priv->tex->target, 0, - PIPE_BIND_RENDER_TARGET, 0)) + PIPE_BIND_RENDER_TARGET)) XORG_FALLBACK("pDst format %s", util_format_name(priv->tex->format)); if (!exa->scrn->is_format_supported(exa->scrn, src_priv->tex->format, src_priv->tex->target, 0, - PIPE_BIND_SAMPLER_VIEW, 0)) + PIPE_BIND_SAMPLER_VIEW)) XORG_FALLBACK("pSrc format %s", util_format_name(src_priv->tex->format)); exa->copy.src = src_priv; @@ -630,7 +630,7 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture, if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format, priv->tex->target, 0, - PIPE_BIND_RENDER_TARGET, 0)) + PIPE_BIND_RENDER_TARGET)) XORG_FALLBACK("pDst format: %s", util_format_name(priv->tex->format)); if (priv->picture_format != pDstPicture->format) @@ -645,7 +645,7 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture, if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format, priv->tex->target, 0, - PIPE_BIND_SAMPLER_VIEW, 0)) + PIPE_BIND_SAMPLER_VIEW)) XORG_FALLBACK("pSrc format: %s", util_format_name(priv->tex->format)); if (!picture_check_formats(priv, pSrcPicture)) @@ -662,7 +662,7 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture, if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format, priv->tex->target, 0, - PIPE_BIND_SAMPLER_VIEW, 0)) + PIPE_BIND_SAMPLER_VIEW)) XORG_FALLBACK("pMask format: %s", util_format_name(priv->tex->format)); if (!picture_check_formats(priv, pMaskPicture)) diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c index 3e82fa8fdc1..6b799af90c8 100644 --- a/src/gallium/state_trackers/xorg/xorg_renderer.c +++ b/src/gallium/state_trackers/xorg/xorg_renderer.c @@ -450,8 +450,7 @@ void renderer_copy_prepare(struct xorg_renderer *r, assert(screen->is_format_supported(screen, dst_surface->format, PIPE_TEXTURE_2D, 0, - PIPE_BIND_RENDER_TARGET, - 0)); + PIPE_BIND_RENDER_TARGET)); (void) screen; @@ -522,7 +521,7 @@ renderer_clone_texture(struct xorg_renderer *r, /* the coming in texture should already have that invariance */ debug_assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE_2D, 0, - PIPE_BIND_SAMPLER_VIEW, 0)); + PIPE_BIND_SAMPLER_VIEW)); format = src->format; |