svga: Fix compile_vs error code.

It could erroneously return PIPE_OK in some circumstances.

Make compile_fs code identical.
This commit is contained in:
José Fonseca 2010-01-13 13:40:09 +00:00
parent 831764fa75
commit 1b333453e4
2 changed files with 7 additions and 3 deletions

View File

@ -76,8 +76,10 @@ static enum pipe_error compile_fs( struct svga_context *svga,
}
result->id = util_bitmask_add(svga->fs_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,

View File

@ -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,