Skip to content

anv: Implement VK_EXT_robustness2

The bit new things in robustness2 are null descriptors and proper UBO bounds checking. The UBO bounds checking was added as part of !3777 (merged) and !4447 (merged) so there's nothing to do in this MR. The bulk of this MR, however, is to handle one tiny little line added to the Vulkan spec:

If the access is a load that reads from the same memory locations as a prior store in the same shader invocation, with no other intervening accesses to the same memory locations in that shader invocation, then the result of the load may be the value stored by the store instruction, even if the access is out of bounds. If the load is Volatile, then an out of bounds load must return the appropriate out of bounds value.

This suddenly makes the volatile keyword in GLSL or the Volatile decoration in SPIR-V observable. This MR patches up NIR's handling of volatile in a few optimization passes and adds unit tests for it.

Merge request reports