Module: Mesa Branch: main Commit: 34d8bfe65f47df92efe83d902522297614f9a44a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=34d8bfe65f47df92efe83d902522297614f9a44a
Author: Lionel Landwerlin <[email protected]> Date: Fri Mar 17 09:42:31 2023 +0200 intel/fs: run VGRF compaction just before max live register accounting There are a number of instances of the dead code elimination pass that could reduce the count. For some reason this also seems to affect register allocation itself. Signed-off-by: Lionel Landwerlin <[email protected]> Cc: mesa-stable Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21853> --- src/intel/compiler/brw_fs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index b22b32e5112..77cd0b757b8 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -6506,6 +6506,8 @@ fs_visitor::allocate_registers(bool allow_spilling) "lifo" }; + compact_virtual_grfs(); + if (needs_register_pressure) shader_stats.max_register_pressure = compute_max_register_pressure();
