radeonsi: Keep around copies of original sampler states.
authorMichel Dänzer <michel.daenzer@amd.com>
Mon, 14 May 2012 14:34:11 +0000 (16:34 +0200)
committerMichel Dänzer <michel@daenzer.net>
Mon, 14 May 2012 15:56:03 +0000 (17:56 +0200)
Fixes crashes when restoring sampler states after blits.

src/gallium/drivers/radeonsi/evergreen_state.c

index 264618b069333e83921365d578af47e92fdcf445..8043c0c59da86e9c6706d90ecc9c9edf01e64c25 100644 (file)
@@ -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);