Robustness2 extension

From the specs about Robustness2, Most accesses must be tightly bounds-checked, out of bounds writes must be discarded, out of bound reads must return zero.
For example, I have a vkImage data, reading with sampler in shader. The sampler creates with .unnormalizedCoordinates = VK_FALSE and .addressModeU = addressModeV = addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT. My question is that Robustness2 extension is enable when reading with sampler in shader? because if out of bounds writes must be discarded, it will conflict with VK_SAMPLER_ADDRESS_MODE_REPEAT

The Vulkan chapter on sampling of a texture explains sampling in such a way that texture coordinates outside of the [0, 1] range don’t correspond to memory addresses outside of the boundaries of the texture. For your example, repeat sampling mode turns a texture coordinate of -0.5 into a texture coordinate of 0.5 before it actually goes out to memory.

As such, it never violates the robustness provisions.

Similarly, clamp-to-border behavior doesn’t access out-of-bounds. When a texture coordinate is past the border, it goes to the border color instead of accessing the texture.