diff options
author | Timothy Arceri <timothy.arceri@collabora.com> | 2016-04-03 12:44:33 +1000 |
---|---|---|
committer | Timothy Arceri <timothy.arceri@collabora.com> | 2016-04-06 09:56:24 +1000 |
commit | f1293b2f9bc3a45c71941931edb5148d7b5f5a27 (patch) | |
tree | ba998230fc2b04bf8d130b6d7704650dbba09e83 /src/mesa/main/uniforms.c | |
parent | 506b561ba7e3df2a7759dded684fae84bf459f65 (diff) | |
download | external_mesa3d-f1293b2f9bc3a45c71941931edb5148d7b5f5a27.zip external_mesa3d-f1293b2f9bc3a45c71941931edb5148d7b5f5a27.tar.gz external_mesa3d-f1293b2f9bc3a45c71941931edb5148d7b5f5a27.tar.bz2 |
glsl: fully split apart buffer block arrays
With this change we create the UBO and SSBO arrays separately from the
beginning rather than putting them into a combined array and splitting
it apart later.
A bug is with UBO and SSBO stage reference querying is also fixed as
we now use the block index to lookup the references in the separate arrays
not the combined buffer block array.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r-- | src/mesa/main/uniforms.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 7dcbdcc..a9308d0 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -1016,13 +1016,13 @@ _mesa_UniformBlockBinding(GLuint program, return; } - if (shProg->UniformBlocks[uniformBlockIndex]->Binding != + if (shProg->UniformBlocks[uniformBlockIndex].Binding != uniformBlockBinding) { FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewUniformBuffer; - shProg->UniformBlocks[uniformBlockIndex]->Binding = uniformBlockBinding; + shProg->UniformBlocks[uniformBlockIndex].Binding = uniformBlockBinding; } } @@ -1059,13 +1059,13 @@ _mesa_ShaderStorageBlockBinding(GLuint program, return; } - if (shProg->ShaderStorageBlocks[shaderStorageBlockIndex]->Binding != + if (shProg->ShaderStorageBlocks[shaderStorageBlockIndex].Binding != shaderStorageBlockBinding) { FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewShaderStorageBuffer; - shProg->ShaderStorageBlocks[shaderStorageBlockIndex]->Binding = + shProg->ShaderStorageBlocks[shaderStorageBlockIndex].Binding = shaderStorageBlockBinding; } } |