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")
(cherry picked from commit 47a1565c3d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32119>
This commit is contained in:
Karol Herbst 2024-11-07 20:26:53 +01:00 committed by Dylan Baker
parent 1ab129ba70
commit b856d0d3cc
2 changed files with 2 additions and 2 deletions

View file

@ -324,7 +324,7 @@
"description": "nv/codegen: Do not use a zero immediate for tex instructions",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "85a31fa1fc906d500e10a7fa5c9973aa17e7f1d6",
"notes": null

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)