summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_to_hir.cpp4
-rw-r--r--src/glsl/glsl_types.cpp8
-rw-r--r--src/glsl/ir_clone.cpp8
-rw-r--r--src/glsl/link_uniform_initializers.cpp5
4 files changed, 16 insertions, 9 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 33e20a8208d..e76544a2c4c 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -861,10 +861,6 @@ do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1)
* ignores the sampler present in the type.
*/
break;
-
- default:
- assert(!"Should not get here.");
- break;
}
if (cmp == NULL)
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 71b1850278a..7386760a1a2 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -672,9 +672,13 @@ glsl_type::component_slots() const
case GLSL_TYPE_ARRAY:
return this->length * this->fields.array->component_slots();
- default:
- return 0;
+ case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
+ break;
}
+
+ return 0;
}
bool
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index c62c1fc20b2..9b7981b5622 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -375,10 +375,14 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
return c;
}
- default:
+ case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
assert(!"Should not get here.");
- return NULL;
+ break;
}
+
+ return NULL;
}
diff --git a/src/glsl/link_uniform_initializers.cpp b/src/glsl/link_uniform_initializers.cpp
index 849e080970a..933df29449d 100644
--- a/src/glsl/link_uniform_initializers.cpp
+++ b/src/glsl/link_uniform_initializers.cpp
@@ -67,7 +67,10 @@ copy_constant_to_storage(union gl_constant_value *storage,
case GLSL_TYPE_BOOL:
storage[i].b = int(val->value.b[i]);
break;
- default:
+ case GLSL_TYPE_ARRAY:
+ case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
/* All other types should have already been filtered by other
* paths in the caller.
*/