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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
This commit is contained in:
Emma Anholt 2022-04-14 12:04:56 -07:00 committed by Marge Bot
parent af718674ab
commit 801dca3c40

View file

@ -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) {