From e790a3c9105a54455eb634dbaffab8060805044c Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 8 Feb 2015 03:42:51 -0500 Subject: [PATCH] glsl/tests: add DOUBLE types Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie --- src/glsl/tests/uniform_initializer_utils.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/glsl/tests/uniform_initializer_utils.cpp b/src/glsl/tests/uniform_initializer_utils.cpp index 31dc9b78ae5..297f342c1b3 100644 --- a/src/glsl/tests/uniform_initializer_utils.cpp +++ b/src/glsl/tests/uniform_initializer_utils.cpp @@ -93,6 +93,9 @@ generate_data_element(void *mem_ctx, const glsl_type *type, case GLSL_TYPE_BOOL: data.b[i] = bool(values[idx]); break; + case GLSL_TYPE_DOUBLE: + data.d[i] = double(values[idx]); + break; case GLSL_TYPE_ATOMIC_UINT: case GLSL_TYPE_STRUCT: case GLSL_TYPE_ARRAY: @@ -122,6 +125,9 @@ generate_data_element(void *mem_ctx, const glsl_type *type, case GLSL_TYPE_BOOL: ASSERT_EQ(data.b[i], val->value.b[i]); break; + case GLSL_TYPE_DOUBLE: + ASSERT_EQ(data.d[i], val->value.d[i]); + break; case GLSL_TYPE_ATOMIC_UINT: case GLSL_TYPE_STRUCT: case GLSL_TYPE_ARRAY: @@ -223,6 +229,9 @@ verify_data(gl_constant_value *storage, unsigned storage_array_size, case GLSL_TYPE_BOOL: EXPECT_EQ(val->value.b[i] ? boolean_true : 0, storage[i].i); break; + case GLSL_TYPE_DOUBLE: + EXPECT_EQ(val->value.d[i], *(double *)&storage[i*2].i); + break; case GLSL_TYPE_ATOMIC_UINT: case GLSL_TYPE_STRUCT: case GLSL_TYPE_ARRAY: -- 2.30.2