diff options
author | Paul Berry <[email protected]> | 2011-10-25 18:06:37 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-10-27 15:30:58 -0700 |
commit | cf45949d6a896651a5f3864d3b195e26d59eee74 (patch) | |
tree | bcea46177d6c94002317b3b26371a85df5dcd61f /src/glsl/ir.h | |
parent | 0fbc8d301b66aebb95507d715b3128ff711610fd (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.h')
-rw-r--r-- | src/glsl/ir.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index b707634ea5a..4ea8764b68f 100644 --- a/src/glsl/ir.h +++ b/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. * @@ -1679,7 +1674,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, |