mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radv: check that pipeline is different before binding it
We only need to dirty the descriptors when the pipeline is a new one, because user SGPRs can be potentially different. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
2572c2771d
commit
b53c207659
1 changed files with 8 additions and 2 deletions
|
|
@ -2454,14 +2454,20 @@ void radv_CmdBindPipeline(
|
|||
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
RADV_FROM_HANDLE(radv_pipeline, pipeline, _pipeline);
|
||||
|
||||
radv_mark_descriptor_sets_dirty(cmd_buffer);
|
||||
|
||||
switch (pipelineBindPoint) {
|
||||
case VK_PIPELINE_BIND_POINT_COMPUTE:
|
||||
if (cmd_buffer->state.compute_pipeline == pipeline)
|
||||
return;
|
||||
radv_mark_descriptor_sets_dirty(cmd_buffer);
|
||||
|
||||
cmd_buffer->state.compute_pipeline = pipeline;
|
||||
cmd_buffer->push_constant_stages |= VK_SHADER_STAGE_COMPUTE_BIT;
|
||||
break;
|
||||
case VK_PIPELINE_BIND_POINT_GRAPHICS:
|
||||
if (cmd_buffer->state.pipeline == pipeline)
|
||||
return;
|
||||
radv_mark_descriptor_sets_dirty(cmd_buffer);
|
||||
|
||||
cmd_buffer->state.pipeline = pipeline;
|
||||
if (!pipeline)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue