mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-18 03:50:36 +02:00
radeonsi: clean up compute_wave_size use in si_compute_blit.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878>
This commit is contained in:
parent
8290cae2b7
commit
913e1b9138
1 changed files with 6 additions and 6 deletions
|
|
@ -220,14 +220,14 @@ void si_compute_clear_buffer_rmw(struct si_context *sctx, struct pipe_resource *
|
|||
|
||||
/* Use buffer_load_dwordx4 and buffer_store_dwordx4 per thread. */
|
||||
unsigned dwords_per_instruction = 4;
|
||||
unsigned wave_size = sctx->screen->compute_wave_size;
|
||||
unsigned dwords_per_wave = dwords_per_instruction * wave_size;
|
||||
unsigned block_size = 64; /* it's always 64x1x1 */
|
||||
unsigned dwords_per_wave = dwords_per_instruction * block_size;
|
||||
|
||||
unsigned num_dwords = size / 4;
|
||||
unsigned num_instructions = DIV_ROUND_UP(num_dwords, dwords_per_instruction);
|
||||
|
||||
struct pipe_grid_info info = {};
|
||||
info.block[0] = MIN2(wave_size, num_instructions);
|
||||
info.block[0] = MIN2(block_size, num_instructions);
|
||||
info.block[1] = 1;
|
||||
info.block[2] = 1;
|
||||
info.grid[0] = DIV_ROUND_UP(num_dwords, dwords_per_wave);
|
||||
|
|
@ -305,14 +305,14 @@ static void si_compute_do_clear_or_copy(struct si_context *sctx, struct pipe_res
|
|||
src ? SI_COMPUTE_COPY_DW_PER_THREAD : SI_COMPUTE_CLEAR_DW_PER_THREAD;
|
||||
unsigned instructions_per_thread = MAX2(1, dwords_per_thread / 4);
|
||||
unsigned dwords_per_instruction = dwords_per_thread / instructions_per_thread;
|
||||
unsigned wave_size = sctx->screen->compute_wave_size;
|
||||
unsigned dwords_per_wave = dwords_per_thread * wave_size;
|
||||
unsigned block_size = sctx->screen->compute_wave_size;
|
||||
unsigned dwords_per_wave = dwords_per_thread * block_size;
|
||||
|
||||
unsigned num_dwords = size / 4;
|
||||
unsigned num_instructions = DIV_ROUND_UP(num_dwords, dwords_per_instruction);
|
||||
|
||||
struct pipe_grid_info info = {};
|
||||
info.block[0] = MIN2(wave_size, num_instructions);
|
||||
info.block[0] = MIN2(block_size, num_instructions);
|
||||
info.block[1] = 1;
|
||||
info.block[2] = 1;
|
||||
info.grid[0] = DIV_ROUND_UP(num_dwords, dwords_per_wave);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue