summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-09-29 13:34:20 +0200
committerIago Toral Quiroga <[email protected]>2015-10-01 09:25:30 +0200
commit74553240301c60e3520fb55e09391993dac28f5d (patch)
treeb91ccec67b2c36f6b46ab0442204155d3ac849f3 /src
parentca2e16d26ec46e604c76ab72d3ec14a7a8643cc8 (diff)
main: Fix block index when mixing UBO and SSBO blocks
Since we store both in UniformBlocks, we can't just compute the index by subtracting the array address start, we need to count the number of buffers of the approriate type. v2: - Just fall back to calc_resource_index (Tapani) Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/shader_query.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 73dee85cc4d..718967605b5 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -611,11 +611,10 @@ _mesa_program_resource_index(struct gl_shader_program *shProg,
return GL_INVALID_INDEX;
switch (res->Type) {
- case GL_UNIFORM_BLOCK:
- case GL_SHADER_STORAGE_BLOCK:
- return RESOURCE_UBO(res)- shProg->UniformBlocks;
case GL_ATOMIC_COUNTER_BUFFER:
return RESOURCE_ATC(res) - shProg->AtomicBuffers;
+ case GL_UNIFORM_BLOCK:
+ case GL_SHADER_STORAGE_BLOCK:
case GL_TRANSFORM_FEEDBACK_VARYING:
default:
return calc_resource_index(shProg, res);