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>2022-02-18 23:33:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-02-18 23:33:47 +0300
commiteba3ffc31a88a53d12868d26202908c4a3435966 (patch)
tree2d8e6d00848ecd0fe4ff069a2b1817c491971b90 /source/blender/gpu/opengl
parent7f7c614ecddbcb66de0bff1657366970dede99be (diff)
GL: Fix possible shift by -1
This can happen when the attribute has been optimized out by the compiler.
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r--source/blender/gpu/opengl/gl_vertex_array.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_array.cc b/source/blender/gpu/opengl/gl_vertex_array.cc
index 282ede5ba9b..d8d301b0f75 100644
--- a/source/blender/gpu/opengl/gl_vertex_array.cc
+++ b/source/blender/gpu/opengl/gl_vertex_array.cc
@@ -70,7 +70,7 @@ static uint16_t vbo_bind(const ShaderInterface *interface,
const char *name = GPU_vertformat_attr_name_get(format, a, n_idx);
const ShaderInput *input = interface->attr_get(name);
- if (input == nullptr) {
+ if (input == nullptr || input->location == -1) {
continue;
}