diff options
author | Nicolai Hähnle <[email protected]> | 2018-06-28 21:01:40 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-03 15:51:12 -0400 |
commit | 84e7ee421f66ba903fb8113bd1dafbbd03e65183 (patch) | |
tree | f1d2a2874a34fb883e99d09f4c97cc20db39d072 /src/amd/common | |
parent | a66be784c32ea08e0eae00fe4de9b2e1b42cb53d (diff) |
ac/surface/gfx10: allow "rotated" micro mode
Standard mode does not support DCC.
The R is retconned to "render target" on gfx10.
Acked-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_surface.c | 14 | ||||
-rw-r--r-- | src/amd/common/ac_surface.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 8168b2e97bc..d1ff060a17e 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1612,7 +1612,7 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, surf->micro_tile_mode = RADEON_MICRO_MODE_DISPLAY; break; - /* R = rotated. */ + /* R = rotated (gfx9), render target (gfx10). */ case ADDR_SW_256B_R: case ADDR_SW_4KB_R: case ADDR_SW_64KB_R: @@ -1622,13 +1622,13 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, case ADDR_SW_64KB_R_X: case ADDR_SW_VAR_R_X: /* 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. + * used at the same time. We currently do not use rotated + * in gfx9. */ - assert(!"rotate micro tile mode is unsupported"); - r = ADDR_ERROR; - goto error; + assert(info->chip_class >= GFX10 || + !"rotate micro tile mode is unsupported"); + surf->micro_tile_mode = RADEON_MICRO_MODE_ROTATED; + break; /* Z = depth. */ case ADDR_SW_4KB_Z: diff --git a/src/amd/common/ac_surface.h b/src/amd/common/ac_surface.h index a4144a4e16c..9fb09326d12 100644 --- a/src/amd/common/ac_surface.h +++ b/src/amd/common/ac_surface.h @@ -54,7 +54,7 @@ enum radeon_micro_mode { RADEON_MICRO_MODE_DISPLAY = 0, RADEON_MICRO_MODE_THIN = 1, RADEON_MICRO_MODE_DEPTH = 2, - RADEON_MICRO_MODE_ROTATED = 3, + RADEON_MICRO_MODE_ROTATED = 3, /* gfx10+: render target */ }; /* the first 16 bits are reserved for libdrm_radeon, don't use them */ |