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:
authorClément Foucault <foucault.clem@gmail.com>2022-02-04 22:16:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-02-04 22:21:41 +0300
commitc017820692a739762a3a3958baa4d29eb1526b92 (patch)
tree73564538d483b043b87d104de7964d6899af76ac /source/blender/gpu/intern/gpu_shader_private.hh
parent671fb286abd2206b1e93507625412d8081f69fde (diff)
GPUShader: Improve error/warning logging experience
Thanks to the new `ShaderCreateInfo` we now include source files without any modification. This let us query which are the source files passed to the `print_log` function. The log will now include a file with row and column number which is interpreted as a link in most IDE. DEBUG_CONTEXT_LINES will add more lines around the error lines for more context. This is also useful if the error line is imprecise (because of driver bugs) and the reported line is not sufficient to know the location of the error. The DEBUG_DEPENDENCIES option will display the list of included files in the shader sources. Note that it will not print generated source. This commit also fixes some issues with unhelpful logs, bogus row & column numbers, other error format, and bug if row was 0.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_private.hh')
-rw-r--r--source/blender/gpu/intern/gpu_shader_private.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh
index 3bfecdefba7..93c33811ee0 100644
--- a/source/blender/gpu/intern/gpu_shader_private.hh
+++ b/source/blender/gpu/intern/gpu_shader_private.hh
@@ -120,6 +120,7 @@ struct LogCursor {
struct GPULogItem {
LogCursor cursor;
+ bool source_base_row = false;
Severity severity = Severity::Unknown;
};