From 8969de7e986265168532fbfec7557fd9bf632012 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Mon, 14 May 2012 16:34:11 +0200 Subject: [PATCH] radeonsi: Keep around copies of original sampler states. Fixes crashes when restoring sampler states after blits. --- src/gallium/drivers/radeonsi/evergreen_state.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.30.2