[Piglit] [PATCH 3/3] Make shader_runner atomic tests more robust against race conditions.
Kenneth Graunke
kenneth at whitecape.org
Wed Oct 21 01:11:27 PDT 2015
This is the same fix as the previous patch.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
tests/shaders/shader_runner.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 32ac7bd..a967e52 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -2575,6 +2575,7 @@ static bool
probe_atomic_counter(GLint counter_num, const char *op, uint32_t value)
{
uint32_t *p;
+ uint32_t observed;
enum comparison cmp;
bool result;
@@ -2589,13 +2590,14 @@ probe_atomic_counter(GLint counter_num, const char *op, uint32_t value)
return false;
}
- result = compare_uint(value, *p, cmp);
+ observed = *p;
+ result = compare_uint(value, observed, cmp);
if (!result) {
printf("Atomic counter %d test failed: Reference %s Observed\n",
counter_num, comparison_string(cmp));
printf(" Reference: %u\n", value);
- printf(" Observed: %u\n", *p);
+ printf(" Observed: %u\n", observed);
glUnmapBuffer(GL_ATOMIC_COUNTER_BUFFER);
return false;
}
--
2.6.1
More information about the Piglit
mailing list