Skip to content

Commit

Permalink
Fix layout compat check for push descriptors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Jul 18, 2024
1 parent 87b05bb commit 11e4bad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vulkan/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,12 @@ void CommandBuffer::set_program_layout(const PipelineLayout *layout)
// Find the first set whose descriptor set layout differs.
for (unsigned set = 0; set < VULKAN_NUM_DESCRIPTOR_SETS; set++)
{
if (layout->get_allocator(set) != pipeline_state.layout->get_allocator(set))
uint32_t first_push_set =
std::min<uint32_t>(layout->get_push_set_index(), pipeline_state.layout->get_push_set_index());
bool push_set_delta = layout->get_push_set_index() != pipeline_state.layout->get_push_set_index();

if (layout->get_allocator(set) != pipeline_state.layout->get_allocator(set) ||
(push_set_delta && first_push_set == set))
{
dirty_sets |= ~((1u << set) - 1);
break;
Expand Down

0 comments on commit 11e4bad

Please sign in to comment.