nir: Don't print swizzles when there are more than 4 components
authorMatt Turner <mattst88@gmail.com>
Sat, 28 Oct 2017 01:15:46 +0000 (18:15 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 8 Nov 2017 21:22:26 +0000 (13:22 -0800)
commit77a63d190a9bd6bcb6d6d8eb9bc734c0b18ee0e3
treefbc898e588f98e7bf340391963377ec6b7f367eb
parent34593e978c9331ad09ab10e8fcafa3809615e63d
nir: Don't print swizzles when there are more than 4 components

... as can happen with various types like mat4, or else we'll smash the
stack writing past the end of components_local[].

Fixes: 5a0d3e1129b7 ("nir: Print the components referenced for split or
                      packed shader in/outs.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_print.c