The SPIR-V spec was recently updated to clarify that array indices are
treated as signed integers.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
} else if (stride == 1) {
nir_ssa_def *ssa = vtn_ssa_value(b, link.id)->def;
if (ssa->bit_size != 32)
- ssa = nir_u2u32(&b->nb, ssa);
+ ssa = nir_i2i32(&b->nb, ssa);
return ssa;
} else {
nir_ssa_def *src0 = vtn_ssa_value(b, link.id)->def;
if (src0->bit_size != 32)
- src0 = nir_u2u32(&b->nb, src0);
+ src0 = nir_i2i32(&b->nb, src0);
return nir_imul_imm(&b->nb, src0, stride);
}
}