summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
diff options
context:
space:
mode:
authorEleni Maria Stea <estea@igalia.com>2019-02-15 15:29:42 +0200
committerNanley Chery <nanley.g.chery@intel.com>2019-02-15 15:54:41 -0800
commitdb0c379c067002c35a261992de3847a97b3579d4 (patch)
treea0b1eb22c7bb0d6e547e842dc38d33125bdd4a10 /src/mesa/drivers/dri/i965/intel_mipmap_tree.c
parentd8eb7287fe82e74da8f2938e7190610d3ded0051 (diff)
i965: Fixed the CopyImageSubData for ETC2 on Gen < 8
For CopyImageSubData to copy the data during the 1st draw call, we need to update the shadow tree right before the rendering. v2: - Added assertion that the miptree doesn't need update at the time we update the texture surface. (Nanley Chery) v3: - As we now update the tree before the rendering we don't need to copy the data during the unmap anymore. Removed the unnecessary update from the intel_miptree_unmap in intel_mipmap_tree.c (Nanley Chery) v4: - Fixed unrelated empty line removal (Nanley Chery) - As now the intel_upate_etc_shadow of intel_mipmap_tree.c is only called inside its following function, we don't need to declare it at the top of the file anymore. (Nanley Chery) Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 976a004ade0..7146fcb6582 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -57,11 +57,6 @@ static void *intel_miptree_map_raw(struct brw_context *brw,
GLbitfield mode);
static void intel_miptree_unmap_raw(struct intel_mipmap_tree *mt);
-static void intel_miptree_update_etc_shadow(struct brw_context *brw,
- struct intel_mipmap_tree *mt,
- unsigned int level,
- unsigned int slice,
- int level_w, int level_h);
static bool
intel_miptree_supports_mcs(struct brw_context *brw,
@@ -3779,7 +3774,6 @@ intel_miptree_unmap(struct brw_context *brw,
unsigned int slice)
{
struct intel_miptree_map *map = mt->level[level].slice[slice].map;
- int level_w, level_h;
assert(mt->surf.samples == 1);
@@ -3789,21 +3783,10 @@ intel_miptree_unmap(struct brw_context *brw,
DBG("%s: mt %p (%s) level %d slice %d\n", __func__,
mt, _mesa_get_format_name(mt->format), level, slice);
- level_w = minify(mt->surf.phys_level0_sa.width,
- level - mt->first_level);
- level_h = minify(mt->surf.phys_level0_sa.height,
- level - mt->first_level);
-
if (map->unmap)
map->unmap(brw, mt, map, level, slice);
intel_miptree_release_map(mt, level, slice);
-
- if (intel_miptree_has_etc_shadow(brw, mt) && mt->shadow_needs_update) {
- mt->shadow_needs_update = false;
- intel_miptree_update_etc_shadow(brw, mt, level, slice, level_w,
- level_h);
- }
}
enum isl_surf_dim