summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 87a2e2e55e7..fbac57688be 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -715,6 +715,7 @@ static int r600_shader_select(struct pipe_context *ctx,
struct r600_pipe_shader * shader = NULL;
int r;
+ memset(&key, 0, sizeof(key));
key = r600_shader_selector_key(ctx, sel);
/* Check if we don't need to change anything.
@@ -762,7 +763,7 @@ static int r600_shader_select(struct pipe_context *ctx,
key = r600_shader_selector_key(ctx, sel);
}
- shader->key = key;
+ memcpy(&shader->key, &key, sizeof(key));
sel->num_shaders++;
}