diff options
author | Elie Tournier <[email protected]> | 2020-02-03 15:33:34 +0000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-14 11:14:58 +0000 |
commit | eeb6d6112859c3ba41f1c8914d503bf1a3dd981d (patch) | |
tree | 19d2409937444930cb7f267828f5fcfd6dd06a1c /src | |
parent | 7e80b03dd15eefb7250b994e311864e720b0b1bb (diff) |
spirv2nir: print nir shader if translation succed
Signed-off-by: Elie Tournier <[email protected]>
Reviewed-by: Erik Faye-Lund <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3678>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/spirv/spirv2nir.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv2nir.c b/src/compiler/spirv/spirv2nir.c index 72c607c458d..62bef2e4897 100644 --- a/src/compiler/spirv/spirv2nir.c +++ b/src/compiler/spirv/spirv2nir.c @@ -79,7 +79,11 @@ int main(int argc, char **argv) nir_shader *nir = spirv_to_nir(map, word_count, NULL, 0, MESA_SHADER_FRAGMENT, "main", &spirv_opts, NULL); - nir_print_shader(nir, stderr); + + if (nir) + nir_print_shader(nir, stderr); + else + fprintf(stderr, "SPIRV to NIR compilation failed\n"); glsl_type_singleton_decref(); |