KhronosGroup / Vulkan-Portability

Apache License 2.0
40 stars 4 forks source link

Add VkPhysicalDevicePortabilitySubsetFeaturesKHR:: subpassDependencyLateFragmentTests capability #45

Open billhollings opened 2 years ago

billhollings commented 2 years ago

Some CTS tests fail with subpass dependencies that depend on late fragment depth testing.

This might be fixable with effort within the implementations.

In the meantime, these use cases can be disabled in CTS and reported as Not Supported, by adding a VkPhysicalDevicePortabilitySubsetFeaturesKHR:: subpassDependencyLateFragmentTests capability.

This affects 9 CTS tests:

dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_2.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_3.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_5.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_5.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_3.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_5.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_2.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_3.d32_sfloat_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_5.d32_sfloat_s8_uint
  Fail (Depth compare failed.)
cdavis5e commented 1 year ago

It should be theoretically possible to solve this by inserting MTLFences everywhere the render pass declares a memory dependency. We need to do this anyway, in order to support MTLHazardTrackingModeUntracked.

cdavis5e commented 1 year ago

Hmm... Looking at this more closely, I'm now starting to think this is more of a rendering accuracy issue. Only a few pixels in the result are off. I wonder now if this isn't one where we'd need to get a waiver.