summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp7
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp3
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp7
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp7
-rw-r--r--src/mesa/program/ir_to_mesa.cpp14
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp8
6 files changed, 32 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 0d2dde72be4..03b0630a755 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -455,10 +455,13 @@ fs_visitor::type_size(const struct glsl_type *type)
* link time.
*/
return 0;
- default:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
assert(!"not reached");
- return 0;
+ break;
}
+
+ return 0;
}
fs_reg
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 2b1332f1acc..9f6af6f872a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -698,7 +698,8 @@ fs_visitor::emit_assignment_writes(fs_reg &l, fs_reg &r,
case GLSL_TYPE_SAMPLER:
break;
- default:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
assert(!"not reached");
break;
}
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 1c02c87a11b..6abf714f3a1 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -285,10 +285,13 @@ brw_type_for_base_type(const struct glsl_type *type)
* way to trip up if we don't.
*/
return BRW_REGISTER_TYPE_UD;
- default:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
assert(!"not reached");
- return BRW_REGISTER_TYPE_F;
+ break;
}
+
+ return BRW_REGISTER_TYPE_F;
}
uint32_t
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 4fb365d9acd..84dcc48341b 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -509,10 +509,13 @@ type_size(const struct glsl_type *type)
* at link time.
*/
return 1;
- default:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
assert(0);
- return 0;
+ break;
}
+
+ return 0;
}
int
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 544b4a93c23..fc892fe86cc 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -623,10 +623,13 @@ type_size(const struct glsl_type *type)
* at link time.
*/
return 1;
- default:
- assert(0);
- return 0;
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
+ assert(!"Invalid type in type_size");
+ break;
}
+
+ return 0;
}
/**
@@ -2529,7 +2532,10 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
format = uniform_native;
columns = 1;
break;
- default:
+ case GLSL_TYPE_ARRAY:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_ERROR:
assert(!"Should not get here.");
break;
}
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 575636e6e57..643a9bbb09d 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -984,10 +984,12 @@ type_size(const struct glsl_type *type)
* at link time.
*/
return 1;
- default:
- assert(0);
- return 0;
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
+ assert(!"Invalid type in type_size");
+ break;
}
+ return 0;
}
/**