Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoltenVK failing to resolve GetDeviceXxxMemoryRequirements #105

Open
pollend opened this issue Nov 12, 2024 · 11 comments
Open

MoltenVK failing to resolve GetDeviceXxxMemoryRequirements #105

pollend opened this issue Nov 12, 2024 · 11 comments
Labels
in progress Issue is in progress not bug Not a bug vk VK specific

Comments

@pollend
Copy link
Contributor

pollend commented Nov 12, 2024

for the moment i was trying to use MoltenVK for my project. I'm unable to resolve these methods below I wonder if moltenVK provides these interfaces? just wanted to see if it would be possible to just use this but if worse comes to worse its more ideal to just support metal directly then using an intermediary api.

Screenshot 2024-11-11 at 10 47 01 PM
    GET_DEVICE_CORE_OR_KHR_PROC(GetDeviceBufferMemoryRequirements);
    GET_DEVICE_CORE_OR_KHR_PROC(GetDeviceImageMemoryRequirements);
VUID-VkPhysicalDeviceGroupProperties-sType-sType(ERROR / SPEC): msgNum: -907153781 - Validation Error: [ VUID-VkPhysicalDeviceGroupProperties-sType-sType ] | MessageID = 0xc9edee8b | vkEnumeratePhysicalDeviceGroups(): pPhysicalDeviceGroupProperties[0].sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES. The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES (https://vulkan.lunarg.com/doc/view/1.3.290.0/mac/1.3-extensions/vkspec.html#VUID-VkPhysicalDeviceGroupProperties-sType-sType)
    Objects: 0
nri::INFO (DeviceVK.hpp:133) - VK::Unknown - Supported instance extensions:
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_device_group_creation (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_external_fence_capabilities (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_external_memory_capabilities (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_external_semaphore_capabilities (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_get_physical_device_properties2 (v2)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_get_surface_capabilities2 (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_surface (v25)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_debug_report (v10)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_debug_utils (v2)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_headless_surface (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_layer_settings (v2)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_metal_surface (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_surface_maintenance1 (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_swapchain_colorspace (v4)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_MVK_macos_surface (v3)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_portability_enumeration (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_LUNARG_direct_driver_loading (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_validation_features (v2)
VUID-VkPhysicalDeviceGroupProperties-sType-sType(ERROR / SPEC): msgNum: -907153781 - Validation Error: [ VUID-VkPhysicalDeviceGroupProperties-sType-sType ] | MessageID = 0xc9edee8b | vkEnumeratePhysicalDeviceGroups(): pPhysicalDeviceGroupProperties[0].sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES. The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES (https://vulkan.lunarg.com/doc/view/1.3.290.0/mac/1.3-extensions/vkspec.html#VUID-VkPhysicalDeviceGroupProperties-sType-sType)
    Objects: 0
nri::INFO (DeviceVK.hpp:179) - VK::Apple M3 - Supported device extensions:
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_16bit_storage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_8bit_storage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_bind_memory2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_buffer_device_address (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_calibrated_timestamps (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_copy_commands2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_create_renderpass2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_dedicated_allocation (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_deferred_host_operations (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_depth_stencil_resolve (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_descriptor_update_template (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_device_group (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_driver_properties (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_dynamic_rendering (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_external_fence (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_external_memory (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_external_semaphore (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_fragment_shader_barycentric (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_format_feature_flags2 (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_get_memory_requirements2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_imageless_framebuffer (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_image_format_list (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_incremental_present (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_maintenance1 (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_maintenance2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_maintenance3 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_map_memory2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_multiview (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_portability_subset (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_push_descriptor (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_relaxed_block_layout (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_sampler_mirror_clamp_to_edge (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_sampler_ycbcr_conversion (v14)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_separate_depth_stencil_layouts (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_draw_parameters (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_float_controls (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_float16_int8 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_integer_dot_product (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_non_semantic_info (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_subgroup_extended_types (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_spirv_1_4 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_storage_buffer_storage_class (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_swapchain (v70)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_swapchain_mutable_format (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_synchronization2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_timeline_semaphore (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_uniform_buffer_standard_layout (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_variable_pointers (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_vertex_attribute_divisor (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_4444_formats (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_buffer_device_address (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_calibrated_timestamps (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_debug_marker (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_descriptor_indexing (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_extended_dynamic_state (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_extended_dynamic_state2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_extended_dynamic_state3 (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_external_memory_host (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_fragment_shader_interlock (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_hdr_metadata (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_host_image_copy (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_host_query_reset (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_image_robustness (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_inline_uniform_block (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_memory_budget (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_metal_objects (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_pipeline_creation_cache_control (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_pipeline_creation_feedback (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_post_depth_coverage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_private_data (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_robustness2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_sample_locations (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_scalar_block_layout (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_separate_stencil_usage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_atomic_float (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_demote_to_helper_invocation (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_stencil_export (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_subgroup_ballot (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_subgroup_vote (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_viewport_index_layer (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_subgroup_size_control (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_swapchain_maintenance1 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_texel_buffer_alignment (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_texture_compression_astc_hdr (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_vertex_attribute_divisor (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_gpu_shader_half_float (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_negative_viewport_height (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_shader_image_load_store_lod (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_shader_trinary_minmax (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_IMG_format_pvrtc (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_INTEL_shader_integer_functions2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_GOOGLE_display_timing (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_NV_fragment_shader_barycentric (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_NV_glsl_shader (v1)
nri::ERROR (DeviceVK.hpp:1578) - VK::Apple M3 - ResolveDispatchTable(): Failed to get device function: 'vkGetDeviceBufferMemoryRequirements'
@pollend pollend changed the title moltenVK vulkan missing moltenVK vulkan failing to resolve GetDeviceBufferMemoryRequirements/GetDeviceImageMemoryRequirements Nov 12, 2024
@dzhdanNV
Copy link
Collaborator

I googled a bit and I have found that MoltenVK does support GetDeviceBufferMemoryRequirements/GetDeviceImageMemoryRequirement and even 2 variants.

@dzhdanNV
Copy link
Collaborator

For example:
KhronosGroup/MoltenVK#1250
KhronosGroup/MoltenVK#1216
Can it be a linkage issue? (like in 1216 from the above)

@pollend
Copy link
Contributor Author

pollend commented Nov 13, 2024

I tried a couple more things, i separated out the windowing logic so i don't get this double linking problem im seeing. the rendering code is loaded from another library but i don't see why this would be problem. this looks similar to what is happening but, im a little flumixed why this is not working.

KhronosGroup/MoltenVK#1708


WARNING-CreateInstance-status-message(INFO / SPEC): msgNum: 601872502 - Validation Information: [ WARNING-CreateInstance-status-message ] Object 0: handle = 0x12c853800, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x23dfd876 | vkCreateInstance():  Khronos Validation Layer Active:
    Settings File: Found at /Users/michaelpollind/.local/share/vulkan/settings.d/vk_layer_settings.txt specified by VkConfig application override.
    Current Enables: None.
    Current Disables: VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT, VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT.

    Objects: 1
        [0] 0x12c853800, type: 1, name: NULL
VUID-VkPhysicalDeviceGroupProperties-sType-sType(ERROR / SPEC): msgNum: -907153781 - Validation Error: [ VUID-VkPhysicalDeviceGroupProperties-sType-sType ] | MessageID = 0xc9edee8b | vkEnumeratePhysicalDeviceGroups(): pPhysicalDeviceGroupProperties[0].sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES. The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES (https://vulkan.lunarg.com/doc/view/1.3.290.0/mac/1.3-extensions/vkspec.html#VUID-VkPhysicalDeviceGroupProperties-sType-sType)
    Objects: 0
nri::INFO (DeviceVK.hpp:133) - VK::Unknown - Supported instance extensions:
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_device_group_creation (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_external_fence_capabilities (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_external_memory_capabilities (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_external_semaphore_capabilities (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_get_physical_device_properties2 (v2)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_get_surface_capabilities2 (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_surface (v25)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_debug_report (v10)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_debug_utils (v2)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_headless_surface (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_layer_settings (v2)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_metal_surface (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_surface_maintenance1 (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_swapchain_colorspace (v4)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_MVK_macos_surface (v3)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_KHR_portability_enumeration (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_LUNARG_direct_driver_loading (v1)
nri::INFO (DeviceVK.hpp:135) - VK::Unknown -     VK_EXT_validation_features (v2)
WARNING-CreateInstance-status-message(INFO / SPEC): msgNum: 601872502 - Validation Information: [ WARNING-CreateInstance-status-message ] Object 0: handle = 0x12d03ae08, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x23dfd876 | vkCreateInstance():  Khronos Validation Layer Active:
    Settings File: Found at /Users/michaelpollind/.local/share/vulkan/settings.d/vk_layer_settings.txt specified by VkConfig application override.
    Current Enables: None.
    Current Disables: VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT, VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT.

    Objects: 1
        [0] 0x12d03ae08, type: 1, name: NULL
VUID-VkPhysicalDeviceGroupProperties-sType-sType(ERROR / SPEC): msgNum: -907153781 - Validation Error: [ VUID-VkPhysicalDeviceGroupProperties-sType-sType ] | MessageID = 0xc9edee8b | vkEnumeratePhysicalDeviceGroups(): pPhysicalDeviceGroupProperties[0].sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES. The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES (https://vulkan.lunarg.com/doc/view/1.3.290.0/mac/1.3-extensions/vkspec.html#VUID-VkPhysicalDeviceGroupProperties-sType-sType)
    Objects: 0
nri::ERROR (DeviceVK.hpp:1248) - VK::Unknown - Validation Error: [ VUID-VkPhysicalDeviceGroupProperties-sType-sType ] | MessageID = 0xc9edee8b | vkEnumeratePhysicalDeviceGroups(): pPhysicalDeviceGroupProperties[0].sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES. The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES (https://vulkan.lunarg.com/doc/view/1.3.290.0/mac/1.3-extensions/vkspec.html#VUID-VkPhysicalDeviceGroupProperties-sType-sType)
nri::INFO (DeviceVK.hpp:179) - VK::Apple M3 - Supported device extensions:
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_16bit_storage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_8bit_storage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_bind_memory2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_buffer_device_address (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_calibrated_timestamps (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_copy_commands2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_create_renderpass2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_dedicated_allocation (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_deferred_host_operations (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_depth_stencil_resolve (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_descriptor_update_template (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_device_group (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_driver_properties (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_dynamic_rendering (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_external_fence (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_external_memory (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_external_semaphore (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_fragment_shader_barycentric (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_format_feature_flags2 (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_get_memory_requirements2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_imageless_framebuffer (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_image_format_list (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_incremental_present (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_maintenance1 (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_maintenance2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_maintenance3 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_map_memory2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_multiview (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_portability_subset (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_push_descriptor (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_relaxed_block_layout (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_sampler_mirror_clamp_to_edge (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_sampler_ycbcr_conversion (v14)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_separate_depth_stencil_layouts (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_draw_parameters (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_float_controls (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_float16_int8 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_integer_dot_product (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_non_semantic_info (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_shader_subgroup_extended_types (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_spirv_1_4 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_storage_buffer_storage_class (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_swapchain (v70)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_swapchain_mutable_format (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_synchronization2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_timeline_semaphore (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_uniform_buffer_standard_layout (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_variable_pointers (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_KHR_vertex_attribute_divisor (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_4444_formats (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_buffer_device_address (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_calibrated_timestamps (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_debug_marker (v4)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_descriptor_indexing (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_extended_dynamic_state (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_extended_dynamic_state2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_extended_dynamic_state3 (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_external_memory_host (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_fragment_shader_interlock (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_hdr_metadata (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_host_image_copy (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_host_query_reset (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_image_robustness (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_inline_uniform_block (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_memory_budget (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_metal_objects (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_pipeline_creation_cache_control (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_pipeline_creation_feedback (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_post_depth_coverage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_private_data (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_robustness2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_sample_locations (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_scalar_block_layout (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_separate_stencil_usage (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_atomic_float (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_demote_to_helper_invocation (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_stencil_export (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_subgroup_ballot (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_subgroup_vote (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_shader_viewport_index_layer (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_subgroup_size_control (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_swapchain_maintenance1 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_texel_buffer_alignment (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_texture_compression_astc_hdr (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_EXT_vertex_attribute_divisor (v3)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_gpu_shader_half_float (v2)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_negative_viewport_height (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_shader_image_load_store_lod (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_AMD_shader_trinary_minmax (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_IMG_format_pvrtc (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_INTEL_shader_integer_functions2 (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_GOOGLE_display_timing (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_NV_fragment_shader_barycentric (v1)
nri::INFO (DeviceVK.hpp:181) - VK::Apple M3 -     VK_NV_glsl_shader (v1)
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 - Inserted device layer "VK_LAYER_KHRONOS_validation" (/usr/local/share/vulkan/explicit_layer.d/../../../lib/libVkLayer_khronos_validation.dylib)
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 - vkCreateDevice layer callstack setup to:
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -    <Application>
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -      ||
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -    <Loader>
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -      ||
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -    VK_LAYER_KHRONOS_validation
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -            Type: Explicit
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -            Manifest: /usr/local/share/vulkan/explicit_layer.d/VkLayer_khronos_validation.json
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -            Library:  /usr/local/share/vulkan/explicit_layer.d/../../../lib/libVkLayer_khronos_validation.dylib
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -      ||
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -    <Device>
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 -        Using "Apple M3" with driver: "/usr/local/share/vulkan/icd.d/../../../lib/libMoltenVK.dylib"
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 - Vulkan semaphores using MTLEvent.
nri::INFO (DeviceVK.hpp:1248) - VK::Apple M3 - Created VkDevice to run on GPU Apple M3 with the following 10 Vulkan extensions enabled:
		VK_KHR_deferred_host_operations v4
		VK_KHR_dynamic_rendering v1
		VK_KHR_portability_subset v1
		VK_KHR_push_descriptor v2
		VK_KHR_swapchain v70
		VK_KHR_swapchain_mutable_format v1
		VK_KHR_synchronization2 v1
		VK_EXT_memory_budget v1
		VK_EXT_sample_locations v1
		VK_EXT_shader_atomic_float v1
nri::ERROR (DeviceVK.hpp:1576) - VK::Apple M3 - ResolveDispatchTable(): Failed to get device function: 'vkGetDeviceBufferMemoryRequirements'

@pollend
Copy link
Contributor Author

pollend commented Nov 14, 2024

@dzhdanNV so I managed to reproduce this on my macbook on the NRISamples. @vertver were you ever able to run nri on any kind of apple hardware or might it be specific to me or my setup? At worse I just give up on trying with vulkan and committing to the metal branch.

NVIDIAGameWorks/NRISamples#8

@dzhdanNV
Copy link
Collaborator

I'm happy to help, but I don't know how.

@vertver
Copy link
Contributor

vertver commented Nov 14, 2024

@vertver were you ever able to run nri on any kind of apple hardware or might it be specific to me or my setup?

Yeah, I can try to run it on my Macbook Air M1. Most likely it's an SDK version issue.

@pollend
Copy link
Contributor Author

pollend commented Nov 14, 2024

@dzhdanNV I got a response from moltenvk looks like maintenance 4 ext is not available KhronosGroup/MoltenVK#2394

@dzhdanNV
Copy link
Collaborator

dzhdanNV commented Nov 15, 2024

Thanks for digging. I would say it's unexpectedly expected. Of course, I take the responsibility for migrating from vkGetXxxMemoryRequirements to vkGetDeviceXxxMemoryRequirements and friends. The reason was simple it's stupid to create an object beforehand and ask for memory requirements afterwards. It adds unnecessary complications and restrictions on use cases. And this is what has been fixed in VK_KHR_maintenance4. IMO, MoltenVK must get updated to the latest ASAP, but it's out of our control. So, the question is - how to proceed?

Solutions:

  • MoltenVK: wait/push for fixes
  • NRI: return back support for vkGetXxxMemoryRequirements, requiring a pre-created object (it's easy for me, but it will add restrictions on use cases obviously)
  • NRI: native Metal support (hope they have support for something similar to vkGetDeviceXxxMemoryRequirements)

Other suggestions?

@dzhdanNV dzhdanNV added vk VK specific not bug Not a bug in progress Issue is in progress labels Nov 15, 2024
@pollend
Copy link
Contributor Author

pollend commented Nov 15, 2024

Thanks for digging. I would say it's unexpectedly expected. Of course, I take the responsibility for migrating from vkGetXxxMemoryRequirements to vkGetDeviceXxxMemoryRequirements and friends. The reason was simple it's stupid to create an object beforehand and ask for memory requirements afterwards. It adds unnecessary complications and restrictions on use cases. And this is what has been fixed in VK_KHR_maintenance4. IMO, MoltenVK must get updated to the latest ASAP, but it's out of our control. So, the question is - how to proceed?

Solutions:

* MoltenVK: wait/push for fixes

* NRI: return back support for `vkGetXxxMemoryRequirements`, requiring a pre-created object (it's easy for me, but it will add restrictions on use cases obviously)

* NRI: native Metal support (hope they have support for something similar to `vkGetDeviceXxxMemoryRequirements`)

Other suggestions?

i might just work on the metal branch more might take a while before i get it to a working state.

@dzhdanNV dzhdanNV changed the title moltenVK vulkan failing to resolve GetDeviceBufferMemoryRequirements/GetDeviceImageMemoryRequirements MoltenVK failing to resolve GetDeviceXxxMemoryRequirements Nov 15, 2024
@dzhdanNV
Copy link
Collaborator

dzhdanNV commented Nov 15, 2024

Please, let me know if you want to get back vkGetXxxMemoryRequirements from VK 1.0. Many thanks for your work!

@pollend
Copy link
Contributor Author

pollend commented Nov 15, 2024

here is the ticket to track for getting samples to work again:

ref:
KhronosGroup/MoltenVK#1930
KhronosGroup/MoltenVK#2116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Issue is in progress not bug Not a bug vk VK specific
Projects
None yet
Development

No branches or pull requests

3 participants