diff options
author | Brian Paul <[email protected]> | 2017-06-22 14:45:07 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-06-30 08:24:27 -0600 |
commit | 4f3974d7586070fe72a9ef09d3df3f24b4a49f43 (patch) | |
tree | 0483e1db1b330c83075facdf5eeb34b29568a303 /src/gallium/drivers/svga/svga_state_vs.c | |
parent | adead35320c0afe95f3f170a6047905179f8c6c3 (diff) |
svga: change error handling convention for svga_set_stream_output()
In general, the functions which emit commands to the command buffer check
for failure and return a PIPE_ERROR_x code. It's up to the caller to
flush the buffer and retry the command.
But svga_set_stream_output() did its own flushing and the callers never
checked the return value (though, it would always be PIPE_OK) in practice.
This patch changes svga_set_stream_output() so that it does not call
svga_context_flush() when the buffer is full. And we update the callers
to check the return value as we do for other functions, like
svga_set_shader().
No Piglit regressions. Also tested w/ Nature demo.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_vs.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_state_vs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c index 325ef3ebad4..a0ab868cbba 100644 --- a/src/gallium/drivers/svga/svga_state_vs.c +++ b/src/gallium/drivers/svga/svga_state_vs.c @@ -353,11 +353,14 @@ emit_hw_vs(struct svga_context *svga, unsigned dirty) /* No GS stream out */ if (svga_have_vs_streamout(svga)) { /* Set VS stream out */ - svga_set_stream_output(svga, vs->base.stream_output); + ret = svga_set_stream_output(svga, vs->base.stream_output); } else { /* turn off stream out */ - svga_set_stream_output(svga, NULL); + ret = svga_set_stream_output(svga, NULL); + } + if (ret != PIPE_OK) { + goto done; } } |