diff options
author | Jason Ekstrand <[email protected]> | 2017-08-16 16:15:23 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-04 09:21:09 -0800 |
commit | 94ca8e04adf681b0cad6ade1c9f28856efe35ae6 (patch) | |
tree | c23833164f50cab767bfb953f1fb0ac121276847 /src/compiler/glsl/ast.h | |
parent | 0c49aa0624c289164b5501a8724b6d9fdbae7f49 (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/glsl/ast.h')
0 files changed, 0 insertions, 0 deletions