From b3178eb59e69d604012ac7463a93353d4817bc99 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Wed, 11 Oct 2017 02:12:10 +1100 Subject: 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. --- video/out/gpu/spirv_shaderc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'video/out/gpu') 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); -- cgit v1.2.3