diff options
author | Nicolai Hähnle <[email protected]> | 2018-06-28 20:55:38 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2018-11-29 13:18:23 +0100 |
commit | 621c1077606182a6f42deff553b184d545aa12c9 (patch) | |
tree | dbe7d65b6535e2db20a6b35fcfb864ac8c45b5b7 | |
parent | 729ebdf07e34cbd7bbb066b5896ff583cdc1ea4f (diff) |
ac/surface/gfx9: let addrlib choose the preferred swizzle kind
Our choices here are simply redundant as long as sin.flags is set
correctly.
(v2:
- remove unused function parameter)
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/amd/common/ac_surface.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index edd710a968c..4a79765d004 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1038,8 +1038,7 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, static int gfx9_get_preferred_swizzle_mode(ADDR_HANDLE addrlib, ADDR2_COMPUTE_SURFACE_INFO_INPUT *in, - bool is_fmask, unsigned flags, - AddrSwizzleMode *swizzle_mode) + bool is_fmask, AddrSwizzleMode *swizzle_mode) { ADDR_E_RETURNCODE ret; ADDR2_GET_PREFERRED_SURF_SETTING_INPUT sin = {0}; @@ -1064,16 +1063,6 @@ gfx9_get_preferred_swizzle_mode(ADDR_HANDLE addrlib, sin.numSamples = in->numSamples; sin.numFrags = in->numFrags; - if (flags & RADEON_SURF_SCANOUT) { - sin.preferredSwSet.sw_D = 1; - /* Raven only allows S for displayable surfaces with < 64 bpp, so - * allow it as fallback */ - sin.preferredSwSet.sw_S = 1; - } else if (in->flags.depth || in->flags.stencil || is_fmask) - sin.preferredSwSet.sw_Z = 1; - else - sin.preferredSwSet.sw_S = 1; - if (is_fmask) { sin.flags.display = 0; sin.flags.color = 0; @@ -1273,8 +1262,7 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib, fout.size = sizeof(ADDR2_COMPUTE_FMASK_INFO_OUTPUT); ret = gfx9_get_preferred_swizzle_mode(addrlib, in, - true, surf->flags, - &fin.swizzleMode); + true, &fin.swizzleMode); if (ret != ADDR_OK) return ret; @@ -1476,8 +1464,7 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, } r = gfx9_get_preferred_swizzle_mode(addrlib, &AddrSurfInfoIn, - false, surf->flags, - &AddrSurfInfoIn.swizzleMode); + false, &AddrSurfInfoIn.swizzleMode); if (r) return r; break; @@ -1513,8 +1500,7 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, if (!AddrSurfInfoIn.flags.depth) { r = gfx9_get_preferred_swizzle_mode(addrlib, &AddrSurfInfoIn, - false, surf->flags, - &AddrSurfInfoIn.swizzleMode); + false, &AddrSurfInfoIn.swizzleMode); if (r) return r; } else |