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-01-24 15:23:50 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-24 15:28:33 +0300
commite774f2c901f291c0cd721285a6e25052b0e9e5c2 (patch)
treec29e4824e7af93f07fbb42ded7cb3e54fddcd49e /source/blender/gpu/intern/gpu_shader_create_info.hh
parent7708a848c96915425b37db937478b4ecd227fc0d (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.hh3
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);
+
/** \} */
};