Skip to content
Snippets Groups Projects
Commit 60c71183 authored by Rhys Perry's avatar Rhys Perry Committed by Marge Bot
Browse files

aco: remove pack_half_2x16(a, 0) optimization


This makes the compiler less predictable and should only have a very small
effect on performance.

fossil-db (Vega):
Totals from 2410 (1.79% of 134756) affected shaders:
CodeSize: 6911568 -> 6942840 (+0.45%)

Fixes Horizon Zero Dawn artifacts.

If a shader has:
   a = pack_half_2x16(a, 0) //rtne
   store(pack_half_2x16(0, b) | a) //rtne
   a = unpack_2x16(a).x
It will become:
   store(pack_half_2x16(a, b)) //rtz
   a = unpack_2x16(pack_half_2x16(a, 0)).x //rtne

So a later shader with "unpack_2x16(load()).x" will use "a" rounded to
zero, while the previous shader will use "a" rounded to the nearest even.

Signed-off-by: default avatarRhys Perry <pendingchaos02@gmail.com>
Reviewed-by: default avatarDaniel Schürmann <daniel@schuermann.dev>
Fixes: 2f125908 ("radv,aco: lower_pack_half_2x16")
Part-of: <mesa/mesa!14475>
parent 6e08d8fc
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment