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-09-15 21:08:31 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-09-15 21:09:09 +0300
commitf565d8c4ae9a2ddf0520a15e2407744aecff7cba (patch)
tree0f454d1f19110205f0600f5401eb63bbe6eacaaf /source/blender/gpu/intern/gpu_uniformbuffer.c
parent208d6f28c8125dafd60bdf391a51145d6d7f46ec (diff)
Eevee: Fix T52738: Probes are black.
This fix the crappy binding logic. Note the current method is doing a lot of useless binding. We should somewhat order the texture so that reused textures are already bound most of the time.
Diffstat (limited to 'source/blender/gpu/intern/gpu_uniformbuffer.c')
-rw-r--r--source/blender/gpu/intern/gpu_uniformbuffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_uniformbuffer.c b/source/blender/gpu/intern/gpu_uniformbuffer.c
index 652cd38b16b..3defbe1e55f 100644
--- a/source/blender/gpu/intern/gpu_uniformbuffer.c
+++ b/source/blender/gpu/intern/gpu_uniformbuffer.c
@@ -97,6 +97,7 @@ GPUUniformBuffer *GPU_uniformbuffer_create(int size, const void *data, char err_
{
GPUUniformBuffer *ubo = MEM_callocN(sizeof(GPUUniformBufferStatic), "GPUUniformBufferStatic");
ubo->size = size;
+ ubo->bindpoint = -1;
/* Generate Buffer object */
glGenBuffers(1, &ubo->bindcode);
@@ -134,6 +135,7 @@ GPUUniformBuffer *GPU_uniformbuffer_dynamic_create(ListBase *inputs, char err_ou
GPUUniformBufferDynamic *ubo = MEM_callocN(sizeof(GPUUniformBufferDynamic), "GPUUniformBufferDynamic");
ubo->buffer.type = GPU_UBO_DYNAMIC;
+ ubo->buffer.bindpoint = -1;
ubo->flag = GPU_UBO_FLAG_DIRTY;
/* Generate Buffer object. */