gallium: remove the geom_flags param from is_format_supported
authorMarek Olšák <maraeo@gmail.com>
Mon, 7 Mar 2011 23:01:58 +0000 (00:01 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 11 Mar 2011 20:39:30 +0000 (21:39 +0100)
50 files changed:
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_caps.c
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/auxiliary/util/u_surface.c
src/gallium/auxiliary/util/u_vbuf_mgr.c
src/gallium/drivers/cell/ppu/cell_screen.c
src/gallium/drivers/galahad/glhd_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i965/brw_screen.c
src/gallium/drivers/identity/id_screen.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/noop/noop_pipe.c
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nvc0/nvc0_screen.c
src/gallium/drivers/nvfx/nvfx_miptree.c
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_texture.c
src/gallium/drivers/rbug/rbug_screen.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/trace/tr_screen.c
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_screen.h
src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
src/gallium/state_trackers/dri/common/dri_screen.c
src/gallium/state_trackers/egl/common/egl_g3d.c
src/gallium/state_trackers/egl/drm/native_drm.c
src/gallium/state_trackers/egl/fbdev/native_fbdev.c
src/gallium/state_trackers/egl/gdi/native_gdi.c
src/gallium/state_trackers/egl/x11/native_dri2.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/state_trackers/vega/image.c
src/gallium/state_trackers/vega/renderer.c
src/gallium/state_trackers/vega/vg_context.c
src/gallium/state_trackers/wgl/stw_pixelformat.c
src/gallium/state_trackers/xorg/xorg_dri2.c
src/gallium/state_trackers/xorg/xorg_exa.c
src/gallium/state_trackers/xorg/xorg_renderer.c
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_extensions.c
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_texture.c

index 76bd7ace52618dd5038ce17c263a91eb9cd03735..ff3baf79c2684980b581def80f6efa93eec5d065 100644 (file)
@@ -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);
index fd1c2b72d044df1d96f4d8c9385eb88d5b302a7a..bdc13b547db557c16e37d23965bb650eebf6a59d 100644 (file)
@@ -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);
index e209a98b7066d1f79c4d6838fd5e6242a3446c67..75677b2b133fd85223de9acf37190952e178f2fc 100644 (file)
@@ -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;
          }
index 2b30d555033d2e6a76db2163b8e27cd3f06f03c0..5bf0f53d084ad13eed8788cdcb7bb030a327c63f 100644 (file)
@@ -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;
    }
index 4eddd3f519e8d430c5abdb52788162ed59d14375..9caf76c802b6986524185f6f29f75494f3e0d9dd 100644 (file)
@@ -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;
       }
index 7d157c99ccc8c98e4ae8224053ce272aa5c04769..51bb4b858504f570ce82e2b672fe5b7f69887353 100644 (file)
@@ -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 *
index 8d2b4b964382c554d0750edcb4ce80007b211b5e..0ee124a24fcc75857dadeb6eabd8bc356371d91a 100644 (file)
@@ -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;
 
index 06b6b34b74ba2fbea184b3c434d3efee812ca7a8..b4edebe49207b67f987c1a57dd6c96126b4b3680 100644 (file)
@@ -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 *
index 031c9680d2ccfa4d4e0e11eae1501c00a4bce3e3..c0050bc160c7cb6b80f95fce982aae505003858c 100644 (file)
@@ -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,
index b3b88c799d9b2eaa7096f9f1b09b2ec117589c4a..25204fd088d0be557221b87686a3ec9436b96809 100644 (file)
@@ -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,
index 56e8ac014cfde166e5653b7e6ad48bfecd070a12..9bf7fd4c0eebef38bebd17105cda3631d39a1d6e 100644 (file)
@@ -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 *
index 446037c660a2d405f0ab5650cb287cba34e5d629..521a52ad3ae907a2dec5ee00e7e29f0f3e2137ef 100644 (file)
@@ -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;
index 90b6ebf36b5a6c35965156f8e52e298c6ddd481a..9bcc1e6b45ac5904508168d709517c215ae4e4a9 100644 (file)
@@ -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;
 }
index d1744a388370c9663e7939e9ec924f6cc1fa777c..7690c80eef0d62568e7d81bb30de470d538ecb5d 100644 (file)
@@ -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;
index 4ce827d33f814ae4b46a52d0604a9ada0d55ca17..675bbe0fe31d98e4829835c57e706dc462015771 100644 (file)
@@ -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;
index 8c043b867bae6b8d0a122d37b02097853dbbf4f0..1be84b90a90171315a0be7160558ef81ff157f70 100644 (file)
@@ -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;
index aa1e9567d313c8591f67e25a8244a93c97ce549a..9e6b9d6ef8fe14325c96b6003664038aeae5a117 100644 (file)
@@ -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);
 
index 6682b2bad4429a10208241e4f75babd389acce50..37b635fd120bcd6dd44237a119345dc7ff03460a 100644 (file)
@@ -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;
index 37ca2295d0a6a4c08c4b415bdac8d3363cf63fca..8a69628c53e2866ddab293855943594b63df21cf 100644 (file)
@@ -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;
index 9964bb3910209caf5ca7063c4acb7d2371d7ef14..d8e057fe5d205d538778165add1bc1cd1e5412ae 100644 (file)
@@ -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) {
index 10b6c0cff70838862095533c13b925518157d97c..f527c07adcdb548339e51af6f6afd92398644ea8 100644 (file)
@@ -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;
index 4f8b1003dfc6f3c91fc05e1c2a091ee4d840372c..7c8dfdcc12a145eb075c62784c0275bf68c84911 100644 (file)
@@ -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 *
index 8b693ba9198a35b369b602563ee201dfec389943..48aabc18da34c857c62ebdb8d2b3972d414b8505 100644 (file)
@@ -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;
index 159758ed8bb151c3bc81b8ca898cbe50382ba7b5..6c987abe0564e3c351769fa3ed0c9d48cea77ac1 100644 (file)
@@ -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;
index 282a0dcef82071550611d52c6cea0415ec31fb6b..42180c4f19e0916230f2da33eacfb8bc665ffbb3 100644 (file)
@@ -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);
 
index 200ec67834b7096ccfa748e348c95031fd9a870c..a4185f23839074bfcecab746881c001d09adda01 100644 (file)
@@ -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:
  */
index 9aab5895dfeb50a417865088f7afbc9920aed9d7..a7845dd24d9fd772d6251bebeae9b04743eed5d1 100644 (file)
@@ -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.
index 9cfdc837d8e361cc12e50db5c4bd8469d0505e5b..f678ac7f7332c151ab7397aa845e0200d2afca47 100644 (file)
@@ -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;
                }
index 69c2e7e9ec83ed35ac22ad6464436e079e7b6833..5931df993b0236100def531c56a0ee6581fed609 100644 (file)
@@ -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++;
          }
index e60a56074dd57a5dbec4945482d869495f6ad7a9..2c7f3bde4f0052ae0ec3e1d8e2af2f7d7b602a20 100644 (file)
@@ -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;
          }
index cdbb304c5eeee2ac28f5c8d11b682146f3cc79db..9863329ff4084c6559bb631dba879984acc1c415 100644 (file)
@@ -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 **
index 4a96039ac39580f58dc342c8ffe415e8db767b2a..e2fde00e975ebb98c34748d38fdecdc915e7de83 100644 (file)
@@ -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;
       }
index 3c2475f84d810fbf41441e9ec501e0b4cfaaf694..5d0045f92ee5f0e647ad519a16d7580cb368d016 100644 (file)
@@ -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];
    }
 
index b18c3132c578142ac5ec69c8d132e0fe916246d4..5afca67a4d4a5368c4b39a54089016c441ed6841 100644 (file)
@@ -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
index aa8dbf4a4c1ada66376be4d58188a83fe1ebcbed..7bfd2c3779d42886416c4ab9fb463da86181627f 100644 (file)
@@ -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;
       }
index 2c6dcb146b8c59605506497e912c5fafac3a73c0..44480876b6e7f2fb9db62687c021b6fdccd251a6 100644 (file)
@@ -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;
index 9de2cb1014dde3fcb47d7edda98283b1ac79bd5e..5715073e2d961314551c982b1ca19f841bf44b50 100644 (file)
@@ -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.
index 83b42609e03432c8fc58e6435e9d7a02f0358ede..c2ab56455b1c412828056af1593265ded0c1f01b 100644 (file)
@@ -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;
    }
 
index 5ede1d43220f9a4287f0812c3677686c46bfe2c0..333f50c25f6114bb288d10b62569b6492c095cc3 100644 (file)
@@ -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 );
index 0523702820574e5dc4f22c22724a91e5d2d8a020..edd988f4e0926f2605bdbdda1281d074199f509f 100644 (file)
@@ -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);
 }
index 8767ab9469576f6c013ae6f384312da849b16086..2accda1525e3fb1de2803d7eb91be6b1ce55dce0 100644 (file)
@@ -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))
index 3e82fa8fdc12dd160eaee335725074ab870a0118..6b799af90c8a1cc613f8a3b9a34b09da7662bdb5 100644 (file)
@@ -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;
 
index 149f1ca445040526ed68212527f0a687f398f704..49b196032b9b4318da07417b0990696fc492b5f0 100644 (file)
@@ -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 {
index c2b4e1808f55bba1e7e5f69d66a81a8cc2cf0d3b..013446659a8700c35da73f277f3e2fb4702c51f6 100644 (file)
@@ -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 {
index 27b8a06de57044294a563db25e3c507a03008dce..0df04287ae6b23e4792c293f9aaac9ae0efef830 100644 (file)
@@ -485,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);
 }
 
 
index 3f98ffd3d6f503315144e78d7154e62800da4573..9e00fcf18b0e72967154fcf7686280833c682aab 100644 (file)
@@ -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;
index aaa1658f4a0b712c6b9e63fb89a8f088e6e97f48..e34f90f41e16ba1a67309e983c08e42fe80b4897 100644 (file)
@@ -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;
    }
 
index 6b89bae7d16f0ef5704be498de56b49000fb754b..03655ee048394aa40ffbd5bb43cadc13a86185a5 100644 (file)
@@ -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;
 
index 899161e78ffb72f613e8270a460f30f5b94f2f97..aea69c1b434fa02523fa7062c3a81327f95de73f 100644 (file)
@@ -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;
    }
 
index 1e0a8323ab830cd5d9c2bc427f6dd2fa3dc6793c..ffe7e256a56163363605440edfae5f7d68169e16 100644 (file)
@@ -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;