nir: Add pass to handle out-of-bounds access to image ranges and use it in virgl
In order to avoid accessing non-existing images, add a pass so that the shader checks whether an image is available, and if it is not, return a default value 0.
Use it in virgl to avoid that TGSI is created that uses illegal image indices.
@anholt I'm wondering whether calling this pass should be moved to NTT instead of doing it in virgl, your opinion?
Edited by Gert Wollny