diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-09-15 21:08:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-09-15 21:09:09 +0300 |
commit | f565d8c4ae9a2ddf0520a15e2407744aecff7cba (patch) | |
tree | 0f454d1f19110205f0600f5401eb63bbe6eacaaf /source/blender/gpu/intern/gpu_uniformbuffer.c | |
parent | 208d6f28c8125dafd60bdf391a51145d6d7f46ec (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.c | 2 |
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. */ |