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 <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -405,11 +405,11 @@ ir_reader::read_declaration(s_expression *expr)
|
||||
} else if (strcmp(qualifier->value(), "inout") == 0) {
|
||||
var->mode = ir_var_inout;
|
||||
} else if (strcmp(qualifier->value(), "smooth") == 0) {
|
||||
var->interpolation = ir_var_smooth;
|
||||
var->interpolation = INTERP_QUALIFIER_SMOOTH;
|
||||
} else if (strcmp(qualifier->value(), "flat") == 0) {
|
||||
var->interpolation = ir_var_flat;
|
||||
var->interpolation = INTERP_QUALIFIER_FLAT;
|
||||
} else if (strcmp(qualifier->value(), "noperspective") == 0) {
|
||||
var->interpolation = ir_var_noperspective;
|
||||
var->interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
|
||||
} else {
|
||||
ir_read_error(expr, "unknown qualifier: %s", qualifier->value());
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user