diff options
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx/ir2_nir.c')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/ir2_nir.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c index 31c9add3b92..53a3c0a6649 100644 --- a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c +++ b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c @@ -504,12 +504,6 @@ load_input(struct ir2_context *ctx, nir_dest *dst, unsigned idx) assert(slot >= 0); switch (slot) { - case VARYING_SLOT_PNTC: - /* need to extract with abs */ - instr = instr_create_alu_dest(ctx, nir_op_mov, dst); - instr->src[0] = ir2_src(ctx->f->inputs_count, IR2_SWIZZLE_ZW, IR2_SRC_INPUT); - instr->src[0].abs = true; - break; case VARYING_SLOT_POS: /* need to extract xy with abs and add tile offset on a20x * zw from fragcoord input (w inverted in fragment shader) @@ -638,6 +632,13 @@ emit_intrinsic(struct ir2_context *ctx, nir_intrinsic_instr *intr) instr->src[0] = ir2_src(tmp->idx, 0, IR2_SRC_SSA); instr->src[1] = ir2_zero(ctx); break; + case nir_intrinsic_load_point_coord: + /* param.zw (note: abs might be needed like fragcoord in param.xy?) */ + ctx->so->need_param = true; + + instr = instr_create_alu_dest(ctx, nir_op_mov, &intr->dest); + instr->src[0] = ir2_src(ctx->f->inputs_count, IR2_SWIZZLE_ZW, IR2_SRC_INPUT); + break; default: compile_error(ctx, "unimplemented intr %d\n", intr->intrinsic); break; @@ -759,11 +760,6 @@ setup_input(struct ir2_context *ctx, nir_variable * in) if (ctx->so->type != MESA_SHADER_FRAGMENT) compile_error(ctx, "unknown shader type: %d\n", ctx->so->type); - if (slot == VARYING_SLOT_PNTC) { - so->need_param = true; - return; - } - n = ctx->f->inputs_count++; /* half of fragcoord from param reg, half from a varying */ |