Skip to content

nir/opt_frag_coord_to_pixel_coord: optimize trunc/floor

Georg Lehmann requested to merge DadSchoorse/mesa:nir-more-pixel-coord into main

In theory, gl_FragCoord.xy - 0.5 would also be interesting, but that makes assumptions about sampling locations / sample shading, so it's not as easy.

Foz-DB Navi21:
Totals from 207 (0.26% of 79206) affected shaders:
MaxWaves: 5924 -> 5980 (+0.95%)
Instrs: 83164 -> 83144 (-0.02%); split: -0.06%, +0.04%
CodeSize: 457296 -> 459092 (+0.39%); split: -0.00%, +0.39%
VGPRs: 5336 -> 5160 (-3.30%)
Latency: 1308811 -> 1307754 (-0.08%); split: -0.16%, +0.08%
InvThroughput: 232768 -> 222979 (-4.21%); split: -4.21%, +0.00%
VClause: 1359 -> 1370 (+0.81%); split: -0.07%, +0.88%
SClause: 3300 -> 3293 (-0.21%); split: -0.24%, +0.03%
Copies: 4992 -> 4985 (-0.14%); split: -0.56%, +0.42%
PreVGPRs: 3757 -> 3619 (-3.67%)
VALU: 58366 -> 58338 (-0.05%); split: -0.08%, +0.03%

Merge request reports

Loading