summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shader_query.cpp
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2015-03-12 07:58:48 +0200
committerTapani Pälli <[email protected]>2015-04-16 07:55:57 +0300
commit34df5ebd778fd3027db0f380eab71a95cfa298c0 (patch)
treed5b1d8ad4ca79156407370e0f3406499c30a499d /src/mesa/main/shader_query.cpp
parent4e7f134f89f52cf103e2b682faa72dac4cc2f840 (diff)
mesa: mesa_bufferiv utility function for buffer objects
Patch adds new function 'mesa_bufferiv' and refactors existing GetActiveUniformBlockiv and GetActiveAtomicCounterBufferiv to use it. corresponding Piglit tests: arb_uniform_buffer_object* arb_shader_atomic_counters* (Many tests hit the corresponding queries.) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r--src/mesa/main/shader_query.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 185e95d8f2b..c7062abe7d8 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -1058,12 +1058,12 @@ _mesa_get_program_resourceiv(struct gl_shader_program *shProg,
int props_written =
_mesa_program_resource_prop(shProg, res, index, *prop, val,
"glGetProgramResourceiv");
- if (props_written) {
- amount += props_written;
- } else {
- /* Error happened. */
+
+ /* Error happened. */
+ if (props_written == 0)
return;
- }
+
+ amount += props_written;
}
/* If <length> is not NULL, the actual number of integer values