nir/lower_point_size: Handle 16-bit point sizes

panfrost has float16 point size, handling that precision too allows the
compiler to call lower_point_size later in the compilation pipeline

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40924>
This commit is contained in:
Lorenzo Rossi 2026-04-14 13:43:11 +02:00 committed by Marge Bot
parent dd96a1514b
commit 30d8f9c554

View file

@ -63,10 +63,10 @@ lower_point_size_intrin(nir_builder *b, nir_intrinsic_instr *intr, void *data)
assert(psiz->num_components == 1);
if (minmax[0] > 0.0f)
psiz = nir_fmax(b, psiz, nir_imm_float(b, minmax[0]));
psiz = nir_fmax(b, psiz, nir_imm_floatN_t(b, minmax[0], psiz->bit_size));
if (minmax[1] > 0.0f)
psiz = nir_fmin(b, psiz, nir_imm_float(b, minmax[1]));
psiz = nir_fmin(b, psiz, nir_imm_floatN_t(b, minmax[1], psiz->bit_size));
nir_src_rewrite(psiz_src, psiz);