From 801dca3c400547c20f5cf16fe3a240a09ffc9f03 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 14 Apr 2022 12:04:56 -0700 Subject: [PATCH] nouveau/nir: Fix edgeflag input detection. VERT_ATTRIB_EDGEFLAG is above GENERIC0, so it was being offset and thus not recognized by vert_attrib_to_tgsi_semantic(). Reviewed-by: Karol Herbst Part-of: --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp index 761f107f81c..51b12c189a1 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -1056,7 +1056,7 @@ bool Converter::assignSlots() { info_out->numPatchConstants = MAX2(info_out->numPatchConstants, index + slots); break; case Program::TYPE_VERTEX: - if (slot >= VERT_ATTRIB_GENERIC0) + if (slot >= VERT_ATTRIB_GENERIC0 && slot < VERT_ATTRIB_GENERIC0 + VERT_ATTRIB_GENERIC_MAX) slot = VERT_ATTRIB_GENERIC0 + vary; vert_attrib_to_tgsi_semantic((gl_vert_attrib)slot, &name, &index); switch (name) {