From 6f4feafd4d22beaabfb0202e66b0dea9047ee084 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 28 Oct 2011 14:48:08 +0200 Subject: mesa git update 28 okt 2011 --- mesalib/src/glsl/ir.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'mesalib/src/glsl/ir.h') 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,10 +283,25 @@ 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 */ @@ -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, -- cgit v1.2.3