aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state_shaders.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-08-19 13:06:47 -0400
committerMarek Olšák <[email protected]>2019-08-27 16:52:28 -0400
commit40e5ac45aea3b226e7ef904ba8cb1dbb2654ce08 (patch)
tree3e1809a0656294d9248777cf3a9001cc437e9db6 /src/gallium/drivers/radeonsi/si_state_shaders.c
parentd8f27552f446bf4c741c5d46dd430cdf17630660 (diff)
radeonsi: align scratch and ring buffer allocations for faster memory access
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_shaders.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 365eed2f84e..5d64f39b287 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -3487,7 +3487,8 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx)
pipe_aligned_buffer_create(sctx->b.screen,
SI_RESOURCE_FLAG_UNMAPPABLE,
PIPE_USAGE_DEFAULT,
- esgs_ring_size, alignment);
+ esgs_ring_size,
+ sctx->screen->info.pte_fragment_size);
if (!sctx->esgs_ring)
return false;
}
@@ -3498,7 +3499,8 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx)
pipe_aligned_buffer_create(sctx->b.screen,
SI_RESOURCE_FLAG_UNMAPPABLE,
PIPE_USAGE_DEFAULT,
- gsvs_ring_size, alignment);
+ gsvs_ring_size,
+ sctx->screen->info.pte_fragment_size);
if (!sctx->gsvs_ring)
return false;
}
@@ -3735,9 +3737,10 @@ static bool si_update_spi_tmpring_size(struct si_context *sctx)
sctx->scratch_buffer =
si_aligned_buffer_create(&sctx->screen->b,
- SI_RESOURCE_FLAG_UNMAPPABLE,
- PIPE_USAGE_DEFAULT,
- scratch_needed_size, 256);
+ SI_RESOURCE_FLAG_UNMAPPABLE,
+ PIPE_USAGE_DEFAULT,
+ scratch_needed_size,
+ sctx->screen->info.pte_fragment_size);
if (!sctx->scratch_buffer)
return false;