[Mesa-dev] [PATCH] treewide: s/comparitor/comparator/

Nicolai Hähnle nhaehnle at gmail.com
Mon Dec 12 14:29:40 UTC 2016


On 12.12.2016 14:34, Ilia Mirkin wrote:
> git grep -l comparitor | xargs sed -i 's/comparitor/comparator/g'
>
> Just happened to notice this in a patch that was sent and included one
> of the tokens in question.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>
> I will regenerate this before pushing in case there are changes in the tree
> between now and then.

Makes sense.

Acked-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

>
>  src/amd/common/ac_nir_to_llvm.c                    | 10 ++++----
>  src/compiler/glsl/builtin_functions.cpp            | 12 +++++-----
>  src/compiler/glsl/glsl_to_nir.cpp                  |  8 +++----
>  src/compiler/glsl/ir.h                             |  6 ++---
>  src/compiler/glsl/ir_clone.cpp                     |  4 ++--
>  src/compiler/glsl/ir_equals.cpp                    |  2 +-
>  src/compiler/glsl/ir_hv_accept.cpp                 |  4 ++--
>  src/compiler/glsl/ir_print_visitor.cpp             |  4 ++--
>  src/compiler/glsl/ir_reader.cpp                    |  8 +++----
>  src/compiler/glsl/ir_rvalue_visitor.cpp            |  2 +-
>  src/compiler/glsl/lower_texture_projection.cpp     |  8 +++----
>  src/compiler/glsl/opt_tree_grafting.cpp            |  2 +-
>  src/compiler/glsl_types.h                          |  2 +-
>  src/compiler/nir/nir.h                             |  4 ++--
>  src/compiler/nir/nir_lower_tex.c                   |  2 +-
>  src/compiler/nir/nir_print.c                       |  4 ++--
>  src/compiler/spirv/spirv_to_nir.c                  |  2 +-
>  src/gallium/auxiliary/nir/tgsi_to_nir.c            |  2 +-
>  .../drivers/freedreno/ir3/ir3_compiler_nir.c       |  2 +-
>  src/gallium/drivers/vc4/vc4_program.c              |  2 +-
>  src/mesa/drivers/dri/i965/brw_defines.h            |  2 +-
>  src/mesa/drivers/dri/i965/brw_fs.cpp               |  4 ++--
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp           |  2 +-
>  .../dri/i965/brw_lower_texture_gradients.cpp       |  2 +-
>  src/mesa/drivers/dri/i965/brw_vec4.h               |  2 +-
>  src/mesa/drivers/dri/i965/brw_vec4_nir.cpp         |  8 +++----
>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp     | 28 +++++++++++-----------
>  src/mesa/main/ff_fragment_shader.cpp               |  2 +-
>  src/mesa/program/ir_to_mesa.cpp                    | 14 +++++------
>  src/mesa/program/prog_to_nir.c                     |  2 +-
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp         | 14 +++++------
>  31 files changed, 85 insertions(+), 85 deletions(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 398db6a..d66fefb 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3418,7 +3418,7 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
>  	unsigned dmask = 0xf;
>  	LLVMValueRef address[16];
>  	LLVMValueRef coords[5];
> -	LLVMValueRef coord = NULL, lod = NULL, comparitor = NULL;
> +	LLVMValueRef coord = NULL, lod = NULL, comparator = NULL;
>  	LLVMValueRef bias = NULL, offsets = NULL;
>  	LLVMValueRef res_ptr, samp_ptr, fmask_ptr = NULL, sample_index = NULL;
>  	LLVMValueRef ddx = NULL, ddy = NULL;
> @@ -3435,8 +3435,8 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
>  			break;
>  		case nir_tex_src_projector:
>  			break;
> -		case nir_tex_src_comparitor:
> -			comparitor = get_src(ctx, instr->src[i].src);
> +		case nir_tex_src_comparator:
> +			comparator = get_src(ctx, instr->src[i].src);
>  			break;
>  		case nir_tex_src_offset:
>  			offsets = get_src(ctx, instr->src[i].src);
> @@ -3521,8 +3521,8 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
>  	}
>
>  	/* Pack depth comparison value */
> -	if (instr->is_shadow && comparitor) {
> -		address[count++] = llvm_extract_elem(ctx, comparitor, 0);
> +	if (instr->is_shadow && comparator) {
> +		address[count++] = llvm_extract_elem(ctx, comparator, 0);
>  	}
>
>  	/* pack derivatives */
> diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
> index 17f03a3..797af08 100644
> --- a/src/compiler/glsl/builtin_functions.cpp
> +++ b/src/compiler/glsl/builtin_functions.cpp
> @@ -1697,7 +1697,7 @@ builtin_builder::create_builtins()
>                  _texture(ir_tex, v130, glsl_type::float_type, glsl_type::sampler1DArrayShadow_type, glsl_type::vec3_type),
>                  _texture(ir_tex, v130, glsl_type::float_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec4_type),
>                  /* samplerCubeArrayShadow is special; it has an extra parameter
> -                 * for the shadow comparitor since there is no vec5 type.
> +                 * for the shadow comparator since there is no vec5 type.
>                   */
>                  _textureCubeArrayShadow(),
>
> @@ -4659,7 +4659,7 @@ builtin_builder::_texture(ir_texture_opcode opcode,
>     if (coord_size == coord_type->vector_elements) {
>        tex->coordinate = var_ref(P);
>     } else {
> -      /* The incoming coordinate also has the projector or shadow comparitor,
> +      /* The incoming coordinate also has the projector or shadow comparator,
>         * so we need to swizzle those away.
>         */
>        tex->coordinate = swizzle_for_size(P, coord_size);
> @@ -4676,12 +4676,12 @@ builtin_builder::_texture(ir_texture_opcode opcode,
>            */
>           ir_variable *refz = in_var(glsl_type::float_type, "refz");
>           sig->parameters.push_tail(refz);
> -         tex->shadow_comparitor = var_ref(refz);
> +         tex->shadow_comparator = var_ref(refz);
>        } else {
> -         /* The shadow comparitor is normally in the Z component, but a few types
> +         /* The shadow comparator is normally in the Z component, but a few types
>            * have sufficiently large coordinates that it's in W.
>            */
> -         tex->shadow_comparitor = swizzle(P, MAX2(coord_size, SWIZZLE_Z), 1);
> +         tex->shadow_comparator = swizzle(P, MAX2(coord_size, SWIZZLE_Z), 1);
>        }
>     }
>
> @@ -4754,7 +4754,7 @@ builtin_builder::_textureCubeArrayShadow()
>     tex->set_sampler(var_ref(s), glsl_type::float_type);
>
>     tex->coordinate = var_ref(P);
> -   tex->shadow_comparitor = var_ref(compare);
> +   tex->shadow_comparator = var_ref(compare);
>
>     body.emit(ret(tex));
>
> diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
> index 4debc37..8b86b1c 100644
> --- a/src/compiler/glsl/glsl_to_nir.cpp
> +++ b/src/compiler/glsl/glsl_to_nir.cpp
> @@ -1894,7 +1894,7 @@ nir_visitor::visit(ir_texture *ir)
>
>     if (ir->projector != NULL)
>        num_srcs++;
> -   if (ir->shadow_comparitor != NULL)
> +   if (ir->shadow_comparator != NULL)
>        num_srcs++;
>     if (ir->offset != NULL)
>        num_srcs++;
> @@ -1942,10 +1942,10 @@ nir_visitor::visit(ir_texture *ir)
>        src_number++;
>     }
>
> -   if (ir->shadow_comparitor != NULL) {
> +   if (ir->shadow_comparator != NULL) {
>        instr->src[src_number].src =
> -         nir_src_for_ssa(evaluate_rvalue(ir->shadow_comparitor));
> -      instr->src[src_number].src_type = nir_tex_src_comparitor;
> +         nir_src_for_ssa(evaluate_rvalue(ir->shadow_comparator));
> +      instr->src[src_number].src_type = nir_tex_src_comparator;
>        src_number++;
>     }
>
> diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h
> index df3ccfd..a11dccd 100644
> --- a/src/compiler/glsl/ir.h
> +++ b/src/compiler/glsl/ir.h
> @@ -1787,7 +1787,7 @@ enum ir_texture_opcode {
>   *
>   *                                    Texel offset (0 or an expression)
>   *                                    | Projection divisor
> - *                                    | |  Shadow comparitor
> + *                                    | |  Shadow comparator
>   *                                    | |  |
>   *                                    v v  v
>   * (tex <type> <sampler> <coordinate> 0 1 ( ))
> @@ -1808,7 +1808,7 @@ public:
>     ir_texture(enum ir_texture_opcode op)
>        : ir_rvalue(ir_type_texture),
>          op(op), sampler(NULL), coordinate(NULL), projector(NULL),
> -        shadow_comparitor(NULL), offset(NULL)
> +        shadow_comparator(NULL), offset(NULL)
>     {
>        memset(&lod_info, 0, sizeof(lod_info));
>     }
> @@ -1863,7 +1863,7 @@ public:
>      * If there is no shadow comparison, this will be \c NULL.  For the
>      * \c ir_txf opcode, this *must* be \c NULL.
>      */
> -   ir_rvalue *shadow_comparitor;
> +   ir_rvalue *shadow_comparator;
>
>     /** Texel offset. */
>     ir_rvalue *offset;
> diff --git a/src/compiler/glsl/ir_clone.cpp b/src/compiler/glsl/ir_clone.cpp
> index 0e50084..062ea23 100644
> --- a/src/compiler/glsl/ir_clone.cpp
> +++ b/src/compiler/glsl/ir_clone.cpp
> @@ -209,8 +209,8 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
>        new_tex->coordinate = this->coordinate->clone(mem_ctx, ht);
>     if (this->projector)
>        new_tex->projector = this->projector->clone(mem_ctx, ht);
> -   if (this->shadow_comparitor) {
> -      new_tex->shadow_comparitor = this->shadow_comparitor->clone(mem_ctx, ht);
> +   if (this->shadow_comparator) {
> +      new_tex->shadow_comparator = this->shadow_comparator->clone(mem_ctx, ht);
>     }
>
>     if (this->offset != NULL)
> diff --git a/src/compiler/glsl/ir_equals.cpp b/src/compiler/glsl/ir_equals.cpp
> index b86f4ea..58b08d4 100644
> --- a/src/compiler/glsl/ir_equals.cpp
> +++ b/src/compiler/glsl/ir_equals.cpp
> @@ -143,7 +143,7 @@ ir_texture::equals(const ir_instruction *ir, enum ir_node_type ignore) const
>     if (!possibly_null_equals(projector, other->projector, ignore))
>        return false;
>
> -   if (!possibly_null_equals(shadow_comparitor, other->shadow_comparitor, ignore))
> +   if (!possibly_null_equals(shadow_comparator, other->shadow_comparator, ignore))
>        return false;
>
>     if (!possibly_null_equals(offset, other->offset, ignore))
> diff --git a/src/compiler/glsl/ir_hv_accept.cpp b/src/compiler/glsl/ir_hv_accept.cpp
> index 5cc6a34..7bbc216 100644
> --- a/src/compiler/glsl/ir_hv_accept.cpp
> +++ b/src/compiler/glsl/ir_hv_accept.cpp
> @@ -178,8 +178,8 @@ ir_texture::accept(ir_hierarchical_visitor *v)
>  	 return (s == visit_continue_with_parent) ? visit_continue : s;
>     }
>
> -   if (this->shadow_comparitor) {
> -      s = this->shadow_comparitor->accept(v);
> +   if (this->shadow_comparator) {
> +      s = this->shadow_comparator->accept(v);
>        if (s != visit_continue)
>  	 return (s == visit_continue_with_parent) ? visit_continue : s;
>     }
> diff --git a/src/compiler/glsl/ir_print_visitor.cpp b/src/compiler/glsl/ir_print_visitor.cpp
> index 6da25e7..e42d246 100644
> --- a/src/compiler/glsl/ir_print_visitor.cpp
> +++ b/src/compiler/glsl/ir_print_visitor.cpp
> @@ -324,9 +324,9 @@ void ir_print_visitor::visit(ir_texture *ir)
>        else
>  	 fprintf(f, "1");
>
> -      if (ir->shadow_comparitor) {
> +      if (ir->shadow_comparator) {
>  	 fprintf(f, " ");
> -	 ir->shadow_comparitor->accept(this);
> +	 ir->shadow_comparator->accept(this);
>        } else {
>  	 fprintf(f, " ()");
>        }
> diff --git a/src/compiler/glsl/ir_reader.cpp b/src/compiler/glsl/ir_reader.cpp
> index d67d143..6d3d048 100644
> --- a/src/compiler/glsl/ir_reader.cpp
> +++ b/src/compiler/glsl/ir_reader.cpp
> @@ -1047,11 +1047,11 @@ ir_reader::read_texture(s_expression *expr)
>        }
>
>        if (s_shadow->subexpressions.is_empty()) {
> -	 tex->shadow_comparitor = NULL;
> +	 tex->shadow_comparator = NULL;
>        } else {
> -	 tex->shadow_comparitor = read_rvalue(s_shadow);
> -	 if (tex->shadow_comparitor == NULL) {
> -	    ir_read_error(NULL, "when reading shadow comparitor in (%s ..)",
> +	 tex->shadow_comparator = read_rvalue(s_shadow);
> +	 if (tex->shadow_comparator == NULL) {
> +	    ir_read_error(NULL, "when reading shadow comparator in (%s ..)",
>  			  tex->opcode_string());
>  	    return NULL;
>  	 }
> diff --git a/src/compiler/glsl/ir_rvalue_visitor.cpp b/src/compiler/glsl/ir_rvalue_visitor.cpp
> index addcc68..d052606 100644
> --- a/src/compiler/glsl/ir_rvalue_visitor.cpp
> +++ b/src/compiler/glsl/ir_rvalue_visitor.cpp
> @@ -51,7 +51,7 @@ ir_rvalue_base_visitor::rvalue_visit(ir_texture *ir)
>  {
>     handle_rvalue(&ir->coordinate);
>     handle_rvalue(&ir->projector);
> -   handle_rvalue(&ir->shadow_comparitor);
> +   handle_rvalue(&ir->shadow_comparator);
>     handle_rvalue(&ir->offset);
>
>     switch (ir->op) {
> diff --git a/src/compiler/glsl/lower_texture_projection.cpp b/src/compiler/glsl/lower_texture_projection.cpp
> index 95df106..698e5b3 100644
> --- a/src/compiler/glsl/lower_texture_projection.cpp
> +++ b/src/compiler/glsl/lower_texture_projection.cpp
> @@ -78,11 +78,11 @@ lower_texture_projection_visitor::visit_leave(ir_texture *ir)
>  					       ir->coordinate,
>  					       deref);
>
> -   if (ir->shadow_comparitor) {
> +   if (ir->shadow_comparator) {
>        deref = new(mem_ctx) ir_dereference_variable(var);
> -      ir->shadow_comparitor = new(mem_ctx) ir_expression(ir_binop_mul,
> -						  ir->shadow_comparitor->type,
> -						  ir->shadow_comparitor,
> +      ir->shadow_comparator = new(mem_ctx) ir_expression(ir_binop_mul,
> +						  ir->shadow_comparator->type,
> +						  ir->shadow_comparator,
>  						  deref);
>     }
>
> diff --git a/src/compiler/glsl/opt_tree_grafting.cpp b/src/compiler/glsl/opt_tree_grafting.cpp
> index a40e5f7..28b6e18 100644
> --- a/src/compiler/glsl/opt_tree_grafting.cpp
> +++ b/src/compiler/glsl/opt_tree_grafting.cpp
> @@ -267,7 +267,7 @@ ir_tree_grafting_visitor::visit_enter(ir_texture *ir)
>     if (do_graft(&ir->coordinate) ||
>         do_graft(&ir->projector) ||
>         do_graft(&ir->offset) ||
> -       do_graft(&ir->shadow_comparitor))
> +       do_graft(&ir->shadow_comparator))
>  	 return visit_stop;
>
>     switch (ir->op) {
> diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h
> index bb223cf..508cf52 100644
> --- a/src/compiler/glsl_types.h
> +++ b/src/compiler/glsl_types.h
> @@ -752,7 +752,7 @@ struct glsl_type {
>      *
>      * Note that this is often different than actual coordinate type used in
>      * a texturing built-in function, since those pack additional values (such
> -    * as the shadow comparitor or projector) into the coordinate type.
> +    * as the shadow comparator or projector) into the coordinate type.
>      */
>     int coordinate_components() const;
>
> diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
> index 544d4ba..3040cbd 100644
> --- a/src/compiler/nir/nir.h
> +++ b/src/compiler/nir/nir.h
> @@ -1065,7 +1065,7 @@ INTRINSIC_IDX_ACCESSORS(interp_mode, INTERP_MODE, unsigned)
>  typedef enum {
>     nir_tex_src_coord,
>     nir_tex_src_projector,
> -   nir_tex_src_comparitor, /* shadow comparitor */
> +   nir_tex_src_comparator, /* shadow comparator */
>     nir_tex_src_offset,
>     nir_tex_src_bias,
>     nir_tex_src_lod,
> @@ -1263,7 +1263,7 @@ nir_tex_instr_src_type(nir_tex_instr *instr, unsigned src)
>        }
>
>     case nir_tex_src_projector:
> -   case nir_tex_src_comparitor:
> +   case nir_tex_src_comparator:
>     case nir_tex_src_bias:
>     case nir_tex_src_ddx:
>     case nir_tex_src_ddy:
> diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
> index 0efd443..39f7af7 100644
> --- a/src/compiler/nir/nir_lower_tex.c
> +++ b/src/compiler/nir/nir_lower_tex.c
> @@ -55,7 +55,7 @@ project_src(nir_builder *b, nir_tex_instr *tex)
>     for (unsigned i = 0; i < tex->num_srcs; i++) {
>        switch (tex->src[i].src_type) {
>        case nir_tex_src_coord:
> -      case nir_tex_src_comparitor:
> +      case nir_tex_src_comparator:
>           break;
>        default:
>           continue;
> diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
> index eb5f57f..d1f1245 100644
> --- a/src/compiler/nir/nir_print.c
> +++ b/src/compiler/nir/nir_print.c
> @@ -706,8 +706,8 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
>        case nir_tex_src_projector:
>           fprintf(fp, "(projector)");
>           break;
> -      case nir_tex_src_comparitor:
> -         fprintf(fp, "(comparitor)");
> +      case nir_tex_src_comparator:
> +         fprintf(fp, "(comparator)");
>           break;
>        case nir_tex_src_offset:
>           fprintf(fp, "(offset)");
> diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
> index f60c6e6..7c35b8c 100644
> --- a/src/compiler/spirv/spirv_to_nir.c
> +++ b/src/compiler/spirv/spirv_to_nir.c
> @@ -1460,7 +1460,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
>     case SpvOpImageSampleProjDrefExplicitLod:
>     case SpvOpImageDrefGather:
>        /* These all have an explicit depth value as their next source */
> -      (*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_comparitor);
> +      (*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_comparator);
>        break;
>
>     case SpvOpImageGather:
> diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
> index 3f05acd..d01e458 100644
> --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
> +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
> @@ -1433,7 +1433,7 @@ ttn_tex(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
>        else
>           instr->src[src_number].src = nir_src_for_ssa(ttn_channel(b, src[0], Z));
>
> -      instr->src[src_number].src_type = nir_tex_src_comparitor;
> +      instr->src[src_number].src_type = nir_tex_src_comparator;
>        src_number++;
>     }
>
> diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
> index 9cf6717..ac6840c 100644
> --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
> +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
> @@ -1372,7 +1372,7 @@ emit_tex(struct ir3_compile *ctx, nir_tex_instr *tex)
>  			lod = get_src(ctx, &tex->src[i].src)[0];
>  			has_lod = true;
>  			break;
> -		case nir_tex_src_comparitor: /* shadow comparator */
> +		case nir_tex_src_comparator: /* shadow comparator */
>  			compare = get_src(ctx, &tex->src[i].src)[0];
>  			break;
>  		case nir_tex_src_projector:
> diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
> index a7c92d5..611c90d 100644
> --- a/src/gallium/drivers/vc4/vc4_program.c
> +++ b/src/gallium/drivers/vc4/vc4_program.c
> @@ -435,7 +435,7 @@ ntq_emit_tex(struct vc4_compile *c, nir_tex_instr *instr)
>                          lod = ntq_get_src(c, instr->src[i].src, 0);
>                          is_txl = true;
>                          break;
> -                case nir_tex_src_comparitor:
> +                case nir_tex_src_comparator:
>                          compare = ntq_get_src(c, instr->src[i].src, 0);
>                          break;
>                  default:
> diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
> index cae8e9a..b1b6248 100644
> --- a/src/mesa/drivers/dri/i965/brw_defines.h
> +++ b/src/mesa/drivers/dri/i965/brw_defines.h
> @@ -1405,7 +1405,7 @@ enum fb_write_logical_srcs {
>  enum tex_logical_srcs {
>     /** Texture coordinates */
>     TEX_LOGICAL_SRC_COORDINATE,
> -   /** Shadow comparitor */
> +   /** Shadow comparator */
>     TEX_LOGICAL_SRC_SHADOW_C,
>     /** dPdx if the operation takes explicit derivatives, otherwise LOD value */
>     TEX_LOGICAL_SRC_LOD,
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index b5d1381..d5d58b6 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -3833,8 +3833,8 @@ lower_sampler_logical_send_gen4(const fs_builder &bld, fs_inst *inst, opcode op,
>     }
>
>     if (has_lod) {
> -      /* Bias/LOD with shadow comparitor is unsupported in SIMD16 -- *Without*
> -       * shadow comparitor (including RESINFO) it's unsupported in SIMD8 mode.
> +      /* Bias/LOD with shadow comparator is unsupported in SIMD16 -- *Without*
> +       * shadow comparator (including RESINFO) it's unsupported in SIMD8 mode.
>         */
>        assert(shadow_c.file != BAD_FILE ? bld.dispatch_width() == 8 :
>               bld.dispatch_width() == 16);
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 855266f..bfb286b 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -4439,7 +4439,7 @@ fs_visitor::nir_emit_texture(const fs_builder &bld, nir_tex_instr *instr)
>           srcs[TEX_LOGICAL_SRC_LOD] =
>              retype(get_nir_src_imm(instr->src[i].src), BRW_REGISTER_TYPE_F);
>           break;
> -      case nir_tex_src_comparitor:
> +      case nir_tex_src_comparator:
>           srcs[TEX_LOGICAL_SRC_SHADOW_C] = retype(src, BRW_REGISTER_TYPE_F);
>           break;
>        case nir_tex_src_coord:
> diff --git a/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
> index 0848e1e..7ae69f8 100644
> --- a/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
> @@ -104,7 +104,7 @@ lower_texture_grad_visitor::visit_leave(ir_texture *ir)
>     /* Only lower textureGrad with cube maps or shadow samplers */
>     if (ir->op != ir_txd ||
>        (ir->sampler->type->sampler_dimensionality != GLSL_SAMPLER_DIM_CUBE &&
> -       !ir->shadow_comparitor))
> +       !ir->shadow_comparator))
>        return visit_continue;
>
>     /* Lower textureGrad() with samplerCube* even if we have the sample_d_c
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
> index dc69ea9..2c5f75e 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.h
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.h
> @@ -254,7 +254,7 @@ public:
>                       const glsl_type *dest_type,
>                       src_reg coordinate,
>                       int coord_components,
> -                     src_reg shadow_comparitor,
> +                     src_reg shadow_comparator,
>                       src_reg lod, src_reg lod2,
>                       src_reg sample_index,
>                       uint32_t constant_offset,
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> index dde07d0..9a851a8 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> @@ -1804,7 +1804,7 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
>     src_reg sampler_reg = brw_imm_ud(sampler);
>     src_reg coordinate;
>     const glsl_type *coord_type = NULL;
> -   src_reg shadow_comparitor;
> +   src_reg shadow_comparator;
>     src_reg offset_value;
>     src_reg lod, lod2;
>     src_reg sample_index;
> @@ -1823,8 +1823,8 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
>     uint32_t constant_offset = 0;
>     for (unsigned i = 0; i < instr->num_srcs; i++) {
>        switch (instr->src[i].src_type) {
> -      case nir_tex_src_comparitor:
> -         shadow_comparitor = get_nir_src(instr->src[i].src,
> +      case nir_tex_src_comparator:
> +         shadow_comparator = get_nir_src(instr->src[i].src,
>                                           BRW_REGISTER_TYPE_F, 1);
>           break;
>
> @@ -1960,7 +1960,7 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
>     ir_texture_opcode op = ir_texture_opcode_for_nir_texop(instr->op);
>
>     emit_texture(op, dest, dest_type, coordinate, instr->coord_components,
> -                shadow_comparitor,
> +                shadow_comparator,
>                  lod, lod2, sample_index,
>                  constant_offset, offset_value, mcs,
>                  texture, texture_reg, sampler_reg);
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> index 8c7901f..c615ac0 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> @@ -901,7 +901,7 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
>                             const glsl_type *dest_type,
>                             src_reg coordinate,
>                             int coord_components,
> -                           src_reg shadow_comparitor,
> +                           src_reg shadow_comparator,
>                             src_reg lod, src_reg lod2,
>                             src_reg sample_index,
>                             uint32_t constant_offset,
> @@ -971,7 +971,7 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
>     inst->base_mrf = 2;
>     inst->mlen = inst->header_size;
>     inst->dst.writemask = WRITEMASK_XYZW;
> -   inst->shadow_compare = shadow_comparitor.file != BAD_FILE;
> +   inst->shadow_compare = shadow_comparator.file != BAD_FILE;
>
>     inst->src[1] = surface_reg;
>     inst->src[2] = sampler_reg;
> @@ -999,11 +999,11 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
>           emit(MOV(dst_reg(MRF, param_base, coordinate.type, zero_mask),
>                    brw_imm_d(0)));
>        }
> -      /* Load the shadow comparitor */
> -      if (shadow_comparitor.file != BAD_FILE && op != ir_txd && (op != ir_tg4 || offset_value.file == BAD_FILE)) {
> -	 emit(MOV(dst_reg(MRF, param_base + 1, shadow_comparitor.type,
> +      /* Load the shadow comparator */
> +      if (shadow_comparator.file != BAD_FILE && op != ir_txd && (op != ir_tg4 || offset_value.file == BAD_FILE)) {
> +	 emit(MOV(dst_reg(MRF, param_base + 1, shadow_comparator.type,
>  			  WRITEMASK_X),
> -		  shadow_comparitor));
> +		  shadow_comparator));
>  	 inst->mlen++;
>        }
>
> @@ -1012,7 +1012,7 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
>  	 int mrf, writemask;
>  	 if (devinfo->gen >= 5) {
>  	    mrf = param_base + 1;
> -	    if (shadow_comparitor.file != BAD_FILE) {
> +	    if (shadow_comparator.file != BAD_FILE) {
>  	       writemask = WRITEMASK_Y;
>  	       /* mlen already incremented */
>  	    } else {
> @@ -1058,17 +1058,17 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
>  	    emit(MOV(dst_reg(MRF, param_base + 1, type, WRITEMASK_YW), lod2));
>  	    inst->mlen++;
>
> -	    if (dest_type->vector_elements == 3 || shadow_comparitor.file != BAD_FILE) {
> +	    if (dest_type->vector_elements == 3 || shadow_comparator.file != BAD_FILE) {
>  	       lod.swizzle = BRW_SWIZZLE_ZZZZ;
>  	       lod2.swizzle = BRW_SWIZZLE_ZZZZ;
>  	       emit(MOV(dst_reg(MRF, param_base + 2, type, WRITEMASK_X), lod));
>  	       emit(MOV(dst_reg(MRF, param_base + 2, type, WRITEMASK_Y), lod2));
>  	       inst->mlen++;
>
> -               if (shadow_comparitor.file != BAD_FILE) {
> +               if (shadow_comparator.file != BAD_FILE) {
>                    emit(MOV(dst_reg(MRF, param_base + 2,
> -                                   shadow_comparitor.type, WRITEMASK_Z),
> -                           shadow_comparitor));
> +                                   shadow_comparator.type, WRITEMASK_Z),
> +                           shadow_comparator));
>                 }
>  	    }
>  	 } else /* devinfo->gen == 4 */ {
> @@ -1077,9 +1077,9 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
>  	    inst->mlen += 2;
>  	 }
>        } else if (op == ir_tg4 && offset_value.file != BAD_FILE) {
> -         if (shadow_comparitor.file != BAD_FILE) {
> -            emit(MOV(dst_reg(MRF, param_base, shadow_comparitor.type, WRITEMASK_W),
> -                     shadow_comparitor));
> +         if (shadow_comparator.file != BAD_FILE) {
> +            emit(MOV(dst_reg(MRF, param_base, shadow_comparator.type, WRITEMASK_W),
> +                     shadow_comparator));
>           }
>
>           emit(MOV(dst_reg(MRF, param_base + 1, glsl_type::ivec2_type, WRITEMASK_XY),
> diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
> index fddcac2..fd2c71f 100644
> --- a/src/mesa/main/ff_fragment_shader.cpp
> +++ b/src/mesa/main/ff_fragment_shader.cpp
> @@ -990,7 +990,7 @@ static void load_texture( texenv_fragment_program *p, GLuint unit )
>
>     if (p->state->unit[unit].shadow) {
>        texcoord = texcoord->clone(p->mem_ctx, NULL);
> -      tex->shadow_comparitor = new(p->mem_ctx) ir_swizzle(texcoord,
> +      tex->shadow_comparator = new(p->mem_ctx) ir_swizzle(texcoord,
>  							  coords, 0, 0, 0,
>  							  1);
>        coords++;
> diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
> index 558f0ea..653b822 100644
> --- a/src/mesa/program/ir_to_mesa.cpp
> +++ b/src/mesa/program/ir_to_mesa.cpp
> @@ -2055,14 +2055,14 @@ ir_to_mesa_visitor::visit(ir_texture *ir)
>  	 emit(ir, OPCODE_RCP, coord_dst, projector);
>
>  	 /* In the case where we have to project the coordinates "by hand,"
> -	  * the shadow comparitor value must also be projected.
> +	  * the shadow comparator value must also be projected.
>  	  */
>  	 src_reg tmp_src = coord;
> -	 if (ir->shadow_comparitor) {
> +	 if (ir->shadow_comparator) {
>  	    /* Slot the shadow value in as the second to last component of the
>  	     * coord.
>  	     */
> -	    ir->shadow_comparitor->accept(this);
> +	    ir->shadow_comparator->accept(this);
>
>  	    tmp_src = get_temp(glsl_type::vec4_type);
>  	    dst_reg tmp_dst = dst_reg(tmp_src);
> @@ -2086,14 +2086,14 @@ ir_to_mesa_visitor::visit(ir_texture *ir)
>     }
>
>     /* If projection is done and the opcode is not OPCODE_TXP, then the shadow
> -    * comparitor was put in the correct place (and projected) by the code,
> +    * comparator was put in the correct place (and projected) by the code,
>      * above, that handles by-hand projection.
>      */
> -   if (ir->shadow_comparitor && (!ir->projector || opcode == OPCODE_TXP)) {
> +   if (ir->shadow_comparator && (!ir->projector || opcode == OPCODE_TXP)) {
>        /* Slot the shadow value in as the second to last component of the
>         * coord.
>         */
> -      ir->shadow_comparitor->accept(this);
> +      ir->shadow_comparator->accept(this);
>
>        /* XXX This will need to be updated for cubemap array samplers. */
>        if (sampler_type->sampler_dimensionality == GLSL_SAMPLER_DIM_2D &&
> @@ -2119,7 +2119,7 @@ ir_to_mesa_visitor::visit(ir_texture *ir)
>     else
>        inst = emit(ir, opcode, result_dst, coord);
>
> -   if (ir->shadow_comparitor)
> +   if (ir->shadow_comparator)
>        inst->tex_shadow = GL_TRUE;
>
>     inst->sampler = get_sampler_uniform_value(ir->sampler, shader_program,
> diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
> index 68a5f67..ed80d46 100644
> --- a/src/mesa/program/prog_to_nir.c
> +++ b/src/mesa/program/prog_to_nir.c
> @@ -634,7 +634,7 @@ ptn_tex(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src,
>        else
>           instr->src[src_number].src = nir_src_for_ssa(ptn_channel(b, src[0], W));
>
> -      instr->src[src_number].src_type = nir_tex_src_comparitor;
> +      instr->src[src_number].src_type = nir_tex_src_comparator;
>        src_number++;
>     }
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 8707d28..c9ebb5a 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -3956,7 +3956,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>
>     switch (ir->op) {
>     case ir_tex:
> -      opcode = (is_cube_array && ir->shadow_comparitor) ? TGSI_OPCODE_TEX2 : TGSI_OPCODE_TEX;
> +      opcode = (is_cube_array && ir->shadow_comparator) ? TGSI_OPCODE_TEX2 : TGSI_OPCODE_TEX;
>        if (ir->offset) {
>           ir->offset->accept(this);
>           offset[0] = this->result;
> @@ -4073,11 +4073,11 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>            * the shadow comparator value must also be projected.
>            */
>           st_src_reg tmp_src = coord;
> -         if (ir->shadow_comparitor) {
> +         if (ir->shadow_comparator) {
>              /* Slot the shadow value in as the second to last component of the
>               * coord.
>               */
> -            ir->shadow_comparitor->accept(this);
> +            ir->shadow_comparator->accept(this);
>
>              tmp_src = get_temp(glsl_type::vec4_type);
>              st_dst_reg tmp_dst = st_dst_reg(tmp_src);
> @@ -4104,11 +4104,11 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>      * comparator was put in the correct place (and projected) by the code,
>      * above, that handles by-hand projection.
>      */
> -   if (ir->shadow_comparitor && (!ir->projector || opcode == TGSI_OPCODE_TXP)) {
> +   if (ir->shadow_comparator && (!ir->projector || opcode == TGSI_OPCODE_TXP)) {
>        /* Slot the shadow value in as the second to last component of the
>         * coord.
>         */
> -      ir->shadow_comparitor->accept(this);
> +      ir->shadow_comparator->accept(this);
>
>        if (is_cube_array) {
>           cube_sc = get_temp(glsl_type::float_type);
> @@ -4167,7 +4167,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>     } else if (opcode == TGSI_OPCODE_TEX2) {
>        inst = emit_asm(ir, opcode, result_dst, coord, cube_sc);
>     } else if (opcode == TGSI_OPCODE_TG4) {
> -      if (is_cube_array && ir->shadow_comparitor) {
> +      if (is_cube_array && ir->shadow_comparator) {
>           inst = emit_asm(ir, opcode, result_dst, coord, cube_sc);
>        } else {
>           inst = emit_asm(ir, opcode, result_dst, coord, component);
> @@ -4175,7 +4175,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>     } else
>        inst = emit_asm(ir, opcode, result_dst, coord);
>
> -   if (ir->shadow_comparitor)
> +   if (ir->shadow_comparator)
>        inst->tex_shadow = GL_TRUE;
>
>     inst->resource.index = sampler_index;
>


More information about the mesa-dev mailing list