summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_state_vs.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-01-13 13:40:09 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-01-13 13:40:09 +0000
commit1b333453e4998d5db76952aed6caa34d98dfdc7c (patch)
treeedb63277532e8d1ef21783ac51695532ce99d3a1 /src/gallium/drivers/svga/svga_state_vs.c
parent831764fa75b9a2ea5b42c2df35c6dcfcedcd9611 (diff)
downloadexternal_mesa3d-1b333453e4998d5db76952aed6caa34d98dfdc7c.zip
external_mesa3d-1b333453e4998d5db76952aed6caa34d98dfdc7c.tar.gz
external_mesa3d-1b333453e4998d5db76952aed6caa34d98dfdc7c.tar.bz2
svga: Fix compile_vs error code.
It could erroneously return PIPE_OK in some circumstances. Make compile_fs code identical.
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_vs.c')
-rw-r--r--src/gallium/drivers/svga/svga_state_vs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index db30f27..5e33c12 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
@@ -70,7 +70,7 @@ static enum pipe_error compile_vs( struct svga_context *svga,
struct svga_shader_result **out_result )
{
struct svga_shader_result *result;
- enum pipe_error ret = PIPE_OK;
+ enum pipe_error ret = PIPE_ERROR;
result = svga_translate_vertex_program( vs, key );
if (result == NULL) {
@@ -79,8 +79,10 @@ static enum pipe_error compile_vs( struct svga_context *svga,
}
result->id = util_bitmask_add(svga->vs_bm);
- if(result->id == UTIL_BITMASK_INVALID_INDEX)
+ if(result->id == UTIL_BITMASK_INVALID_INDEX) {
+ ret = PIPE_ERROR_OUT_OF_MEMORY;
goto fail;
+ }
ret = SVGA3D_DefineShader(svga->swc,
result->id,