From 16edfc516e97042afdc3e35d46ebafcca8cd1bd9 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 27 Sep 2017 18:03:00 +0200 Subject: --debug-gpu-shader: Dump GLSL shaders to disk This is really convenient for development. Either for profiling the generated shaders or to check if the generated code is correct. It writes the shaders to the temporary blender session folder. --- source/creator/creator_args.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index 52a9165bbcb..c38f19397c3 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -548,6 +548,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo BLI_argsPrintArgDoc(ba, "--debug-depsgraph-no-threads"); BLI_argsPrintArgDoc(ba, "--debug-gpumem"); + BLI_argsPrintArgDoc(ba, "--debug-gpu-shaders"); BLI_argsPrintArgDoc(ba, "--debug-wm"); BLI_argsPrintArgDoc(ba, "--debug-all"); BLI_argsPrintArgDoc(ba, "--debug-io"); @@ -1805,6 +1806,8 @@ void main_args_setup(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) CB_EX(arg_handle_debug_mode_generic_set, depsgraph_no_threads), (void *)G_DEBUG_DEPSGRAPH_NO_THREADS); BLI_argsAdd(ba, 1, NULL, "--debug-gpumem", CB_EX(arg_handle_debug_mode_generic_set, gpumem), (void *)G_DEBUG_GPU_MEM); + BLI_argsAdd(ba, 1, NULL, "--debug-gpu-shaders", + CB_EX(arg_handle_debug_mode_generic_set, gpumem), (void *)G_DEBUG_GPU_SHADERS); BLI_argsAdd(ba, 1, NULL, "--verbose", CB(arg_handle_verbosity_set), NULL); -- cgit v1.2.3