diff options
author | Andres Gomez <agomez@igalia.com> | 2016-04-22 17:16:17 +0300 |
---|---|---|
committer | Antia Puentes <apuentes@igalia.com> | 2016-05-04 14:30:43 +0200 |
commit | 094cae4c8a0e2301958f90910a234393637f5c59 (patch) | |
tree | 23b9f71fa11115b17fc3b04b9a66bfba6da872f1 | |
parent | f3a7a0a729fcedac98563710aaa1613a26388f7a (diff) |
shader_runner: Same method to get u/int based type uniforms
u/ivec* was already support to read hexadecimals. Now, this is also
supported for u/int uniforms.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
-rw-r--r-- | tests/shaders/shader_runner.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index e11e8fce8..9f98e762b 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -1693,14 +1693,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(); |