aco/gfx6: disallow global access with sgpr address and two offsets

No fossil-db changes (navi10, pitcairn).

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/35465>
This commit is contained in:
Rhys Perry 2025-06-02 14:47:25 +01:00 committed by Marge Bot
parent 5ad04c02d4
commit 8defd1bc16

View file

@ -846,7 +846,9 @@ lower_global_address(Builder& bld, uint32_t offset_in, Temp* address_inout,
if (bld.program->gfx_level == GFX6) {
/* GFX6 (MUBUF): (SGPR address, SGPR offset) or (VGPR address, SGPR offset) */
if (offset.type() != RegType::sgpr) {
/* Disallow SGPR address with both a const_offset and offset because of possible overflow. */
if (offset.id() && (offset.type() != RegType::sgpr ||
(address.type() == RegType::sgpr && const_offset > 0))) {
address = add64_32(bld, address, offset);
offset = Temp();
}