summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-11-03 00:31:22 -0800
committerJason Ekstrand <[email protected]>2015-11-18 12:28:32 -0800
commit9ff71b649b4b3808a9e17ce69743c6037fd6603c (patch)
tree43664cd40ec6c9edb84b72a59cae59cd6d90797a /bin
parent7bc097899924f40140981567c7bb52297dd801f2 (diff)
i965/nir: Validate that NIR passes call nir_metadata_preserve().
Failing to call nir_metadata_preserve() can have nasty consequences: some pass breaks dominance information, but leaves it marked as valid, causing some subsequent pass to go haywire and probably crash. This pass adds a simple validation mechanism to ensure passes handle this properly. We add a new bogus metadata flag that isn't used for anything in particular, set it before each pass, and ensure it *isn't* still set after the pass. nir_metadata_preserve will reset the flag, so correct passes will work, and bad passes will assert fail. (I would have made these functions static inline, but nir.h is included in C++, so we can't bit-or enums without lots of casting...) Thanks to Dylan Baker for the idea. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions