diff options
author | Marek Olšák <[email protected]> | 2017-07-28 21:34:02 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-04 02:10:04 +0200 |
commit | 4662e45350d54d55950253d361321ba6cb291c68 (patch) | |
tree | 9a1182ab57dcef36747a4a8cdfe3cf08753431be /src/amd/common/ac_surface.c | |
parent | 6839d3369905eb02151334ea7b4cd39ddcfa6770 (diff) |
ac/surface: move tile_swizzle to ac_surface and document it
Gfx9 will use it too.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd/common/ac_surface.c')
-rw-r--r-- | src/amd/common/ac_surface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 26f3729adf9..4647ce46c59 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -716,7 +716,10 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, AddrBaseSwizzleIn.pTileInfo = AddrSurfInfoOut.pTileInfo; AddrBaseSwizzleIn.tileMode = AddrSurfInfoOut.tileMode; AddrComputeBaseSwizzle(addrlib, &AddrBaseSwizzleIn, &AddrBaseSwizzleOut); - surf->u.legacy.tile_swizzle = AddrBaseSwizzleOut.tileSwizzle; + + assert(AddrBaseSwizzleOut.tileSwizzle <= + u_bit_consecutive(0, sizeof(surf->tile_swizzle) * 8)); + surf->tile_swizzle = AddrBaseSwizzleOut.tileSwizzle; } return 0; } |