summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-05-14 16:34:11 +0200
committerMichel Dänzer <[email protected]>2012-05-14 17:56:03 +0200
commit8969de7e986265168532fbfec7557fd9bf632012 (patch)
treea8d61a289accc2ddfbfd41d21cc1232dd94c6b16 /src/gallium
parent1deb2be2b7887d7435e103fdb042857e745ff08d (diff)
radeonsi: Keep around copies of original sampler states.
Fixes crashes when restoring sampler states after blits.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/evergreen_state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/evergreen_state.c b/src/gallium/drivers/radeonsi/evergreen_state.c
index 264618b0693..8043c0c59da 100644
--- a/src/gallium/drivers/radeonsi/evergreen_state.c
+++ b/src/gallium/drivers/radeonsi/evergreen_state.c
@@ -1349,6 +1349,8 @@ static void evergreen_bind_ps_sampler(struct pipe_context *ctx, unsigned count,
rctx->ws->buffer_unmap(bo->cs_buf);
+ memcpy(rctx->ps_samplers.samplers, states, sizeof(void*) * count);
+
rstate->nregs = 0;
va = r600_resource_va(ctx->screen, (void *)bo);
r600_pipe_state_add_reg(rstate, R_00B038_SPI_SHADER_USER_DATA_PS_2, va, bo, RADEON_USAGE_READ);