MoltenVK icon indicating copy to clipboard operation
MoltenVK copied to clipboard

New failing test family for CTS 1.0 `dEQP-VK.image.atomic_operations.*.cube*`

Open aitor-lunarg opened this issue 1 year ago • 10 comments

I just did a new run on CTS 1.0 and found out that there mentioned test family dEQP-VK.image.atomic_operations.*.cube* is now failing. Testing with https://github.com/KhronosGroup/MoltenVK/commit/872d13dcee3a942f23c6965a49e43f0fc6a5e69b and vulkan-cts-1.3.8 ToT (6129a7e275ed24851aab2357c13761d034cc4212).

Creating the issue as a tracker. I have yet to triage to understand where the issue may come from, but I don't believe they are new tests. @billhollings any changes that may have happened around atomic operations on cube textures?

aitor-lunarg avatar Sep 27 '24 07:09 aitor-lunarg

So, the reason why these tests fail is because Metal does not support atomic operations for cube textures. In MoltenVK we report that the format supports atomic operations since that's the Vulkan way to let applications know about that features.

Due to this mismatch in how Vulkan allows to report such feature, the way forward would be to lower the cube texture to a 2D array texture to allow for atomic operations (Metal allows atomic operations for 2D array textures but not for cube textures).

aitor-lunarg avatar Oct 01 '24 17:10 aitor-lunarg

@aitor-lunarg They are now available on Metal4 on Apple10 family GPUs.. so a19 and M5 have it.. curious if exposing the new support, needs spirv-cross support or cts tests were failing compiling generated msl code? Also curious if KosmicKrisp has this workaround for older architectures?

oscarbg avatar Oct 13 '25 01:10 oscarbg

@aitor-lunarg They are now available on Metal4 on Apple10 family GPUs.. so a19 and M5 have it.. curious if exposing the new support, needs spirv-cross support or cts tests were failing compiling generated msl code? Also curious if KosmicKrisp has this workaround for older architectures?

I no longer have cycles to invest in MoltenVK since my efforts are focused on KosmicKrisp. The solution since this is not an optional feature (to my understanding) is the one mentioned in https://github.com/KhronosGroup/MoltenVK/issues/2354#issuecomment-2386565481 which is what we do in KosmicKrisp.

aitor-lunarg avatar Oct 13 '25 02:10 aitor-lunarg

@aitor-lunarg yep.. no problem.. thanks for answering..

not asking to fix anything in MoltenVK/Spirv-Cross.. was just asking only about if needed SPIRV-Cross enablement or not i.e. if MoltenVK shouldn't report any CTS errors on Apple10 GPUs that support cube texture atomics as is by now or not..

also good to know Kosmic uses your proposed approach!!..

finally I hope a LONG LIFE and best wishes for KosmicKrisp!!..

oscarbg avatar Oct 13 '25 04:10 oscarbg

@billhollings with texture cube atomics support on Apple10 family, was going to open issue requesting toggling on support in the portability extension for this family but seems no bit exposing support or not is present in VK_KHR_portability_subset: https://registry.khronos.org/vulkan/specs/latest/man/html/VkPhysicalDevicePortabilitySubsetFeaturesKHR.html

I think that was that missed, was an oversight, right? or was intentional expecting emulated support eventually on MoltenVK?

EDIT: also sad seems this extension has no undefinded_features VkBool32 left in VkPhysicalDevicePortabilitySubsetFeaturesKHR for a simple expansion.. so no simple to add reporting now..

thanks..

oscarbg avatar Oct 21 '25 05:10 oscarbg

@billhollings with texture cube atomics support on Apple10 family, was going to open issue requesting toggling on support in the portability extension for this family but seems no bit exposing support or not is present in VK_KHR_portability_subset: https://registry.khronos.org/vulkan/specs/latest/man/html/VkPhysicalDevicePortabilitySubsetFeaturesKHR.html

At the time the portability subset was initially defined, we didn't expect that Apple would implement atomics for all texture types but cube.

cdavis5e avatar Oct 21 '25 10:10 cdavis5e

thanks @cdavis5e! .. that makes sense.. what is strange, is that it is a Vulkan 1.0 requeriment if not mistaken.. so I'm assuming that these tests (dEQP-VK.image.atomic_operations.*.cube*) weren't in Vulkan CTS at the time of portability spec, or MoltenVK failed to run at the time Vulkan CTS tests like this for other reasons so couldn't be checked/tested that missing support in Apple HW..

oscarbg avatar Oct 21 '25 22:10 oscarbg

Those tests were added with CTS 1.3.8 if I recall correctly

aitor-lunarg avatar Oct 21 '25 22:10 aitor-lunarg

@aitor-lunarg that makes sense now..

oscarbg avatar Oct 21 '25 22:10 oscarbg

Hi, made some cube texture atomics tests and seems SPIRV-Cross is not yet ready for it (created issue: https://github.com/KhronosGroup/SPIRV-Cross/issues/2560), so for MoltenVK support on Apple10 family, SPIRV-Cross will need to be updated once fixed: https://github.com/KhronosGroup/SPIRV-Cross/issues/2560 pinging @squidbus since it also submitted a SPIRV-Cross PR and presumably with update SPIRV-Cross once his PR is merged..

oscarbg avatar Oct 22 '25 04:10 oscarbg