mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-15 14:18:04 +02:00
aco/ra: test the register file in get_reg_specified() when necessary
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Backport-to: * Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
This commit is contained in:
parent
2d5478fc3f
commit
43aeeb8b88
1 changed files with 6 additions and 0 deletions
|
|
@ -1633,6 +1633,12 @@ get_reg_specified(ra_ctx& ctx, const RegisterFile& reg_file, RegClass rc,
|
|||
if (reg.reg_b % info.data_stride)
|
||||
return false;
|
||||
|
||||
/* In other cases, we assume the caller ensured that this is fine. */
|
||||
if (info.rc.bytes() > rc.bytes()) {
|
||||
if (reg_file.test(reg, info.rc.bytes()))
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(util_is_power_of_two_nonzero(info.stride));
|
||||
reg.reg_b &= ~(info.stride - 1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue