We don't really need the varying remapping, and it seems to somehow
happen twice when shader-cache comes into the picture.  But we can
just choose not to have this problem.
Now that everything is using the ir3_point_sprite() helper, we can
flip this pipe cap without it being a massive flag-day.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5595>
                .lower_rotate = true,
                .lower_to_scalar = true,
                .has_imul24 = true,
+               .lower_wpos_pntc = true,
 };
 
 /* we don't want to lower vertex_id to _zero_based on newer gpus: */
                .lower_to_scalar = true,
                .has_imul24 = true,
                .max_unroll_iterations = 32,
+               .lower_wpos_pntc = true,
 };
 
 const nir_shader_compiler_options *
 
        case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
        case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
        case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
+       case PIPE_CAP_TGSI_TEXCOORD:
                if (is_ir3(screen))
                        return 1;
                return 0;
 
                uint32_t sprite_coord_enable, bool *coord_mode)
 {
        gl_varying_slot slot = fs->inputs[i].slot;
-       (void)coord_mode; /* this will be used later */
-       /* since we don't enable PIPE_CAP_TGSI_TEXCOORD: */
-       if (slot >= VARYING_SLOT_VAR0) {
-               unsigned texmask = 1 << (slot - VARYING_SLOT_VAR0);
-               return !!(sprite_coord_enable & texmask);
+       switch (slot) {
+       case VARYING_SLOT_PNTC:
+               *coord_mode = true;
+               return true;
+       case VARYING_SLOT_TEX0 ... VARYING_SLOT_TEX7:
+               return !!(sprite_coord_enable & BITFIELD_BIT(slot - VARYING_SLOT_TEX0));
+       default:
+               return false;
        }
-       return false;
 }
 
 #endif /* IR3_GALLIUM_H_ */