summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_surface.c')
-rw-r--r--src/gallium/drivers/svga/svga_surface.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 79981dcf5ff..4b0f9417c32 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -377,6 +377,7 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
{
enum pipe_error ret = PIPE_OK;
int try;
+ unsigned shader;
assert(svga_have_vgpu10(svga));
@@ -388,11 +389,14 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
* associated resource. We will then use the cloned surface view for
* render target.
*/
- if (svga_check_sampler_view_resource_collision(svga, s->handle)) {
- SVGA_DBG(DEBUG_VIEWS,
- "same resource used in shaderResource and renderTarget 0x%x\n",
- s->handle);
- s = create_backed_surface_view(svga, s);
+ for (shader = PIPE_SHADER_VERTEX; shader <= PIPE_SHADER_GEOMETRY; shader++) {
+ if (svga_check_sampler_view_resource_collision(svga, s->handle, shader)) {
+ SVGA_DBG(DEBUG_VIEWS,
+ "same resource used in shaderResource and renderTarget 0x%x\n",
+ s->handle);
+ s = create_backed_surface_view(svga, s);
+ break;
+ }
}
if (s->view_id == SVGA3D_INVALID_ID) {