ANV: single-layer 2D_ARRAY VkImageViews read from base layer instead of out-of-bounds result with robustImageAccess2.
This (low-priority) bug happens on TGL GT2 hardware with Mesa driver 21.0.3 (and later too, I think).
When using OpImageFetch/OpImageRead with a 2D_ARRAY sampled/storage view having only 1 layer, if the layer coordinate is out-of-bounds, then the view's base level is accessed. Since robustImageAccess2 from VK_EXT_robustness2 is enabled though, the correct behavior should be to return one of {0,0,0,0}
or {0,0,0,one}
, depending on the view format.
Here's a test program:
# the only submodule is volk:
git clone --recurse-submodules https://github.com/Jonathan-Weinstein/vktest.git
git pull --recurse-submodules
cd vktest
make
./vktest.out
The program doesn't use presentation, but it does use the renderdoc api to start/end a frame capture if it detects librenderdoc.so
is already resident.