radv: Only set rt stack size for dynamic stacks

When using a static callable stack, the required scratch has already
been allocated.
Dynamic stacks are located at the end of scratch memory
and are allocated on demand using radv_set_rt_stack_size.
Static stacks live at the start of scratch memory and are allocated in
create_rt_shader by setting scratch_size.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17579>
This commit is contained in:
Konstantin Seurer 2022-07-17 11:20:23 +02:00 committed by Marge Bot
parent eeaf0b1888
commit 0580910aa9
1 changed files with 2 additions and 1 deletions

View File

@ -5289,7 +5289,8 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline
cmd_buffer->state.rt_pipeline = compute_pipeline;
cmd_buffer->push_constant_stages |= RADV_RT_STAGE_BITS;
radv_set_rt_stack_size(cmd_buffer, cmd_buffer->state.rt_stack_size);
if (compute_pipeline->dynamic_stack_size)
radv_set_rt_stack_size(cmd_buffer, cmd_buffer->state.rt_stack_size);
break;
}
case VK_PIPELINE_BIND_POINT_GRAPHICS: {