summaryrefslogtreecommitdiffstats
path: root/src/compiler/shader_enums.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-16 16:15:23 -0700
committerJason Ekstrand <[email protected]>2017-12-04 09:21:09 -0800
commit94ca8e04adf681b0cad6ade1c9f28856efe35ae6 (patch)
treec23833164f50cab767bfb953f1fb0ac121276847 /src/compiler/shader_enums.h
parent0c49aa0624c289164b5501a8724b6d9fdbae7f49 (diff)
spirv: Add vtn_fail and vtn_assert helpers
These helpers are much nicer than just using assert because they don't kill your process. Instead, it longjmps back to spirv_to_nir(), cleans up all the temporary memory, and nicely returns NULL. While crashing is completely OK in the Vulkan world, it's not considered to be quite so nice in GL. This should help us to make SPIR-V parsing much more robust. The one downside here is that vtn_assert is not compiled out in release builds like assert() is so it isn't free. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/shader_enums.h')
0 files changed, 0 insertions, 0 deletions