From eba3ffc31a88a53d12868d26202908c4a3435966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 18 Feb 2022 21:33:04 +0100 Subject: GL: Fix possible shift by -1 This can happen when the attribute has been optimized out by the compiler. --- source/blender/gpu/opengl/gl_vertex_array.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/gpu/opengl') 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; } -- cgit v1.2.3