diff options
author | Paul Berry <[email protected]> | 2013-01-24 16:11:08 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-01-24 16:30:27 -0800 |
commit | 7d51ead56e2b97d313c6a0fda22cc930b5c41e9d (patch) | |
tree | dcd4f46394fc4fbb5eee56629247435b9a066997 /src/glsl/builtin_variables.cpp | |
parent | fce9e5d41bb1d80885d430d0484e9bd46d8ab936 (diff) |
glsl: Clean up case statement in builtin_variables.cpp's add_variable.
The case statement purported to handle the addition of ir_var_const_in
and ir_var_inout builtin variables. But no such variables exist.
This patch removes the unnecessary cases, and adds a comment
explaining why they're not needed.
Reviewed-by: Carl Worth <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r-- | src/glsl/builtin_variables.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index e7769419f61..f2a804986cd 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -404,15 +404,17 @@ add_variable(exec_list *instructions, glsl_symbol_table *symtab, switch (var->mode) { case ir_var_auto: case ir_var_in: - case ir_var_const_in: case ir_var_uniform: case ir_var_system_value: var->read_only = true; break; - case ir_var_inout: case ir_var_out: break; default: + /* The only variables that are added using this function should be + * uniforms, shader inputs, and shader outputs, constants (which use + * ir_var_auto), and system values. + */ assert(0); break; } |