summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2016-02-29 12:00:12 -0800
committerBrian Paul <[email protected]>2016-03-04 07:57:41 -0700
commit8366701f4cb6d297623607e922d151dc05f69811 (patch)
tree7fab9bf50d90781ee369943d6fb1bb18ce9342fd /src/gallium
parent395c7b8fa17069fe996a63a8bca2bfd0fe3f16a0 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-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 3f754c4d53e..e898ff2c4e6 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) {