diff options
author | Marek Olšák <[email protected]> | 2020-05-02 10:56:20 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-04 20:03:15 +0000 |
commit | c4cdef64ad6d11e82894d24691348c38d7fad6ce (patch) | |
tree | e23556aac7bec804cdfbc1f3a045f286cb0cad9a | |
parent | 1dcf291e3bf7050a396cee74b6baca99a575d915 (diff) |
ac/surface: fix MSAA crash with FORCE_SWIZZLE_MODE on gfx9
Fixes: 3dc2ccc14c0e035 "ac/surface: replace RADEON_SURF_OPTIMIZE_FOR_SPACE with !FORCE_SWIZZLE_MODE"
Closes: #2884
Tested-by: Michel Dänzer <[email protected]>
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4862>
-rw-r--r-- | src/amd/common/ac_surface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 474be97d0b4..64bfa419839 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1658,7 +1658,9 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, case RADEON_SURF_MODE_1D: case RADEON_SURF_MODE_2D: - if (surf->flags & (RADEON_SURF_IMPORTED | RADEON_SURF_FORCE_SWIZZLE_MODE)) { + if (surf->flags & RADEON_SURF_IMPORTED || + (info->chip_class >= GFX10 && + surf->flags & RADEON_SURF_FORCE_SWIZZLE_MODE)) { AddrSurfInfoIn.swizzleMode = surf->u.gfx9.surf.swizzle_mode; break; } |