OSDN Git Service

nir/validate: Validate that bit sizes and components always match
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 3 Mar 2017 00:25:59 +0000 (16:25 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 14 Mar 2017 14:36:40 +0000 (07:36 -0700)
commit370d68babcbb8b2e80fb866429e792ee3c43ffeb
treeabf1a2510b0eb335299a7b448efed2a5163e6cc6
parente9a45a3d5da17922b7a02515cff05681728cf99c
nir/validate: Validate that bit sizes and components always match

We've always required bit sizes to match but the rules for number of
components have been a bit loose.  You've never been allowed to source
from something with less components than you consume, but more has
always been fine.  This changes the validator to require that they match
exactly.  The fact that they don't always match has been a source of
confusion in NIR for quite some time and it's time we got rid of it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_validate.c