diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-01 03:41:29 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-01 13:03:52 +0300 |
commit | 53a806f6dffb2a778e383a82c3d0cdb6e9d9d552 (patch) | |
tree | 3bfc9bb0d705a1c198c19b62fe134bda525e51ad /source/blender/gpu/opengl/gl_shader_interface.cc | |
parent | 5ec0250df9d8cf44d099e5b6fffca99bf9cf0c46 (diff) |
GPU: Move UBO binding validation to GL backend
This also make the validation quicker by tracking the currently
bound slots.
Diffstat (limited to 'source/blender/gpu/opengl/gl_shader_interface.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_shader_interface.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc b/source/blender/gpu/opengl/gl_shader_interface.cc index 423db5c8c97..d611efcd975 100644 --- a/source/blender/gpu/opengl/gl_shader_interface.cc +++ b/source/blender/gpu/opengl/gl_shader_interface.cc @@ -124,6 +124,8 @@ GLShaderInterface::GLShaderInterface(GLuint program) glGetProgramiv(program, GL_ACTIVE_UNIFORMS, &active_uniform_len); uniform_len = active_uniform_len; + BLI_assert(ubo_len <= 16 && "enabled_ubo_mask_ is uint16_t"); + /* Work around driver bug with Intel HD 4600 on Windows 7/8, where * GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH does not work. */ if (attr_len > 0 && max_attr_name_len == 0) { |