Vulkan 验证警告 catch-22 关于 MoltenVK 上的 VK_KHR_portability_subset [英] Vulkan validation warning catch-22 about VK_KHR_portability_subset on MoltenVK

查看:26
本文介绍了Vulkan 验证警告 catch-22 关于 MoltenVK 上的 VK_KHR_portability_subset的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Big Sur(2014 年中 15 英寸视网膜)上使用 Vulkan 1.2.170 和 MoltenVK(和 GLFW).我用 VK_LAYER_KHRONOS_validation 创建了实例,当我调用 vkCreateDevice 时,我收到警告

I'm using Vulkan 1.2.170 with MoltenVK (and GLFW) on Big Sur (mid 2014 15" Retina). I created the instance with VK_LAYER_KHRONOS_validation and when I call vkCreateDevice I get the warning

VUID-VkDeviceCreateInfo-pProperties-04451(ERROR / SPEC): msgNum: 976972960 - Validation Error:
 [ VUID-VkDeviceCreateInfo-pProperties-04451 ] Object 0: handle = 0x10cfaad00, 
type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x3a3b6ca0 | vkCreateDevice: 
VK_KHR_portability_subset must be enabled because physical device VkPhysicalDevice 0x10cfaad00[] 
supports it The Vulkan spec states: If the [VK_KHR_portability_subset] extension is included in 
pProperties of vkEnumerateDeviceExtensionProperties, ppEnabledExtensions must include 
"VK_KHR_portability_subset".

好的,好的,我将它添加到 extensions 参数中作为唯一的扩展.然后它说

Okay, fine, I add it to the extensions parameter as the only extension. Then it says

Missing extension required by the device extension VK_KHR_portability_subset:
VK_KHR_get_physical_device_properties2.

和段错误.如果我添加 VK_KHR_get_physical_device_properties2,它会崩溃说它不存在,这是真的(vkEnumerateDeviceExtensionProperties 不返回它).

and segfaults. If I add VK_KHR_get_physical_device_properties2, it crashes saying it doesn't exist, which is true (vkEnumerateDeviceExtensionProperties doesn't return it).

这是一个错误还是它会接受一些扩展?

Is this a bug or is there some set of extensions it will accept?

如果有帮助,支持的扩展是

If it helps, the supported extensions are

VK_KHR_16bit_storage VK_KHR_8bit_storage VK_KHR_bind_memory2 VK_KHR_create_renderpass2 VK_KHR_dedicated_allocation VK_KHR_depth_stencil_resolve VK_KHR_descriptor_update_template VK_KHR_device_group VK_KHR_driver_properties VK_KHR_external_fence VK_KHR_external_memory VK_KHR_external_semaphore VK_KHR_get_memory_requirements2 VK_KHR_image_format_list VK_KHR_maintenance1 VK_KHR_maintenance2 VK_KHR_maintenance3 VK_KHR_multiview VK_KHR_portability_subset VK_KHR_push_descriptor VK_KHR_relaxed_block_layout VK_KHR_sampler_mirror_clamp_to_edge VK_KHR_sampler_ycbcr_conversion VK_KHR_shader_draw_parameters VK_KHR_shader_float16_int8 VK_KHR_storage_buffer_storage_class VK_KHR_swapchain VK_KHR_swapchain_mutable_format VK_KHR_timeline_semaphore VK_KHR_uniform_buffer_standard_layout VK_KHR_variable_pointers VK_EXT_debug_marker VK_EXT_descriptor_indexing VK_EXT_fragment_shader_interlock VK_EXT_hdr_metadata VK_EXT_host_query_reset VK_EXT_image_robustness VK_EXT_inline_uniform_block VK_EXT_memory_bud得到VK_EXT_private_data VK_EXT_robustness2 VK_EXT_scalar_block_layout VK_EXT_shader_viewport_index_layer VK_EXT_subgroup_size_control VK_EXT_texel_buffer_alignment VK_EXT_vertex_attribute_divisor VK_AMD_gpu_shader_half_float VK_AMD_negative_viewport_height VK_AMD_shader_trinary_minmax VK_INTEL_shader_integer_functions2 VK_GOOGLE_display_timing VK_NV_glsl_shader

VK_KHR_16bit_storage VK_KHR_8bit_storage VK_KHR_bind_memory2 VK_KHR_create_renderpass2 VK_KHR_dedicated_allocation VK_KHR_depth_stencil_resolve VK_KHR_descriptor_update_template VK_KHR_device_group VK_KHR_driver_properties VK_KHR_external_fence VK_KHR_external_memory VK_KHR_external_semaphore VK_KHR_get_memory_requirements2 VK_KHR_image_format_list VK_KHR_maintenance1 VK_KHR_maintenance2 VK_KHR_maintenance3 VK_KHR_multiview VK_KHR_portability_subset VK_KHR_push_descriptor VK_KHR_relaxed_block_layout VK_KHR_sampler_mirror_clamp_to_edge VK_KHR_sampler_ycbcr_conversion VK_KHR_shader_draw_parameters VK_KHR_shader_float16_int8 VK_KHR_storage_buffer_storage_class VK_KHR_swapchain VK_KHR_swapchain_mutable_format VK_KHR_timeline_semaphore VK_KHR_uniform_buffer_standard_layout VK_KHR_variable_pointers VK_EXT_debug_marker VK_EXT_descriptor_indexing VK_EXT_fragment_shader_interlock VK_EXT_hdr_metadata VK_EXT_host_query_reset VK_EXT_image_robustness VK_EXT_inline_uniform_block VK_EXT_memory_budget VK_EXT_private_data VK_EXT_robustness2 VK_EXT_scalar_block_layout VK_EXT_shader_viewport_index_layer VK_EXT_subgroup_size_control VK_EXT_texel_buffer_alignment VK_EXT_vertex_attribute_divisor VK_AMD_gpu_shader_half_float VK_AMD_negative_viewport_height VK_AMD_shader_trinary_minmax VK_INTEL_shader_integer_functions2 VK_GOOGLE_display_timing VK_NV_glsl_shader

推荐答案

原来 VK_KHR_get_physical_device_properties2 是一个实例扩展,而不是一个设备扩展,所以它传递给 vkCreateInstance 就像所以:

Turns out VK_KHR_get_physical_device_properties2 is an instance extension, not a device extension, so it's passed to vkCreateInstance like so:

VkInstanceCreateInfo instCreateInfo;
const char* instExtension = "VK_KHR_get_physical_device_properties2";
instCreateInfo.enabledExtensionCount = 1;
instCreateInfo.ppEnabledExtensionNames = &instExtension;
// etcetera
VkInstance instance;
vkCreateInstance(&instCreateInfo, nullptr, &instance);

// ...

VkDeviceCreateInfo deviceCreateInfo;
const char* deviceExtension = "VK_KHR_portability_subset";
deviceCreateInfo.enabledExtensionCount = 1;
deviceCreateInfo.ppEnabledExtensionNames = &deviceExtension;
// etcetera
VkDevice device;
vkCreateDevice(physicalDevice, &deviceCreateInfo, nullptr, &device);

这篇关于Vulkan 验证警告 catch-22 关于 MoltenVK 上的 VK_KHR_portability_subset的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆