[Mesa-dev] [PATCH v5 29/29] glsl/tests: add DOUBLE/IMAGE types
Ilia Mirkin
imirkin at alum.mit.edu
Tue Feb 10 03:59:09 PST 2015
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/glsl/tests/uniform_initializer_utils.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/glsl/tests/uniform_initializer_utils.cpp b/src/glsl/tests/uniform_initializer_utils.cpp
index 6f47acd..8c9d8cc 100644
--- a/src/glsl/tests/uniform_initializer_utils.cpp
+++ b/src/glsl/tests/uniform_initializer_utils.cpp
@@ -84,6 +84,7 @@ generate_data_element(void *mem_ctx, const glsl_type *type,
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_IMAGE:
data.i[i] = values[idx];
break;
case GLSL_TYPE_FLOAT:
@@ -92,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:
@@ -112,6 +116,7 @@ generate_data_element(void *mem_ctx, const glsl_type *type,
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_IMAGE:
ASSERT_EQ(data.i[i], val->value.i[i]);
break;
case GLSL_TYPE_FLOAT:
@@ -120,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:
@@ -212,6 +220,7 @@ verify_data(gl_constant_value *storage, unsigned storage_array_size,
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_IMAGE:
EXPECT_EQ(val->value.i[i], storage[i].i);
break;
case GLSL_TYPE_FLOAT:
@@ -220,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.0.5
More information about the mesa-dev
mailing list