summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_lower_wpos_ytransform.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_lower_wpos_ytransform.c')
-rw-r--r--src/compiler/nir/nir_lower_wpos_ytransform.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c
index 2771f2afede..56ae978490b 100644
--- a/src/compiler/nir/nir_lower_wpos_ytransform.c
+++ b/src/compiler/nir/nir_lower_wpos_ytransform.c
@@ -232,31 +232,6 @@ lower_fragcoord(lower_wpos_ytransform_state *state, nir_intrinsic_instr *intr)
emit_wpos_adjustment(state, intr, invert, adjX, adjY);
}
-static void
-lower_load_pointcoord(lower_wpos_ytransform_state *state,
- nir_intrinsic_instr *intr)
-{
- nir_builder *b = &state->b;
- b->cursor = nir_after_instr(&intr->instr);
-
- nir_ssa_def *pntc = &intr->dest.ssa;
- nir_ssa_def *transform = get_transform(state);
- nir_ssa_def *y = nir_channel(b, pntc, 1);
- /* The offset is 1 if we're flipping, 0 otherwise. */
- nir_ssa_def *offset = nir_fmax(b, nir_channel(b, transform, 2),
- nir_imm_float(b, 0.0));
- /* Flip the sign of y if we're flipping. */
- nir_ssa_def *scaled = nir_fmul(b, y, nir_channel(b, transform, 0));
-
- /* Reassemble the vector. */
- nir_ssa_def *flipped_pntc = nir_vec2(b,
- nir_channel(b, pntc, 0),
- nir_fadd(b, offset, scaled));
-
- nir_ssa_def_rewrite_uses_after(&intr->dest.ssa, nir_src_for_ssa(flipped_pntc),
- flipped_pntc->parent_instr);
-}
-
/* turns 'fddy(p)' into 'fddy(fmul(p, transform.x))' */
static void
lower_fddy(lower_wpos_ytransform_state *state, nir_alu_instr *fddy)
@@ -339,10 +314,6 @@ lower_wpos_ytransform_block(lower_wpos_ytransform_state *state, nir_block *block
} else if (var->data.mode == nir_var_system_value &&
var->data.location == SYSTEM_VALUE_SAMPLE_POS) {
lower_load_sample_pos(state, intr);
- } else if (var->data.mode == nir_var_shader_in &&
- var->data.location == VARYING_SLOT_PNTC &&
- state->shader->options->lower_wpos_pntc) {
- lower_load_pointcoord(state, intr);
}
} else if (intr->intrinsic == nir_intrinsic_load_frag_coord) {
lower_fragcoord(state, intr);