From 0a9d646bd7bdb94be498e3208c502f49a6c5313b Mon Sep 17 00:00:00 2001 From: kd-11 Date: Tue, 28 Feb 2023 17:57:39 +0300 Subject: [PATCH] rsx: Workaround for clang build --- rpcs3/Emu/RSX/VK/vkutils/descriptors.h | 34 +++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/VK/vkutils/descriptors.h b/rpcs3/Emu/RSX/VK/vkutils/descriptors.h index 19dc46f085..9668394f9a 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/descriptors.h +++ b/rpcs3/Emu/RSX/VK/vkutils/descriptors.h @@ -82,7 +82,39 @@ namespace vk rsx::simple_array m_buffer_info_pool; rsx::simple_array m_image_info_pool; - rsx::simple_array m_pending_writes; +#ifdef __clang__ + // Clang (pre 16.x) does not support LWG 2089, std::construct_at for POD types + struct WriteDescriptorSetT : public VkWriteDescriptorSet + { + WriteDescriptorSetT( + VkStructureType sType, + const void* pNext, + VkDescriptorSet dstSet, + uint32_t dstBinding, + uint32_t dstArrayElement, + uint32_t descriptorCount, + VkDescriptorType descriptorType, + const VkDescriptorImageInfo* pImageInfo, + const VkDescriptorBufferInfo* pBufferInfo, + const VkBufferView* pTexelBufferView) + { + this->sType = sType, + this->pNext = pNext, + this->dstSet = dstSet, + this->dstBinding = dstBinding, + this->dstArrayElement = dstArrayElement, + this->descriptorCount = descriptorCount, + this->descriptorType = descriptorType, + this->pImageInfo = pImageInfo, + this->pBufferInfo = pBufferInfo, + this->pTexelBufferView = pTexelBufferView; + } + }; +#else + using WriteDescriptorSetT = VkWriteDescriptorSet; +#endif + + rsx::simple_array m_pending_writes; rsx::simple_array m_pending_copies; };