summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp1
-rw-r--r--src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h2
-rw-r--r--src/gallium/state_trackers/vdpau/output.c1
-rw-r--r--src/gallium/state_trackers/vdpau/presentation.c1
-rw-r--r--src/gallium/state_trackers/vega/image.c10
-rw-r--r--src/gallium/state_trackers/vega/mask.c6
-rw-r--r--src/gallium/state_trackers/vega/renderer.c3
-rw-r--r--src/gallium/state_trackers/vega/vg_context.c8
-rw-r--r--src/gallium/state_trackers/vega/vg_manager.c4
-rw-r--r--src/gallium/state_trackers/xa/xa_context.c3
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c4
-rw-r--r--src/gallium/state_trackers/xvmc/surface.c1
12 files changed, 11 insertions, 33 deletions
diff --git a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
index 54447814c5c..dc63fb90704 100644
--- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
+++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
@@ -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;
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
index 31e59bf38b1..2c06185594f 100644
--- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
+++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
@@ -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)
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index dd3c1a834bb..a8351261199 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -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);
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index 51a702eefde..349654d0625 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -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;
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) {
diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c
index 93dae137ba1..7b7a90343df 100644
--- a/src/gallium/state_trackers/xa/xa_context.c
+++ b/src/gallium/state_trackers/xa/xa_context.c
@@ -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;
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index c8f20acdec7..d78ab74aeef 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -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);
diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c
index bec23a4a1be..fd3f26c5070 100644
--- a/src/gallium/state_trackers/xvmc/surface.c
+++ b/src/gallium/state_trackers/xvmc/surface.c
@@ -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)