aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-28 14:48:08 +0200
committermarha <marha@users.sourceforge.net>2011-10-28 14:48:08 +0200
commit6f4feafd4d22beaabfb0202e66b0dea9047ee084 (patch)
treea317af068ea091dc6d2142802ab316b941682544 /mesalib/src/glsl/ir.h
parentd662d461634660f5c0f3998b5eb7d7ed3bd5a25f (diff)
downloadvcxsrv-6f4feafd4d22beaabfb0202e66b0dea9047ee084.tar.gz
vcxsrv-6f4feafd4d22beaabfb0202e66b0dea9047ee084.tar.bz2
vcxsrv-6f4feafd4d22beaabfb0202e66b0dea9047ee084.zip
mesa git update 28 okt 2011
Diffstat (limited to 'mesalib/src/glsl/ir.h')
-rw-r--r--mesalib/src/glsl/ir.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index b707634ea..404d4cffa 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -34,6 +34,7 @@
#include "list.h"
#include "ir_visitor.h"
#include "ir_hierarchical_visitor.h"
+#include "main/mtypes.h"
/**
* \defgroup IR Intermediate representation nodes
@@ -227,12 +228,6 @@ enum ir_variable_mode {
ir_var_temporary /**< Temporary variable generated during compilation. */
};
-enum ir_variable_interpolation {
- ir_var_smooth = 0,
- ir_var_flat,
- ir_var_noperspective
-};
-
/**
* \brief Layout qualifiers for gl_FragDepth.
*
@@ -288,11 +283,26 @@ public:
* \return The string that would be used in a shader to specify \c
* mode will be returned.
*
+ * This function is used to generate error messages of the form "shader
+ * uses %s interpolation qualifier", so in the case where there is no
+ * interpolation qualifier, it returns "no".
+ *
* This function should only be used on a shader input or output variable.
*/
const char *interpolation_string() const;
/**
+ * Determine how this variable should be interpolated based on its
+ * interpolation qualifier (if present), whether it is gl_Color or
+ * gl_SecondaryColor, and whether flatshading is enabled in the current GL
+ * state.
+ *
+ * The return value will always be either INTERP_QUALIFIER_SMOOTH,
+ * INTERP_QUALIFIER_NOPERSPECTIVE, or INTERP_QUALIFIER_FLAT.
+ */
+ glsl_interp_qualifier determine_interpolation_mode(bool flat_shade);
+
+ /**
* Delcared name of the variable
*/
const char *name;
@@ -1679,7 +1689,8 @@ extern bool
ir_has_call(ir_instruction *ir);
extern void
-do_set_program_inouts(exec_list *instructions, struct gl_program *prog);
+do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
+ bool is_fragment_shader);
extern char *
prototype_string(const glsl_type *return_type, const char *name,