summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2017-06-22 12:58:39 -0600
committerAndres Gomez <agomez@igalia.com>2017-06-28 20:15:05 +0300
commit9eadeb79647cf3159d1048de80f5a35be872d393 (patch)
treeee2d92a19c7f63c7e8b205ef404dd875c515c50a
parentc56792f758755cdc4dd18b04aa79c2a7cc73de78 (diff)
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@lists.freedesktop.org Reviewed-by: Charmaine Lee <charmainel@vmware.com> (cherry picked from commit 041f8ae9f6bab39361263f6c767ea5294f1aa011)
-rw-r--r--src/gallium/drivers/svga/svga_state_gs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_state_gs.c b/src/gallium/drivers/svga/svga_state_gs.c
index cff11ad5c3f..217463882f1 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;