projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fad962e
)
tgsi_to_nir: add assertions for max varying slots
author
Marek Olšák
<marek.olsak@amd.com>
Tue, 13 Aug 2019 22:14:17 +0000
(18:14 -0400)
committer
Marek Olšák
<marek.olsak@amd.com>
Tue, 13 Aug 2019 22:15:53 +0000
(18:15 -0400)
Nine uses GENERIC slots > 31.
Trivial.
src/gallium/auxiliary/nir/tgsi_to_nir.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/nir/tgsi_to_nir.c
b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index cb03c56e406b96c816ac04e2e3b5d661ec6afdfe..1fc886991f216b5823dd5eeeb360b3d908afb003 100644
(file)
--- 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;