treewide: s/comparitor/comparator/
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@alum.mit.edu> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -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 */
|
||||
|
@@ -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));
|
||||
|
||||
|
@@ -1898,7 +1898,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++;
|
||||
@@ -1946,10 +1946,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++;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
|
@@ -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))
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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, " ()");
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -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;
|
||||
|
@@ -707,8 +707,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)");
|
||||
|
@@ -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:
|
||||
|
@@ -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++;
|
||||
}
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
|
@@ -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:
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
|
@@ -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),
|
||||
|
@@ -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++;
|
||||
|
@@ -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,
|
||||
|
@@ -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++;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user