This series has two objectives: 1) Improve logging to provide more detail and provide hooks so we can plumb errors and warnings through to debug_report extensions.
2) Improve error handling so that not all errors result in killing the process. This is done by adding new spv_fail and spv_assert helpers which log the error and longjump back to a point where we can clean up and return NULL without crashing. There is still quite a ways to go with error handling if we want to be able to guarantee that we won't crash given an arbitrary stream of bytes. However, this should at least be a step in the right direction. There are probably at least a couple of cases where I could have left an assert() as an actual "kill the process" assert because it's testing for internal consistency. However, the vast majority of them are validation checks so it seemed better to just search+replace them all and we can convert the few that we want back to real asserts later. Cc: "Ian Romanick" <i...@freedesktop.org> Jason Ekstrand (9): ralloc: Allow reparenting to a NULL context spirv: Parent the nir_shader to the builder while building spirv: Re-arrange vtn_builder initialization spirv: Rework logging spirv: Do something useful with OpSource util: Add a NORETURN macro spirv: Add vtn_fail and vtn_assert helpers spirv: Replace assert with vtn_assert spirv: Replace unreachable with vtn_fail configure.ac | 1 + src/amd/vulkan/radv_pipeline.c | 2 +- src/compiler/spirv/nir_spirv.h | 17 +- src/compiler/spirv/spirv2nir.c | 3 +- src/compiler/spirv/spirv_to_nir.c | 496 +++++++++++++++++++++++-------------- src/compiler/spirv/vtn_alu.c | 46 ++-- src/compiler/spirv/vtn_cfg.c | 59 ++--- src/compiler/spirv/vtn_glsl450.c | 18 +- src/compiler/spirv/vtn_private.h | 56 ++++- src/compiler/spirv/vtn_variables.c | 253 +++++++++---------- src/intel/vulkan/anv_pipeline.c | 2 +- src/util/macros.h | 6 + src/util/ralloc.c | 2 +- 13 files changed, 578 insertions(+), 383 deletions(-) -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev