diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_interface.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_interface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_interface.c b/source/blender/gpu/intern/gpu_shader_interface.c index 8cd1afad536..3218d12bc0d 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.c +++ b/source/blender/gpu/intern/gpu_shader_interface.c @@ -254,8 +254,12 @@ GPUShaderInterface *GPU_shaderinterface_create(int32_t program) } /* TODO: reject DOUBLE gl_types */ - input->location = glGetAttribLocation(program, name); + /* Ignore OpenGL names like `gl_BaseInstanceARB`, `gl_InstanceID` and `gl_VertexID`. */ + if (input->location == -1) { + MEM_freeN(input); + continue; + } if (input->location != -1) { shaderface->enabled_attr_mask |= (1 << input->location); |