diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-06-02 18:29:48 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-06-03 00:44:22 +0300 |
commit | beef67d1dfc016a5e682ace28268e898b3556c5d (patch) | |
tree | 8dd2e33d265d77b773b3c6c878c5720b4c5df356 /source/blender/gpu/intern/gpu_shader_interface.c | |
parent | ea92f8207a99d916aef509272eca804b5136c830 (diff) |
GPUShader: Bind shader for interface creation
This will fix the bindpoints not being set at interface creation
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, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_interface.c b/source/blender/gpu/intern/gpu_shader_interface.c index 2590d738917..a1d75452458 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.c +++ b/source/blender/gpu/intern/gpu_shader_interface.c @@ -220,6 +220,12 @@ static int sampler_binding(int32_t program, GPUShaderInterface *GPU_shaderinterface_create(int32_t program) { +#ifndef NDEBUG + GLint curr_program; + glGetIntegerv(GL_CURRENT_PROGRAM, &curr_program); + BLI_assert(curr_program == program); +#endif + GLint max_attr_name_len = 0, attr_len = 0; glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &max_attr_name_len); glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &attr_len); |