From: Alyssa Rosenzweig Date: Fri, 19 Feb 2021 18:38:57 +0000 (-0500) Subject: panfrost: Fix UNORM 16 rendering X-Git-Tag: upstream/21.2.3~7473 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56047fb64d713512edfb89067ef2be2fb68916b1;p=platform%2Fupstream%2Fmesa.git panfrost: Fix UNORM 16 rendering fp16 loses precision. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- diff --git a/src/panfrost/util/pan_lower_framebuffer.c b/src/panfrost/util/pan_lower_framebuffer.c index df9929b..0a4b82b 100644 --- a/src/panfrost/util/pan_lower_framebuffer.c +++ b/src/panfrost/util/pan_lower_framebuffer.c @@ -66,11 +66,12 @@ pan_unpacked_type_for_format(const struct util_format_description *desc) unreachable("Void format not renderable"); bool large = (desc->channel[c].size > 16); + bool large_norm = (desc->channel[c].size > 8); bool bit8 = (desc->channel[c].size == 8); assert(desc->channel[c].size <= 32); if (desc->channel[c].normalized) - return large ? nir_type_float32 : nir_type_float16; + return large_norm ? nir_type_float32 : nir_type_float16; switch (desc->channel[c].type) { case UTIL_FORMAT_TYPE_UNSIGNED: