mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
Vulkan: Don't bind last descriptor set if bounding box is unsupported
Fixes crash on a4xx/Vulkan.
This commit is contained in:
parent
c6f151c4e1
commit
ee0fa548bc
2 changed files with 6 additions and 3 deletions
|
@ -767,7 +767,9 @@ bool StateTracker::UpdateGXDescriptorSet()
|
||||||
if (num_writes > 0)
|
if (num_writes > 0)
|
||||||
vkUpdateDescriptorSets(g_vulkan_context->GetDevice(), num_writes, writes.data(), 0, nullptr);
|
vkUpdateDescriptorSets(g_vulkan_context->GetDevice(), num_writes, writes.data(), 0, nullptr);
|
||||||
|
|
||||||
m_num_active_descriptor_sets = NUM_GX_DRAW_DESCRIPTOR_SETS;
|
m_num_active_descriptor_sets = g_vulkan_context->SupportsBoundingBox() ?
|
||||||
|
NUM_GX_DRAW_DESCRIPTOR_SETS_SSBO :
|
||||||
|
NUM_GX_DRAW_DESCRIPTOR_SETS;
|
||||||
m_num_dynamic_offsets = NUM_UBO_DESCRIPTOR_SET_BINDINGS;
|
m_num_dynamic_offsets = NUM_UBO_DESCRIPTOR_SET_BINDINGS;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,8 @@ private:
|
||||||
// Number of descriptor sets for game draws.
|
// Number of descriptor sets for game draws.
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
NUM_GX_DRAW_DESCRIPTOR_SETS = DESCRIPTOR_SET_BIND_POINT_STORAGE_OR_TEXEL_BUFFER + 1,
|
NUM_GX_DRAW_DESCRIPTOR_SETS = DESCRIPTOR_SET_BIND_POINT_PIXEL_SHADER_SAMPLERS + 1,
|
||||||
|
NUM_GX_DRAW_DESCRIPTOR_SETS_SSBO = DESCRIPTOR_SET_BIND_POINT_STORAGE_OR_TEXEL_BUFFER + 1,
|
||||||
NUM_UTILITY_DRAW_DESCRIPTOR_SETS = 2
|
NUM_UTILITY_DRAW_DESCRIPTOR_SETS = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,4 +193,4 @@ private:
|
||||||
std::vector<u32> m_scheduled_command_buffer_kicks;
|
std::vector<u32> m_scheduled_command_buffer_kicks;
|
||||||
bool m_allow_background_execution = true;
|
bool m_allow_background_execution = true;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Vulkan
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue