summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-08 15:37:17 +0100
committerMarek Olšák <[email protected]>2012-12-12 13:09:54 +0100
commit25409c6da8163d9acb386511aef0c11577c7aadb (patch)
treeda38c5f59a9703c6feb89d9fac3a6c615a3bebc0 /src/mesa
parentc1f704073b8992f3556c8e44a7fc496e250ba3ae (diff)
gallium: remove pipe_surface::usage
Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c1
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.c8
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c3
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c1
-rw-r--r--src/mesa/state_tracker/st_manager.c8
-rw-r--r--src/mesa/state_tracker/st_manager.h3
6 files changed, 7 insertions, 17 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index a10dbfbd0ec..3df8691f4b9 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -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;
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index 0679e7d44bd..8c78e5ef477 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -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);
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index ae280bfa973..bf206b02552 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -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;
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 131ecf2e170..bf13526d2ff 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -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;
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index e97b3f38c05..e80f238753b 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -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;
diff --git a/src/mesa/state_tracker/st_manager.h b/src/mesa/state_tracker/st_manager.h
index 6a94978390a..f729cff1fa4 100644
--- a/src/mesa/state_tracker/st_manager.h
+++ b/src/mesa/state_tracker/st_manager.h
@@ -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);