diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-06-28 13:20:59 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-06-28 13:23:10 +0300 |
commit | 1b942ef90c9b4b7fe98af50357aa76b74754f7ff (patch) | |
tree | 498267617e896181ce67d6c68b219289b76eec6f /source/blender/gpu/opengl/gl_shader.hh | |
parent | dbd4ff4163617baa3d93dca257be3b2610c28782 (diff) |
GPU: Refactored +cleanup compilation log parsing.
Old implementation has a single parser of many different
formats. With the introduction of Vulkan this would lead
to another parser in the same function. This patch
separates the log parsing using a visitor pattern so the
log parsing can be configured per GPU backend or even
per driver.
With Vulkan we manage the compiler our self so the parsing
will become more straight forward. The OpenGL part depends
on many factors (OS, Driver) and perhaps even GPU.
Diffstat (limited to 'source/blender/gpu/opengl/gl_shader.hh')
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_shader.hh b/source/blender/gpu/opengl/gl_shader.hh index 48aaaf2283d..770bc29747e 100644 --- a/source/blender/gpu/opengl/gl_shader.hh +++ b/source/blender/gpu/opengl/gl_shader.hh @@ -84,5 +84,16 @@ class GLShader : public Shader { MEM_CXX_CLASS_ALLOC_FUNCS("GLShader"); }; +class GLLogParser : public GPULogParser { + public: + char *parse_line(char *log_line, GPULogItem &log_item) override; + + protected: + char *skip_severity_prefix(char *log_line, GPULogItem &log_item); + char *skip_severity_keyword(char *log_line, GPULogItem &log_item); + + MEM_CXX_CLASS_ALLOC_FUNCS("GLLogParser"); +}; + } // namespace gpu } // namespace blender |