Follow-up from "v3dv: expose shaderImageGatherExtended"
The following discussion from !23616 (merged) should be addressed:
-
@alyssa started a discussion: (+4 comments) [PATCH 1/3] nir/lower_tex: copy sampler index when creating copy of tex instruction
I don't think this is the right approach.
The commit message says v3d wants this -- why? The hardware may need a sampler -- that's fine -- but that detail should be handled internally to the driver. From a NIR perspective,
sampler_index
for a samplerless read is formally undefined. From a Gallium perspective, there may not be a sampler associated with a non-sampled texture, that is also formally undefined.I get that it works but it's not the right driver behaviour. Could you explain a bit about v3d's requirements so we can figure out the best approach? I don't want us adding hacks into NIR.