From: Faith Ekstrand Date: Tue, 31 Jan 2023 02:12:02 +0000 (-0600) Subject: nouveau/codegen: Handle/indirect goes before sample index X-Git-Tag: upstream/23.3.3~4873 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9d385d77716d8ca48aa549ffd5832c323f68421;p=platform%2Fupstream%2Fmesa.git nouveau/codegen: Handle/indirect goes before sample index Reviewed-by: Karol Herbst Part-of: --- diff --git a/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 6dae932..e7b47a5 100644 --- a/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -931,8 +931,8 @@ bool NVC0LoweringPass::handleTEX(TexInstruction *i) { const int dim = i->tex.target.getDim() + i->tex.target.isCube(); - const int arg = i->tex.target.getArgCount(); - const int lyr = arg - (i->tex.target.isMS() ? 2 : 1); + const int arg = i->tex.target.getArgCount() - i->tex.target.isMS(); + const int lyr = arg - 1; const int chipset = prog->getTarget()->getChipset(); /* Only normalize in the non-explicit derivatives case. For explicit