diff options
author | Marek Olšák <[email protected]> | 2012-12-08 15:37:17 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-12-12 13:09:54 +0100 |
commit | 25409c6da8163d9acb386511aef0c11577c7aadb (patch) | |
tree | da38c5f59a9703c6feb89d9fac3a6c615a3bebc0 /src/gallium/state_trackers/vega | |
parent | c1f704073b8992f3556c8e44a7fc496e250ba3ae (diff) |
gallium: remove pipe_surface::usage
Not really used by anybody now.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vega')
-rw-r--r-- | src/gallium/state_trackers/vega/image.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/mask.c | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/renderer.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/vg_context.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/vg_manager.c | 4 |
5 files changed, 9 insertions, 22 deletions
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c index 74a84e0a81d..4434550c629 100644 --- a/src/gallium/state_trackers/vega/image.c +++ b/src/gallium/state_trackers/vega/image.c @@ -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, diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c index 89bff6ede1b..e46bbdd768a 100644 --- a/src/gallium/state_trackers/vega/mask.c +++ b/src/gallium/state_trackers/vega/mask.c @@ -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); diff --git a/src/gallium/state_trackers/vega/renderer.c b/src/gallium/state_trackers/vega/renderer.c index 9faf54f411d..11d3b5a0779 100644 --- a/src/gallium/state_trackers/vega/renderer.c +++ b/src/gallium/state_trackers/vega/renderer.c @@ -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; diff --git a/src/gallium/state_trackers/vega/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c index ca4ec7f82ba..c6361881683 100644 --- a/src/gallium/state_trackers/vega/vg_context.c +++ b/src/gallium/state_trackers/vega/vg_context.c @@ -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); diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c index e9c4a832a58..c8531f8b53a 100644 --- a/src/gallium/state_trackers/vega/vg_manager.c +++ b/src/gallium/state_trackers/vega/vg_manager.c @@ -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) { |