Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reported-by: Icecream95 <ixn@keemail.me>
Fixes: 19b4e586f62 ("panfrost: Switch to pan_lower_framebuffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5289>
const struct util_format_description *format_desc =
util_format_description(options.format);
const struct util_format_description *format_desc =
util_format_description(options.format);
+ if (options.half) {
+ src = nir_f2f32(b, src);
+ dst = nir_f2f32(b, dst);
+ }
+
assert(src->num_components <= 4);
assert(dst->num_components <= 4);
assert(src->num_components <= 4);
assert(dst->num_components <= 4);
out = nir_iand(b, out, nir_build_imm(b, 4, 32, mask));
}
out = nir_iand(b, out, nir_build_imm(b, 4, 32, mask));
}
- return nir_format_unorm_to_float(b, out, bits);
+ out = nir_format_unorm_to_float(b, out, bits);
+
+ if (options.half)
+ out = nir_f2f16(b, out);
+
+ return out;
}
/* Given a blend state, the source color, and the destination color,
}
/* Given a blend state, the source color, and the destination color,