aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-31 08:40:01 +0100
committermarha <marha@users.sourceforge.net>2013-10-31 08:40:01 +0100
commite4ef724e06621be9325fc41ed886fd404467fdc0 (patch)
treebe445314647f682fbb4a1e8b94aeb6ee79cede5f /mesalib/src/glsl/ir.cpp
parent270d3a1aa4137dc15d7b7e5a0958cc8c0bef9a1a (diff)
downloadvcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.tar.gz
vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.tar.bz2
vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.zip
fontconfig glproto libX11 mesa xserver xkeyboard-config git update 31 oct 2013
xserver commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa xkeyboard-config commit 70bbf18d6cddb7271db1b2e042765ace3c4ac485 libX11 commit 6cb02b166361200da35ba14f52cd9aaa493eb0ea glproto commit aacc7a51b6161c765b04524e0d2ab31e5e586834 fontconfig commit 525a135ccf53e4bf3363c3143d9cfdf15fba55ab mesa commit b16b3c8703f198ca0f025b730d582600df79c19c
Diffstat (limited to 'mesalib/src/glsl/ir.cpp')
-rw-r--r--mesalib/src/glsl/ir.cpp49
1 files changed, 46 insertions, 3 deletions
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
index c682e3ed5..1b4973612 100644
--- a/mesalib/src/glsl/ir.cpp
+++ b/mesalib/src/glsl/ir.cpp
@@ -1586,7 +1586,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
ir_variable_mode mode)
: max_array_access(0), max_ifc_array_access(NULL),
read_only(false), centroid(false), invariant(false),
- mode(mode), interpolation(INTERP_QUALIFIER_NONE)
+ mode(mode), interpolation(INTERP_QUALIFIER_NONE), atomic()
{
this->ir_type = ir_type_variable;
this->type = type;
@@ -1647,8 +1647,8 @@ ir_variable::determine_interpolation_mode(bool flat_shade)
ir_function_signature::ir_function_signature(const glsl_type *return_type,
builtin_available_predicate b)
- : return_type(return_type), is_defined(false), builtin_avail(b),
- _function(NULL)
+ : return_type(return_type), is_defined(false), is_intrinsic(false),
+ builtin_avail(b), _function(NULL)
{
this->ir_type = ir_type_function_signature;
this->origin = NULL;
@@ -1891,3 +1891,46 @@ vertices_per_prim(GLenum prim)
return 3;
}
}
+
+/**
+ * Generate a string describing the mode of a variable
+ */
+const char *
+mode_string(const ir_variable *var)
+{
+ switch (var->mode) {
+ case ir_var_auto:
+ return (var->read_only) ? "global constant" : "global variable";
+
+ case ir_var_uniform:
+ return "uniform";
+
+ case ir_var_shader_in:
+ return "shader input";
+
+ case ir_var_shader_out:
+ return "shader output";
+
+ case ir_var_function_in:
+ case ir_var_const_in:
+ return "function input";
+
+ case ir_var_function_out:
+ return "function output";
+
+ case ir_var_function_inout:
+ return "function inout";
+
+ case ir_var_system_value:
+ return "shader input";
+
+ case ir_var_temporary:
+ return "compiler temporary";
+
+ case ir_var_mode_count:
+ break;
+ }
+
+ assert(!"Should not get here.");
+ return "invalid variable";
+}