aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/spirv2nir.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-16 16:04:08 -0700
committerJason Ekstrand <[email protected]>2017-12-04 09:21:09 -0800
commit16dfdeefc8469c9bb8770bab763fd943b62f875d (patch)
treec25774a8a13baf150dc0686df1c6c1bf11a8e7e8 /src/compiler/spirv/spirv2nir.c
parent11bd753c4ece5eafa6fc7c416d25f60371758e1b (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/spirv/spirv2nir.c')
-rw-r--r--src/compiler/spirv/spirv2nir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv2nir.c b/src/compiler/spirv/spirv2nir.c
index 0ae14fb19b1..5957f064b49 100644
--- a/src/compiler/spirv/spirv2nir.c
+++ b/src/compiler/spirv/spirv2nir.c
@@ -72,8 +72,11 @@ int main(int argc, char **argv)
return 1;
}
+ struct spirv_to_nir_options spirv_opts = {};
+
nir_function *func = spirv_to_nir(map, word_count, NULL, 0,
- MESA_SHADER_FRAGMENT, "main", NULL, NULL);
+ MESA_SHADER_FRAGMENT, "main",
+ &spirv_opts, NULL);
nir_print_shader(func->shader, stderr);
return 0;