mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
radv: use util_float_to_half_rtz
Since commit8b8af6d398there is a performance regression in dirt 4 on picasso APUs. The game ends up feeding a large value into this which overflows on the conversion to 16bit float. With the old implementation (which now lives in util_float_to_half_rtz) it would be clamped to inf-1, while the new one returns inf. This causes a performance hit somehow at some point down the line. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Fixes:8b8af6d398"gallium/util: Switch util_float_to_half to _mesa_float_to_half()'s impl." Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5062>
This commit is contained in:
parent
632a921bd0
commit
78615dcca1
1 changed files with 1 additions and 1 deletions
|
|
@ -1060,7 +1060,7 @@ bool radv_format_pack_clear_color(VkFormat format,
|
|||
if (channel->size == 32) {
|
||||
memcpy(&v, &value->float32[c], 4);
|
||||
} else if(channel->size == 16) {
|
||||
v = util_float_to_half(value->float32[c]);
|
||||
v = util_float_to_half_rtz(value->float32[c]);
|
||||
} else {
|
||||
fprintf(stderr, "failed to fast clear for unhandled float size in format %d\n", format);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue