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>
This commit is contained in:
Brian Paul
2017-06-22 12:58:39 -06:00
parent 3fbdab8778
commit 041f8ae9f6
+2
View File
@@ -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;