From: Michel Dänzer Date: Mon, 14 May 2012 14:34:11 +0000 (+0200) Subject: radeonsi: Keep around copies of original sampler states. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8969de7e986265168532fbfec7557fd9bf632012;p=mesa.git radeonsi: Keep around copies of original sampler states. Fixes crashes when restoring sampler states after blits. --- 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);