mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 15:00:10 +01:00
i965: Don't allocate a 1-level texture when GL_GENERATE_MIPMAP is set.
Given that a teximage that calls us with this flag set will immediately proceed to allocate the other levels, we can probably just go ahead and allocate those levels now. Reduces miptree copies in piglit by about .05%. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
parent
6ca9b532d8
commit
97bdb4c039
1 changed files with 2 additions and 1 deletions
|
|
@ -60,7 +60,8 @@ intel_miptree_create_for_teximage(struct brw_context *brw,
|
|||
*/
|
||||
if ((intelObj->base.Sampler.MinFilter == GL_NEAREST ||
|
||||
intelObj->base.Sampler.MinFilter == GL_LINEAR) &&
|
||||
intelImage->base.Base.Level == 0) {
|
||||
intelImage->base.Base.Level == 0 &&
|
||||
!intelObj->base.GenerateMipmap) {
|
||||
lastLevel = 0;
|
||||
} else {
|
||||
lastLevel = _mesa_get_tex_max_num_levels(intelObj->base.Target,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue