freedreno/a2xx: ir2: remove pointcoord y invert
authorJonathan Marek <jonathan@marek.ca>
Thu, 5 Sep 2019 15:17:45 +0000 (11:17 -0400)
committerJonathan Marek <jonathan@marek.ca>
Fri, 6 Sep 2019 02:24:29 +0000 (02:24 +0000)
Fixes the following deqp test:
dEQP-GLES2.functional.shaders.builtin_variable.pointcoord

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/freedreno/a2xx/ir2_nir.c

index bb3ca9c9c0ccd5bb6b3a61dabd4f25ad0bef7544..c08566ab0ceb7726db4942e370b75930859aa878 100644 (file)
@@ -504,12 +504,10 @@ load_input(struct ir2_context *ctx, nir_dest *dst, unsigned idx)
 
        switch (slot) {
        case VARYING_SLOT_PNTC:
-               /* need to extract with abs and invert y */
-               instr = instr_create_alu_dest(ctx, nir_op_ffma, dst);
+               /* 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;
-               instr->src[1] = load_const(ctx, (float[]) {1.0f, -1.0f}, 2);
-               instr->src[2] = load_const(ctx, (float[]) {0.0f, 1.0f}, 2);
                break;
        case VARYING_SLOT_POS:
                /* need to extract xy with abs and add tile offset on a20x