mesa/src
Rhys Perry e3c283e0bc aco: use -1.0*x and 1.0*|x| for fneg/fabs
Besides -1.0*x being 1 dword smaller than x^0x80000000, this commit also
improves generated code when the application requires that denormals are
flushed.

Future versions of DXVK will require that 32-bit denormals are flushed.

fossil-db (GFX8):
Totals from 21021 (14.22% of 147787) affected shaders:
SGPRs: 1288960 -> 1288944 (-0.00%); split: -0.01%, +0.01%
VGPRs: 792672 -> 792848 (+0.02%); split: -0.01%, +0.03%
CodeSize: 62439228 -> 62403552 (-0.06%); split: -0.11%, +0.05%
MaxWaves: 136182 -> 136181 (-0.00%); split: +0.00%, -0.00%
Instrs: 12230882 -> 12239927 (+0.07%); split: -0.01%, +0.08%

fossil-db (GFX10.3):
Totals from 20191 (13.80% of 146267) affected shaders:
VGPRs: 799992 -> 800032 (+0.01%)
CodeSize: 59763656 -> 59715484 (-0.08%); split: -0.12%, +0.03%
MaxWaves: 525378 -> 525376 (-0.00%)
Instrs: 11511082 -> 11517419 (+0.06%); split: -0.00%, +0.06%

fossil-db (GFX8, d3d float controls):
Totals from 87160 (58.98% of 147787) affected shaders:
SGPRs: 5395072 -> 5408480 (+0.25%); split: -0.06%, +0.31%
VGPRs: 3596716 -> 3581592 (-0.42%); split: -0.55%, +0.13%
CodeSize: 271347396 -> 266814460 (-1.67%); split: -1.67%, +0.00%
MaxWaves: 539669 -> 540400 (+0.14%); split: +0.15%, -0.02%
Instrs: 53395194 -> 52257505 (-2.13%); split: -2.13%, +0.00%

fossil-db (GFX10.3, d3d float controls):
Totals from 82306 (56.27% of 146267) affected shaders:
VGPRs: 3572312 -> 3558848 (-0.38%); split: -0.44%, +0.06%
CodeSize: 273494748 -> 269648968 (-1.41%); split: -1.41%, +0.00%
MaxWaves: 2007156 -> 2009950 (+0.14%); split: +0.15%, -0.01%
Instrs: 52251568 -> 51356424 (-1.71%); split: -1.71%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9079>
2021-03-24 14:02:41 +00:00
..
amd aco: use -1.0*x and 1.0*|x| for fneg/fabs 2021-03-24 14:02:41 +00:00
android_stub egl/android: implement image cleanup callback 2020-12-15 06:05:27 +00:00
broadcom v3dv: Add support for the on-disk shader cache 2021-03-22 17:10:47 +00:00
compiler nir: add nir_lower_indirect_builtin_uniform_derefs() 2021-03-23 14:44:48 +00:00
drm-shim drm-shim: report support for timeline semaphores 2021-02-09 21:08:52 +00:00
egl egl/wayland: avoid unnecessary roundtrip when authenticated 2021-03-19 14:45:33 +00:00
etnaviv etnaviv, v3d: Fix valgrind include paths. 2020-12-15 19:39:29 +00:00
freedreno turnip: use common entrypoints for VK_KHR_create_renderpass2 2021-03-24 11:21:53 +00:00
gallium zink: handle gallium multi draws more effectively 2021-03-24 12:46:32 +00:00
gbm gbm: remove fprintf calls in gbm_dri_bo_create 2021-03-17 20:47:52 +00:00
getopt scons: Remove. 2021-03-20 10:38:55 +00:00
glx glx/drisw: Implement WaitX and WaitGL 2021-03-19 15:43:49 +00:00
gtest
hgl hgl: Major refactor and cleanup 2021-01-09 20:51:35 -06:00
imgui
intel anv: use common entrypoints for VK_KHR_create_renderpass2 2021-03-24 11:21:53 +00:00
loader scons: Remove. 2021-03-20 10:38:55 +00:00
mapi scons: Remove. 2021-03-20 10:38:55 +00:00
mesa st/glsl_to_nir: lower indirect derefs of builtins in non-packed uniform case 2021-03-23 14:44:48 +00:00
microsoft nir: port fp16 casting code from dxil 2021-03-22 12:16:59 +10:00
nouveau nouveau: add drm-shim support 2021-01-11 22:45:01 +00:00
panfrost panfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler 2021-03-19 19:22:29 +00:00
util scons: Remove. 2021-03-20 10:38:55 +00:00
virtio virgl: implement support for PIPE_CAP_STRING_MARKER 2021-03-09 13:57:05 +00:00
vulkan vulkan: add common entrypoints for VK_KHR_create_renderpass2 2021-03-24 11:21:53 +00:00
meson.build nouveau: add drm-shim support 2021-01-11 22:45:01 +00:00