nir: Only float and double types can be matrices
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 5 Dec 2016 19:51:54 +0000 (11:51 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 13 Dec 2016 01:17:12 +0000 (17:17 -0800)
commita0ce9ff8c49c03d8e952c26ac3e9274ac2f24c8c
treede642e7685722b57de3b70f8ec1366d49c9798f6
parent75149088bea168a10f47df08fc62bcfeed744ce9
nir: Only float and double types can be matrices

In 19a541f (nir: Get rid of nir_constant_data) a number of places that
operated on nir_constant::values were mechanically converted to operate
on the whole array without regard for the base type.  Only
GLSL_TYPE_FLOAT and GLSL_TYPE_DOUBLE can be matrices, so only those
types can have data in the non-0 array element.

See also b870394.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/nir/nir_print.c