From: Marek Olšák Date: Tue, 13 Aug 2019 22:14:17 +0000 (-0400) Subject: tgsi_to_nir: add assertions for max varying slots X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5e1f9ccef249b2f897179150bdb18d564c25ddc;p=mesa.git tgsi_to_nir: add assertions for max varying slots Nine uses GENERIC slots > 31. Trivial. --- diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index cb03c56e406..1fc886991f2 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -136,6 +136,7 @@ tgsi_varying_semantic_to_slot(unsigned semantic, unsigned index) case TGSI_SEMANTIC_PSIZE: return VARYING_SLOT_PSIZ; case TGSI_SEMANTIC_GENERIC: + assert(index < 32); return VARYING_SLOT_VAR0 + index; case TGSI_SEMANTIC_FACE: return VARYING_SLOT_FACE; @@ -151,6 +152,7 @@ tgsi_varying_semantic_to_slot(unsigned semantic, unsigned index) case TGSI_SEMANTIC_CLIPVERTEX: return VARYING_SLOT_CLIP_VERTEX; case TGSI_SEMANTIC_TEXCOORD: + assert(index < 8); return VARYING_SLOT_TEX0 + index; case TGSI_SEMANTIC_PCOORD: return VARYING_SLOT_PNTC;