summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glsl/tests/uniform_initializer_utils.cpp9
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: