spirv: Rework logging
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 16 Aug 2017 23:04:08 +0000 (16:04 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Dec 2017 17:21:09 +0000 (09:21 -0800)
commit16dfdeefc8469c9bb8770bab763fd943b62f875d
treec25774a8a13baf150dc0686df1c6c1bf11a8e7e8
parent11bd753c4ece5eafa6fc7c416d25f60371758e1b
spirv: Rework logging

This commit reworks the way that logging works in SPIR-V to provide
richer and more detailed logging infrastructure.  This commit contains
several improvements over the old mechanism:

 1) Log messages are now more detailed.  They contain the SPIR-V byte
    offset as well as source language information from OpSource and
    OpLine.

 2) There is now a logging callback mechanism so that errors can get
    propagated to the client through debug callbak extensions.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/spirv2nir.c
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_private.h