mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 09:00:08 +01:00
nv50/ir/nir: Fix zero source handling of tex instructions.
For TXQ we know make sure that we at least add one source. If the nir
instruction however didn't had any sources, we inserted a fake 0 source
ending up with two 0s for TXQ.
It's unclear to me if we have other ops where this would be necessary.
Fixes: 85a31fa1fc ("nv50/ir/nir: fix txq emission on MS textures")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24373>
This commit is contained in:
parent
5df97c27dc
commit
8d7f682bdb
1 changed files with 4 additions and 4 deletions
|
|
@ -2958,10 +2958,6 @@ Converter::visit(nir_tex_instr *insn)
|
|||
srcs.push_back(getSSA());
|
||||
}
|
||||
|
||||
if (insn->op == nir_texop_texture_samples)
|
||||
srcs.push_back(zero);
|
||||
else if (!insn->num_srcs)
|
||||
srcs.push_back(loadImm(NULL, 0));
|
||||
if (biasIdx != -1)
|
||||
srcs.push_back(getSrc(&insn->src[biasIdx].src, 0));
|
||||
// TXQ requires a lod argument for all queries we care about here.
|
||||
|
|
@ -3010,6 +3006,10 @@ Converter::visit(nir_tex_instr *insn)
|
|||
if (target.isMS() || (op == OP_TEX && prog->getType() != Program::TYPE_FRAGMENT))
|
||||
lz = true;
|
||||
|
||||
// TODO figure out which instructions still need this.
|
||||
if (srcs.empty())
|
||||
srcs.push_back(loadImm(NULL, 0));
|
||||
|
||||
TexInstruction *texi = mkTex(op, target.getEnum(), r, s, defs, srcs);
|
||||
texi->tex.levelZero = lz;
|
||||
texi->tex.mask = mask;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue