mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
vk: Fix edge cases in descriptor update logic
This commit is contained in:
parent
161e85eab7
commit
510c7f1afe
2 changed files with 9 additions and 3 deletions
|
@ -399,12 +399,11 @@ namespace vk
|
|||
{
|
||||
if (!set.m_device)
|
||||
{
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
bind_sets[count++] = set.m_descriptor_set.value(); // Current set pointer for binding
|
||||
set.m_descriptor_set.on_bind(); // Notify async queue
|
||||
set.next_descriptor_set(); // Flush queue and update pointers
|
||||
set.on_bind(); // Notify bind event. Internally updates handles and triggers flushing.
|
||||
}
|
||||
|
||||
vkCmdBindPipeline(cmd, bind_point, m_pipeline);
|
||||
|
@ -528,6 +527,7 @@ namespace vk
|
|||
|
||||
m_descriptor_set.push(m_copy_cmds, type_mask); // Write previous state
|
||||
m_descriptor_set = allocate_descriptor_set();
|
||||
m_any_descriptors_dirty = false;
|
||||
}
|
||||
|
||||
void descriptor_table_t::create_descriptor_set_layout()
|
||||
|
|
|
@ -138,6 +138,12 @@ namespace vk
|
|||
VkDescriptorSet allocate_descriptor_set();
|
||||
void next_descriptor_set();
|
||||
|
||||
inline void on_bind()
|
||||
{
|
||||
next_descriptor_set(); // Enqueue changes and update pointers
|
||||
m_descriptor_set.on_bind(); // Notify async queue to flush any pending changes
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void notify_descriptor_slot_updated(u32 slot, const T& data)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue