mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
nv50/ir/nir: fix txq emission on MS textures
In GL and a lot of Vulkan if we end up with either a lod or an ms index. Sadly in Vulkan we can end up with both and have to choose properly. For TXQ we have to emit a zero LOD. For TXF we have to emit the ms index. Fixes:bb032d8b62("nv50/ir/nir: implement nir_instr_type_tex") Signed-off-by: Karol Herbst <git@karolherbst.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24343> (cherry picked from commit85a31fa1fc)
This commit is contained in:
parent
dd98f98764
commit
68cf3ae3e1
2 changed files with 7 additions and 2 deletions
|
|
@ -22894,7 +22894,7 @@
|
||||||
"description": "nv50/ir/nir: fix txq emission on MS textures",
|
"description": "nv50/ir/nir: fix txq emission on MS textures",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "bb032d8b629cd42c8b7767d9f2156530b1b746f9",
|
"because_sha": "bb032d8b629cd42c8b7767d9f2156530b1b746f9",
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -2970,8 +2970,12 @@ Converter::visit(nir_tex_instr *insn)
|
||||||
srcs.push_back(loadImm(NULL, 0));
|
srcs.push_back(loadImm(NULL, 0));
|
||||||
if (biasIdx != -1)
|
if (biasIdx != -1)
|
||||||
srcs.push_back(getSrc(&insn->src[biasIdx].src, 0));
|
srcs.push_back(getSrc(&insn->src[biasIdx].src, 0));
|
||||||
if (lodIdx != -1)
|
// TXQ requires a lod argument for all queries we care about here.
|
||||||
|
// For other ops on MS textures we skip it.
|
||||||
|
if (lodIdx != -1 && !target.isMS())
|
||||||
srcs.push_back(getSrc(&insn->src[lodIdx].src, 0));
|
srcs.push_back(getSrc(&insn->src[lodIdx].src, 0));
|
||||||
|
else if (op == OP_TXQ)
|
||||||
|
srcs.push_back(zero); // TXQ always needs an LOD
|
||||||
else if (op == OP_TXF)
|
else if (op == OP_TXF)
|
||||||
lz = true;
|
lz = true;
|
||||||
if (msIdx != -1)
|
if (msIdx != -1)
|
||||||
|
|
@ -3038,6 +3042,7 @@ Converter::visit(nir_tex_instr *insn)
|
||||||
texi->tex.mask = 0x8;
|
texi->tex.mask = 0x8;
|
||||||
texi->tex.query = TXQ_DIMS;
|
texi->tex.query = TXQ_DIMS;
|
||||||
break;
|
break;
|
||||||
|
// TODO: TXQ_SAMPLE_POSITION needs the sample id instead of the LOD emited further up.
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue