radv: update the number of scratch waves for RT prolog at bind time
The compute scratch size is computed later because the RT stack size can be dynamic, but the number of waves shouldn't change. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24502>
This commit is contained in:
committed by
Marge Bot
parent
44e82a6cf1
commit
ea31193532
@@ -6570,6 +6570,9 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline
|
||||
/* Bind the stack size when it's not dynamic. */
|
||||
if (rt_pipeline->stack_size != -1u)
|
||||
cmd_buffer->state.rt_stack_size = rt_pipeline->stack_size;
|
||||
|
||||
const unsigned max_scratch_waves = radv_get_max_scratch_waves(cmd_buffer->device, rt_pipeline->prolog);
|
||||
cmd_buffer->compute_scratch_waves_wanted = MAX2(cmd_buffer->compute_scratch_waves_wanted, max_scratch_waves);
|
||||
break;
|
||||
}
|
||||
case VK_PIPELINE_BIND_POINT_GRAPHICS: {
|
||||
|
||||
@@ -129,7 +129,7 @@ radv_DestroyPipeline(VkDevice _device, VkPipeline _pipeline, const VkAllocationC
|
||||
void
|
||||
radv_pipeline_init_scratch(const struct radv_device *device, struct radv_pipeline *pipeline, struct radv_shader *shader)
|
||||
{
|
||||
if (!shader->config.scratch_bytes_per_wave && pipeline->type != RADV_PIPELINE_RAY_TRACING)
|
||||
if (!shader->config.scratch_bytes_per_wave)
|
||||
return;
|
||||
|
||||
pipeline->scratch_bytes_per_wave = MAX2(pipeline->scratch_bytes_per_wave, shader->config.scratch_bytes_per_wave);
|
||||
|
||||
Reference in New Issue
Block a user