etnaviv: nir: Add assertion to prevent src2 conflicts in texture instructions

Add an assert to catch cases where both nir_tex_src_comparator and
nir_tex_src_ddy attempt to use the same src2 slot in texture instructions.
This prevents silent overwrites that could cause incorrect shader
compilation.

The assertion helps catch potential issues in complex texture operations
like those found in dEQP textureGrad shadow tests, where multiple
texture sources compete for the same hardware slot.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35531>
This commit is contained in:
Christian Gmeiner
2025-06-14 07:43:07 +02:00
committed by Marge Bot
parent 3225d3e918
commit 07f5cbcd9b

View File

@@ -556,6 +556,7 @@ emit_tex(struct etna_compile *c, nir_tex_instr * tex)
break;
case nir_tex_src_comparator:
case nir_tex_src_ddy:
assert(!src2);
src2 = &tex->src[i].src;
break;
default: