VulkanDevice: Fix validation errors
This commit is contained in:
parent
7344661801
commit
e646096180
|
@ -395,6 +395,8 @@ bool VulkanDevice::SelectDeviceExtensions(ExtensionList* extension_list, bool en
|
|||
m_optional_extensions.vk_khr_dynamic_rendering &&
|
||||
SupportsExtension(VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME, false);
|
||||
m_optional_extensions.vk_khr_push_descriptor = SupportsExtension(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, false);
|
||||
m_optional_extensions.vk_khr_shader_non_semantic_info =
|
||||
SupportsExtension(VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME, false);
|
||||
m_optional_extensions.vk_ext_external_memory_host =
|
||||
SupportsExtension(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME, false);
|
||||
|
||||
|
@ -849,8 +851,7 @@ bool VulkanDevice::CreateCommandBuffers()
|
|||
pool_sizes[num_pools++] = {VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, MAX_INPUT_ATTACHMENT_DESCRIPTORS_PER_FRAME};
|
||||
|
||||
VkDescriptorPoolCreateInfo pool_create_info = {
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, nullptr, 0, MAX_DESCRIPTOR_SETS_PER_FRAME,
|
||||
static_cast<u32>(std::size(pool_sizes)), pool_sizes};
|
||||
VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, nullptr, 0, MAX_DESCRIPTOR_SETS_PER_FRAME, num_pools, pool_sizes};
|
||||
|
||||
res = vkCreateDescriptorPool(m_device, &pool_create_info, nullptr, &resources.descriptor_pool);
|
||||
if (res != VK_SUCCESS)
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
bool vk_khr_dynamic_rendering : 1;
|
||||
bool vk_khr_dynamic_rendering_local_read : 1;
|
||||
bool vk_khr_push_descriptor : 1;
|
||||
bool vk_khr_shader_non_semantic_info : 1;
|
||||
bool vk_ext_external_memory_host : 1;
|
||||
};
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ std::unique_ptr<GPUShader> VulkanDevice::CreateShaderFromSource(GPUShaderStage s
|
|||
if (m_debug_device)
|
||||
{
|
||||
options.SetOptimizationLevel(shaderc_optimization_level_zero);
|
||||
options.SetGenerateDebugInfo();
|
||||
if (m_optional_extensions.vk_khr_shader_non_semantic_info)
|
||||
options.SetGenerateDebugInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue