mesa/src
Pavel Ondračka c0074b22cd r300: reduce CPU overhead in IF transformation pass
Right now there is a call to rc_get_variables, which performs a global
analysis of the whole shader, for every IF encountered. As a result,
shaders with a lot of IFs are compiled very slowly. The patological
cases are shaders using relative adressing, where the lowered array
access can result in tens of IFs.

This patch restructures the pass to call the rc_get_variables just once
at the beginning and later reuse the gathered info. We can do this,
because even though we transform the shader in the meantime (like for
example adding extra MOVs) the transformations are not siginificant
enough to influence the relevant variable info we are using.

This reduces CPU time for my shader-db by more than a half. I also
checked that the generated code for all shaders in shader-db is
identical.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18678>
2022-09-20 13:43:00 +00:00
..
amd radv,aco: do not compact MRTs if the pipeline uses a PS epilog 2022-09-20 13:12:49 +00:00
android_stub
asahi agx: Convert and clamp array indices in NIR 2022-09-19 16:14:24 +00:00
broadcom v3dv: fix VK_EXT_texel_buffer_alignment 2022-09-20 12:52:31 +00:00
c11 c11: Update the values of enum mtx_plain, mtx_recursive, mtx_timed to make sure mtx_recursive != mtx_plain | mtx_recursive 2022-09-14 02:46:51 +00:00
compiler nir, anv, hasvk, radv: pull uses_wide_subgroup_intrinsics into shader_info 2022-09-20 10:19:21 +00:00
drm-shim drm-shim: drop gnu99 override 2022-09-16 02:06:38 +00:00
egl egl/dri2: Fix missing return with dri2_egl_error_unlock. 2022-09-19 16:24:08 +00:00
etnaviv util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
freedreno freedreno/a6xx: Pre-calculate user const state size 2022-09-20 02:22:19 +00:00
gallium r300: reduce CPU overhead in IF transformation pass 2022-09-20 13:43:00 +00:00
gbm Android: Use libgbm_mesa name for SDK30+ 2022-09-12 07:37:27 +00:00
getopt
glx glx: Remove some excess work from the GLX_FBCONFIG_ID fallback 2022-09-17 03:06:10 +00:00
gtest gtest: Fix maybe-uninitialized compiler warning 2022-06-29 21:02:18 +00:00
hgl
imagination pvr: Implement vkCmdWaitEvents2 API. 2022-09-16 13:02:30 +00:00
imgui
intel nir, anv, hasvk, radv: pull uses_wide_subgroup_intrinsics into shader_info 2022-09-20 10:19:21 +00:00
loader loader: use os_get_option for driver override 2022-09-08 19:30:38 +00:00
mapi mesa: Expose GL_NV_ES1_1_compatibility 2022-08-25 10:17:10 -07:00
mesa fix: mesa/st: unused variable ‘src’ [-Wunused-variable] 2022-09-19 22:02:16 +00:00
microsoft vulkan: Add a vk_command_buffer_ops struct 2022-09-01 20:17:25 +00:00
nouveau nouveau: const cleanup 2022-09-16 14:23:47 +00:00
panfrost pan/bi: Implement unpack_64_2x32 2022-09-19 17:22:58 +00:00
tool pps: enable track_event in system.cfg 2022-08-26 21:47:44 +00:00
util fix: util/format: unused variable ‘desc’ [-Wunused-variable] 2022-09-19 22:02:16 +00:00
virtio venus: use buffer cache for vkGetDeviceBufferMemoryRequirements 2022-09-15 20:35:18 +00:00
vulkan vulkan/runtime: Compact descriptor update templates 2022-09-17 03:32:29 +00:00
meson.build meson: Remove usage of use_elf_tls 2022-07-29 23:59:11 +00:00