diff options
author | Brian Paul <[email protected]> | 2011-09-22 17:02:59 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-09-23 07:59:00 -0600 |
commit | 5f053bf4ae092df9e5ff6ab38caf9867e6fe46bf (patch) | |
tree | 17e87d1b8f619f81b3ff542229b8a6f3c6de0f78 /src/gallium/drivers/svga/svga_pipe_clear.c | |
parent | 681f92140c2f4170ec222a8213e0895c7fa8483a (diff) |
svga: clean up return values and error codes
Previously we were using a hodge podge of int vs. pipe_enum and
0 vs. PIPE_OK. Some functions that always returned PIPE_OK were
made void.
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_clear.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_clear.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c index d9ff79cc5ee..ddee9ee5d73 100644 --- a/src/gallium/drivers/svga/svga_pipe_clear.c +++ b/src/gallium/drivers/svga/svga_pipe_clear.c @@ -41,7 +41,7 @@ try_clear(struct svga_context *svga, double depth, unsigned stencil) { - int ret = PIPE_OK; + enum pipe_error ret = PIPE_OK; SVGA3dRect rect = { 0, 0, 0, 0 }; boolean restore_viewport = FALSE; SVGA3dClearFlag flags = 0; @@ -49,7 +49,7 @@ try_clear(struct svga_context *svga, union util_color uc = {0}; ret = svga_update_state(svga, SVGA_STATE_HW_CLEAR); - if (ret) + if (ret != PIPE_OK) return ret; if (svga->rebind.rendertargets) { @@ -82,7 +82,7 @@ try_clear(struct svga_context *svga, if (memcmp(&rect, &svga->state.hw_clear.viewport, sizeof(rect)) != 0) { restore_viewport = TRUE; ret = SVGA3D_SetViewport(svga->swc, &rect); - if (ret) + if (ret != PIPE_OK) return ret; } @@ -109,7 +109,7 @@ svga_clear(struct pipe_context *pipe, unsigned buffers, double depth, unsigned stencil) { struct svga_context *svga = svga_context( pipe ); - int ret; + enum pipe_error ret; if (buffers & PIPE_CLEAR_COLOR) SVGA_DBG(DEBUG_DMA, "clear sid %p\n", |