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>2020-09-04 23:19:36 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 18:49:14 +0300
commit7d4adbdfaba4f23b2adbf96f97ce18806aca31c8 (patch)
tree4797d2fda9bb09a0c9a33b1b49a5f12b8a4e3bb9 /source/blender/gpu/intern/gpu_shader_interface.hh
parent541de201fe24ededf9ba9535d6919fd7087c020d (diff)
GLTexture: Add validation for empty slots before drawing
This is to have better error detection in debug builds. This is not a replacement for a full check like in renderdoc but it might catch some issues early on.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_interface.hh')
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh
index 265fe90fc76..f76339d3adb 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.hh
+++ b/source/blender/gpu/intern/gpu_shader_interface.hh
@@ -93,6 +93,11 @@ class ShaderInterface {
return input_lookup(inputs_ + attr_len_ + ubo_len_, uniform_len_, name);
}
+ inline const ShaderInput *texture_get(const int binding) const
+ {
+ return input_lookup(inputs_ + attr_len_ + ubo_len_, uniform_len_, binding);
+ }
+
inline const char *input_name_get(const ShaderInput *input) const
{
return name_buffer_ + input->name_offset;