spirv: Tell which opcode or value is unhandled when failing
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 10 Apr 2019 18:13:40 +0000 (11:13 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 16 Apr 2019 18:11:10 +0000 (11:11 -0700)
commita0dae78e720c980a311c6c3cfd8ddcef70102bfe
tree582bb284fdd515269af1553a9a1db041618c8d52
parent0ccfe741b106efea2f2c5d526d50f4bce61d701e
spirv: Tell which opcode or value is unhandled when failing

v2: When available, include the opcode name too. (Karol)

v3: Use more to_string helpers. (Karol)
    Include the wrong bit_size in those failures.
    Include the capability number in spv_check_supported.
    Provide vtn_fail_with_* macros to avoid noise in the call sites.

v4: Provide macros only for opcode and decoration, which have enough
    usages to justify them. (Jason)

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_alu.c
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c