compiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Jul 2016 09:02:38 +0000 (02:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 18 Jul 2016 02:26:48 +0000 (19:26 -0700)
Likewise, rename the enum type to glsl_interp_mode.

Beyond the GLSL front-end, talking about "interpolation modes" seems
more natural than "interpolation qualifiers" - in the IR, we're removed
from how exactly the source language specifies how to interpolate an
input.  Also, SPIR-V calls these "decorations" rather than "qualifiers".

Generated by:
$ find . -regextype egrep -regex '.*\.(c|cpp|h)' -type f -exec sed -i \
  -e 's/INTERP_QUALIFIER_/INTERP_MODE_/g' \
  -e 's/glsl_interp_qualifier/glsl_interp_mode/g' {} \;

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Dave Airlie <airlied@redhat.com>
37 files changed:
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/builtin_variables.cpp
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h
src/compiler/glsl/ir_print_visitor.cpp
src/compiler/glsl/ir_reader.cpp
src/compiler/glsl/ir_set_program_inouts.cpp
src/compiler/glsl/link_varyings.cpp
src/compiler/glsl/lower_packed_varyings.cpp
src/compiler/nir/nir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_two_sided_color.c
src/compiler/nir/nir_print.c
src/compiler/shader_enums.c
src/compiler/shader_enums.h
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_variables.c
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/gallium/drivers/freedreno/a3xx/fd3_program.c
src/gallium/drivers/freedreno/a4xx/fd4_program.c
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/ir3/ir3_shader.h
src/intel/vulkan/anv_meta_blit.c
src/intel/vulkan/anv_meta_blit2d.c
src/intel/vulkan/anv_meta_clear.c
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
src/mesa/drivers/dri/i965/brw_clip_util.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_interpolation_map.c
src/mesa/drivers/dri/i965/brw_sf_emit.c
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_nir_lower_builtin.c
src/mesa/state_tracker/st_program.c

index 8ddc084cab7f0adf12913f44374323dc40453ae9..1b8829000814ad05ad702e5dc723bb1473555013 100644 (file)
@@ -2826,7 +2826,7 @@ apply_explicit_binding(struct _mesa_glsl_parse_state *state,
 static void
 validate_interpolation_qualifier(struct _mesa_glsl_parse_state *state,
                                  YYLTYPE *loc,
-                                 const glsl_interp_qualifier interpolation,
+                                 const glsl_interp_mode interpolation,
                                  const struct ast_type_qualifier *qual,
                                  const struct glsl_type *var_type,
                                  ir_variable_mode mode)
@@ -2855,7 +2855,7 @@ validate_interpolation_qualifier(struct _mesa_glsl_parse_state *state,
     *    fragment shader."
     */
    if (state->is_version(130, 300)
-       && interpolation != INTERP_QUALIFIER_NONE) {
+       && interpolation != INTERP_MODE_NONE) {
       const char *i = interpolation_string(interpolation);
       if (mode != ir_var_shader_in && mode != ir_var_shader_out)
          _mesa_glsl_error(loc, state,
@@ -2893,7 +2893,7 @@ validate_interpolation_qualifier(struct _mesa_glsl_parse_state *state,
     * These deprecated storage qualifiers do not exist in GLSL ES 3.00.
     */
    if (state->is_version(130, 0)
-       && interpolation != INTERP_QUALIFIER_NONE
+       && interpolation != INTERP_MODE_NONE
        && qual->flags.q.varying) {
 
       const char *i = interpolation_string(interpolation);
@@ -2939,7 +2939,7 @@ validate_interpolation_qualifier(struct _mesa_glsl_parse_state *state,
     */
    if (state->is_version(130, 300)
        && var_type->contains_integer()
-       && interpolation != INTERP_QUALIFIER_FLAT
+       && interpolation != INTERP_MODE_FLAT
        && ((state->stage == MESA_SHADER_FRAGMENT && mode == ir_var_shader_in)
            || (state->stage == MESA_SHADER_VERTEX && mode == ir_var_shader_out
                && state->es_shader))) {
@@ -2969,7 +2969,7 @@ validate_interpolation_qualifier(struct _mesa_glsl_parse_state *state,
     */
    if (state->has_double()
        && var_type->contains_double()
-       && interpolation != INTERP_QUALIFIER_FLAT
+       && interpolation != INTERP_MODE_FLAT
        && state->stage == MESA_SHADER_FRAGMENT
        && mode == ir_var_shader_in) {
       _mesa_glsl_error(loc, state, "if a fragment input is (or contains) "
@@ -2977,20 +2977,20 @@ validate_interpolation_qualifier(struct _mesa_glsl_parse_state *state,
    }
 }
 
-static glsl_interp_qualifier
+static glsl_interp_mode
 interpret_interpolation_qualifier(const struct ast_type_qualifier *qual,
                                   const struct glsl_type *var_type,
                                   ir_variable_mode mode,
                                   struct _mesa_glsl_parse_state *state,
                                   YYLTYPE *loc)
 {
-   glsl_interp_qualifier interpolation;
+   glsl_interp_mode interpolation;
    if (qual->flags.q.flat)
-      interpolation = INTERP_QUALIFIER_FLAT;
+      interpolation = INTERP_MODE_FLAT;
    else if (qual->flags.q.noperspective)
-      interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+      interpolation = INTERP_MODE_NOPERSPECTIVE;
    else if (qual->flags.q.smooth)
-      interpolation = INTERP_QUALIFIER_SMOOTH;
+      interpolation = INTERP_MODE_SMOOTH;
    else if (state->es_shader &&
             ((mode == ir_var_shader_in &&
               state->stage != MESA_SHADER_VERTEX) ||
@@ -3001,9 +3001,9 @@ interpret_interpolation_qualifier(const struct ast_type_qualifier *qual,
        *    "When no interpolation qualifier is present, smooth interpolation
        *    is used."
        */
-      interpolation = INTERP_QUALIFIER_SMOOTH;
+      interpolation = INTERP_MODE_SMOOTH;
    else
-      interpolation = INTERP_QUALIFIER_NONE;
+      interpolation = INTERP_MODE_NONE;
 
    validate_interpolation_qualifier(state, loc,
                                     interpolation,
index a311047dced941e607634db59495ed498ccfba8b..f63dc3a0b168ff0751eda82a3d778c3c65f6bcf2 100644 (file)
@@ -330,7 +330,7 @@ per_vertex_accumulator::add_field(int slot, const glsl_type *type,
    this->fields[this->num_fields].matrix_layout = GLSL_MATRIX_LAYOUT_INHERITED;
    this->fields[this->num_fields].location = slot;
    this->fields[this->num_fields].offset = -1;
-   this->fields[this->num_fields].interpolation = INTERP_QUALIFIER_NONE;
+   this->fields[this->num_fields].interpolation = INTERP_MODE_NONE;
    this->fields[this->num_fields].centroid = 0;
    this->fields[this->num_fields].sample = 0;
    this->fields[this->num_fields].patch = 0;
@@ -1004,11 +1004,11 @@ builtin_variable_generator::generate_vs_special_vars()
    }
    if (state->AMD_vertex_shader_layer_enable) {
       var = add_output(VARYING_SLOT_LAYER, int_t, "gl_Layer");
-      var->data.interpolation = INTERP_QUALIFIER_FLAT;
+      var->data.interpolation = INTERP_MODE_FLAT;
    }
    if (state->AMD_vertex_shader_viewport_index_enable) {
       var = add_output(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex");
-      var->data.interpolation = INTERP_QUALIFIER_FLAT;
+      var->data.interpolation = INTERP_MODE_FLAT;
    }
    if (compatibility) {
       add_input(VERT_ATTRIB_POS, vec4_t, "gl_Vertex");
@@ -1075,10 +1075,10 @@ builtin_variable_generator::generate_gs_special_vars()
    ir_variable *var;
 
    var = add_output(VARYING_SLOT_LAYER, int_t, "gl_Layer");
-   var->data.interpolation = INTERP_QUALIFIER_FLAT;
+   var->data.interpolation = INTERP_MODE_FLAT;
    if (state->is_version(410, 0) || state->ARB_viewport_array_enable) {
       var = add_output(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex");
-      var->data.interpolation = INTERP_QUALIFIER_FLAT;
+      var->data.interpolation = INTERP_MODE_FLAT;
    }
    if (state->is_version(400, 0) || state->ARB_gpu_shader5_enable)
       add_system_value(SYSTEM_VALUE_INVOCATION_ID, int_t, "gl_InvocationID");
@@ -1094,9 +1094,9 @@ builtin_variable_generator::generate_gs_special_vars()
     * gl_PrimitiveIDIn as an {ARB,EXT}_geometry_shader4-only variable.
     */
    var = add_input(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveIDIn");
-   var->data.interpolation = INTERP_QUALIFIER_FLAT;
+   var->data.interpolation = INTERP_MODE_FLAT;
    var = add_output(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID");
-   var->data.interpolation = INTERP_QUALIFIER_FLAT;
+   var->data.interpolation = INTERP_MODE_FLAT;
 }
 
 
@@ -1123,7 +1123,7 @@ builtin_variable_generator::generate_fs_special_vars()
 
    if (state->has_geometry_shader()) {
       var = add_input(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID");
-      var->data.interpolation = INTERP_QUALIFIER_FLAT;
+      var->data.interpolation = INTERP_MODE_FLAT;
    }
 
    /* gl_FragColor and gl_FragData were deprecated starting in desktop GLSL
@@ -1192,9 +1192,9 @@ builtin_variable_generator::generate_fs_special_vars()
 
    if (state->is_version(430, 0) || state->ARB_fragment_layer_viewport_enable) {
       var = add_input(VARYING_SLOT_LAYER, int_t, "gl_Layer");
-      var->data.interpolation = INTERP_QUALIFIER_FLAT;
+      var->data.interpolation = INTERP_MODE_FLAT;
       var = add_input(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex");
-      var->data.interpolation = INTERP_QUALIFIER_FLAT;
+      var->data.interpolation = INTERP_MODE_FLAT;
    }
 
    if (state->is_version(450, 310) || state->ARB_ES3_1_compatibility_enable)
index 7961f00ffd1371a4322b663c2b948a561994bb69..b049fda3a66f18a67f5bf1e84a2f919ea210ed87 100644 (file)
@@ -1676,7 +1676,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
    this->data.invariant = false;
    this->data.how_declared = ir_var_declared_normally;
    this->data.mode = mode;
-   this->data.interpolation = INTERP_QUALIFIER_NONE;
+   this->data.interpolation = INTERP_MODE_NONE;
    this->data.max_array_access = -1;
    this->data.offset = 0;
    this->data.precision = GLSL_PRECISION_NONE;
@@ -1703,10 +1703,10 @@ const char *
 interpolation_string(unsigned interpolation)
 {
    switch (interpolation) {
-   case INTERP_QUALIFIER_NONE:          return "no";
-   case INTERP_QUALIFIER_SMOOTH:        return "smooth";
-   case INTERP_QUALIFIER_FLAT:          return "flat";
-   case INTERP_QUALIFIER_NOPERSPECTIVE: return "noperspective";
+   case INTERP_MODE_NONE:          return "no";
+   case INTERP_MODE_SMOOTH:        return "smooth";
+   case INTERP_MODE_FLAT:          return "flat";
+   case INTERP_MODE_NOPERSPECTIVE: return "noperspective";
    }
 
    assert(!"Should not get here.");
index 1325e3533feacba727fd191703e08c8f28954146..5d93cf11f0c20eaa20e4e9dea367323d68e55f7a 100644 (file)
@@ -592,7 +592,7 @@ public:
 
    inline bool is_interpolation_flat() const
    {
-      return this->data.interpolation == INTERP_QUALIFIER_FLAT ||
+      return this->data.interpolation == INTERP_MODE_FLAT ||
              this->type->contains_integer() ||
              this->type->contains_double();
    }
@@ -686,7 +686,7 @@ public:
       /**
        * Interpolation mode for shader inputs / outputs
        *
-       * \sa glsl_interp_qualifier
+       * \sa glsl_interp_mode
        */
       unsigned interpolation:2;
 
index e06acce782a23136f3125dbc8e110c7087de6609..0dd1c3527e7c78cc91fa15a46b4b8ecadf43b7e1 100644 (file)
@@ -181,7 +181,7 @@ void ir_print_visitor::visit(ir_variable *ir)
    STATIC_ASSERT(ARRAY_SIZE(mode) == ir_var_mode_count);
    const char *const stream [] = {"", "stream1 ", "stream2 ", "stream3 "};
    const char *const interp[] = { "", "smooth", "flat", "noperspective" };
-   STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_QUALIFIER_COUNT);
+   STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_MODE_COUNT);
 
    fprintf(f, "(%s%s%s%s%s%s%s%s%s) ",
            loc, cent, samp, patc, inv, prec, mode[ir->data.mode],
index 15315aac522cf9f39ba084b897c3efca19c5058b..7deb125264f7c096943eb7669552748badd07ea3 100644 (file)
@@ -448,11 +448,11 @@ ir_reader::read_declaration(s_expression *expr)
       } else if (strcmp(qualifier->value(), "stream3") == 0) {
         var->data.stream = 3;
       } else if (strcmp(qualifier->value(), "smooth") == 0) {
-        var->data.interpolation = INTERP_QUALIFIER_SMOOTH;
+        var->data.interpolation = INTERP_MODE_SMOOTH;
       } else if (strcmp(qualifier->value(), "flat") == 0) {
-        var->data.interpolation = INTERP_QUALIFIER_FLAT;
+        var->data.interpolation = INTERP_MODE_FLAT;
       } else if (strcmp(qualifier->value(), "noperspective") == 0) {
-        var->data.interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+        var->data.interpolation = INTERP_MODE_NOPERSPECTIVE;
       } else {
         ir_read_error(expr, "unknown qualifier: %s", qualifier->value());
         return NULL;
index 1f9971dffc78af91253f348d4974c0dc6bfed988..7c61994dacaf9ed692b89b5896d588d95b25007c 100644 (file)
@@ -125,7 +125,7 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
          if (stage == MESA_SHADER_FRAGMENT) {
             gl_fragment_program *fprog = (gl_fragment_program *) prog;
             fprog->InterpQualifier[idx] =
-               (glsl_interp_qualifier) var->data.interpolation;
+               (glsl_interp_mode) var->data.interpolation;
             if (var->data.centroid)
                fprog->IsCentroid |= bitfield;
             if (var->data.sample)
index 76d0be1c61dd9d00dadb2fed170a0a0ce263e96d..29362c4f21c6a007ffcb6072d6a10815ffcceb5c 100644 (file)
@@ -1388,13 +1388,13 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
       if (producer_var) {
          producer_var->data.centroid = false;
          producer_var->data.sample = false;
-         producer_var->data.interpolation = INTERP_QUALIFIER_FLAT;
+         producer_var->data.interpolation = INTERP_MODE_FLAT;
       }
 
       if (consumer_var) {
          consumer_var->data.centroid = false;
          consumer_var->data.sample = false;
-         consumer_var->data.interpolation = INTERP_QUALIFIER_FLAT;
+         consumer_var->data.interpolation = INTERP_MODE_FLAT;
       }
    }
 
@@ -1612,7 +1612,7 @@ varying_matches::compute_packing_class(const ir_variable *var)
                             (var->data.patch << 2);
    packing_class *= 4;
    packing_class += var->is_interpolation_flat()
-      ? unsigned(INTERP_QUALIFIER_FLAT) : var->data.interpolation;
+      ? unsigned(INTERP_MODE_FLAT) : var->data.interpolation;
    return packing_class;
 }
 
index 2b347399cea3b29ccbd7c1df7a27a0c933f3ce55..4eeb4b44d854085ba50cd9a3779452ad500735f7 100644 (file)
@@ -276,8 +276,8 @@ lower_packed_varyings_visitor::run(struct gl_linked_shader *shader)
        * together when their interpolation mode is "flat".  Treat integers as
        * being flat when the interpolation mode is none.
        */
-      assert(var->data.interpolation == INTERP_QUALIFIER_FLAT ||
-             var->data.interpolation == INTERP_QUALIFIER_NONE ||
+      assert(var->data.interpolation == INTERP_MODE_FLAT ||
+             var->data.interpolation == INTERP_MODE_NONE ||
              !var->type->contains_integer());
 
       /* Clone the variable for program resource list before
@@ -628,7 +628,7 @@ lower_packed_varyings_visitor::get_packed_varying_deref(
       packed_var->data.sample = unpacked_var->data.sample;
       packed_var->data.patch = unpacked_var->data.patch;
       packed_var->data.interpolation = packed_type == glsl_type::ivec4_type
-         ? unsigned(INTERP_QUALIFIER_FLAT) : unpacked_var->data.interpolation;
+         ? unsigned(INTERP_MODE_FLAT) : unpacked_var->data.interpolation;
       packed_var->data.location = location;
       packed_var->data.precision = unpacked_var->data.precision;
       packed_var->data.always_active_io = unpacked_var->data.always_active_io;
index 3c8b4e0e5d28b499d549cee93794aadd6c632e34..b5d46145aa8235d8b431b0d203a2512910cc4772 100644 (file)
@@ -161,7 +161,7 @@ nir_variable_create(nir_shader *shader, nir_variable_mode mode,
 
    if ((mode == nir_var_shader_in && shader->stage != MESA_SHADER_VERTEX) ||
        (mode == nir_var_shader_out && shader->stage != MESA_SHADER_FRAGMENT))
-      var->data.interpolation = INTERP_QUALIFIER_SMOOTH;
+      var->data.interpolation = INTERP_MODE_SMOOTH;
 
    if (mode == nir_var_shader_in || mode == nir_var_uniform)
       var->data.read_only = true;
index a7921eeb2ab727d38427ef37da96bd4bb9ce7121..c5d3b6b698d37bb4a941e63b3e9b2df6e4086755 100644 (file)
@@ -179,7 +179,7 @@ typedef struct nir_variable {
       /**
        * Interpolation mode for shader inputs / outputs
        *
-       * \sa glsl_interp_qualifier
+       * \sa glsl_interp_mode
        */
       unsigned interpolation:2;
 
index 5d8779e14cf1a0856f85b62ee737bcdbf9cbd93f..3e666691a691f6079c47746df0f9e26d9fe7c866 100644 (file)
@@ -114,7 +114,7 @@ setup_inputs(lower_2side_state *state)
    /* if we don't already have one, insert a FACE input: */
    if (!state->face) {
       state->face = create_input(state->shader, ++maxloc, VARYING_SLOT_FACE);
-      state->face->data.interpolation = INTERP_QUALIFIER_FLAT;
+      state->face->data.interpolation = INTERP_MODE_FLAT;
    }
 
    /* add required back-face color inputs: */
index bca8a3525ed29cdbffe8bf3aeb0e8fdad9f98973..a3380e677d1c88862f2315010fbeb8ed1409180d 100644 (file)
@@ -374,7 +374,7 @@ print_var_decl(nir_variable *var, print_state *state)
    const char *const inv = (var->data.invariant) ? "invariant " : "";
    fprintf(fp, "%s%s%s%s%s %s ",
            cent, samp, patch, inv, get_variable_mode_str(var->data.mode),
-           glsl_interp_qualifier_name(var->data.interpolation));
+           glsl_interp_mode_name(var->data.interpolation));
 
    const char *const coher = (var->data.image.coherent) ? "coherent " : "";
    const char *const volat = (var->data.image._volatile) ? "volatile " : "";
index ff2f564dc986ce5d0dbea78c32dbc17fbcb5b9fc..00261d1988c5bea23cc732e0371a7f660496972b 100644 (file)
@@ -226,15 +226,15 @@ gl_system_value_name(gl_system_value sysval)
 }
 
 const char *
-glsl_interp_qualifier_name(enum glsl_interp_qualifier qual)
+glsl_interp_mode_name(enum glsl_interp_mode qual)
 {
    static const char *names[] = {
-      ENUM(INTERP_QUALIFIER_NONE),
-      ENUM(INTERP_QUALIFIER_SMOOTH),
-      ENUM(INTERP_QUALIFIER_FLAT),
-      ENUM(INTERP_QUALIFIER_NOPERSPECTIVE),
+      ENUM(INTERP_MODE_NONE),
+      ENUM(INTERP_MODE_SMOOTH),
+      ENUM(INTERP_MODE_FLAT),
+      ENUM(INTERP_MODE_NOPERSPECTIVE),
    };
-   STATIC_ASSERT(ARRAY_SIZE(names) == INTERP_QUALIFIER_COUNT);
+   STATIC_ASSERT(ARRAY_SIZE(names) == INTERP_MODE_COUNT);
    return NAME(qual);
 }
 
index df3124eb6b38cf14cd8fa237dd0253e0b7e7a523..a69905cb7d4b8db8ab639ac147ea18825f9a9097 100644 (file)
@@ -485,19 +485,19 @@ const char *gl_system_value_name(gl_system_value sysval);
  * The possible interpolation qualifiers that can be applied to a fragment
  * shader input in GLSL.
  *
- * Note: INTERP_QUALIFIER_NONE must be 0 so that memsetting the
+ * Note: INTERP_MODE_NONE must be 0 so that memsetting the
  * gl_fragment_program data structure to 0 causes the default behavior.
  */
-enum glsl_interp_qualifier
+enum glsl_interp_mode
 {
-   INTERP_QUALIFIER_NONE = 0,
-   INTERP_QUALIFIER_SMOOTH,
-   INTERP_QUALIFIER_FLAT,
-   INTERP_QUALIFIER_NOPERSPECTIVE,
-   INTERP_QUALIFIER_COUNT /**< Number of interpolation qualifiers */
+   INTERP_MODE_NONE = 0,
+   INTERP_MODE_SMOOTH,
+   INTERP_MODE_FLAT,
+   INTERP_MODE_NOPERSPECTIVE,
+   INTERP_MODE_COUNT /**< Number of interpolation qualifiers */
 };
 
-const char *glsl_interp_qualifier_name(enum glsl_interp_qualifier qual);
+const char *glsl_interp_mode_name(enum glsl_interp_mode qual);
 
 /**
  * Fragment program results
index 85f53a0fdc854be5ac4d72544d0922dadac9b850..1efda9ba85cb57a3e00912a39dab79e3c775a41e 100644 (file)
@@ -478,10 +478,10 @@ struct_member_decoration_cb(struct vtn_builder *b,
    case SpvDecorationUniform:
       break; /* FIXME: Do nothing with this for now. */
    case SpvDecorationNoPerspective:
-      ctx->fields[member].interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+      ctx->fields[member].interpolation = INTERP_MODE_NOPERSPECTIVE;
       break;
    case SpvDecorationFlat:
-      ctx->fields[member].interpolation = INTERP_QUALIFIER_FLAT;
+      ctx->fields[member].interpolation = INTERP_MODE_FLAT;
       break;
    case SpvDecorationCentroid:
       ctx->fields[member].centroid = true;
index 8b112b016c69f363db507d2d7ff8012497507998..84664ad83597e9d3735c2e285b935ddbd649700b 100644 (file)
@@ -968,10 +968,10 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
    case SpvDecorationRelaxedPrecision:
       break; /* FIXME: Do nothing with this for now. */
    case SpvDecorationNoPerspective:
-      nir_var->data.interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+      nir_var->data.interpolation = INTERP_MODE_NOPERSPECTIVE;
       break;
    case SpvDecorationFlat:
-      nir_var->data.interpolation = INTERP_QUALIFIER_FLAT;
+      nir_var->data.interpolation = INTERP_MODE_FLAT;
       break;
    case SpvDecorationCentroid:
       nir_var->data.centroid = true;
index e2b305ecb375afb6726c65f6044f9a136479bf81..e1d7c682bf62978899cfe9a2927928fbc680cbef 100644 (file)
@@ -353,13 +353,13 @@ ttn_emit_declaration(struct ttn_compile *c)
              */
             switch (decl->Interp.Interpolate) {
             case TGSI_INTERPOLATE_CONSTANT:
-               var->data.interpolation = INTERP_QUALIFIER_FLAT;
+               var->data.interpolation = INTERP_MODE_FLAT;
                break;
             case TGSI_INTERPOLATE_LINEAR:
-               var->data.interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+               var->data.interpolation = INTERP_MODE_NOPERSPECTIVE;
                break;
             case TGSI_INTERPOLATE_PERSPECTIVE:
-               var->data.interpolation = INTERP_QUALIFIER_SMOOTH;
+               var->data.interpolation = INTERP_MODE_SMOOTH;
                break;
             }
 
index 8152f8fcb9c2c48c4af0fcb78dae060851f48f51..485a4da2c1a4e7a7adf85cdf015924941b611cd0 100644 (file)
@@ -392,7 +392,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
                         */
                        uint32_t inloc = fp->inputs[j].inloc - 8;
 
-                       if ((fp->inputs[j].interpolate == INTERP_QUALIFIER_FLAT) ||
+                       if ((fp->inputs[j].interpolate == INTERP_MODE_FLAT) ||
                                        (fp->inputs[j].rasterflat && emit->rasterflat)) {
                                uint32_t loc = inloc;
 
index 4590c0e7df9e4b74b8a5ec739098b15986d4073c..0e8efc2e5c53743a92c02d3c1ce96ecd06f526ea 100644 (file)
@@ -520,7 +520,7 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
                         */
                        uint32_t inloc = s[FS].v->inputs[j].inloc - 8;
 
-                       if ((s[FS].v->inputs[j].interpolate == INTERP_QUALIFIER_FLAT) ||
+                       if ((s[FS].v->inputs[j].interpolate == INTERP_MODE_FLAT) ||
                                        (s[FS].v->inputs[j].rasterflat && emit->rasterflat)) {
                                uint32_t loc = inloc;
 
index 5c7ad84c25064c80c60f93346ff1fa5e8681fd47..14d5e50f992a9206ba54f01fdea13e8922885747 100644 (file)
@@ -1146,7 +1146,7 @@ static void add_sysval_input(struct ir3_compile *ctx, gl_system_value slot,
        so->inputs[n].slot = slot;
        so->inputs[n].compmask = 1;
        so->inputs[n].regid = r;
-       so->inputs[n].interpolate = INTERP_QUALIFIER_FLAT;
+       so->inputs[n].interpolate = INTERP_MODE_FLAT;
        so->total_in++;
 
        ctx->ir->ninputs = MAX2(ctx->ir->ninputs, r + 1);
@@ -2055,7 +2055,7 @@ setup_input(struct ir3_compile *ctx, nir_variable *in)
                                 * we need to do flat vs smooth shading depending on
                                 * rast state:
                                 */
-                               if (in->data.interpolation == INTERP_QUALIFIER_NONE) {
+                               if (in->data.interpolation == INTERP_MODE_NONE) {
                                        switch (slot) {
                                        case VARYING_SLOT_COL0:
                                        case VARYING_SLOT_COL1:
@@ -2069,7 +2069,7 @@ setup_input(struct ir3_compile *ctx, nir_variable *in)
                                }
 
                                if (ctx->flat_bypass) {
-                                       if ((so->inputs[n].interpolate == INTERP_QUALIFIER_FLAT) ||
+                                       if ((so->inputs[n].interpolate == INTERP_MODE_FLAT) ||
                                                        (so->inputs[n].rasterflat && ctx->so->key.rasterflat))
                                                use_ldlv = true;
                                }
index c17a76be18998140b1973c90792876c961f95310..b773609249f9d9b87129c10ed39c6c91399cb37e 100644 (file)
@@ -197,7 +197,7 @@ struct ir3_shader_variant {
                /* fragment shader specific: */
                bool    bary       : 1;   /* fetched varying (vs one loaded into reg) */
                bool    rasterflat : 1;   /* special handling for emit->rasterflat */
-               enum glsl_interp_qualifier interpolate;
+               enum glsl_interp_mode interpolate;
        } inputs[16 + 2];  /* +POSITION +FACE */
 
        /* sum of input components (scalar).  For frag shaders, it only counts
index dc098efca39315def7987c1ac4717cd059b3b140..e8b244bcab78896d70f9c1f8df5ba9d10b6abd68 100644 (file)
@@ -54,7 +54,7 @@ build_nir_vertex_shader(void)
    nir_variable *tex_pos_out = nir_variable_create(b.shader, nir_var_shader_out,
                                                    vec4, "v_tex_pos");
    tex_pos_out->data.location = VARYING_SLOT_VAR0;
-   tex_pos_out->data.interpolation = INTERP_QUALIFIER_SMOOTH;
+   tex_pos_out->data.interpolation = INTERP_MODE_SMOOTH;
    nir_copy_var(&b, tex_pos_out, tex_pos_in);
 
    return b.shader;
index e6c6875631de5004942d294cc02e97fea5a5fd57..9d4c2fcfb96da69d9440216cd59493a701761f93 100644 (file)
@@ -709,7 +709,7 @@ build_nir_vertex_shader(void)
    nir_variable *tex_pos_out = nir_variable_create(b.shader, nir_var_shader_out,
                                                    vec4, "v_tex_pos");
    tex_pos_out->data.location = VARYING_SLOT_VAR0;
-   tex_pos_out->data.interpolation = INTERP_QUALIFIER_SMOOTH;
+   tex_pos_out->data.interpolation = INTERP_MODE_SMOOTH;
    nir_copy_var(&b, tex_pos_out, tex_pos_in);
 
    nir_variable *other_in = nir_variable_create(b.shader, nir_var_shader_in,
@@ -718,7 +718,7 @@ build_nir_vertex_shader(void)
    nir_variable *other_out = nir_variable_create(b.shader, nir_var_shader_out,
                                                    vec4, "v_other");
    other_out->data.location = VARYING_SLOT_VAR1;
-   other_out->data.interpolation = INTERP_QUALIFIER_FLAT;
+   other_out->data.interpolation = INTERP_MODE_FLAT;
    nir_copy_var(&b, other_out, other_in);
 
    return b.shader;
@@ -976,7 +976,7 @@ build_nir_w_tiled_fragment_shader(struct anv_device *device,
    nir_variable *tex_off_in = nir_variable_create(b.shader, nir_var_shader_in,
                                                   ivec3, "v_tex_off");
    tex_off_in->data.location = VARYING_SLOT_VAR0;
-   tex_off_in->data.interpolation = INTERP_QUALIFIER_FLAT;
+   tex_off_in->data.interpolation = INTERP_MODE_FLAT;
 
    /* In location 1 we have a uvec4 that gives us the bounds of the
     * destination.  We need to discard if we get outside this boundary.
@@ -984,7 +984,7 @@ build_nir_w_tiled_fragment_shader(struct anv_device *device,
    nir_variable *bounds_in = nir_variable_create(b.shader, nir_var_shader_in,
                                                  uvec4, "v_bounds");
    bounds_in->data.location = VARYING_SLOT_VAR1;
-   bounds_in->data.interpolation = INTERP_QUALIFIER_FLAT;
+   bounds_in->data.interpolation = INTERP_MODE_FLAT;
 
    nir_variable *color_out = nir_variable_create(b.shader, nir_var_shader_out,
                                                  vec4, "f_color");
index 7ec060859cf23fdb63b406b06508b437f5db6541..e39949825e670111acc14f80be7be1936edc9a27 100644 (file)
@@ -94,7 +94,7 @@ build_color_shaders(struct nir_shader **out_vs,
       nir_variable_create(vs_b.shader, nir_var_shader_out, color_type,
                           "v_color");
    vs_out_color->data.location = VARYING_SLOT_VAR0;
-   vs_out_color->data.interpolation = INTERP_QUALIFIER_FLAT;
+   vs_out_color->data.interpolation = INTERP_MODE_FLAT;
 
    nir_variable *fs_in_color =
       nir_variable_create(fs_b.shader, nir_var_shader_in, color_type,
index 76e771f217f5731c0da59a3b8ddf58abd3f0e06e..a54680e5b6ba65d1ee7662524d7ef85e4f29bb0d 100644 (file)
@@ -353,7 +353,7 @@ brw_blorp_blit_vars_init(nir_builder *b, struct brw_blorp_blit_vars *v,
 #define LOAD_INPUT(name, type)\
    v->v_##name = nir_variable_create(b->shader, nir_var_shader_in, \
                                      type, #name); \
-   v->v_##name->data.interpolation = INTERP_QUALIFIER_FLAT; \
+   v->v_##name->data.interpolation = INTERP_MODE_FLAT; \
    v->v_##name->data.location = VARYING_SLOT_VAR0 + \
       offsetof(struct brw_blorp_wm_inputs, name) / (4 * sizeof(float));
 
index a38ea0c551677c9749ca0cb6a93b09a5bd99a747..1bc0dbbe7563b36d91efa7fb318b4c063eb47820 100644 (file)
@@ -70,7 +70,7 @@ brw_blorp_params_get_clear_kernel(struct brw_context *brw,
    nir_variable *v_color = nir_variable_create(b.shader, nir_var_shader_in,
                                                glsl_vec4_type(), "v_color");
    v_color->data.location = VARYING_SLOT_VAR0;
-   v_color->data.interpolation = INTERP_QUALIFIER_FLAT;
+   v_color->data.interpolation = INTERP_MODE_FLAT;
 
    nir_variable *frag_color = nir_variable_create(b.shader, nir_var_shader_out,
                                                   glsl_vec4_type(),
index 3e6664e4a8291fbc23c267ad2c21da97d1f4b6f5..f5d0a5ad946abf65db1ea15ab8c603cce7e30cab 100644 (file)
@@ -274,10 +274,10 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
          */
          GLuint interp = c->key.interpolation_mode.mode[slot];
 
-         if (interp != INTERP_QUALIFIER_FLAT) {
+         if (interp != INTERP_MODE_FLAT) {
             struct brw_reg tmp = get_tmp(c);
             struct brw_reg t =
-               interp == INTERP_QUALIFIER_NOPERSPECTIVE ? t_nopersp : t0;
+               interp == INTERP_MODE_NOPERSPECTIVE ? t_nopersp : t0;
 
             brw_MUL(p,
                   vec4(brw_null_reg()),
@@ -406,7 +406,7 @@ void brw_clip_copy_flatshaded_attributes( struct brw_clip_compile *c,
    struct brw_codegen *p = &c->func;
 
    for (int i = 0; i < c->vue_map.num_slots; i++) {
-      if (c->key.interpolation_mode.mode[i] == INTERP_QUALIFIER_FLAT) {
+      if (c->key.interpolation_mode.mode[i] == INTERP_MODE_FLAT) {
          brw_MOV(p,
                  byte_offset(c->reg.vertex[to], brw_vue_slot_to_offset(i)),
                  byte_offset(c->reg.vertex[from], brw_vue_slot_to_offset(i)));
index 028bffcbd40c0fe0db6275be291aaae18bb3c081..bfad868cf87db1f573bc1ba2fe8a5718eb3d1cea 100644 (file)
@@ -392,7 +392,7 @@ struct interpolation_mode_map {
 static inline bool brw_any_flat_varyings(struct interpolation_mode_map *map)
 {
    for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++)
-      if (map->mode[i] == INTERP_QUALIFIER_FLAT)
+      if (map->mode[i] == INTERP_MODE_FLAT)
          return true;
 
    return false;
@@ -401,7 +401,7 @@ static inline bool brw_any_flat_varyings(struct interpolation_mode_map *map)
 static inline bool brw_any_noperspective_varyings(struct interpolation_mode_map *map)
 {
    for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++)
-      if (map->mode[i] == INTERP_QUALIFIER_NOPERSPECTIVE)
+      if (map->mode[i] == INTERP_MODE_NOPERSPECTIVE)
          return true;
 
    return false;
index d4e5e86e4656563d48696c1c3de80bc8d822b001..c907725d5c56c9fa37d168739b0179d8dab72688 100644 (file)
@@ -1071,13 +1071,13 @@ fs_visitor::emit_fragcoord_interpolation()
 }
 
 static enum brw_barycentric_mode
-barycentric_mode(enum glsl_interp_qualifier mode,
+barycentric_mode(enum glsl_interp_mode mode,
                  bool is_centroid, bool is_sample)
 {
    unsigned bary;
 
    /* Barycentric modes don't make sense for flat inputs. */
-   assert(mode != INTERP_QUALIFIER_FLAT);
+   assert(mode != INTERP_MODE_FLAT);
 
    if (is_sample) {
       bary = BRW_BARYCENTRIC_PERSPECTIVE_SAMPLE;
@@ -1087,7 +1087,7 @@ barycentric_mode(enum glsl_interp_qualifier mode,
       bary = BRW_BARYCENTRIC_PERSPECTIVE_PIXEL;
    }
 
-   if (mode == INTERP_QUALIFIER_NOPERSPECTIVE)
+   if (mode == INTERP_MODE_NOPERSPECTIVE)
       bary += 3;
 
    return (enum brw_barycentric_mode) bary;
@@ -1107,7 +1107,7 @@ centroid_to_pixel(enum brw_barycentric_mode bary)
 void
 fs_visitor::emit_general_interpolation(fs_reg *attr, const char *name,
                                        const glsl_type *type,
-                                       glsl_interp_qualifier interpolation_mode,
+                                       glsl_interp_mode interpolation_mode,
                                        int *location, bool mod_centroid,
                                        bool mod_sample)
 {
@@ -1142,7 +1142,7 @@ fs_visitor::emit_general_interpolation(fs_reg *attr, const char *name,
 
       attr->type = brw_type_for_base_type(type->get_scalar_type());
 
-      if (interpolation_mode == INTERP_QUALIFIER_FLAT) {
+      if (interpolation_mode == INTERP_MODE_FLAT) {
          /* Constant interpolation (flat shading) case. The SF has
           * handed us defined values in only the constant offset
           * field of the setup reg.
@@ -1198,7 +1198,7 @@ fs_visitor::emit_general_interpolation(fs_reg *attr, const char *name,
             } else {
                bld.emit(FS_OPCODE_LINTERP, *attr, delta_xy[bary], interp);
             }
-            if (devinfo->gen < 6 && interpolation_mode == INTERP_QUALIFIER_SMOOTH) {
+            if (devinfo->gen < 6 && interpolation_mode == INTERP_MODE_SMOOTH) {
                bld.MUL(*attr, *attr, this->pixel_w);
             }
             *attr = offset(*attr, bld, 1);
@@ -6347,7 +6347,7 @@ brw_compute_barycentric_interp_modes(const struct brw_device_info *devinfo,
          continue;
 
       /* Flat inputs don't need barycentric modes. */
-      if (var->data.interpolation == INTERP_QUALIFIER_FLAT)
+      if (var->data.interpolation == INTERP_MODE_FLAT)
          continue;
 
       /* Determine the set (or sets) of barycentric coordinates needed to
@@ -6357,7 +6357,7 @@ brw_compute_barycentric_interp_modes(const struct brw_device_info *devinfo,
        * for lit pixels, so we need both sets of barycentric coordinates.
        */
       enum brw_barycentric_mode bary_mode =
-         barycentric_mode((glsl_interp_qualifier) var->data.interpolation,
+         barycentric_mode((glsl_interp_mode) var->data.interpolation,
                           var->data.centroid, var->data.sample);
 
       barycentric_interp_modes |= 1 << bary_mode;
@@ -6382,7 +6382,7 @@ brw_compute_flat_inputs(struct brw_wm_prog_data *prog_data,
         continue;
 
       /* flat shading */
-      if (var->data.interpolation == INTERP_QUALIFIER_FLAT)
+      if (var->data.interpolation == INTERP_MODE_FLAT)
          prog_data->flat_inputs |= (1 << input_index);
    }
 }
@@ -6423,18 +6423,18 @@ brw_nir_set_default_interpolation(const struct brw_device_info *devinfo,
        * Everything defaults to smooth except for the legacy GL color
        * built-in variables, which might be flat depending on API state.
        */
-      if (var->data.interpolation == INTERP_QUALIFIER_NONE) {
+      if (var->data.interpolation == INTERP_MODE_NONE) {
          const bool flat = api_flat_shade &&
             (var->data.location == VARYING_SLOT_COL0 ||
              var->data.location == VARYING_SLOT_COL1);
 
-         var->data.interpolation = flat ? INTERP_QUALIFIER_FLAT
-                                        : INTERP_QUALIFIER_SMOOTH;
+         var->data.interpolation = flat ? INTERP_MODE_FLAT
+                                        : INTERP_MODE_SMOOTH;
       }
 
       /* Apply 'sample' if necessary for API state. */
       if (per_sample_interpolation &&
-          var->data.interpolation != INTERP_QUALIFIER_FLAT) {
+          var->data.interpolation != INTERP_MODE_FLAT) {
          var->data.centroid = false;
          var->data.sample = true;
       }
index 70e324919e1415634b9319829f2b5bcd259f3d60..29c13cd802875136046e99162a70431b39f52c64 100644 (file)
@@ -176,7 +176,7 @@ public:
    fs_reg *emit_samplemaskin_setup();
    void emit_general_interpolation(fs_reg *attr, const char *name,
                                    const glsl_type *type,
-                                   glsl_interp_qualifier interpolation_mode,
+                                   glsl_interp_mode interpolation_mode,
                                    int *location, bool mod_centroid,
                                    bool mod_sample);
    fs_reg *emit_vs_system_value(int location);
index 129984a8812fb3fad2baddc75a5b2fb8e6f805b7..ccf0d093f5bd83d530a90e33f4782313e3959277 100644 (file)
@@ -76,7 +76,7 @@ fs_visitor::nir_setup_inputs()
       } else {
          int location = var->data.location;
          emit_general_interpolation(&input, var->name, var->type,
-                                    (glsl_interp_qualifier) var->data.interpolation,
+                                    (glsl_interp_mode) var->data.interpolation,
                                     &location, var->data.centroid,
                                     var->data.sample);
       }
@@ -1639,7 +1639,7 @@ emit_pixel_interpolater_send(const fs_builder &bld,
                              const fs_reg &dst,
                              const fs_reg &src,
                              const fs_reg &desc,
-                             glsl_interp_qualifier interpolation)
+                             glsl_interp_mode interpolation)
 {
    fs_inst *inst;
    fs_reg payload;
@@ -1658,7 +1658,7 @@ emit_pixel_interpolater_send(const fs_builder &bld,
    inst->mlen = mlen;
    /* 2 floats per slot returned */
    inst->regs_written = 2 * bld.dispatch_width() / 8;
-   inst->pi_noperspective = interpolation == INTERP_QUALIFIER_NOPERSPECTIVE;
+   inst->pi_noperspective = interpolation == INTERP_MODE_NOPERSPECTIVE;
 
    return inst;
 }
@@ -3108,8 +3108,8 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
       wm_prog_data->pulls_bary = true;
 
       fs_reg dst_xy = bld.vgrf(BRW_REGISTER_TYPE_F, 2);
-      const glsl_interp_qualifier interpolation =
-         (glsl_interp_qualifier) instr->variables[0]->var->data.interpolation;
+      const glsl_interp_mode interpolation =
+         (glsl_interp_mode) instr->variables[0]->var->data.interpolation;
 
       switch (instr->intrinsic) {
       case nir_intrinsic_interp_var_at_centroid:
index 87b35d8d59dac31365c6a59d2dbf5e514ffed7b3..6d0a813eee7b1faf6788f7cb58939106672a8b38 100644 (file)
 static char const *get_qual_name(int mode)
 {
    switch (mode) {
-      case INTERP_QUALIFIER_NONE:          return "none";
-      case INTERP_QUALIFIER_FLAT:          return "flat";
-      case INTERP_QUALIFIER_SMOOTH:        return "smooth";
-      case INTERP_QUALIFIER_NOPERSPECTIVE: return "nopersp";
+      case INTERP_MODE_NONE:          return "none";
+      case INTERP_MODE_FLAT:          return "flat";
+      case INTERP_MODE_SMOOTH:        return "smooth";
+      case INTERP_MODE_NOPERSPECTIVE: return "nopersp";
       default:                             return "???";
    }
 }
@@ -49,7 +49,7 @@ brw_setup_vue_interpolation(struct brw_context *brw)
                         BRW_NEW_VUE_MAP_GEOM_OUT))
       return;
 
-   memset(&brw->interpolation_mode, INTERP_QUALIFIER_NONE, sizeof(brw->interpolation_mode));
+   memset(&brw->interpolation_mode, INTERP_MODE_NONE, sizeof(brw->interpolation_mode));
 
    brw->ctx.NewDriverState |= BRW_NEW_INTERPOLATION_MAP;
 
@@ -64,7 +64,7 @@ brw_setup_vue_interpolation(struct brw_context *brw)
       /* HPOS always wants noperspective. setting it up here allows
        * us to not need special handling in the SF program. */
       if (varying == VARYING_SLOT_POS) {
-         brw->interpolation_mode.mode[i] = INTERP_QUALIFIER_NOPERSPECTIVE;
+         brw->interpolation_mode.mode[i] = INTERP_MODE_NOPERSPECTIVE;
          continue;
       }
 
@@ -75,17 +75,17 @@ brw_setup_vue_interpolation(struct brw_context *brw)
       if (!(fprog->Base.InputsRead & BITFIELD64_BIT(frag_attrib)))
          continue;
 
-      enum glsl_interp_qualifier mode = fprog->InterpQualifier[frag_attrib];
+      enum glsl_interp_mode mode = fprog->InterpQualifier[frag_attrib];
 
       /* If the mode is not specified, the default varies: Color values
        * follow GL_SHADE_MODEL; everything else is smooth.
        */
-      if (mode == INTERP_QUALIFIER_NONE) {
+      if (mode == INTERP_MODE_NONE) {
          if (frag_attrib == VARYING_SLOT_COL0 || frag_attrib == VARYING_SLOT_COL1)
             mode = brw->ctx.Light.ShadeModel == GL_FLAT
-               ? INTERP_QUALIFIER_FLAT : INTERP_QUALIFIER_SMOOTH;
+               ? INTERP_MODE_FLAT : INTERP_MODE_SMOOTH;
          else
-            mode = INTERP_QUALIFIER_SMOOTH;
+            mode = INTERP_MODE_SMOOTH;
       }
 
       brw->interpolation_mode.mode[i] = mode;
index f03b74143f4a5cbe8d765df1355d692e82078a3a..fe05d547fbcd28fe8842ff56ec2a8812ef415479 100644 (file)
@@ -162,7 +162,7 @@ static void copy_flatshaded_attributes(struct brw_sf_compile *c,
    int i;
 
    for (i = 0; i < c->vue_map.num_slots; i++) {
-      if (c->key.interpolation_mode.mode[i] == INTERP_QUALIFIER_FLAT) {
+      if (c->key.interpolation_mode.mode[i] == INTERP_MODE_FLAT) {
          brw_MOV(p,
                  get_vue_slot(c, dst, i),
                  get_vue_slot(c, src, i));
@@ -176,7 +176,7 @@ static int count_flatshaded_attributes(struct brw_sf_compile *c)
    int count = 0;
 
    for (i = 0; i < c->vue_map.num_slots; i++)
-      if (c->key.interpolation_mode.mode[i] == INTERP_QUALIFIER_FLAT)
+      if (c->key.interpolation_mode.mode[i] == INTERP_MODE_FLAT)
          count++;
 
    return count;
@@ -336,17 +336,17 @@ calculate_masks(struct brw_sf_compile *c,
                 GLushort *pc_linear)
 {
    bool is_last_attr = (reg == c->nr_setup_regs - 1);
-   enum glsl_interp_qualifier interp;
+   enum glsl_interp_mode interp;
 
    *pc_persp = 0;
    *pc_linear = 0;
    *pc = 0xf;
 
    interp = c->key.interpolation_mode.mode[vert_reg_to_vue_slot(c, reg, 0)];
-   if (interp == INTERP_QUALIFIER_SMOOTH) {
+   if (interp == INTERP_MODE_SMOOTH) {
       *pc_linear = 0xf;
       *pc_persp = 0xf;
-   } else if (interp == INTERP_QUALIFIER_NOPERSPECTIVE)
+   } else if (interp == INTERP_MODE_NOPERSPECTIVE)
       *pc_linear = 0xf;
 
    /* Maybe only processs one attribute on the final round:
@@ -355,10 +355,10 @@ calculate_masks(struct brw_sf_compile *c,
       *pc |= 0xf0;
 
       interp = c->key.interpolation_mode.mode[vert_reg_to_vue_slot(c, reg, 1)];
-      if (interp == INTERP_QUALIFIER_SMOOTH) {
+      if (interp == INTERP_MODE_SMOOTH) {
          *pc_linear |= 0xf0;
          *pc_persp |= 0xf0;
-      } else if (interp == INTERP_QUALIFIER_NOPERSPECTIVE)
+      } else if (interp == INTERP_MODE_NOPERSPECTIVE)
          *pc_linear |= 0xf0;
    }
 
index 29e47debfc258fd0cd6cdaece0407eb2409c1b33..3dae16895a23f4f33044f962cb6518ec4430d519 100644 (file)
@@ -2031,9 +2031,9 @@ struct gl_fragment_program
    /**
     * GLSL interpolation qualifier associated with each fragment shader input.
     * For inputs that do not have an interpolation qualifier specified in
-    * GLSL, the value is INTERP_QUALIFIER_NONE.
+    * GLSL, the value is INTERP_MODE_NONE.
     */
-   enum glsl_interp_qualifier InterpQualifier[VARYING_SLOT_MAX];
+   enum glsl_interp_mode InterpQualifier[VARYING_SLOT_MAX];
 
    /**
     * Bitfield indicating, for each fragment shader input, 1 if that input
@@ -2638,7 +2638,7 @@ struct gl_shader_variable
    /**
     * Interpolation mode for shader inputs / outputs
     *
-    * \sa glsl_interp_qualifier
+    * \sa glsl_interp_mode
     */
    unsigned interpolation:2;
 
index 20b04d1e20f6950e27560eb6733dbc43fe5ddbce..19a8ac031395de032ac087d2fdb23a8f0d6597f7 100644 (file)
  *
  * with appropriate substitutions in the uniform variables list:
  *
- *    decl_var uniform INTERP_QUALIFIER_NONE gl_FogParameters gl_Fog (0, 0)
+ *    decl_var uniform INTERP_MODE_NONE gl_FogParameters gl_Fog (0, 0)
  *
  * would become:
  *
- *    decl_var uniform INTERP_QUALIFIER_NONE vec4 state.fog.color (0, 0)
- *    decl_var uniform INTERP_QUALIFIER_NONE vec4 state.fog.params (0, 1)
+ *    decl_var uniform INTERP_MODE_NONE vec4 state.fog.color (0, 0)
+ *    decl_var uniform INTERP_MODE_NONE vec4 state.fog.params (0, 1)
  *
  * See in particular 'struct gl_builtin_uniform_element'.
  */
index 57b093544871b8c2ce4737ee729a32d9e677f689..ebeed14ea2e52e4ca2022bb23cc21753c74a38e1 100644 (file)
@@ -545,18 +545,18 @@ st_get_vp_variant(struct st_context *st,
 
 
 static unsigned
-st_translate_interp(enum glsl_interp_qualifier glsl_qual, bool is_color)
+st_translate_interp(enum glsl_interp_mode glsl_qual, bool is_color)
 {
    switch (glsl_qual) {
-   case INTERP_QUALIFIER_NONE:
+   case INTERP_MODE_NONE:
       if (is_color)
          return TGSI_INTERPOLATE_COLOR;
       return TGSI_INTERPOLATE_PERSPECTIVE;
-   case INTERP_QUALIFIER_SMOOTH:
+   case INTERP_MODE_SMOOTH:
       return TGSI_INTERPOLATE_PERSPECTIVE;
-   case INTERP_QUALIFIER_FLAT:
+   case INTERP_MODE_FLAT:
       return TGSI_INTERPOLATE_CONSTANT;
-   case INTERP_QUALIFIER_NOPERSPECTIVE:
+   case INTERP_MODE_NOPERSPECTIVE:
       return TGSI_INTERPOLATE_LINEAR;
    default:
       assert(0 && "unexpected interp mode in st_translate_interp()");