diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-24 15:23:50 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-24 15:28:33 +0300 |
commit | e774f2c901f291c0cd721285a6e25052b0e9e5c2 (patch) | |
tree | c29e4824e7af93f07fbb42ded7cb3e54fddcd49e /source/blender/gpu/intern/gpu_shader_create_info.hh | |
parent | 7708a848c96915425b37db937478b4ecd227fc0d (diff) |
GPUShaderCreateInfo: Add manual validation of bindpoints
Some drivers/glsl compilers will not warn about multiple resources using
the same binding, creating silent errors.
This patch checks for this case and outputs a descriptive error message if
a particular createInfo merge error is founds.
Other validation can be added later.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_create_info.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_create_info.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh index a1ebdb0ec51..c7b3ac5ca37 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.hh +++ b/source/blender/gpu/intern/gpu_shader_create_info.hh @@ -597,6 +597,9 @@ struct ShaderCreateInfo { /* WARNING: Recursive. */ void finalize(); + /** Error detection that some backend compilers do not complain about. */ + void validate(const ShaderCreateInfo &other_info); + /** \} */ }; |