summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2013-02-15 12:58:03 -0800
committerChad Versace <[email protected]>2013-02-28 15:22:41 -0800
commit809fdc211fbe8fb7e2a8f024a7ad1a38948be0d0 (patch)
treed7555b3e14f88522c2fd0851de477038047645a4 /src/mesa/drivers
parentc001985cbf299f283d64289e1ba5f2a236880ebb (diff)
intel: Remove intel_mipmap_tree::wraps_etc
The field was equivalent to (etc_format != MESA_FORMAT_NONE), and therefore duplicate information. This patch removes field and replaces all references to it with `etc_format != MESA_FORMAT_NONE`. No Piglit ETC test regresses on Intel Sandybridge. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c10
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h14
2 files changed, 3 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 306cbbea177..e15050112ed 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -390,7 +390,6 @@ intel_miptree_create(struct intel_context *intel,
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,
@@ -1309,10 +1308,7 @@ intel_miptree_map_etc(struct intel_context *intel,
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);
}
@@ -1575,7 +1571,7 @@ intel_miptree_map_singlesample(struct intel_context *intel,
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);
@@ -1633,7 +1629,7 @@ intel_miptree_unmap_singlesample(struct intel_context *intel,
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);
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index 27540bc182f..2070be7680a 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -360,20 +360,6 @@ struct intel_mipmap_tree
*/
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;