gallium: remove pipe_surface::usage
authorMarek Olšák <maraeo@gmail.com>
Sat, 8 Dec 2012 14:37:17 +0000 (15:37 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 12 Dec 2012 12:09:54 +0000 (13:09 +0100)
Not really used by anybody now.

Reviewed-by: Brian Paul <brianp@vmware.com>
62 files changed:
src/gallium/auxiliary/postprocess/pp_init.c
src/gallium/auxiliary/postprocess/pp_program.c
src/gallium/auxiliary/postprocess/pp_run.c
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_debug.c
src/gallium/auxiliary/util/u_dump_state.c
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/auxiliary/util/u_inlines.h
src/gallium/auxiliary/util/u_surface.c
src/gallium/auxiliary/util/u_surface.h
src/gallium/auxiliary/util/u_surfaces.c
src/gallium/auxiliary/util/u_surfaces.h
src/gallium/auxiliary/vl/vl_idct.c
src/gallium/auxiliary/vl/vl_video_buffer.c
src/gallium/drivers/i915/i915_surface.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/noop/noop_state.c
src/gallium/drivers/nouveau/nouveau_video.c
src/gallium/drivers/nv30/nv30_miptree.c
src/gallium/drivers/nv50/nv50_miptree.c
src/gallium/drivers/nv50/nv50_resource.c
src/gallium/drivers/nv50/nv50_surface.c
src/gallium/drivers/nvc0/nvc0_surface.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r600/evergreen_compute_internal.c
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/r600/r600_texture.c
src/gallium/drivers/radeonsi/r600_blit.c
src/gallium/drivers/radeonsi/r600_texture.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/svga/svga_surface.c
src/gallium/drivers/trace/tr_dump_state.c
src/gallium/include/pipe/p_state.h
src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
src/gallium/state_trackers/vdpau/output.c
src/gallium/state_trackers/vdpau/presentation.c
src/gallium/state_trackers/vega/image.c
src/gallium/state_trackers/vega/mask.c
src/gallium/state_trackers/vega/renderer.c
src/gallium/state_trackers/vega/vg_context.c
src/gallium/state_trackers/vega/vg_manager.c
src/gallium/state_trackers/xa/xa_context.c
src/gallium/state_trackers/xorg/xorg_exa.c
src/gallium/state_trackers/xvmc/surface.c
src/gallium/tests/graw/clear.c
src/gallium/tests/graw/fs-test.c
src/gallium/tests/graw/graw_util.h
src/gallium/tests/graw/gs-test.c
src/gallium/tests/graw/quad-sample.c
src/gallium/tests/graw/shader-leak.c
src/gallium/tests/graw/tri-gs.c
src/gallium/tests/graw/tri-instanced.c
src/gallium/tests/graw/vs-test.c
src/gallium/tests/trivial/quad-tex.c
src/gallium/tests/trivial/tri.c
src/mesa/state_tracker/st_atom_framebuffer.c
src/mesa/state_tracker/st_cb_eglimage.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_manager.c
src/mesa/state_tracker/st_manager.h

index e059be6e9bc84f3b0171097fc83beaff05689116..d9552736f00f8652dc17c8286416d0ed113ab93a 100644 (file)
@@ -213,7 +213,7 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w,
    tmp_res.depth0 = 1;
    tmp_res.array_size = 1;
    tmp_res.last_level = 0;
-   tmp_res.bind = p->surf.usage = PIPE_BIND_RENDER_TARGET;
+   tmp_res.bind = PIPE_BIND_RENDER_TARGET;
 
    if (!p->screen->is_format_supported(p->screen, tmp_res.format,
                                        tmp_res.target, 1, tmp_res.bind))
@@ -237,7 +237,7 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w,
          goto error;
    }
 
-   tmp_res.bind = p->surf.usage = PIPE_BIND_DEPTH_STENCIL;
+   tmp_res.bind = PIPE_BIND_DEPTH_STENCIL;
 
    tmp_res.format = p->surf.format = PIPE_FORMAT_S8_UINT_Z24_UNORM;
 
index c25078df6f1df8baa86294b67caa0abf38e9b2b3..7044e3453df3c6cede5790635966a66c1fbc5c44 100644 (file)
@@ -133,7 +133,6 @@ pp_init_prog(struct pp_queue_t *ppq, struct pipe_context *pipe,
 
    p->framebuffer.nr_cbufs = 1;
 
-   p->surf.usage = PIPE_BIND_RENDER_TARGET;
    p->surf.format = PIPE_FORMAT_B8G8R8A8_UNORM;
 
    return p;
index 112458f384edaefdee4c9ab8476837fd294b494b..0bed547bd445ac327ce88b8b4a065197bb3875e2 100644 (file)
@@ -166,7 +166,6 @@ void
 pp_filter_setup_out(struct program *p, struct pipe_resource *out)
 {
    p->surf.format = out->format;
-   p->surf.usage = PIPE_BIND_RENDER_TARGET;
 
    p->framebuffer.cbufs[0] = p->pipe->create_surface(p->pipe, out, &p->surf);
 }
index e7baf3af767632c3fb213455293af9dad45534f2..49f01dec1bac90494e98890a40ddfb0535542344 100644 (file)
@@ -1083,12 +1083,6 @@ void util_blitter_default_dst_texture(struct pipe_surface *dst_templ,
                                       const struct pipe_box *srcbox)
 {
     memset(dst_templ, 0, sizeof(*dst_templ));
-    dst_templ->format = dst->format;
-    if (util_format_is_depth_or_stencil(dst->format)) {
-       dst_templ->usage = PIPE_BIND_DEPTH_STENCIL;
-    } else {
-       dst_templ->usage = PIPE_BIND_RENDER_TARGET;
-    }
     dst_templ->format = util_format_linear(dst->format);
     dst_templ->u.tex.level = dstlevel;
     dst_templ->u.tex.first_layer = dstz;
@@ -1743,7 +1737,6 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter,
    surf_tmpl.u.tex.level = dst_level;
    surf_tmpl.u.tex.first_layer = dst_layer;
    surf_tmpl.u.tex.last_layer = dst_layer;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
 
    dstsurf = pipe->create_surface(pipe, dst, &surf_tmpl);
 
index ee97b7adb81ad8e1e20b676c437c1b597c0be597..ce472b0204ed1471e0cfabf5e5e28f8385ff5aa7 100644 (file)
@@ -537,8 +537,7 @@ void debug_dump_texture(struct pipe_context *pipe,
       return;
 
    /* XXX for now, just dump image for layer=0, level=0 */
-   memset(&surf_tmpl, 0, sizeof(surf_tmpl));
-   u_surface_default_template(&surf_tmpl, texture, 0 /* no bind flag - not a surface */);
+   u_surface_default_template(&surf_tmpl, texture);
    surface = pipe->create_surface(pipe, texture, &surf_tmpl);
    if (surface) {
       debug_dump_surface(pipe, prefix, surface);
index f5d8b437399f55629f9f2981b3c87b540db540dd..09faffe73f391488e3bdec2aa31b2d7f85d559fc 100644 (file)
@@ -661,8 +661,6 @@ util_dump_surface(FILE *stream, const struct pipe_surface *state)
    util_dump_member(stream, uint, state, width);
    util_dump_member(stream, uint, state, height);
 
-   util_dump_member(stream, uint, state, usage);
-
    util_dump_member(stream, ptr, state, texture);
    util_dump_member(stream, uint, state, u.tex.level);
    util_dump_member(stream, uint, state, u.tex.first_layer);
index 90588a022df4b1a5dd3c2b63aa635a0b21013d97..e1f18f39c057b0c73d1824d61dc77bcbfb49190f 100644 (file)
@@ -1617,10 +1617,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
         } else
             layer = face;
 
-         memset(&surf_templ, 0, sizeof(surf_templ));
-         u_surface_default_template(&surf_templ, pt,
-                                    is_depth ? PIPE_BIND_DEPTH_STENCIL :
-                                               PIPE_BIND_RENDER_TARGET);
+         u_surface_default_template(&surf_templ, pt);
          surf_templ.u.tex.level = dstLevel;
          surf_templ.u.tex.first_layer = layer;
          surf_templ.u.tex.last_layer = layer;
index 469f95461faffcb71adca91fd152ba0a1a45995b..582aacdca1e4a2851be4dc464d6fb4a2a2826605 100644 (file)
@@ -188,14 +188,12 @@ pipe_so_target_reference(struct pipe_stream_output_target **ptr,
 
 static INLINE void
 pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
-                   struct pipe_resource *pt, unsigned level, unsigned layer,
-                   unsigned flags)
+                   struct pipe_resource *pt, unsigned level, unsigned layer)
 {
    pipe_resource_reference(&ps->texture, pt);
    ps->format = pt->format;
    ps->width = u_minify(pt->width0, level);
    ps->height = u_minify(pt->height0, level);
-   ps->usage = flags;
    ps->u.tex.level = level;
    ps->u.tex.first_layer = ps->u.tex.last_layer = layer;
    ps->context = ctx;
@@ -203,12 +201,11 @@ pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
 
 static INLINE void
 pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
-                  struct pipe_resource *pt, unsigned level, unsigned layer,
-                  unsigned flags)
+                  struct pipe_resource *pt, unsigned level, unsigned layer)
 {
    ps->texture = 0;
    pipe_reference_init(&ps->reference, 1);
-   pipe_surface_reset(ctx, ps, pt, level, layer, flags);
+   pipe_surface_reset(ctx, ps, pt, level, layer);
 }
 
 /* Return true if the surfaces are equal. */
index bef002902adf69748ed91fea5fdad5707db8eedd..5e771c95095e2768f0f5cb2f8d40e5f736431c6a 100644 (file)
  */
 void
 u_surface_default_template(struct pipe_surface *surf,
-                           const struct pipe_resource *texture,
-                           unsigned bind)
+                           const struct pipe_resource *texture)
 {
    memset(surf, 0, sizeof(*surf));
 
    surf->format = texture->format;
-   /* XXX should filter out all non-rt/ds bind flags ? */
-   surf->usage = bind;
 }
 
 /**
@@ -110,7 +107,7 @@ util_create_rgba_texture(struct pipe_context *pipe,
       return FALSE;
 
    /* create surface */
-   u_surface_default_template(&surf_templ, *textureOut, bind);
+   u_surface_default_template(&surf_templ, *textureOut);
    return TRUE;
 }
 
index a39f677bdfc77725f59eb0aaa69e6fbffdece812..fe950c818e33e489da3b5e8ed2a6edd75ac9728f 100644 (file)
@@ -42,8 +42,7 @@ extern "C" {
 
 extern void
 u_surface_default_template(struct pipe_surface *view,
-                           const struct pipe_resource *texture,
-                           unsigned bind);
+                           const struct pipe_resource *texture);
 
 extern boolean
 util_create_rgba_texture(struct pipe_context *ctx,
index b0cfec2a8260867d2f278e78a9b95d24f71e62e6..c2f2b74c939d8d752a3351e23df40a5806e32c99 100644 (file)
@@ -32,7 +32,7 @@
 boolean
 util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
                      struct pipe_context *ctx, struct pipe_resource *pt,
-                     unsigned level, unsigned layer, unsigned flags,
+                     unsigned level, unsigned layer,
                      struct pipe_surface **res)
 {
    struct pipe_surface *ps;
@@ -65,7 +65,7 @@ util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
       return FALSE;
    }
 
-   pipe_surface_init(ctx, ps, pt, level, layer, flags);
+   pipe_surface_init(ctx, ps, pt, level, layer);
 
    if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)
       cso_hash_insert(us->u.hash, (layer << 8) | level, ps);
index 9581feda7c814f00e46477040f8c49f1eb2924ee..1605215cb887ee50ee794b5ef7c089be72708753 100644 (file)
@@ -46,14 +46,14 @@ struct util_surfaces
 boolean
 util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
                      struct pipe_context *ctx, struct pipe_resource *pt,
-                     unsigned level, unsigned layer, unsigned flags,
+                     unsigned level, unsigned layer,
                      struct pipe_surface **res);
 
 /* fast inline path for the very common case */
 static INLINE boolean
 util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size,
                   struct pipe_context *ctx, struct pipe_resource *pt,
-                  unsigned level, unsigned layer, unsigned flags,
+                  unsigned level, unsigned layer,
                   struct pipe_surface **res)
 {
    if(likely((pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT) && us->u.array))
@@ -67,7 +67,7 @@ util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size,
       }
    }
 
-   return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, flags, res);
+   return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, res);
 }
 
 static INLINE struct pipe_surface *
index 5adc72f7db6601c805df92114eaf06a36071a08b..a0c243f809ae2bef109ca388d9f866f2266354f0 100644 (file)
@@ -603,7 +603,6 @@ init_source(struct vl_idct *idct, struct vl_idct_buffer *buffer)
    surf_templ.format = tex->format;
    surf_templ.u.tex.first_layer = 0;
    surf_templ.u.tex.last_layer = 0;
-   surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
    buffer->fb_state_mismatch.cbufs[0] = idct->pipe->create_surface(idct->pipe, tex, &surf_templ);
 
    buffer->viewport_mismatch.scale[0] = tex->width0;
@@ -643,7 +642,6 @@ init_intermediate(struct vl_idct *idct, struct vl_idct_buffer *buffer)
       surf_templ.format = tex->format;
       surf_templ.u.tex.first_layer = i;
       surf_templ.u.tex.last_layer = i;
-      surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
       buffer->fb_state.cbufs[i] = idct->pipe->create_surface(
          idct->pipe, tex, &surf_templ);
 
index 82d7386e64486f522b44dbfd9730bf39a6fb0d41..511485f75d6b87f7d798be76119b8561c9122c36 100644 (file)
@@ -368,7 +368,6 @@ vl_video_buffer_surfaces(struct pipe_video_buffer *buffer)
          if (!buf->surfaces[surf]) {
             memset(&surf_templ, 0, sizeof(surf_templ));
             surf_templ.format = vl_video_buffer_surface_format(buf->resources[j]->format);
-            surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
             surf_templ.u.tex.first_layer = surf_templ.u.tex.last_layer = i;
             buf->surfaces[surf] = pipe->create_surface(pipe, buf->resources[j], &surf_templ);
             if (!buf->surfaces[surf])
index 08a6f343922dc1410776c525f0ae86226381733a..b8eef89ecd4a0aa10d500bfa48b7e7b40099faac 100644 (file)
@@ -332,7 +332,6 @@ i915_create_surface(struct pipe_context *ctx,
       ps->u.tex.level = surf_tmpl->u.tex.level;
       ps->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
       ps->u.tex.last_layer = surf_tmpl->u.tex.last_layer;
-      ps->usage = surf_tmpl->usage;
       ps->context = ctx;
    }
    return ps;
index 31ea7dca50e43fa8ae4ed38687c30605c8614f27..2e9c6bfe1cacbe1a97970f3f3352c741c3c2163a 100644 (file)
@@ -602,7 +602,6 @@ llvmpipe_create_surface(struct pipe_context *pipe,
       ps->format = surf_tmpl->format;
       ps->width = u_minify(pt->width0, surf_tmpl->u.tex.level);
       ps->height = u_minify(pt->height0, surf_tmpl->u.tex.level);
-      ps->usage = surf_tmpl->usage;
 
       ps->u.tex.level = surf_tmpl->u.tex.level;
       ps->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
index 16ce9b457d9c605e1a5da47af360dea368412ad9..f56ff597c6c242949b23e1eb42028dc29895763f 100644 (file)
@@ -116,7 +116,6 @@ static struct pipe_surface *noop_create_surface(struct pipe_context *ctx,
        surface->format = surf_tmpl->format;
        surface->width = texture->width0;
        surface->height = texture->height0;
-       surface->usage = surf_tmpl->usage;
        surface->texture = texture;
        surface->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
        surface->u.tex.last_layer = surf_tmpl->u.tex.last_layer;
index bd8f0961bc4f39bc2065af3a65c64866f7f3a0e2..eeaabab4aea292abfdbea840b79642af8ed0391c 100644 (file)
@@ -744,7 +744,6 @@ nouveau_video_buffer_surfaces(struct pipe_video_buffer *buffer)
       if (!buf->surfaces[i]) {
          memset(&surf_templ, 0, sizeof(surf_templ));
          surf_templ.format = buf->resources[i]->format;
-         surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
          buf->surfaces[i] = pipe->create_surface(pipe, buf->resources[i], &surf_templ);
          if (!buf->surfaces[i])
             goto error;
index 5d941ab771eb88ac9f0093a857491a29bba89cdd..d4dcacb85069fe14d6d9b084d6510ea8736e830a 100644 (file)
@@ -460,7 +460,6 @@ nv30_miptree_surface_new(struct pipe_context *pipe,
    pipe_resource_reference(&ps->texture, pt);
    ps->context = pipe;
    ps->format = tmpl->format;
-   ps->usage = tmpl->usage;
    ps->u.tex.level = tmpl->u.tex.level;
    ps->u.tex.first_layer = tmpl->u.tex.first_layer;
    ps->u.tex.last_layer = tmpl->u.tex.last_layer;
index 568526c5933f830ec10405e11cd5cfe84218ef3b..fc9d7f360d0c0499e156bc7e9f8d94f2c2beb009 100644 (file)
@@ -378,7 +378,6 @@ nv50_surface_from_miptree(struct nv50_miptree *mt,
    pipe_resource_reference(&ps->texture, &mt->base.base);
 
    ps->format = templ->format;
-   ps->usage = templ->usage;
    ps->u.tex.level = templ->u.tex.level;
    ps->u.tex.first_layer = templ->u.tex.first_layer;
    ps->u.tex.last_layer = templ->u.tex.last_layer;
index 42fefa61efcdc387e3addcffd05b27b2e511fc23..d5c330decc4039bd58cd3a5ea47b11ef2636702a 100644 (file)
@@ -43,7 +43,6 @@ nv50_surface_from_buffer(struct pipe_context *pipe,
    pipe_resource_reference(&sf->base.texture, pbuf);
 
    sf->base.format = templ->format;
-   sf->base.usage = templ->usage;
    sf->base.u.buf.first_element = templ->u.buf.first_element;
    sf->base.u.buf.last_element = templ->u.buf.last_element;
 
index d9722a86b296b7fde81eb42f9ab84ae56231d592..b02550f437be0b2d8ad6ace95bad31ab8d02a4bd 100644 (file)
@@ -697,7 +697,6 @@ nv50_blit_set_dst(struct nv50_blitctx *ctx,
    else
       templ.format = format;
 
-   templ.usage = PIPE_USAGE_STREAM;
    templ.u.tex.level = level;
    templ.u.tex.first_layer = templ.u.tex.last_layer = layer;
 
index dbd4fa3b7942dbca6ae3e320e5af76cd7980fda2..2f81cf5c61ecc35ca4acb200090c348bc57791cb 100644 (file)
@@ -573,7 +573,6 @@ nvc0_blit_set_dst(struct nvc0_blitctx *ctx,
    else
       templ.format = format;
 
-   templ.usage = PIPE_USAGE_STREAM;
    templ.u.tex.level = level;
    templ.u.tex.first_layer = templ.u.tex.last_layer = layer;
 
index c16bb03e702171e221e48ba04902781899d4413c..6197cf719ef6335071458abf1e017d31fd6ae7e6 100644 (file)
@@ -1109,7 +1109,6 @@ struct pipe_surface* r300_create_surface_custom(struct pipe_context * ctx,
         surface->base.format = surf_tmpl->format;
         surface->base.width = u_minify(width0_override, level);
         surface->base.height = u_minify(height0_override, level);
-        surface->base.usage = surf_tmpl->usage;
         surface->base.u.tex.level = level;
         surface->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
         surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
index 7bc7fb43f6c37934836c032dd0b6a4a50cbb97ae..cbf662285185da072a51aa98d0a9ba18148ce186 100644 (file)
@@ -272,7 +272,6 @@ void evergreen_set_rat(
 
        /* Create the RAT surface */
        memset(&rat_templ, 0, sizeof(rat_templ));
-       rat_templ.usage = RADEON_USAGE_READWRITE;
        rat_templ.format = PIPE_FORMAT_R32_UINT;
        rat_templ.u.tex.level = 0;
        rat_templ.u.tex.first_layer = 0;
index e39f4bd9cd1bf4d54af0b2dae8d39182e55e24f4..f702f7bd4f048a70095022d527d2a5e617810137 100644 (file)
@@ -182,7 +182,6 @@ void r600_blit_decompress_depth(struct pipe_context *ctx,
                                surf_tmpl.u.tex.level = level;
                                surf_tmpl.u.tex.first_layer = layer;
                                surf_tmpl.u.tex.last_layer = layer;
-                               surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
 
                                zsurf = ctx->create_surface(ctx, &texture->resource.b.b, &surf_tmpl);
 
@@ -190,7 +189,6 @@ void r600_blit_decompress_depth(struct pipe_context *ctx,
                                surf_tmpl.u.tex.level = level;
                                surf_tmpl.u.tex.first_layer = layer;
                                surf_tmpl.u.tex.last_layer = layer;
-                               surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
                                cbsurf = ctx->create_surface(ctx,
                                                &flushed_depth_texture->resource.b.b, &surf_tmpl);
 
@@ -231,7 +229,6 @@ static void r600_blit_decompress_depth_in_place(struct r600_context *rctx,
        rctx->db_misc_state.atom.dirty = true;
 
        surf_tmpl.format = texture->resource.b.b.format;
-       surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
 
        for (level = first_level; level <= last_level; level++) {
                if (!(texture->dirty_level_mask & (1 << level)))
@@ -348,7 +345,6 @@ static void r600_blit_decompress_color(struct pipe_context *ctx,
                        surf_tmpl.u.tex.level = level;
                        surf_tmpl.u.tex.first_layer = layer;
                        surf_tmpl.u.tex.last_layer = layer;
-                       surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
                        cbsurf = ctx->create_surface(ctx, &rtex->resource.b.b, &surf_tmpl);
 
                        r600_blitter_begin(ctx, R600_DECOMPRESS);
index d6d1b3daff621cebe6435dd7cf6ffd5ef6ddff40..efff2c3629729867496288f89d961af300fb321d 100644 (file)
@@ -567,7 +567,6 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
        surface->base.format = templ->format;
        surface->base.width = width;
        surface->base.height = height;
-       surface->base.usage = templ->usage;
        surface->base.u = templ->u;
        return &surface->base;
 }
index 30736fcf8a73acefac51fe642e53cbab97a0adf7..40967d64ea51600b9975406dfaa18d3625aa30e0 100644 (file)
@@ -133,12 +133,10 @@ void si_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_tex
                        surf_tmpl.u.tex.level = level;
                        surf_tmpl.u.tex.first_layer = layer;
                        surf_tmpl.u.tex.last_layer = layer;
-                       surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
 
                        zsurf = ctx->create_surface(ctx, &texture->resource.b.b, &surf_tmpl);
 
                        surf_tmpl.format = texture->flushed_depth_texture->real_format;
-                       surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
                        cbsurf = ctx->create_surface(ctx,
                                        (struct pipe_resource*)texture->flushed_depth_texture, &surf_tmpl);
 
index 676f4a9780a60bc53327dead852e49ba91a7ee63..fdfc8f3fa28e5866add4442d80f0dd86b9846273 100644 (file)
@@ -562,7 +562,6 @@ static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
        surface->base.format = surf_tmpl->format;
        surface->base.width = rtex->surface.level[level].npix_x;
        surface->base.height = rtex->surface.level[level].npix_y;
-       surface->base.usage = surf_tmpl->usage;
        surface->base.texture = texture;
        surface->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
        surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
index 9c31daa63f37b443c54f431592b35c7348d118d6..0d1481af23fd6def13ef56eb8b19d9123239d43c 100644 (file)
@@ -296,7 +296,6 @@ softpipe_create_surface(struct pipe_context *pipe,
       ps->format = surf_tmpl->format;
       ps->width = u_minify(pt->width0, level);
       ps->height = u_minify(pt->height0, level);
-      ps->usage = surf_tmpl->usage;
 
       ps->u.tex.level = level;
       ps->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
index d3c228bf57d31bace912f4457c9fad8ddfb46347..f5619561269bcb6bc165014865f0d64cb711d732 100644 (file)
@@ -216,7 +216,6 @@ svga_create_surface(struct pipe_context *pipe,
    s->base.format = surf_tmpl->format;
    s->base.width = u_minify(pt->width0, surf_tmpl->u.tex.level);
    s->base.height = u_minify(pt->height0, surf_tmpl->u.tex.level);
-   s->base.usage = surf_tmpl->usage;
    s->base.u.tex.level = surf_tmpl->u.tex.level;
    s->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
    s->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
index 4cc25d24477c5942799d2840a0003b00d187e0e3..006082b74706d09c6b2fcb96e86e2101d5a1b8dc 100644 (file)
@@ -544,8 +544,6 @@ void trace_dump_surface_template(const struct pipe_surface *state,
    trace_dump_member(uint, state, width);
    trace_dump_member(uint, state, height);
 
-   trace_dump_member(uint, state, usage);
-
    trace_dump_member_begin("u");
    trace_dump_struct_begin(""); /* anonymous */
    if (target == PIPE_BUFFER) {
index f84bfd79d6a88dc9c908bfd0db25f4bcc2a8d54d..ab49cabb80098b8587562a0b68ae322315b12d6a 100644 (file)
@@ -335,7 +335,6 @@ struct pipe_surface
    unsigned width;               /**< logical width in pixels */
    unsigned height;              /**< logical height in pixels */
 
-   unsigned usage;               /**< bitmask of PIPE_BIND_x */
    unsigned writable:1;          /**< writable shader resource */
 
    union {
index 54447814c5c90b03c195969b8806107d746e4ada..dc63fb907045e7d6ee81f6dcc0aaac4f4ae9b872 100644 (file)
@@ -1167,7 +1167,6 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX
 
                        if(!formats_compatible || src->width0 != dst_w || src->height0 != dst_h) {
                                struct pipe_surface templat;
-                               templat.usage = PIPE_BIND_RENDER_TARGET;
                                templat.format = dst->format;
                                templat.u.tex.level = 0;
                                templat.u.tex.first_layer = 0;
index 31e59bf38b116695c9130645d320bc320ace74fb..2c06185594fec5d9a8de0197e625d8ee4b7b2c2f 100644 (file)
@@ -1226,7 +1226,6 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen
                templat.format = (desc->Format == DXGI_FORMAT_UNKNOWN) ? resource->format : dxgi_to_pipe_format[desc->Format];
                if(!templat.format)
                        return E_NOTIMPL;
-               templat.usage = PIPE_BIND_RENDER_TARGET;
                templat.texture = ((GalliumD3D11Resource<>*)iresource)->resource;
 
                switch(desc->ViewDimension)
@@ -1316,7 +1315,6 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen
                templat.format = (desc->Format == DXGI_FORMAT_UNKNOWN) ? resource->format : dxgi_to_pipe_format[desc->Format];
                if(!templat.format)
                        return E_NOTIMPL;
-               templat.usage = PIPE_BIND_DEPTH_STENCIL;
                templat.texture = ((GalliumD3D11Resource<>*)iresource)->resource;
 
                switch(desc->ViewDimension)
index dd3c1a834bba84c371cdfb7f3239038305019f64..a835126119909d63121fb937743942b9e14b66f5 100644 (file)
@@ -100,7 +100,6 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
 
    memset(&surf_templ, 0, sizeof(surf_templ));
    surf_templ.format = res->format;
-   surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
    vlsurface->surface = pipe->create_surface(pipe, res, &surf_templ);
    if (!vlsurface->surface) {
       pipe_resource_reference(&res, NULL);
index 51a702eefde391c1ebe5c44f99f18ac87b760c46..349654d06257b5bc3db9f7292395db428fd1a311 100644 (file)
@@ -236,7 +236,6 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
 
    memset(&surf_templ, 0, sizeof(surf_templ));
    surf_templ.format = tex->format;
-   surf_templ.usage = PIPE_BIND_RENDER_TARGET;
    surf_draw = pipe->create_surface(pipe, tex, &surf_templ);
 
    surf->timestamp = (vlVdpTime)earliest_presentation_time;
index 74a84e0a81dc91c4dd19b68820467d11544bc5bf..4434550c629bf9e4a01369a4f784ac8a108f005c 100644 (file)
@@ -139,7 +139,7 @@ static void vg_copy_texture(struct vg_context *ctx,
       struct pipe_surface *surf, surf_tmpl;
 
       /* get the destination surface */
-      u_surface_default_template(&surf_tmpl, dst, PIPE_BIND_RENDER_TARGET);
+      u_surface_default_template(&surf_tmpl, dst);
       surf = ctx->pipe->create_surface(ctx->pipe, dst, &surf_tmpl);
       if (surf && renderer_copy_begin(ctx->renderer, surf, VG_TRUE, src)) {
          renderer_copy(ctx->renderer,
@@ -570,9 +570,7 @@ void image_set_pixels(VGint dx, VGint dy,
    struct pipe_surface *surf, surf_tmpl;
    struct st_renderbuffer *strb = ctx->draw_buffer->strb;
 
-   memset(&surf_tmpl, 0, sizeof(surf_tmpl));
-   u_surface_default_template(&surf_tmpl, image_texture(src),
-                              0 /* no bind flag - not a surface*/);
+   u_surface_default_template(&surf_tmpl, image_texture(src));
    surf = pipe->create_surface(pipe, image_texture(src), &surf_tmpl);
 
    vg_copy_surface(ctx, strb->surface, dx, dy,
@@ -593,9 +591,7 @@ void image_get_pixels(struct vg_image *dst, VGint dx, VGint dy,
    /* flip the y coordinates */
    /*dy = dst->height - dy - height;*/
 
-   memset(&surf_tmpl, 0, sizeof(surf_tmpl));
-   u_surface_default_template(&surf_tmpl, image_texture(dst),
-                              PIPE_BIND_RENDER_TARGET);
+   u_surface_default_template(&surf_tmpl, image_texture(dst));
    surf = pipe->create_surface(pipe, image_texture(dst), &surf_tmpl);
 
    vg_copy_surface(ctx, surf, dst->x + dx, dst->y + dy,
index 89bff6ede1b35bd5389719148525fb5d18eef0a4..e46bbdd768addb7b5a6a9100320207ba4cf06662 100644 (file)
@@ -398,8 +398,7 @@ void mask_copy(struct vg_mask_layer *layer,
    struct pipe_surface *surf, surf_tmpl;
 
    /* get the destination surface */
-   u_surface_default_template(&surf_tmpl, layer->sampler_view->texture,
-                              PIPE_BIND_RENDER_TARGET);
+   u_surface_default_template(&surf_tmpl, layer->sampler_view->texture);
    surf = ctx->pipe->create_surface(ctx->pipe, layer->sampler_view->texture,
                                     &surf_tmpl);
    if (surf && renderer_copy_begin(ctx->renderer, surf, VG_FALSE, src)) {
@@ -425,8 +424,7 @@ static void mask_layer_render_to(struct vg_mask_layer *layer,
    struct pipe_sampler_view *view = vg_get_surface_mask(ctx);
    struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix;
    struct pipe_surface *surf, surf_tmpl;
-   u_surface_default_template(&surf_tmpl, view->texture,
-                              PIPE_BIND_RENDER_TARGET);
+   u_surface_default_template(&surf_tmpl, view->texture);
    surf = pipe->create_surface(pipe, view->texture, &surf_tmpl);
 
    renderer_validate_for_mask_rendering(ctx->renderer, surf, mat);
index 9faf54f411d80a017dbe27e3a9c43c94e06182d6..11d3b5a0779b04739598070017a092ffb914389e 100644 (file)
@@ -870,8 +870,7 @@ VGboolean renderer_filter_begin(struct renderer *renderer,
    if (!renderer_can_support(renderer, dst, PIPE_BIND_RENDER_TARGET))
       return VG_FALSE;
 
-   u_surface_default_template(&surf_tmpl, dst,
-                              PIPE_BIND_RENDER_TARGET);
+   u_surface_default_template(&surf_tmpl, dst);
    surf = renderer->pipe->create_surface(renderer->pipe, dst, &surf_tmpl);
    if (!surf)
       return VG_FALSE;
index ca4ec7f82bafefc0c8d02e2f1777960aa65eb2d5..c63618816835143e79ea9bc9d958edea200954ff 100644 (file)
@@ -377,9 +377,7 @@ vg_context_update_depth_stencil_rb(struct vg_context * ctx,
    if (!dsrb->texture)
       return TRUE;
 
-   memset(&surf_tmpl, 0, sizeof(surf_tmpl));
-   u_surface_default_template(&surf_tmpl, dsrb->texture,
-                              PIPE_BIND_DEPTH_STENCIL);
+   u_surface_default_template(&surf_tmpl, dsrb->texture);
    dsrb->surface = pipe->create_surface(pipe,
                                         dsrb->texture,
                                         &surf_tmpl);
@@ -450,9 +448,7 @@ static void vg_prepare_blend_texture(struct vg_context *ctx,
 
    vg_context_update_blend_texture_view(ctx, stfb->width, stfb->height);
 
-   memset(&surf_tmpl, 0, sizeof(surf_tmpl));
-   u_surface_default_template(&surf_tmpl, stfb->blend_texture_view->texture,
-                              PIPE_BIND_RENDER_TARGET);
+   u_surface_default_template(&surf_tmpl, stfb->blend_texture_view->texture);
    surf = ctx->pipe->create_surface(ctx->pipe,
                                     stfb->blend_texture_view->texture,
                                     &surf_tmpl);
index e9c4a832a58d41601ac915d383d7696fe0f0ae1b..c8531f8b53a2008fcbec74cc651580f0b782cdd9 100644 (file)
@@ -61,9 +61,7 @@ vg_context_update_color_rb(struct vg_context *ctx, struct pipe_resource *pt)
 
    strb->texture = pt;
 
-   memset(&surf_tmpl, 0, sizeof(surf_tmpl));
-   u_surface_default_template(&surf_tmpl, strb->texture,
-                              PIPE_BIND_RENDER_TARGET);
+   u_surface_default_template(&surf_tmpl, strb->texture);
    strb->surface = pipe->create_surface(pipe, strb->texture, &surf_tmpl);
 
    if (!strb->surface) {
index 93dae137ba193bbf35cd552579196f8ece8ac7d2..7b7a90343df99066bc3c42a6e1c46c33cef9b035 100644 (file)
@@ -182,8 +182,7 @@ xa_ctx_srf_create(struct xa_context *ctx, struct xa_surface *dst)
                                     PIPE_BIND_RENDER_TARGET))
        return -XA_ERR_INVAL;
 
-    u_surface_default_template(&srf_templ, dst->tex,
-                              PIPE_BIND_RENDER_TARGET);
+    u_surface_default_template(&srf_templ, dst->tex);
     ctx->srf = ctx->pipe->create_surface(ctx->pipe, dst->tex, &srf_templ);
     if (!ctx->srf)
        return -XA_ERR_NORES;
index c8f20acdec7c7428adf4638168eaf85664fd0edc..d78ab74aeef4ad4121079f88861a08488234b056 100644 (file)
@@ -1062,9 +1062,7 @@ struct pipe_surface *
 xorg_gpu_surface(struct pipe_context *pipe, struct exa_pixmap_priv *priv)
 {
    struct pipe_surface surf_tmpl;
-   memset(&surf_tmpl, 0, sizeof(surf_tmpl));
-   u_surface_default_template(&surf_tmpl, priv->tex,
-                              PIPE_BIND_RENDER_TARGET);
+   u_surface_default_template(&surf_tmpl, priv->tex);
 
    return pipe->create_surface(pipe, priv->tex, &surf_tmpl);
 
index bec23a4a1be2b722eec671fb1f2d76df0ebd1860..fd3f26c50705bf3b6152141cbd3d777ccf40746f 100644 (file)
@@ -386,7 +386,6 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
 
    memset(&surf_templ, 0, sizeof(surf_templ));
    surf_templ.format = tex->format;
-   surf_templ.usage = PIPE_BIND_RENDER_TARGET;
    surf = pipe->create_surface(pipe, tex, &surf_templ);
 
    if (!surf)
index c6c645e8a46f3a72548a055763a78a3bc88294f3..0b78be80a8c0c99cc4aaaf552c44ac4d75361a79 100644 (file)
@@ -82,7 +82,6 @@ static void init( void )
       exit(4);
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index 9cde75cff2573caf7d4b172971c9985ab5273616..2c02f4f1297b2a337c45ed477a17c925c7f20bee 100644 (file)
@@ -421,7 +421,6 @@ static void init( void )
       exit(4);
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index 86bb18d43e61ad287770ac60bd1e45780c9f582d..1ff7a3f01ff95ca575ff334f49f35d7185c61f0c 100644 (file)
@@ -87,7 +87,6 @@ graw_util_create_window(struct graw_info *info,
 
       /* create color surface */
       surface_temp.format = resource_temp.format;
-      surface_temp.usage = PIPE_BIND_RENDER_TARGET;
       surface_temp.u.tex.level = 0;
       surface_temp.u.tex.first_layer = 0;
       surface_temp.u.tex.last_layer = 0;
@@ -118,7 +117,6 @@ graw_util_create_window(struct graw_info *info,
 
    /* create z surface */
    surface_temp.format = resource_temp.format;
-   surface_temp.usage = PIPE_BIND_DEPTH_STENCIL;
    surface_temp.u.tex.level = 0;
    surface_temp.u.tex.first_layer = 0;
    surface_temp.u.tex.last_layer = 0;
index c43f54595bf39062797725343be6d3ff534cbbbe..0bd5e29fdd568965f06fe4bf55edc46766d4fd20 100644 (file)
@@ -528,7 +528,6 @@ static void init( void )
       exit(4);
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index ab5f299f3e302ceb960fd2b5c620b57248a0ae53..c9e7646e8e2fe712ff9ea91aa11c00a3b3c25a97 100644 (file)
@@ -336,7 +336,6 @@ static void init( void )
       exit(4);
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index be93771f5772a65c864f955095b5c7ad963cbbea..b685fb98494c3a519b6f947403319dd28d716bfa 100644 (file)
@@ -211,7 +211,6 @@ static void init( void )
    }
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index 573bc8a83f4b1cfaba3c756cbf285a0eb73048ff..8fdc28d58da958ef235f08662442da8b445c289d 100644 (file)
@@ -218,7 +218,6 @@ static void init( void )
       exit(4);
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index 4e3a80b61dd3ebd0d4ec64a425e987fdadb8a877..651518a14ed8bd8c3dcc067f58ffd2f918b91ea6 100644 (file)
@@ -269,7 +269,6 @@ static void init( void )
       exit(4);
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index 0677f04f28fa533ade3272507ab1bb6849e69ade..e0358e6868ffe620579d74dbb428e61e905a5d05 100644 (file)
@@ -415,7 +415,6 @@ static void init( void )
       exit(4);
 
    surf_tmpl.format = templat.format;
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = 0;
    surf_tmpl.u.tex.first_layer = 0;
    surf_tmpl.u.tex.last_layer = 0;
index feff902bbae0616c3ec6b6334862310945279139..db99789280f75b0f02b9e18db21ce590071626a8 100644 (file)
@@ -211,7 +211,6 @@ static void init_prog(struct program *p)
        p->sampler.normalized_coords = 1;
 
        surf_tmpl.format = PIPE_FORMAT_B8G8R8A8_UNORM; /* All drivers support this */
-       surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
        surf_tmpl.u.tex.level = 0;
        surf_tmpl.u.tex.first_layer = 0;
        surf_tmpl.u.tex.last_layer = 0;
index f9b4696abef6ee8aca9e6135b39e7cd6668d0a59..2c11f72da3adcf0f9ba5ef6ea70650980239d1ed 100644 (file)
@@ -156,7 +156,6 @@ static void init_prog(struct program *p)
        p->rasterizer.depth_clip = 1;
 
        surf_tmpl.format = PIPE_FORMAT_B8G8R8A8_UNORM;
-       surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
        surf_tmpl.u.tex.level = 0;
        surf_tmpl.u.tex.first_layer = 0;
        surf_tmpl.u.tex.last_layer = 0;
index a10dbfbd0ec2138ae6327b2f1a708eb40de9a95d..3df8691f4b96fff304b916ee7ddefe7e2c7fce0b 100644 (file)
@@ -71,7 +71,6 @@ update_renderbuffer_surface(struct st_context *st,
             struct pipe_surface surf_tmpl;
             memset(&surf_tmpl, 0, sizeof(surf_tmpl));
             surf_tmpl.format = format;
-            surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
             surf_tmpl.u.tex.level = level;
             surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice;
             surf_tmpl.u.tex.last_layer = strb->rtt_face + strb->rtt_slice;
index 0679e7d44bdbf46b390702442cdf67222289370e..8c78e5ef47712ef9bb78a6015f45b2f2ec5ec0ea 100644 (file)
@@ -76,10 +76,8 @@ st_egl_image_target_renderbuffer_storage(struct gl_context *ctx,
    struct st_context *st = st_context(ctx);
    struct st_renderbuffer *strb = st_renderbuffer(rb);
    struct pipe_surface *ps;
-   unsigned usage;
 
-   usage = PIPE_BIND_RENDER_TARGET;
-   ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
+   ps = st_manager_get_egl_image_surface(st, (void *) image_handle);
    if (ps) {
       strb->Base.Width = ps->width;
       strb->Base.Height = ps->height;
@@ -146,10 +144,8 @@ st_egl_image_target_texture_2d(struct gl_context *ctx, GLenum target,
 {
    struct st_context *st = st_context(ctx);
    struct pipe_surface *ps;
-   unsigned usage;
 
-   usage = PIPE_BIND_SAMPLER_VIEW;
-   ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
+   ps = st_manager_get_egl_image_surface(st, (void *) image_handle);
    if (ps) {
       st_bind_surface(ctx, target, texObj, texImage, ps);
       pipe_surface_reference(&ps, NULL);
index ae280bfa9735f72702549bb05fbfcbd5cff6b04c..bf206b025529caa16ebeaa2af9f6658b6f00ea5a 100644 (file)
@@ -206,7 +206,7 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx,
    if (!strb->texture)
       return FALSE;
 
-   u_surface_default_template(&surf_tmpl, strb->texture, templ.bind);
+   u_surface_default_template(&surf_tmpl, strb->texture);
    strb->surface = pipe->create_surface(pipe,
                                         strb->texture,
                                         &surf_tmpl);
@@ -444,7 +444,6 @@ st_render_texture(struct gl_context *ctx,
    memset(&surf_tmpl, 0, sizeof(surf_tmpl));
    surf_tmpl.format = ctx->Color.sRGBEnabled
       ? strb->texture->format : util_format_linear(strb->texture->format);
-   surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
    surf_tmpl.u.tex.level = strb->rtt_level;
    surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice;
    surf_tmpl.u.tex.last_layer = strb->rtt_face + strb->rtt_slice;
index 131ecf2e1706d850f6d9fa65e2999c1018705d00..bf13526d2ff06012127a248e76725b2954c7d790 100644 (file)
@@ -1090,7 +1090,6 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
 
    memset(&surf_tmpl, 0, sizeof(surf_tmpl));
    surf_tmpl.format = util_format_linear(stImage->pt->format);
-   surf_tmpl.usage = dst_usage;
    surf_tmpl.u.tex.level = stImage->base.Level;
    surf_tmpl.u.tex.first_layer = stImage->base.Face + destZ;
    surf_tmpl.u.tex.last_layer = stImage->base.Face + destZ;
index e97b3f38c058d8b64b2897bbf2310cf54515d381..e80f238753b49511b95492b00bd6aaade228f10f 100644 (file)
@@ -224,8 +224,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb,
          continue;
       }
 
-      u_surface_default_template(&surf_tmpl, textures[i],
-                                 PIPE_BIND_RENDER_TARGET);
+      u_surface_default_template(&surf_tmpl, textures[i]);
       ps = st->pipe->create_surface(st->pipe, textures[i], &surf_tmpl);
       if (ps) {
          pipe_surface_reference(&strb->surface, ps);
@@ -792,8 +791,7 @@ st_manager_flush_frontbuffer(struct st_context *st)
  * FIXME: I think this should operate on resources, not surfaces
  */
 struct pipe_surface *
-st_manager_get_egl_image_surface(struct st_context *st,
-                                 void *eglimg, unsigned usage)
+st_manager_get_egl_image_surface(struct st_context *st, void *eglimg)
 {
    struct st_manager *smapi =
       (struct st_manager *) st->iface.st_context_private;
@@ -807,7 +805,7 @@ st_manager_get_egl_image_surface(struct st_context *st,
    if (!smapi->get_egl_image(smapi, eglimg, &stimg))
       return NULL;
 
-   u_surface_default_template(&surf_tmpl, stimg.texture, usage);
+   u_surface_default_template(&surf_tmpl, stimg.texture);
    surf_tmpl.u.tex.level = stimg.level;
    surf_tmpl.u.tex.first_layer = stimg.layer;
    surf_tmpl.u.tex.last_layer = stimg.layer;
index 6a94978390ae804345dcef97a7750843f71c9b22..f729cff1fa42a5bbaa572bb16302ef68a0032a80 100644 (file)
@@ -36,8 +36,7 @@
 struct st_context;
 
 struct pipe_surface *
-st_manager_get_egl_image_surface(struct st_context *st,
-                                 void *eglimg, unsigned usage);
+st_manager_get_egl_image_surface(struct st_context *st, void *eglimg);
 
 void
 st_manager_flush_frontbuffer(struct st_context *st);