6ae2844c52
For texture instructions that don't have sampler state we have been incorrectly using sampler index to retrive texture packing information. This is incorrect for two reasons: 1. These instructions don't have a defined sampler index by definition. 2. The driver was not setting it either, so effectively, we have always been using whatever we had set for the first texture, which is obviously bogus. Fix this by running a lowering pass that sets the index to use in backend_flags, which is what the compiler expects, based on the texture index, which is what we want in GL since we make this decision based on the texture format. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537>