Improves GLBenchmark 2.1 offscreen performance by 3.2% +/- 1.5% (n=52).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
struct intel_mipmap_tree *dst_mt)
{
struct intel_mipmap_tree *src_mt = intelImage->mt;
+ struct intel_texture_object *intel_obj =
+ intel_texture_object(intelImage->base.Base.TexObject);
int level = intelImage->base.Base.Level;
int face = intelImage->base.Base.Face;
GLuint depth = intelImage->base.Base.Depth;
}
intel_miptree_reference(&intelImage->mt, dst_mt);
+ intel_obj->needs_validate = true;
}
bool
DBG("%s\n", __FUNCTION__);
_mesa_initialize_texture_object(&obj->base, name, target);
+ obj->needs_validate = true;
+
return &obj->base;
}
image->Width, image->Height, image->Depth, intel_image->mt);
}
+ intel_texobj->needs_validate = true;
+
return true;
}
region);
if (intel_image->mt == NULL)
return;
+ intel_texobj->needs_validate = true;
intel_image->mt->offset = offset;
intel_image->base.RowStride = region->pitch;
* regions will be copied to this region and the old storage freed.
*/
struct intel_mipmap_tree *mt;
+
+ /**
+ * Set when mipmap trees in the texture images of this texture object
+ * might not all be the mipmap tree above.
+ */
+ bool needs_validate;
};
struct gl_sampler_object *sampler)
{
struct gl_texture_object *tObj = &intelObj->base;
+ int maxlevel;
if (sampler->MinFilter == GL_NEAREST ||
sampler->MinFilter == GL_LINEAR) {
- intelObj->_MaxLevel = tObj->BaseLevel;
+ maxlevel = tObj->BaseLevel;
} else {
- intelObj->_MaxLevel = tObj->_MaxLevel;
+ maxlevel = tObj->_MaxLevel;
+ }
+
+ if (intelObj->_MaxLevel != maxlevel) {
+ intelObj->_MaxLevel = maxlevel;
+ intelObj->needs_validate = true;
}
}
/* What levels must the tree include at a minimum?
*/
intel_update_max_level(intelObj, sampler);
+ if (intelObj->mt && intelObj->mt->first_level != tObj->BaseLevel)
+ intelObj->needs_validate = true;
+
+ if (!intelObj->needs_validate)
+ return true;
+
firstImage = intel_texture_image(tObj->Image[0][tObj->BaseLevel]);
/* Check tree can hold all active levels. Check tree matches
}
}
+ intelObj->needs_validate = false;
+
return true;
}