diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-05-31 14:39:46 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-06-03 15:05:30 -0400 |
commit | 4583f09caa5aef719a1eec282f24a86c789cbba6 (patch) | |
tree | 19479547351009458ea37d1c5c96f991720e1d1d | |
parent | 5820ac6756898a1bd30bde04555437a55c378726 (diff) |
radeonsi: init sctx->dma_copy before using it
Commit a1378639ab19 reordered context functions initializations but broke
sctx->b.resource_copy_region init when using AMD_DEBUG=forcedma.
In this case sctx->dma_copy was assigned a value after being used in:
sctx->b.resource_copy_region = sctx->dma_copy;
This commit moves the FORCE_DMA special case after sctx->dma_copy initialization.
See https://bugs.freedesktop.org/show_bug.cgi?id=110422
Signed-off-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index c19a2cd97d3..1faaa22ab0d 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -505,9 +505,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, si_init_query_functions(sctx); si_init_state_compute_functions(sctx); - if (sscreen->debug_flags & DBG(FORCE_DMA)) - sctx->b.resource_copy_region = sctx->dma_copy; - /* Initialize graphics-only context functions. */ if (sctx->has_graphics) { si_init_context_texture_functions(sctx); @@ -532,6 +529,9 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, else si_init_dma_functions(sctx); + if (sscreen->debug_flags & DBG(FORCE_DMA)) + sctx->b.resource_copy_region = sctx->dma_copy; + sctx->sample_mask = 0xffff; /* Initialize multimedia functions. */ |