diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-07-09 10:00:13 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-07-09 10:00:13 +0300 |
commit | dbcdc536b6a20c7218c3b6f4871d8c29e5127366 (patch) | |
tree | 1f551ed67c40e344dd1d5c5af79472686098914a /source/blender/gpu | |
parent | 93092876871adf96338ac3b7a1312cc984b84c8a (diff) |
Fix crash: incorrect uniform location for builtins.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_shader_interface.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc b/source/blender/gpu/opengl/gl_shader_interface.cc index d9291cd642a..c5c8e2397d1 100644 --- a/source/blender/gpu/opengl/gl_shader_interface.cc +++ b/source/blender/gpu/opengl/gl_shader_interface.cc @@ -334,7 +334,7 @@ GLShaderInterface::GLShaderInterface(const UniformBuiltinStructType *type_info, for (int32_t u_int = 0; u_int < GPU_NUM_UNIFORMS; u_int++) { GPUUniformBuiltin u = static_cast<GPUUniformBuiltin>(u_int); const ShaderInput *block = this->uniform_get(builtin_uniform_name(u)); - builtins_[u] = (block != nullptr) ? block->binding : -1; + builtins_[u] = (block != nullptr) ? block->location : -1; } /* Builtin Uniforms Blocks */ |