mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
glsl: Fix ir_print_visitor's handling of interpolation qualifiers.
This patch updates the interp[] array to match the enum glsl_interp_qualifier. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> v2: Add a STATIC_ASSERT to make sure the array is the correct size. This required adding INTERP_QUALIFIER_COUNT to the enum.
This commit is contained in:
parent
c295874129
commit
67f226e179
2 changed files with 5 additions and 2 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include "ir_print_visitor.h"
|
||||
#include "glsl_types.h"
|
||||
#include "glsl_parser_extras.h"
|
||||
#include "main/macros.h"
|
||||
#include "program/hash_table.h"
|
||||
|
||||
static void print_type(const glsl_type *t);
|
||||
|
|
@ -149,7 +150,8 @@ void ir_print_visitor::visit(ir_variable *ir)
|
|||
const char *const mode[] = { "", "uniform ", "shader_in ", "shader_out ",
|
||||
"in ", "out ", "inout ",
|
||||
"const_in ", "sys ", "temporary " };
|
||||
const char *const interp[] = { "", "flat", "noperspective" };
|
||||
const char *const interp[] = { "", "smooth", "flat", "noperspective" };
|
||||
STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_QUALIFIER_COUNT);
|
||||
|
||||
printf("(%s%s%s%s) ",
|
||||
cent, inv, mode[ir->mode], interp[ir->interpolation]);
|
||||
|
|
|
|||
|
|
@ -1829,7 +1829,8 @@ enum glsl_interp_qualifier
|
|||
INTERP_QUALIFIER_NONE = 0,
|
||||
INTERP_QUALIFIER_SMOOTH,
|
||||
INTERP_QUALIFIER_FLAT,
|
||||
INTERP_QUALIFIER_NOPERSPECTIVE
|
||||
INTERP_QUALIFIER_NOPERSPECTIVE,
|
||||
INTERP_QUALIFIER_COUNT /**< Number of interpolation qualifiers */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue