mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
rsx: Simplify descriptor set contract a bit
- Making the functions sometimes destructive is confusing
This commit is contained in:
parent
c347435151
commit
315ffed12f
|
|
@ -404,30 +404,15 @@ namespace vk
|
|||
vkUpdateDescriptorSets(*g_render_device, 1, &writer, 0, nullptr);
|
||||
}
|
||||
|
||||
void descriptor_set::push(rsx::simple_array<VkCopyDescriptorSet>& copy_cmd, u32 type_mask)
|
||||
void descriptor_set::push(const rsx::simple_array<VkCopyDescriptorSet>& copy_cmd, u32 type_mask)
|
||||
{
|
||||
m_push_type_mask |= type_mask;
|
||||
|
||||
if (m_pending_copies.empty()) [[likely]]
|
||||
{
|
||||
m_pending_copies = std::move(copy_cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
m_pending_copies += copy_cmd;
|
||||
}
|
||||
|
||||
void descriptor_set::push(rsx::simple_array<VkWriteDescriptorSet>& write_cmds, u32 type_mask)
|
||||
void descriptor_set::push(const rsx::simple_array<VkWriteDescriptorSet>& write_cmds, u32 type_mask)
|
||||
{
|
||||
m_push_type_mask |= type_mask;
|
||||
|
||||
#if !defined(__clang__) || (__clang_major__ >= 16)
|
||||
if (m_pending_writes.empty()) [[unlikely]]
|
||||
{
|
||||
m_pending_writes = std::move(write_cmds);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
m_pending_writes += write_cmds;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ namespace vk
|
|||
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, u32 count, VkDescriptorType type, u32 binding);
|
||||
void push(rsx::simple_array<VkCopyDescriptorSet>& copy_cmd, u32 type_mask = umax);
|
||||
void push(rsx::simple_array<VkWriteDescriptorSet>& write_cmds, u32 type_mask = umax);
|
||||
void push(const rsx::simple_array<VkCopyDescriptorSet>& copy_cmd, u32 type_mask = umax);
|
||||
void push(const rsx::simple_array<VkWriteDescriptorSet>& write_cmds, u32 type_mask = umax);
|
||||
void push(const descriptor_set_dynamic_offset_t& offset);
|
||||
|
||||
void on_bind();
|
||||
|
|
|
|||
Loading…
Reference in a new issue