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>2017-10-06 15:57:21 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-10-06 17:25:50 +0300
commitf94f141f241608f6475082603df6f15d812b1ab7 (patch)
tree94aefceac7e753c572ba38c91820bfd68a694a59 /source/blender/gpu
parentea606a7847a316a82b365155f666b33e81ff4c2e (diff)
Gawain: Add UBOs to shader interface.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_shader.c3
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)