[Mesa-dev] [PATCH] glsl/tests: add GLSL_TYPE_UINT8, GLSL_TYPE_INT8 cases to switch statements
Brian Paul
brianp at vmware.com
Mon Apr 30 14:42:59 UTC 2018
To silence warnings about unhandled switch values.
Untested otherwise.
---
src/compiler/glsl/tests/uniform_initializer_utils.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/compiler/glsl/tests/uniform_initializer_utils.cpp b/src/compiler/glsl/tests/uniform_initializer_utils.cpp
index 0d7fa26..1575b0a 100644
--- a/src/compiler/glsl/tests/uniform_initializer_utils.cpp
+++ b/src/compiler/glsl/tests/uniform_initializer_utils.cpp
@@ -83,6 +83,8 @@ generate_data_element(void *mem_ctx, const glsl_type *type,
switch (type->base_type) {
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
+ case GLSL_TYPE_UINT8:
+ case GLSL_TYPE_INT8:
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_IMAGE:
data.i[i] = values[idx];
@@ -126,6 +128,8 @@ generate_data_element(void *mem_ctx, const glsl_type *type,
switch (type->base_type) {
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
+ case GLSL_TYPE_UINT8:
+ case GLSL_TYPE_INT8:
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_IMAGE:
ASSERT_EQ(data.i[i], val->value.i[i]);
@@ -257,6 +261,8 @@ verify_data(gl_constant_value *storage, unsigned storage_array_size,
switch (val->type->base_type) {
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
+ case GLSL_TYPE_UINT8:
+ case GLSL_TYPE_INT8:
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_IMAGE:
EXPECT_EQ(val->value.i[i], storage[i].i);
--
2.7.4
More information about the mesa-dev
mailing list