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:
authorBrecht Van Lommel <brecht@blender.org>2020-05-18 22:22:02 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-05-18 22:22:02 +0300
commitc4ee94328fba1f70ca29df42ffff471aaeee2a82 (patch)
treedaeef9b1abd5a868f6726396ec47051c35a1ae08 /source/blender/gpu
parent0bdb827bdf9e68e8e2fc61ac7ca1fa685770b593 (diff)
Fix invalid bit shift when GPU shader attribute is not found
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_interface.c b/source/blender/gpu/intern/gpu_shader_interface.c
index cb1cd9a6f6d..8cd1afad536 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.c
+++ b/source/blender/gpu/intern/gpu_shader_interface.c
@@ -257,7 +257,9 @@ GPUShaderInterface *GPU_shaderinterface_create(int32_t program)
input->location = glGetAttribLocation(program, name);
- shaderface->enabled_attr_mask |= (1 << input->location);
+ if (input->location != -1) {
+ shaderface->enabled_attr_mask |= (1 << input->location);
+ }
set_input_name(shaderface, input, name, name_len);