compiler: add a new explicit interpolation mode
This introduces one more interpolation mode INTERP_MODE_EXPLICIT, which is needed for AMD_shader_explicit_vertex_parameter. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3578>
This commit is contained in:

committed by
Marge Bot

parent
e6b531af66
commit
746e9e5d66
@@ -213,7 +213,7 @@ void ir_print_visitor::visit(ir_variable *ir)
|
||||
"in ", "out ", "inout ",
|
||||
"const_in ", "sys ", "temporary " };
|
||||
STATIC_ASSERT(ARRAY_SIZE(mode) == ir_var_mode_count);
|
||||
const char *const interp[] = { "", "smooth", "flat", "noperspective" };
|
||||
const char *const interp[] = { "", "smooth", "flat", "noperspective", "explicit" };
|
||||
STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_MODE_COUNT);
|
||||
|
||||
fprintf(f, "(%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s) ",
|
||||
|
@@ -1254,7 +1254,7 @@ struct glsl_struct_field {
|
||||
* For interface blocks, the interpolation mode (as in
|
||||
* ir_variable::interpolation). 0 otherwise.
|
||||
*/
|
||||
unsigned interpolation:2;
|
||||
unsigned interpolation:3;
|
||||
|
||||
/**
|
||||
* For interface blocks, 1 if this variable uses centroid interpolation (as
|
||||
|
@@ -378,7 +378,7 @@ typedef struct nir_variable {
|
||||
*
|
||||
* \sa glsl_interp_mode
|
||||
*/
|
||||
unsigned interpolation:2;
|
||||
unsigned interpolation:3;
|
||||
|
||||
/**
|
||||
* If non-zero, then this variable may be packed along with other variables
|
||||
|
@@ -269,6 +269,7 @@ glsl_interp_mode_name(enum glsl_interp_mode qual)
|
||||
ENUM(INTERP_MODE_SMOOTH),
|
||||
ENUM(INTERP_MODE_FLAT),
|
||||
ENUM(INTERP_MODE_NOPERSPECTIVE),
|
||||
ENUM(INTERP_MODE_EXPLICIT),
|
||||
};
|
||||
STATIC_ASSERT(ARRAY_SIZE(names) == INTERP_MODE_COUNT);
|
||||
return NAME(qual);
|
||||
|
@@ -667,6 +667,7 @@ enum glsl_interp_mode
|
||||
INTERP_MODE_SMOOTH,
|
||||
INTERP_MODE_FLAT,
|
||||
INTERP_MODE_NOPERSPECTIVE,
|
||||
INTERP_MODE_EXPLICIT,
|
||||
INTERP_MODE_COUNT /**< Number of interpolation qualifiers */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user