summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_resource_texture.c
diff options
context:
space:
mode:
authorCharmaine Lee <charmainel@vmware.com>2016-02-29 12:00:12 -0800
committerBrian Paul <brianp@vmware.com>2016-03-04 07:57:41 -0700
commit8366701f4cb6d297623607e922d151dc05f69811 (patch)
tree7fab9bf50d90781ee369943d6fb1bb18ce9342fd /src/gallium/drivers/svga/svga_resource_texture.c
parent395c7b8fa17069fe996a63a8bca2bfd0fe3f16a0 (diff)
downloadexternal_mesa3d-8366701f4cb6d297623607e922d151dc05f69811.zip
external_mesa3d-8366701f4cb6d297623607e922d151dc05f69811.tar.gz
external_mesa3d-8366701f4cb6d297623607e922d151dc05f69811.tar.bz2
svga: fix an error in svga_texture_generate_mipmap
With this patch, make sure the shader resource view is properly created before referencing it in the generate mipmap command. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga/svga_resource_texture.c')
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index 3f754c4..e898ff2 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -1038,7 +1038,12 @@ svga_texture_generate_mipmap(struct pipe_context *pipe,
return FALSE;
sv = svga_pipe_sampler_view(psv);
- svga_validate_pipe_sampler_view(svga, sv);
+ ret = svga_validate_pipe_sampler_view(svga, sv);
+ if (ret != PIPE_OK) {
+ svga_context_flush(svga, NULL);
+ ret = svga_validate_pipe_sampler_view(svga, sv);
+ assert(ret == PIPE_OK);
+ }
ret = SVGA3D_vgpu10_GenMips(svga->swc, sv->id, tex->handle);
if (ret != PIPE_OK) {