clover/nir: Register callback for translation messages (v2)
authorPierre Moreau <dev@pmoreau.org>
Sun, 10 May 2020 21:21:56 +0000 (23:21 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 20 Aug 2020 19:48:12 +0000 (19:48 +0000)
commita624faeef98cf06e6effb67f95dc92e70e33f165
tree3c87bceb00923398bbf35315156bf5c289185450
parent2402466a08c370adb19319162ee67ead9024d57b
clover/nir: Register callback for translation messages (v2)

This allows us to add SPIR-V to NIR translation failure messages to the
program’s compilation log, which can then be queried by the user.

v2: Replace the if-statement in `debug_function()` with an assert.

Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
src/gallium/frontends/clover/nir/invocation.cpp