panfrost: Fix UNORM 16 rendering
fp16 loses precision. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
This commit is contained in:
parent
1b239a3786
commit
56047fb64d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue