Mesa (main): nouveau/nir: Fix edgeflag input detection.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 20 22:13:40 UTC 2022
Module: Mesa
Branch: main
Commit: 801dca3c400547c20f5cf16fe3a240a09ffc9f03
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=801dca3c400547c20f5cf16fe3a240a09ffc9f03
Author: Emma Anholt <emma at anholt.net>
Date: Thu Apr 14 12:04:56 2022 -0700
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 <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
---
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) {
More information about the mesa-commit
mailing list