aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_pipe_streamout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_streamout.c')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_streamout.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_streamout.c b/src/gallium/drivers/svga/svga_pipe_streamout.c
index 4add087888f..3f30e648c0c 100644
--- a/src/gallium/drivers/svga/svga_pipe_streamout.c
+++ b/src/gallium/drivers/svga/svga_pipe_streamout.c
@@ -157,7 +157,6 @@ enum pipe_error
svga_set_stream_output(struct svga_context *svga,
struct svga_stream_output *streamout)
{
- enum pipe_error ret = PIPE_OK;
unsigned id = streamout ? streamout->id : SVGA3D_INVALID_ID;
if (!svga_have_vgpu10(svga)) {
@@ -168,17 +167,15 @@ svga_set_stream_output(struct svga_context *svga,
streamout, id);
if (svga->current_so != streamout) {
- /* Save current SO state */
- svga->current_so = streamout;
-
- ret = SVGA3D_vgpu10_SetStreamOutput(svga->swc, id);
+ enum pipe_error ret = SVGA3D_vgpu10_SetStreamOutput(svga->swc, id);
if (ret != PIPE_OK) {
- svga_context_flush(svga, NULL);
- ret = SVGA3D_vgpu10_SetStreamOutput(svga->swc, id);
+ return ret;
}
+
+ svga->current_so = streamout;
}
- return ret;
+ return PIPE_OK;
}
void