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_create_info.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_create_info.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_create_info.hh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh index f8149bc7be0..6236e92a226 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.hh +++ b/source/blender/gpu/intern/gpu_shader_create_info.hh @@ -559,7 +559,9 @@ struct ShaderCreateInfo { StringRefNull info_name1 = "", StringRefNull info_name2 = "", StringRefNull info_name3 = "", - StringRefNull info_name4 = "") + StringRefNull info_name4 = "", + StringRefNull info_name5 = "", + StringRefNull info_name6 = "") { additional_infos_.append(info_name0); if (!info_name1.is_empty()) { @@ -574,6 +576,12 @@ struct ShaderCreateInfo { if (!info_name4.is_empty()) { additional_infos_.append(info_name4); } + if (!info_name5.is_empty()) { + additional_infos_.append(info_name5); + } + if (!info_name6.is_empty()) { + additional_infos_.append(info_name6); + } return *(Self *)this; } |