mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
vk: Avoid leaking descriptor copies
This commit is contained in:
parent
2331dc3256
commit
3942a464fe
3 changed files with 5 additions and 2 deletions
|
@ -829,6 +829,7 @@ void VKGSRender::emit_geometry(u32 sub_index)
|
||||||
{
|
{
|
||||||
// Need to update descriptors; make a copy for the next draw
|
// Need to update descriptors; make a copy for the next draw
|
||||||
VkDescriptorSet previous_set = m_current_frame->descriptor_set.value();
|
VkDescriptorSet previous_set = m_current_frame->descriptor_set.value();
|
||||||
|
m_current_frame->descriptor_set.flush();
|
||||||
m_current_frame->descriptor_set = allocate_descriptor_set();
|
m_current_frame->descriptor_set = allocate_descriptor_set();
|
||||||
rsx::simple_array<VkCopyDescriptorSet> copy_cmds(binding_table.total_descriptor_bindings);
|
rsx::simple_array<VkCopyDescriptorSet> copy_cmds(binding_table.total_descriptor_bindings);
|
||||||
|
|
||||||
|
|
|
@ -346,8 +346,10 @@ namespace vk
|
||||||
vkUpdateDescriptorSets(*g_render_device, 1, &writer, 0, nullptr);
|
vkUpdateDescriptorSets(*g_render_device, 1, &writer, 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void descriptor_set::push(rsx::simple_array<VkCopyDescriptorSet>& copy_cmd)
|
void descriptor_set::push(rsx::simple_array<VkCopyDescriptorSet>& copy_cmd, u32 type_mask)
|
||||||
{
|
{
|
||||||
|
m_push_type_mask |= type_mask;
|
||||||
|
|
||||||
if (m_pending_copies.empty()) [[likely]]
|
if (m_pending_copies.empty()) [[likely]]
|
||||||
{
|
{
|
||||||
m_pending_copies = std::move(copy_cmd);
|
m_pending_copies = std::move(copy_cmd);
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace vk
|
||||||
void push(const VkDescriptorBufferInfo& buffer_info, VkDescriptorType type, u32 binding);
|
void push(const VkDescriptorBufferInfo& buffer_info, VkDescriptorType type, u32 binding);
|
||||||
void push(const VkDescriptorImageInfo& image_info, VkDescriptorType type, u32 binding);
|
void push(const VkDescriptorImageInfo& image_info, VkDescriptorType type, u32 binding);
|
||||||
void push(const VkDescriptorImageInfo* image_info, u32 count, VkDescriptorType type, u32 binding);
|
void push(const VkDescriptorImageInfo* image_info, u32 count, VkDescriptorType type, u32 binding);
|
||||||
void push(rsx::simple_array<VkCopyDescriptorSet>& copy_cmd);
|
void push(rsx::simple_array<VkCopyDescriptorSet>& copy_cmd, u32 type_mask = umax);
|
||||||
|
|
||||||
void bind(VkCommandBuffer cmd, VkPipelineBindPoint bind_point, VkPipelineLayout layout);
|
void bind(VkCommandBuffer cmd, VkPipelineBindPoint bind_point, VkPipelineLayout layout);
|
||||||
void bind(const command_buffer& cmd, VkPipelineBindPoint bind_point, VkPipelineLayout layout);
|
void bind(const command_buffer& cmd, VkPipelineBindPoint bind_point, VkPipelineLayout layout);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue