[Piglit] [PATCH] shader_runner: Same method to get u/int based type uniforms
Alejandro Piñeiro
apinheiro at igalia.com
Mon May 2 09:08:19 UTC 2016
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
On 25/04/16 16:09, Andres Gomez wrote:
> 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();
More information about the Piglit
mailing list