[Piglit] [PATCH] shader_runner: Same method to get u/int based type uniforms
Andres Gomez
agomez at igalia.com
Mon Apr 25 14:09:52 UTC 2016
u/ivec* was already support to read hexadecimals. Now, this is also
supported for u/int uniforms.
Signed-off-by: Andres Gomez <agomez at igalia.com>
---
tests/shaders/shader_runner.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 239735c..eb63ba4 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1687,14 +1687,13 @@ set_uniform(const char *line, int ubo_array_index)
glUniform1fv(loc, 1, f);
return;
} else if (string_match("int", type)) {
- int val = atoi(line);
- glUniform1i(loc, val);
+ get_ints(line, ints, 1);
+ glUniform1iv(loc, 1, ints);
return;
} else if (string_match("uint", type)) {
- unsigned val;
check_unsigned_support();
- val = strtoul(line, NULL, 0);
- glUniform1ui(loc, val);
+ get_uints(line, uints, 1);
+ glUniform1uiv(loc, 1, uints);
return;
} else if (string_match("double", type)) {
check_double_support();
--
2.8.0.rc3
More information about the Piglit
mailing list