total_height = ALIGN(total_height, 64);
}
- mt->wraps_etc = (etc_format != MESA_FORMAT_NONE) ? true : false;
mt->etc_format = etc_format;
mt->region = intel_region_alloc(intel->intelScreen,
tiling,
unsigned int level,
unsigned int slice)
{
- /* For justification see intel_mipmap_tree:wraps_etc.
- */
- assert(mt->wraps_etc);
-
+ assert(mt->etc_format != MESA_FORMAT_NONE);
if (mt->etc_format == MESA_FORMAT_ETC1_RGB8) {
assert(mt->format == MESA_FORMAT_RGBX8888_REV);
}
if (mt->format == MESA_FORMAT_S8) {
intel_miptree_map_s8(intel, mt, map, level, slice);
- } else if (mt->wraps_etc) {
+ } else if (mt->etc_format != MESA_FORMAT_NONE) {
intel_miptree_map_etc(intel, mt, map, level, slice);
} else if (mt->stencil_mt) {
intel_miptree_map_depthstencil(intel, mt, map, level, slice);
if (mt->format == MESA_FORMAT_S8) {
intel_miptree_unmap_s8(intel, mt, map, level, slice);
- } else if (mt->wraps_etc) {
+ } else if (mt->etc_format != MESA_FORMAT_NONE) {
intel_miptree_unmap_etc(intel, mt, map, level, slice);
} else if (mt->stencil_mt) {
intel_miptree_unmap_depthstencil(intel, mt, map, level, slice);
*/
struct intel_mipmap_tree *mcs_mt;
- /**
- * \brief The miptree contains uncompressed data that was originally
- * ETC1/ETC2 data.
- *
- * On hardware that lacks support for ETC1/ETC2 textures, we do the following
- * on calls to glCompressedTexImage2D() with an ETC1/ETC2 texture format:
- * 1. Create a miptree whose format is a suitable uncompressed mesa format
- * with the wraps_etc flag set.
- * 2. Translate the ETC1/ETC2 data into uncompressed mesa format.
- * 3. Store the uncompressed data into the miptree and discard the ETC1/ETC2
- * data.
- */
- bool wraps_etc;
-
/* These are also refcounted:
*/
GLuint refcount;