diff options
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_fs.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_state_fs.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index 349aa27..e5fb4d1 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -91,7 +91,7 @@ static enum pipe_error compile_fs( struct svga_context *svga, SVGA3D_SHADERTYPE_PS, result->tokens, result->nr_tokens * sizeof result->tokens[0]); - if (ret) + if (ret != PIPE_OK) goto fail; *out_result = result; @@ -114,8 +114,9 @@ fail: * SVGA_NEW_NEED_SWTNL * SVGA_NEW_SAMPLER */ -static int make_fs_key( const struct svga_context *svga, - struct svga_fs_compile_key *key ) +static enum pipe_error +make_fs_key(const struct svga_context *svga, + struct svga_fs_compile_key *key) { int i; int idx = 0; @@ -193,17 +194,17 @@ static int make_fs_key( const struct svga_context *svga, key->sprite_origin_lower_left = (svga->curr.rast->templ.sprite_coord_mode == PIPE_SPRITE_COORD_LOWER_LEFT); - return 0; + return PIPE_OK; } -static int emit_hw_fs( struct svga_context *svga, - unsigned dirty ) +static enum pipe_error +emit_hw_fs(struct svga_context *svga, unsigned dirty) { struct svga_shader_result *result = NULL; unsigned id = SVGA3D_INVALID_ID; - int ret = 0; + enum pipe_error ret = PIPE_OK; struct svga_fragment_shader *fs = svga->curr.fs; struct svga_fs_compile_key key; @@ -215,13 +216,13 @@ static int emit_hw_fs( struct svga_context *svga, * SVGA_NEW_SAMPLER */ ret = make_fs_key( svga, &key ); - if (ret) + if (ret != PIPE_OK) return ret; result = search_fs_key( fs, &key ); if (!result) { ret = compile_fs( svga, fs, &key, &result ); - if (ret) + if (ret != PIPE_OK) return ret; } @@ -234,14 +235,14 @@ static int emit_hw_fs( struct svga_context *svga, ret = SVGA3D_SetShader(svga->swc, SVGA3D_SHADERTYPE_PS, id ); - if (ret) + if (ret != PIPE_OK) return ret; svga->dirty |= SVGA_NEW_FS_RESULT; svga->state.hw_draw.fs = result; } - return 0; + return PIPE_OK; } struct svga_tracked_state svga_hw_fs = |