KhronosGroup / Vulkan-Portability

Apache License 2.0
40 stars 4 forks source link

Add VkPhysicalDevicePortabilitySubsetFeaturesKHR:: shaderNoPositionC0E1 capability #39

Closed billhollings closed 1 year ago

billhollings commented 2 years ago

Metal requires a position output from all vertex shaders. Some CTS tests fail when the shader does not include a position output, but only in certain structural situations.

This is likely fixable with effort within the implementations.

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

This affects 8 CTS tests:

dEQP-VK.pipeline.no_position.implicit_declarations.basic.single_view.v0_c0_e1
dEQP-VK.pipeline.no_position.implicit_declarations.basic.single_view.v1_c0_e1
dEQP-VK.pipeline.no_position.implicit_declarations.ssbo_writes.single_view.v0_c0_e1
dEQP-VK.pipeline.no_position.implicit_declarations.ssbo_writes.single_view.v1_c0_e1
dEQP-VK.pipeline.no_position.explicit_declarations.basic.single_view.v0_c0_e1
dEQP-VK.pipeline.no_position.explicit_declarations.basic.single_view.v1_c0_e1
dEQP-VK.pipeline.no_position.explicit_declarations.ssbo_writes.single_view.v0_c0_e1
dEQP-VK.pipeline.no_position.explicit_declarations.ssbo_writes.single_view.v1_c0_e1
  Vertex attribute gl_Position(0) is missing from the vertex descriptor.
kvark commented 2 years ago

It seems to me that the workaround here is straightforward - just always output "position" from VS. The justification to introduce a flag for it is therefore weak - it would incur work for the CTS, for spec complexity, etc, while a fix in SPIRV-Cross is simple.

cdavis5e commented 1 year ago

This has been fixed in SPIRV-Cross/MoltenVK.

cdavis5e commented 1 year ago

Um, I still lack permission to close these bugs...

billhollings commented 1 year ago

Um, I still lack permission to close these bugs...

Sorry about that oversight. I've added you as an admin collaborator to this repo now. Try again when you get a chance.