diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-10-06 15:57:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-10-06 17:25:50 +0300 |
commit | f94f141f241608f6475082603df6f15d812b1ab7 (patch) | |
tree | 94aefceac7e753c572ba38c91820bfd68a694a59 /source | |
parent | ea606a7847a316a82b365155f666b33e81ff4c2e (diff) |
Gawain: Add UBOs to shader interface.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c index 7e0848ec071..733aafd7362 100644 --- a/source/blender/gpu/intern/gpu_shader.c +++ b/source/blender/gpu/intern/gpu_shader.c @@ -561,7 +561,8 @@ int GPU_shader_get_uniform_block(GPUShader *shader, const char *name) { BLI_assert(shader && shader->program); - return glGetUniformBlockIndex(shader->program, name); + const Gwn_ShaderInput *ubo = GWN_shaderinterface_ubo(shader->interface, name); + return ubo ? ubo->location : -1; } void *GPU_fx_shader_get_interface(GPUShader *shader) |