diff options
author | Ilia Mirkin <[email protected]> | 2015-02-08 03:42:51 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-02-19 00:28:35 -0500 |
commit | e790a3c9105a54455eb634dbaffab8060805044c (patch) | |
tree | 3fec1026cbbf980a83083fb37ae4946062078058 | |
parent | 2e7e7b8af6cb9055204e196db9902ec9991cd538 (diff) |
glsl/tests: add DOUBLE types
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/glsl/tests/uniform_initializer_utils.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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: |