diff --git a/.pick_status.json b/.pick_status.json index 1dc64bf5e72..819b591f219 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -373,7 +373,7 @@ "description": "nv50/ir/nir: fix txq emission on MS textures", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "bb032d8b629cd42c8b7767d9f2156530b1b746f9" }, diff --git a/src/nouveau/codegen/nv50_ir_from_nir.cpp b/src/nouveau/codegen/nv50_ir_from_nir.cpp index abc9d0e9a82..3b1a78d588b 100644 --- a/src/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/nouveau/codegen/nv50_ir_from_nir.cpp @@ -3101,8 +3101,12 @@ Converter::visit(nir_tex_instr *insn) srcs.push_back(loadImm(NULL, 0)); if (biasIdx != -1) 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)); + else if (op == OP_TXQ) + srcs.push_back(zero); // TXQ always needs an LOD else if (op == OP_TXF) lz = true; if (msIdx != -1) @@ -3169,6 +3173,7 @@ Converter::visit(nir_tex_instr *insn) texi->tex.mask = 0x8; texi->tex.query = TXQ_DIMS; break; + // TODO: TXQ_SAMPLE_POSITION needs the sample id instead of the LOD emited further up. default: break; }