#define RADEON_SURF_HAS_TILE_MODE_INDEX (1 << 20)
#define RADEON_SURF_FMASK (1 << 21)
#define RADEON_SURF_DISABLE_DCC (1 << 22)
+#define RADEON_SURF_TC_COMPATIBLE_HTILE (1 << 23)
#define RADEON_SURF_GET(v, field) (((v) >> RADEON_SURF_ ## field ## _SHIFT) & RADEON_SURF_ ## field ## _MASK)
#define RADEON_SURF_SET(v, field) (((v) & RADEON_SURF_ ## field ## _MASK) << RADEON_SURF_ ## field ## _SHIFT)
uint64_t dcc_size;
uint64_t dcc_alignment;
+
+ uint64_t htile_size;
+ uint64_t htile_slice_size;
+ uint64_t htile_alignment;
};
enum radeon_bo_layout {
}
}
+ if (!is_stencil && AddrSurfInfoIn->flags.depth &&
+ surf_level->mode == RADEON_SURF_MODE_2D && level == 0) {
+ ADDR_COMPUTE_HTILE_INFO_INPUT AddrHtileIn = {0};
+ ADDR_COMPUTE_HTILE_INFO_OUTPUT AddrHtileOut = {0};
+ AddrHtileIn.flags.tcCompatible = AddrSurfInfoIn->flags.tcCompatible;
+ AddrHtileIn.pitch = AddrSurfInfoOut->pitch;
+ AddrHtileIn.height = AddrSurfInfoOut->height;
+ AddrHtileIn.numSlices = AddrSurfInfoOut->depth;
+ AddrHtileIn.blockWidth = ADDR_HTILE_BLOCKSIZE_8;
+ AddrHtileIn.blockHeight = ADDR_HTILE_BLOCKSIZE_8;
+ AddrHtileIn.pTileInfo = AddrSurfInfoOut->pTileInfo;
+ AddrHtileIn.tileIndex = AddrSurfInfoOut->tileIndex;
+ AddrHtileIn.macroModeIndex = AddrSurfInfoOut->macroModeIndex;
+
+ ret = AddrComputeHtileInfo(addrlib,
+ &AddrHtileIn,
+ &AddrHtileOut);
+
+ if (ret == ADDR_OK) {
+ surf->htile_size = AddrHtileOut.htileBytes;
+ surf->htile_slice_size = AddrHtileOut.sliceSize;
+ surf->htile_alignment = AddrHtileOut.baseAlign;
+ }
+ }
return 0;
}
surf->bo_size = 0;
surf->dcc_size = 0;
surf->dcc_alignment = 1;
+ surf->htile_size = surf->htile_slice_size = 0;
+ surf->htile_alignment = 1;
/* Calculate texture layout information. */
for (level = 0; level <= surf->last_level; level++) {