diff options
author | Timothy Arceri <[email protected]> | 2016-04-02 12:51:12 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-04-02 17:10:56 +1100 |
commit | 1265e1c4e17dec5c9931fda8b6d44a4006ed1a4c (patch) | |
tree | ccd8536971deac76c85aaee507ce2ec6303cefaa /src/mesa/main/shader_query.cpp | |
parent | d8855d66f4ae2acf994eae31e59fd2cfa5483627 (diff) |
glsl: store stage reference in gl_uniform_block
This allows us to simplify the code and drop InterfaceBlockStageIndex
which is a per stage array of integers the size of all blocks in the
program combined including duplicates across stages. Adding a stage
ref per block will use less memory.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r-- | src/mesa/main/shader_query.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 4650a5c9ef1..4ef6a81204e 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -926,7 +926,7 @@ is_resource_referenced(struct gl_shader_program *shProg, return RESOURCE_ATC(res)->StageReferences[stage]; if (res->Type == GL_UNIFORM_BLOCK || res->Type == GL_SHADER_STORAGE_BLOCK) - return shProg->InterfaceBlockStageIndex[stage][index] != -1; + return shProg->BufferInterfaceBlocks[index].stageref & (1 << stage); return res->StageReferences & (1 << stage); } |