[Piglit] [PATCH] shader_runner: fix dvec ubo uploads
Ilia Mirkin
imirkin at alum.mit.edu
Mon Feb 9 16:40:09 PST 2015
The number of elements is at index 4, not 3 (like in vec)
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
tests/shaders/shader_runner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index baccd35..c193de9 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1305,7 +1305,7 @@ set_ubo_uniform(const char *name, const char *type, const char *line, int ubo_ar
get_uints(line, uints, elements);
memcpy(data, uints, elements * sizeof(unsigned));
} else if (string_match("dvec", type)) {
- int elements = type[3] - '0';
+ int elements = type[4] - '0';
get_doubles(line, d, elements);
memcpy(data, d, elements * sizeof(double));
} else if (string_match("mat", type)) {
--
2.0.5
More information about the Piglit
mailing list