Module: Mesa
Branch: master
Commit: 8366701f4cb6d297623607e922d151dc05f69811
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8366701f4cb6d297623607e922d151dc05f69811

Author: Charmaine Lee <[email protected]>
Date:   Mon Feb 29 12:00:12 2016 -0800

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]>

---

 src/gallium/drivers/svga/svga_resource_texture.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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) {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to