diff options
author | James Ross-Gowan <rossy@jrg.systems> | 2017-10-11 02:12:10 +1100 |
---|---|---|
committer | James Ross-Gowan <rossy@jrg.systems> | 2017-10-11 12:22:21 +1100 |
commit | b3178eb59e69d604012ac7463a93353d4817bc99 (patch) | |
tree | ccd85d4a582c2f135a700e8fa91e0656269993d3 | |
parent | 5f012f2d16710c81824c5f037a3849d3552b9118 (diff) |
vo_gpu: shaderc: include debug info when --gpu-debug is set
This adds symbol information to the generated SPIR-V, which shows up in
the SPIR-V assembly dump. It's also useful for potential RA backends
that use SPIRV-Cross, since the symbol information is used in the
generated shader source.
-rw-r--r-- | video/out/gpu/spirv_shaderc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/gpu/spirv_shaderc.c b/video/out/gpu/spirv_shaderc.c index 9b429ca2c2..ee702053d5 100644 --- a/video/out/gpu/spirv_shaderc.c +++ b/video/out/gpu/spirv_shaderc.c @@ -33,6 +33,8 @@ static bool shaderc_init(struct ra_ctx *ctx) shaderc_compile_options_set_optimization_level(p->opts, shaderc_optimization_level_size); + if (ctx->opts.debug) + shaderc_compile_options_set_generate_debug_info(p->opts); int ver, rev; shaderc_get_spv_version(&ver, &rev); |