diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-27 12:27:24 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-27 12:30:06 +0300 |
commit | 0379ddac7d68114798c8963821fd821c1b3d7d28 (patch) | |
tree | d84f68de15b71ae873fcce938bbc6176ba8a934d /source/blender/gpu/intern/gpu_shader_interface.hh | |
parent | cf31c4ba183d5e64c766ed17b6be974d1d1f01ff (diff) |
GPUShaderCreateInfo: Add optionnal check for optimized out resources
This opt-in functionnality enabled developper keep track of unused
resources present in the `GPUShaderCreateInfo` descriptors of their
shaders.
The output is pretty noisy at the moment so we do not enforce its usage.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_interface.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_interface.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh index 8c6d6ede11b..7f99619c98c 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.hh +++ b/source/blender/gpu/intern/gpu_shader_interface.hh @@ -107,6 +107,10 @@ class ShaderInterface { { return input_lookup(inputs_ + attr_len_ + ubo_len_ + uniform_len_, ssbo_len_, name); } + inline const ShaderInput *ssbo_get(const int binding) const + { + return input_lookup(inputs_ + attr_len_ + ubo_len_ + uniform_len_, ssbo_len_, binding); + } inline const char *input_name_get(const ShaderInput *input) const { |