1
mirror of https://github.com/mpv-player/mpv synced 2024-10-30 04:46:41 +01:00

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.
This commit is contained in:
James Ross-Gowan 2017-10-11 02:12:10 +11:00
parent 5f012f2d16
commit b3178eb59e

View File

@ -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);