diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-26 14:46:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-26 14:46:37 +0300 |
commit | 5b299e5999e2b59e30edd4e770f64aa700e482d6 (patch) | |
tree | 17052358b339e20c44ca942e62b735ef63b23f88 /source/blender/gpu/intern/gpu_shader_interface.hh | |
parent | 9bce134e56c28045aee37080f5c5b6622a07927b (diff) |
D13910: Workbench: Port shaders to use GPUShaderCreateInfo
Also adds a few things to GPUShader for easily create shaders.
Heavy usage of macros to compose the createInfo and avoid
duplications and copy paste bugs.
This makes the link between the shader request functions
(in workbench_shader.cc) and the actual createInfo a bit
obscure since the names are composed and not searchable.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D13910
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_interface.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_interface.hh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh index 735b8fea71d..44dadec7b84 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.hh +++ b/source/blender/gpu/intern/gpu_shader_interface.hh @@ -189,7 +189,7 @@ inline const char *ShaderInterface::builtin_uniform_name(GPUUniformBuiltin u) case GPU_UNIFORM_COLOR: return "color"; case GPU_UNIFORM_BASE_INSTANCE: - return "baseInstance"; + return "gpu_BaseInstance"; case GPU_UNIFORM_RESOURCE_CHUNK: return "resourceChunk"; case GPU_UNIFORM_RESOURCE_ID: @@ -211,6 +211,13 @@ inline const char *ShaderInterface::builtin_uniform_block_name(GPUUniformBlockBu return "modelBlock"; case GPU_UNIFORM_BLOCK_INFO: return "infoBlock"; + + case GPU_UNIFORM_BLOCK_DRW_VIEW: + return "drw_view"; + case GPU_UNIFORM_BLOCK_DRW_MODEL: + return "drw_matrices"; + case GPU_UNIFORM_BLOCK_DRW_INFOS: + return "drw_infos"; default: return NULL; } |