summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-09 10:14:51 -0600
committerBrian Paul <[email protected]>2012-08-16 08:58:55 -0600
commitd733e5da9c50f0bb93549642304da2f211879bb9 (patch)
tree08308b80f41cf1161db492b7cc0b169b1cf94d7b
parent50188adf7d4ca12488a3cb4b70ffdedea2e9c9b1 (diff)
svga: move result->key expression after result != NULL check
-rw-r--r--src/gallium/drivers/svga/svga_state_constants.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c
index a8711541776..77c93493a8d 100644
--- a/src/gallium/drivers/svga/svga_state_constants.c
+++ b/src/gallium/drivers/svga/svga_state_constants.c
@@ -320,7 +320,7 @@ static enum pipe_error
emit_vs_consts(struct svga_context *svga, unsigned dirty)
{
const struct svga_shader_result *result = svga->state.hw_draw.vs;
- const struct svga_vs_compile_key *key = &result->key.vkey;
+ const struct svga_vs_compile_key *key;
enum pipe_error ret = PIPE_OK;
unsigned offset;
@@ -329,6 +329,8 @@ emit_vs_consts(struct svga_context *svga, unsigned dirty)
if (result == NULL)
return PIPE_OK;
+ key = &result->key.vkey;
+
/* SVGA_NEW_VS_CONST_BUFFER
*/
ret = emit_consts( svga, PIPE_SHADER_VERTEX );