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;
}
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;
}
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. */
*/
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. */
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 */
tex->surface.u.gfx9.surf.swizzle_mode &= ~0x3;
tex->surface.u.gfx9.surf.swizzle_mode += 2; /* D */
break;
- case RADEON_MICRO_MODE_THIN:
+ case RADEON_MICRO_MODE_STANDARD:
tex->surface.u.gfx9.surf.swizzle_mode &= ~0x3;
tex->surface.u.gfx9.surf.swizzle_mode += 1; /* S */
break;
- case RADEON_MICRO_MODE_ROTATED:
+ case RADEON_MICRO_MODE_RENDER:
tex->surface.u.gfx9.surf.swizzle_mode &= ~0x3;
tex->surface.u.gfx9.surf.swizzle_mode += 3; /* R */
break;
case RADEON_MICRO_MODE_DISPLAY:
tex->surface.u.legacy.tiling_index[0] = 10;
break;
- case RADEON_MICRO_MODE_THIN:
+ case RADEON_MICRO_MODE_STANDARD:
tex->surface.u.legacy.tiling_index[0] = 14;
break;
- case RADEON_MICRO_MODE_ROTATED:
+ case RADEON_MICRO_MODE_RENDER:
tex->surface.u.legacy.tiling_index[0] = 28;
break;
default: /* depth, thick */
break;
}
break;
- case RADEON_MICRO_MODE_THIN:
+ case RADEON_MICRO_MODE_STANDARD:
switch (tex->surface.bpe) {
case 1:
tex->surface.u.legacy.tiling_index[0] = 14;
set_micro_tile_mode(surf_ws, &ws->info);
surf_ws->is_displayable = surf_ws->is_linear ||
surf_ws->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY ||
- surf_ws->micro_tile_mode == RADEON_MICRO_MODE_ROTATED;
+ surf_ws->micro_tile_mode == RADEON_MICRO_MODE_RENDER;
}
static void si_compute_cmask(const struct radeon_info *info,