freedreno/ir3: fix load_interpolated_input slot
authorRob Clark <robdclark@chromium.org>
Thu, 25 Apr 2019 19:20:07 +0000 (12:20 -0700)
committerRob Clark <robdclark@chromium.org>
Thu, 25 Apr 2019 21:13:31 +0000 (14:13 -0700)
The so->inputs[] table is in units of vec4

Fixes: 7ff6705b8d8 freedreno/ir3: convert to "new style" frag inputs
Signed-off-by: Rob Clark <robdclark@chromium.org>
src/freedreno/ir3/ir3_compiler_nir.c

index 8347520f6d5ef2eb49145ca1a9a435ade385ceb4..73e7dd6b973a504204f7ca60951ddbbae710f215 100644 (file)
@@ -1185,7 +1185,7 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr)
                        idx += nir_src_as_uint(intr->src[1]);
                        for (int i = 0; i < intr->num_components; i++) {
                                unsigned inloc = idx * 4 + i + comp;
-                               if (ctx->so->inputs[idx * 4].bary) {
+                               if (ctx->so->inputs[idx].bary) {
                                        dst[i] = ir3_BARY_F(b, create_immed(b, inloc), 0, coord, 0);
                                } else {
                                        /* for non-varyings use the pre-setup input, since