mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
aco/ra: fix sub-dword get_reg_specified in some cases
For example, v6b MIMG can have sdw_def_info={4, 6}. This now has similar
behaviour as the DefInfo constructor.
fossil-db (navi31):
Totals from 5 (0.01% of 79395) affected shaders:
CodeSize: 29460 -> 29408 (-0.18%); split: -0.29%, +0.11%
Latency: 22133 -> 21934 (-0.90%); split: -2.51%, +1.61%
InvThroughput: 2953 -> 2963 (+0.34%); split: -0.03%, +0.37%
Copies: 410 -> 409 (-0.24%); split: -1.95%, +1.71%
VALU: 3242 -> 3241 (-0.03%); split: -0.25%, +0.22%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 56345b8c61 ("aco: allow reading/writing upper halves/bytes when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30761>
(cherry picked from commit 1e6741bf6b)
This commit is contained in:
parent
00cfae94c0
commit
25235a9f2e
2 changed files with 4 additions and 3 deletions
|
|
@ -684,7 +684,7 @@
|
|||
"description": "aco/ra: fix sub-dword get_reg_specified in some cases",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "56345b8c610e06b2c6ccb0d0975e62f9a008e34e",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1403,8 +1403,9 @@ get_reg_specified(ra_ctx& ctx, const RegisterFile& reg_file, RegClass rc,
|
|||
return false;
|
||||
|
||||
if (rc.is_subdword()) {
|
||||
PhysReg test_reg;
|
||||
test_reg.reg_b = reg.reg_b & ~(sdw_def_info.second - 1);
|
||||
PhysReg test_reg = reg;
|
||||
if (sdw_def_info.second > rc.bytes())
|
||||
test_reg.reg_b &= ~(align(sdw_def_info.first, sdw_def_info.second) - 1);
|
||||
if (reg_file.test(test_reg, sdw_def_info.second))
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue