diff options
author | Timothy Arceri <[email protected]> | 2016-04-03 12:44:33 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-04-06 09:56:24 +1000 |
commit | f1293b2f9bc3a45c71941931edb5148d7b5f5a27 (patch) | |
tree | ba998230fc2b04bf8d130b6d7704650dbba09e83 /src/mesa/main/shader_query.cpp | |
parent | 506b561ba7e3df2a7759dded684fae84bf459f65 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r-- | src/mesa/main/shader_query.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 4ef6a81204e..2c1a6ee3505 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -925,8 +925,11 @@ is_resource_referenced(struct gl_shader_program *shProg, if (res->Type == GL_ATOMIC_COUNTER_BUFFER) return RESOURCE_ATC(res)->StageReferences[stage]; - if (res->Type == GL_UNIFORM_BLOCK || res->Type == GL_SHADER_STORAGE_BLOCK) - return shProg->BufferInterfaceBlocks[index].stageref & (1 << stage); + if (res->Type == GL_UNIFORM_BLOCK) + return shProg->UniformBlocks[index].stageref & (1 << stage); + + if (res->Type == GL_SHADER_STORAGE_BLOCK) + return shProg->ShaderStorageBlocks[index].stageref & (1 << stage); return res->StageReferences & (1 << stage); } |