nv/codegen: Do not use a zero immediate for tex instructions

They aren't always legal for tex instructions, specifically for TXQ when
an actual source is needed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11999
Fixes: 85a31fa1fc ("nv50/ir/nir: fix txq emission on MS textures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32043>
This commit is contained in:
Karol Herbst
2024-11-07 20:26:53 +01:00
committed by Marge Bot
parent 2c3dd2a37d
commit 47a1565c3d
+1 -1
View File
@@ -3151,7 +3151,7 @@ Converter::visit(nir_tex_instr *insn)
if (lodIdx != -1 && !target.isMS())
srcs.push_back(getSrc(&insn->src[lodIdx].src, 0));
else if (op == OP_TXQ)
srcs.push_back(zero); // TXQ always needs an LOD
srcs.push_back(loadImm(NULL, 0)); // TXQ always needs an LOD
else if (op == OP_TXF)
lz = true;
if (msIdx != -1)