KhronosGroup / Vulkan-Portability

Apache License 2.0
40 stars 4 forks source link

MoltenVK Vulkan 1.0: Point polygon fill mode and depth bias #65

Closed aitor-lunarg closed 6 months ago

aitor-lunarg commented 7 months ago

Failing CTS tests:

dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_point

The test renders a triangle list with points as polygon fill mode. However, Metal does not support fill mode to be points (https://developer.apple.com/documentation/metal/mtltrianglefillmode), so MoltenVK decides to change the input primitive topology type to point instead of triangle list. This seems like a reasonable approach. However, Metal does not support depth bias unless the topology type is triangles (https://developer.apple.com/documentation/metal/mtlrendercommandencoder/1516269-setdepthbias check note). Due to this combination the test fails.

Proposed solutions:

Let me know your thoughts or if I missed anything.

lexaknyazev commented 7 months ago

The original portability subset extension had the pointPolygons flag (https://github.com/KhronosGroup/MoltenVK/issues/1396). It was recently renamed to rasterizationDynamicPolygonModePoints assuming that emulation is feasible (see discussions in https://github.com/KhronosGroup/MoltenVK/pull/2100).

aitor-lunarg commented 6 months ago

Thank you for pointing it out! I was not aware of that flag, I'll close the issue