summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-10-25 18:06:37 -0700
committerPaul Berry <[email protected]>2011-10-27 15:30:58 -0700
commitcf45949d6a896651a5f3864d3b195e26d59eee74 (patch)
treebcea46177d6c94002317b3b26371a85df5dcd61f /src/glsl/ir.cpp
parent0fbc8d301b66aebb95507d715b3128ff711610fd (diff)
mesa: Expose GLSL interpolation qualifiers in gl_fragment_program.
This patch makes GLSL interpolation qualifiers visible to drivers via the array InterpQualifier[] in gl_fragment_program, so that they can easily be used by driver back-ends to select the correct interpolation mode. Previous to this patch, the GLSL compiler was using the enum ir_variable_interpolation to represent interpolation types. Rather than make a duplicate enum in core mesa to represent the same thing, I moved the enum into mtypes.h and renamed it to be more consistent with the other enums defined there. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index d968890a2c9..046ce25f90c 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -1320,7 +1320,7 @@ ir_swizzle::variable_referenced() const
ir_variable::ir_variable(const struct glsl_type *type, const char *name,
ir_variable_mode mode)
: max_array_access(0), read_only(false), centroid(false), invariant(false),
- mode(mode), interpolation(ir_var_smooth)
+ mode(mode), interpolation(INTERP_QUALIFIER_SMOOTH)
{
this->ir_type = ir_type_variable;
this->type = type;
@@ -1343,9 +1343,9 @@ const char *
ir_variable::interpolation_string() const
{
switch (this->interpolation) {
- case ir_var_smooth: return "smooth";
- case ir_var_flat: return "flat";
- case ir_var_noperspective: return "noperspective";
+ case INTERP_QUALIFIER_SMOOTH: return "smooth";
+ case INTERP_QUALIFIER_FLAT: return "flat";
+ case INTERP_QUALIFIER_NOPERSPECTIVE: return "noperspective";
}
assert(!"Should not get here.");