Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index 97673e92bcf..bb657ff1645 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -166,6 +166,11 @@ void Shader::print_log(Span<const char *> sources, char *log, const char *stage,
found_line_id = true;
break;
}
+/* TODO(fclem) Make this an option to display N lines before error. */
+#if 0 /* Uncomment to print shader file up to the error line to have more context. */
+ BLI_dynstr_appendf(dynstr, "%5d | ", src_line_index);
+ BLI_dynstr_nappend(dynstr, src_line, (src_line_end + 1) - src_line);
+#endif
/* Continue to next line. */
src_line = src_line_end + 1;
src_line_index++;