diff options
author | Marek Olšák <[email protected]> | 2020-04-23 00:31:36 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-29 14:53:25 +0000 |
commit | 25d3cc293e9e4b21a965fe086537a4b448424bd8 (patch) | |
tree | 3c29d91ae92d35e6a22e0979906b08dc84083077 /src/amd/common | |
parent | 298e247776309b4444b4c3ac26872fc1f694568c (diff) |
ac/surface: rename micro tile mode enums like gfx10 uses them
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_surface.c | 12 | ||||
-rw-r--r-- | src/amd/common/ac_surface.h | 8 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 67abb7871d5..55595a66781 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -952,14 +952,14 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, surf->is_linear = surf->u.legacy.level[0].mode == RADEON_SURF_MODE_LINEAR_ALIGNED; surf->is_displayable = surf->is_linear || surf->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY || - surf->micro_tile_mode == RADEON_MICRO_MODE_ROTATED; + surf->micro_tile_mode == RADEON_MICRO_MODE_RENDER; /* The rotated micro tile mode doesn't work if both CMASK and RB+ are * used at the same time. This case is not currently expected to occur * because we don't use rotated. Enforce this restriction on all chips * to facilitate testing. */ - if (surf->micro_tile_mode == RADEON_MICRO_MODE_ROTATED) { + if (surf->micro_tile_mode == RADEON_MICRO_MODE_RENDER) { assert(!"rotate micro tile mode is unsupported"); return ADDR_ERROR; } @@ -1008,11 +1008,11 @@ gfx9_get_preferred_swizzle_mode(ADDR_HANDLE addrlib, if (surf->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY) sin.preferredSwSet.sw_D = 1; - else if (surf->micro_tile_mode == RADEON_MICRO_MODE_THIN) + else if (surf->micro_tile_mode == RADEON_MICRO_MODE_STANDARD) sin.preferredSwSet.sw_S = 1; else if (surf->micro_tile_mode == RADEON_MICRO_MODE_DEPTH) sin.preferredSwSet.sw_Z = 1; - else if (surf->micro_tile_mode == RADEON_MICRO_MODE_ROTATED) + else if (surf->micro_tile_mode == RADEON_MICRO_MODE_RENDER) sin.preferredSwSet.sw_R = 1; } @@ -1634,7 +1634,7 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, case ADDR_SW_64KB_S_T: case ADDR_SW_4KB_S_X: case ADDR_SW_64KB_S_X: - surf->micro_tile_mode = RADEON_MICRO_MODE_THIN; + surf->micro_tile_mode = RADEON_MICRO_MODE_STANDARD; break; /* D = display. */ @@ -1662,7 +1662,7 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, */ assert(info->chip_class >= GFX10 || !"rotate micro tile mode is unsupported"); - surf->micro_tile_mode = RADEON_MICRO_MODE_ROTATED; + surf->micro_tile_mode = RADEON_MICRO_MODE_RENDER; break; /* Z = depth. */ diff --git a/src/amd/common/ac_surface.h b/src/amd/common/ac_surface.h index a552383caf0..56b2cb9aa5a 100644 --- a/src/amd/common/ac_surface.h +++ b/src/amd/common/ac_surface.h @@ -49,12 +49,14 @@ enum radeon_surf_mode { RADEON_SURF_MODE_2D = 3, }; -/* These are defined exactly like GB_TILE_MODEn.MICRO_TILE_MODE_NEW. */ +/* This describes D/S/Z/R swizzle modes. + * Defined in the GB_TILE_MODEn.MICRO_TILE_MODE_NEW order. + */ enum radeon_micro_mode { RADEON_MICRO_MODE_DISPLAY = 0, - RADEON_MICRO_MODE_THIN = 1, + RADEON_MICRO_MODE_STANDARD = 1, RADEON_MICRO_MODE_DEPTH = 2, - RADEON_MICRO_MODE_ROTATED = 3, /* gfx10+: render target */ + RADEON_MICRO_MODE_RENDER = 3, /* gfx9 and older: rotated */ }; /* the first 16 bits are reserved for libdrm_radeon, don't use them */ |