VideoCommon: avoid Vulkan validation errors when custom shader ubo isn't set up

Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
This commit is contained in:
iwubcode 2023-10-06 02:00:41 -05:00
parent b6d321bfb1
commit 751356af47
1 changed files with 6 additions and 0 deletions

View File

@ -494,6 +494,12 @@ void StateTracker::UpdateGXDescriptorSet()
continue; continue;
} }
// If custom pixel shaders haven't been used, their buffer range is 0
if (i == UBO_DESCRIPTOR_SET_BINDING_PS_CUST && m_bindings.gx_ubo_bindings[i].range == 0)
{
continue;
}
writes[num_writes++] = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, writes[num_writes++] = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
nullptr, nullptr,
m_gx_descriptor_sets[0], m_gx_descriptor_sets[0],