Mesa (master): svga: check return value from svga_set_shader( SVGA3D_SHADERTYPE_GS, NULL)

Brian Paul brianp at kemper.freedesktop.org
Thu Jun 22 19:35:00 UTC 2017


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

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Jun 22 12:58:39 2017 -0600

svga: check return value from svga_set_shader( SVGA3D_SHADERTYPE_GS, NULL)

If the call fails we need to flush the command buffer and retry.  In this
case, we were failing to unbind the GS which led to subsequent errors.

This fixes a bug replaying a Cinebench R15 apitrace in a Linux guest.
VMware bug 1894451

cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Charmaine Lee <charmainel at vmware.com>

---

 src/gallium/drivers/svga/svga_state_gs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/svga/svga_state_gs.c b/src/gallium/drivers/svga/svga_state_gs.c
index cff11ad5c3..217463882f 100644
--- a/src/gallium/drivers/svga/svga_state_gs.c
+++ b/src/gallium/drivers/svga/svga_state_gs.c
@@ -190,6 +190,8 @@ emit_hw_gs(struct svga_context *svga, unsigned dirty)
           *  Needs to unbind the geometry shader.
           */
          ret = svga_set_shader(svga, SVGA3D_SHADERTYPE_GS, NULL);
+         if (ret != PIPE_OK)
+            goto done;
          svga->state.hw_draw.gs = NULL;
       }
       goto done;




More information about the mesa-commit mailing list