gallium: Fix NIR validation when lowering polygon stipple

The fmul operation takes the maximum number of components from either
of its operands. We only need to use 2 components from the fragment
coordinates.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7507>
diff --git a/src/gallium/auxiliary/nir/nir_draw_helpers.c b/src/gallium/auxiliary/nir/nir_draw_helpers.c
index 5ad6c79..0337c06 100644
--- a/src/gallium/auxiliary/nir/nir_draw_helpers.c
+++ b/src/gallium/auxiliary/nir/nir_draw_helpers.c
@@ -71,11 +71,10 @@
 
    b->cursor = nir_before_block(block);
 
-   nir_ssa_def *div32 = nir_imm_vec2(b, 1.0/32.0, 1.0/32.0);
-
    nir_ssa_def *frag_coord = state->fs_pos_is_sysval ? nir_load_frag_coord(b) : load_frag_coord(b);
 
-   texcoord = nir_fmul(b, frag_coord, div32);
+   texcoord = nir_fmul(b, nir_channels(b, frag_coord, 0x3),
+                       nir_imm_vec2(b, 1.0/32.0, 1.0/32.0));
 
    nir_tex_instr *tex = nir_tex_instr_create(b->shader, 1);
    tex->op = nir_texop_tex;