1 /**************************************************************************
3 * Copyright 2006 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 #include <GL/internal/dri_interface.h>
31 #include "intel_batchbuffer.h"
32 #include "intel_chipset.h"
33 #include "intel_context.h"
34 #include "intel_mipmap_tree.h"
35 #include "intel_regions.h"
36 #include "intel_tex_layout.h"
37 #include "intel_tex.h"
38 #include "intel_blit.h"
40 #include "main/enums.h"
41 #include "main/formats.h"
42 #include "main/glformats.h"
43 #include "main/teximage.h"
45 #define FILE_DEBUG_FLAG DEBUG_MIPTREE
48 target_to_target(GLenum target
)
51 case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
:
52 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB
:
53 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB
:
54 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
:
55 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB
:
56 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
:
57 return GL_TEXTURE_CUBE_MAP_ARB
;
63 struct intel_mipmap_tree
*
64 intel_miptree_create_layout(struct intel_context
*intel
,
73 struct intel_mipmap_tree
*mt
= calloc(sizeof(*mt
), 1);
77 DBG("%s target %s format %s level %d..%d <-- %p\n", __func__
,
78 _mesa_enum_to_string(target
),
79 _mesa_get_format_name(format
),
80 first_level
, last_level
, mt
);
82 mt
->target
= target_to_target(target
);
84 mt
->first_level
= first_level
;
85 mt
->last_level
= last_level
;
86 mt
->logical_width0
= width0
;
87 mt
->logical_height0
= height0
;
88 mt
->logical_depth0
= depth0
;
90 /* The cpp is bytes per (1, blockheight)-sized block for compressed
91 * textures. This is why you'll see divides by blockheight all over
94 _mesa_get_format_block_size(format
, &bw
, &bh
);
95 assert(_mesa_get_format_bytes(mt
->format
) % bw
== 0);
96 mt
->cpp
= _mesa_get_format_bytes(mt
->format
) / bw
;
98 mt
->compressed
= _mesa_is_format_compressed(format
);
101 if (target
== GL_TEXTURE_CUBE_MAP
) {
106 mt
->physical_width0
= width0
;
107 mt
->physical_height0
= height0
;
108 mt
->physical_depth0
= depth0
;
110 intel_get_texture_alignment_unit(intel
, mt
->format
,
111 &mt
->align_w
, &mt
->align_h
);
114 i945_miptree_layout(mt
);
116 i915_miptree_layout(mt
);
122 * \brief Helper function for intel_miptree_create().
125 intel_miptree_choose_tiling(struct intel_context
*intel
,
128 enum intel_miptree_tiling_mode requested
,
129 struct intel_mipmap_tree
*mt
)
131 /* Some usages may want only one type of tiling, like depth miptrees (Y
132 * tiled), or temporary BOs for uploading data once (linear).
135 case INTEL_MIPTREE_TILING_ANY
:
137 case INTEL_MIPTREE_TILING_Y
:
138 return I915_TILING_Y
;
139 case INTEL_MIPTREE_TILING_NONE
:
140 return I915_TILING_NONE
;
143 int minimum_pitch
= mt
->total_width
* mt
->cpp
;
145 /* If the width is much smaller than a tile, don't bother tiling. */
146 if (minimum_pitch
< 64)
147 return I915_TILING_NONE
;
149 if (ALIGN(minimum_pitch
, 512) >= 32768) {
150 perf_debug("%dx%d miptree too large to blit, falling back to untiled",
151 mt
->total_width
, mt
->total_height
);
152 return I915_TILING_NONE
;
155 /* We don't have BLORP to handle Y-tiled blits, so use X-tiling. */
156 return I915_TILING_X
;
159 struct intel_mipmap_tree
*
160 intel_miptree_create(struct intel_context
*intel
,
168 bool expect_accelerated_upload
,
169 enum intel_miptree_tiling_mode requested_tiling
)
171 struct intel_mipmap_tree
*mt
;
172 GLuint total_width
, total_height
;
175 mt
= intel_miptree_create_layout(intel
, target
, format
,
176 first_level
, last_level
, width0
,
179 /* pitch == 0 || height == 0 indicates the null texture */
180 if (!mt
|| !mt
->total_width
|| !mt
->total_height
) {
181 intel_miptree_release(&mt
);
185 total_width
= mt
->total_width
;
186 total_height
= mt
->total_height
;
188 uint32_t tiling
= intel_miptree_choose_tiling(intel
, format
, width0
,
191 bool y_or_x
= tiling
== (I915_TILING_Y
| I915_TILING_X
);
193 mt
->region
= intel_region_alloc(intel
->intelScreen
,
194 y_or_x
? I915_TILING_Y
: tiling
,
198 expect_accelerated_upload
);
200 /* If the region is too large to fit in the aperture, we need to use the
201 * BLT engine to support it. The BLT paths can't currently handle Y-tiling,
202 * so we need to fall back to X.
204 if (y_or_x
&& mt
->region
->bo
->size
>= intel
->max_gtt_map_object_size
) {
205 perf_debug("%dx%d miptree larger than aperture; falling back to X-tiled\n",
206 mt
->total_width
, mt
->total_height
);
207 intel_region_release(&mt
->region
);
209 mt
->region
= intel_region_alloc(intel
->intelScreen
,
214 expect_accelerated_upload
);
220 intel_miptree_release(&mt
);
227 struct intel_mipmap_tree
*
228 intel_miptree_create_for_bo(struct intel_context
*intel
,
237 struct intel_mipmap_tree
*mt
;
239 struct intel_region
*region
= calloc(1, sizeof(*region
));
243 /* Nothing will be able to use this miptree with the BO if the offset isn't
246 if (tiling
!= I915_TILING_NONE
)
247 assert(offset
% 4096 == 0);
249 /* miptrees can't handle negative pitch. If you need flipping of images,
250 * that's outside of the scope of the mt.
254 mt
= intel_miptree_create_layout(intel
, GL_TEXTURE_2D
, format
,
262 region
->cpp
= mt
->cpp
;
263 region
->width
= width
;
264 region
->height
= height
;
265 region
->pitch
= pitch
;
266 region
->refcount
= 1;
267 drm_intel_bo_reference(bo
);
269 region
->tiling
= tiling
;
279 * Wraps the given region with a miptree.
281 struct intel_mipmap_tree
*
282 intel_miptree_create_for_dri2_buffer(struct intel_context
*intel
,
283 unsigned dri_attachment
,
285 struct intel_region
*region
)
287 struct intel_mipmap_tree
*mt
= NULL
;
289 /* Only the front and back buffers, which are color buffers, are shared
292 assert(dri_attachment
== __DRI_BUFFER_BACK_LEFT
||
293 dri_attachment
== __DRI_BUFFER_FRONT_LEFT
||
294 dri_attachment
== __DRI_BUFFER_FAKE_FRONT_LEFT
);
295 assert(_mesa_get_format_base_format(format
) == GL_RGB
||
296 _mesa_get_format_base_format(format
) == GL_RGBA
);
298 mt
= intel_miptree_create_for_bo(intel
,
308 mt
->region
->name
= region
->name
;
314 * Wraps the given region with a miptree.
316 struct intel_mipmap_tree
*
317 intel_miptree_create_for_image_buffer(struct intel_context
*intel
,
318 enum __DRIimageBufferMask buffer_type
,
320 uint32_t num_samples
,
321 struct intel_region
*region
)
323 struct intel_mipmap_tree
*mt
= NULL
;
325 /* Only the front and back buffers, which are color buffers, are allocated
326 * through the image loader.
328 assert(_mesa_get_format_base_format(format
) == GL_RGB
||
329 _mesa_get_format_base_format(format
) == GL_RGBA
);
331 mt
= intel_miptree_create_for_bo(intel
,
342 struct intel_mipmap_tree
*
343 intel_miptree_create_for_renderbuffer(struct intel_context
*intel
,
350 return intel_miptree_create(intel
, GL_TEXTURE_2D
, format
, 0, 0,
351 width
, height
, depth
, true,
352 INTEL_MIPTREE_TILING_ANY
);
356 intel_miptree_reference(struct intel_mipmap_tree
**dst
,
357 struct intel_mipmap_tree
*src
)
362 intel_miptree_release(dst
);
366 DBG("%s %p refcount now %d\n", __func__
, src
, src
->refcount
);
374 intel_miptree_release(struct intel_mipmap_tree
**mt
)
379 DBG("%s %p refcount will be %d\n", __func__
, *mt
, (*mt
)->refcount
- 1);
380 if (--(*mt
)->refcount
<= 0) {
383 DBG("%s deleting %p\n", __func__
, *mt
);
385 intel_region_release(&((*mt
)->region
));
387 for (i
= 0; i
< MAX_TEXTURE_LEVELS
; i
++) {
388 free((*mt
)->level
[i
].slice
);
397 intel_miptree_get_dimensions_for_image(struct gl_texture_image
*image
,
398 int *width
, int *height
, int *depth
)
400 switch (image
->TexObject
->Target
) {
401 case GL_TEXTURE_1D_ARRAY
:
402 *width
= image
->Width
;
404 *depth
= image
->Height
;
407 *width
= image
->Width
;
408 *height
= image
->Height
;
409 *depth
= image
->Depth
;
415 * Can the image be pulled into a unified mipmap tree? This mirrors
416 * the completeness test in a lot of ways.
418 * Not sure whether I want to pass gl_texture_image here.
421 intel_miptree_match_image(struct intel_mipmap_tree
*mt
,
422 struct gl_texture_image
*image
)
424 struct intel_texture_image
*intelImage
= intel_texture_image(image
);
425 GLuint level
= intelImage
->base
.Base
.Level
;
426 int width
, height
, depth
;
428 /* glTexImage* choose the texture object based on the target passed in, and
429 * objects can't change targets over their lifetimes, so this should be
432 assert(target_to_target(image
->TexObject
->Target
) == mt
->target
);
434 mesa_format mt_format
= mt
->format
;
436 if (image
->TexFormat
!= mt_format
)
439 intel_miptree_get_dimensions_for_image(image
, &width
, &height
, &depth
);
441 if (mt
->target
== GL_TEXTURE_CUBE_MAP
)
444 /* Test image dimensions against the base level image adjusted for
445 * minification. This will also catch images not present in the
446 * tree, changed targets, etc.
448 if (width
!= mt
->level
[level
].width
||
449 height
!= mt
->level
[level
].height
||
450 depth
!= mt
->level
[level
].depth
) {
459 intel_miptree_set_level_info(struct intel_mipmap_tree
*mt
,
462 GLuint w
, GLuint h
, GLuint d
)
464 mt
->level
[level
].width
= w
;
465 mt
->level
[level
].height
= h
;
466 mt
->level
[level
].depth
= d
;
467 mt
->level
[level
].level_x
= x
;
468 mt
->level
[level
].level_y
= y
;
470 DBG("%s level %d size: %d,%d,%d offset %d,%d\n", __func__
,
471 level
, w
, h
, d
, x
, y
);
473 assert(mt
->level
[level
].slice
== NULL
);
475 mt
->level
[level
].slice
= calloc(d
, sizeof(*mt
->level
[0].slice
));
476 mt
->level
[level
].slice
[0].x_offset
= mt
->level
[level
].level_x
;
477 mt
->level
[level
].slice
[0].y_offset
= mt
->level
[level
].level_y
;
482 intel_miptree_set_image_offset(struct intel_mipmap_tree
*mt
,
483 GLuint level
, GLuint img
,
486 if (img
== 0 && level
== 0)
487 assert(x
== 0 && y
== 0);
489 assert(img
< mt
->level
[level
].depth
);
491 mt
->level
[level
].slice
[img
].x_offset
= mt
->level
[level
].level_x
+ x
;
492 mt
->level
[level
].slice
[img
].y_offset
= mt
->level
[level
].level_y
+ y
;
494 DBG("%s level %d img %d pos %d,%d\n",
495 __func__
, level
, img
,
496 mt
->level
[level
].slice
[img
].x_offset
,
497 mt
->level
[level
].slice
[img
].y_offset
);
501 intel_miptree_get_image_offset(struct intel_mipmap_tree
*mt
,
502 GLuint level
, GLuint slice
,
503 GLuint
*x
, GLuint
*y
)
505 assert(slice
< mt
->level
[level
].depth
);
507 *x
= mt
->level
[level
].slice
[slice
].x_offset
;
508 *y
= mt
->level
[level
].slice
[slice
].y_offset
;
512 * Rendering with tiled buffers requires that the base address of the buffer
513 * be aligned to a page boundary. For renderbuffers, and sometimes with
514 * textures, we may want the surface to point at a texture image level that
515 * isn't at a page boundary.
517 * This function returns an appropriately-aligned base offset
518 * according to the tiling restrictions, plus any required x/y offset
522 intel_miptree_get_tile_offsets(struct intel_mipmap_tree
*mt
,
523 GLuint level
, GLuint slice
,
527 struct intel_region
*region
= mt
->region
;
529 uint32_t mask_x
, mask_y
;
531 intel_region_get_tile_masks(region
, &mask_x
, &mask_y
, false);
532 intel_miptree_get_image_offset(mt
, level
, slice
, &x
, &y
);
534 *tile_x
= x
& mask_x
;
535 *tile_y
= y
& mask_y
;
537 return intel_region_get_aligned_offset(region
, x
& ~mask_x
, y
& ~mask_y
,
542 intel_miptree_copy_slice_sw(struct intel_context
*intel
,
543 struct intel_mipmap_tree
*dst_mt
,
544 struct intel_mipmap_tree
*src_mt
,
551 int src_stride
, dst_stride
;
552 int cpp
= dst_mt
->cpp
;
554 intel_miptree_map(intel
, src_mt
,
561 intel_miptree_map(intel
, dst_mt
,
565 GL_MAP_WRITE_BIT
| GL_MAP_INVALIDATE_RANGE_BIT
,
568 DBG("sw blit %s mt %p %p/%d -> %s mt %p %p/%d (%dx%d)\n",
569 _mesa_get_format_name(src_mt
->format
),
570 src_mt
, src
, src_stride
,
571 _mesa_get_format_name(dst_mt
->format
),
572 dst_mt
, dst
, dst_stride
,
575 int row_size
= cpp
* width
;
576 if (src_stride
== row_size
&&
577 dst_stride
== row_size
) {
578 memcpy(dst
, src
, row_size
* height
);
580 for (int i
= 0; i
< height
; i
++) {
581 memcpy(dst
, src
, row_size
);
587 intel_miptree_unmap(intel
, dst_mt
, level
, slice
);
588 intel_miptree_unmap(intel
, src_mt
, level
, slice
);
592 intel_miptree_copy_slice(struct intel_context
*intel
,
593 struct intel_mipmap_tree
*dst_mt
,
594 struct intel_mipmap_tree
*src_mt
,
600 mesa_format format
= src_mt
->format
;
601 uint32_t width
= src_mt
->level
[level
].width
;
602 uint32_t height
= src_mt
->level
[level
].height
;
610 assert(depth
< src_mt
->level
[level
].depth
);
611 assert(src_mt
->format
== dst_mt
->format
);
613 if (dst_mt
->compressed
) {
614 height
= ALIGN(height
, dst_mt
->align_h
) / dst_mt
->align_h
;
615 width
= ALIGN(width
, dst_mt
->align_w
);
618 uint32_t dst_x
, dst_y
, src_x
, src_y
;
619 intel_miptree_get_image_offset(dst_mt
, level
, slice
, &dst_x
, &dst_y
);
620 intel_miptree_get_image_offset(src_mt
, level
, slice
, &src_x
, &src_y
);
622 DBG("validate blit mt %s %p %d,%d/%d -> mt %s %p %d,%d/%d (%dx%d)\n",
623 _mesa_get_format_name(src_mt
->format
),
624 src_mt
, src_x
, src_y
, src_mt
->region
->pitch
,
625 _mesa_get_format_name(dst_mt
->format
),
626 dst_mt
, dst_x
, dst_y
, dst_mt
->region
->pitch
,
629 if (!intel_miptree_blit(intel
,
630 src_mt
, level
, slice
, 0, 0, false,
631 dst_mt
, level
, slice
, 0, 0, false,
632 width
, height
, GL_COPY
)) {
633 perf_debug("miptree validate blit for %s failed\n",
634 _mesa_get_format_name(format
));
636 intel_miptree_copy_slice_sw(intel
, dst_mt
, src_mt
, level
, slice
,
642 * Copies the image's current data to the given miptree, and associates that
643 * miptree with the image.
645 * If \c invalidate is true, then the actual image data does not need to be
646 * copied, but the image still needs to be associated to the new miptree (this
647 * is set to true if we're about to clear the image).
650 intel_miptree_copy_teximage(struct intel_context
*intel
,
651 struct intel_texture_image
*intelImage
,
652 struct intel_mipmap_tree
*dst_mt
,
655 struct intel_mipmap_tree
*src_mt
= intelImage
->mt
;
656 struct intel_texture_object
*intel_obj
=
657 intel_texture_object(intelImage
->base
.Base
.TexObject
);
658 int level
= intelImage
->base
.Base
.Level
;
659 int face
= intelImage
->base
.Base
.Face
;
660 GLuint depth
= intelImage
->base
.Base
.Depth
;
663 for (int slice
= 0; slice
< depth
; slice
++) {
664 intel_miptree_copy_slice(intel
, dst_mt
, src_mt
, level
, face
, slice
);
668 intel_miptree_reference(&intelImage
->mt
, dst_mt
);
669 intel_obj
->needs_validate
= true;
673 intel_miptree_map_raw(struct intel_context
*intel
, struct intel_mipmap_tree
*mt
)
675 drm_intel_bo
*bo
= mt
->region
->bo
;
677 if (unlikely(INTEL_DEBUG
& DEBUG_PERF
)) {
678 if (drm_intel_bo_busy(bo
)) {
679 perf_debug("Mapping a busy BO, causing a stall on the GPU.\n");
683 intel_flush(&intel
->ctx
);
685 if (mt
->region
->tiling
!= I915_TILING_NONE
)
686 drm_intel_gem_bo_map_gtt(bo
);
688 drm_intel_bo_map(bo
, true);
694 intel_miptree_unmap_raw(struct intel_mipmap_tree
*mt
)
696 drm_intel_bo_unmap(mt
->region
->bo
);
700 intel_miptree_map_gtt(struct intel_context
*intel
,
701 struct intel_mipmap_tree
*mt
,
702 struct intel_miptree_map
*map
,
703 unsigned int level
, unsigned int slice
)
707 unsigned int image_x
, image_y
;
711 /* For compressed formats, the stride is the number of bytes per
712 * row of blocks. intel_miptree_get_image_offset() already does
715 _mesa_get_format_block_size(mt
->format
, &bw
, &bh
);
719 base
= intel_miptree_map_raw(intel
, mt
) + mt
->offset
;
724 /* Note that in the case of cube maps, the caller must have passed the
725 * slice number referencing the face.
727 intel_miptree_get_image_offset(mt
, level
, slice
, &image_x
, &image_y
);
731 map
->stride
= mt
->region
->pitch
;
732 map
->ptr
= base
+ y
* map
->stride
+ x
* mt
->cpp
;
735 DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __func__
,
736 map
->x
, map
->y
, map
->w
, map
->h
,
737 mt
, _mesa_get_format_name(mt
->format
),
738 x
, y
, map
->ptr
, map
->stride
);
742 intel_miptree_unmap_gtt(struct intel_mipmap_tree
*mt
)
744 intel_miptree_unmap_raw(mt
);
748 intel_miptree_map_blit(struct intel_context
*intel
,
749 struct intel_mipmap_tree
*mt
,
750 struct intel_miptree_map
*map
,
751 unsigned int level
, unsigned int slice
)
753 map
->mt
= intel_miptree_create(intel
, GL_TEXTURE_2D
, mt
->format
,
757 INTEL_MIPTREE_TILING_NONE
);
759 fprintf(stderr
, "Failed to allocate blit temporary\n");
762 map
->stride
= map
->mt
->region
->pitch
;
764 if (!intel_miptree_blit(intel
,
766 map
->x
, map
->y
, false,
769 map
->w
, map
->h
, GL_COPY
)) {
770 fprintf(stderr
, "Failed to blit\n");
774 intel_batchbuffer_flush(intel
);
775 map
->ptr
= intel_miptree_map_raw(intel
, map
->mt
);
777 DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __func__
,
778 map
->x
, map
->y
, map
->w
, map
->h
,
779 mt
, _mesa_get_format_name(mt
->format
),
780 level
, slice
, map
->ptr
, map
->stride
);
785 intel_miptree_release(&map
->mt
);
791 intel_miptree_unmap_blit(struct intel_context
*intel
,
792 struct intel_mipmap_tree
*mt
,
793 struct intel_miptree_map
*map
,
797 struct gl_context
*ctx
= &intel
->ctx
;
799 intel_miptree_unmap_raw(map
->mt
);
801 if (map
->mode
& GL_MAP_WRITE_BIT
) {
802 bool ok
= intel_miptree_blit(intel
,
806 map
->x
, map
->y
, false,
807 map
->w
, map
->h
, GL_COPY
);
808 WARN_ONCE(!ok
, "Failed to blit from linear temporary mapping");
811 intel_miptree_release(&map
->mt
);
815 * Create and attach a map to the miptree at (level, slice). Return the
818 static struct intel_miptree_map
*
819 intel_miptree_attach_map(struct intel_mipmap_tree
*mt
,
828 struct intel_miptree_map
*map
= calloc(1, sizeof(*map
));
833 assert(mt
->level
[level
].slice
[slice
].map
== NULL
);
834 mt
->level
[level
].slice
[slice
].map
= map
;
846 * Release the map at (level, slice).
849 intel_miptree_release_map(struct intel_mipmap_tree
*mt
,
853 struct intel_miptree_map
**map
;
855 map
= &mt
->level
[level
].slice
[slice
].map
;
861 intel_miptree_map(struct intel_context
*intel
,
862 struct intel_mipmap_tree
*mt
,
873 struct intel_miptree_map
*map
;
875 map
= intel_miptree_attach_map(mt
, level
, slice
, x
, y
, w
, h
, mode
);
882 /* See intel_miptree_blit() for details on the 32k pitch limit. */
883 if (mt
->region
->tiling
!= I915_TILING_NONE
&&
884 mt
->region
->bo
->size
>= intel
->max_gtt_map_object_size
) {
885 assert(mt
->region
->pitch
< 32768);
886 intel_miptree_map_blit(intel
, mt
, map
, level
, slice
);
888 intel_miptree_map_gtt(intel
, mt
, map
, level
, slice
);
892 *out_stride
= map
->stride
;
894 if (map
->ptr
== NULL
)
895 intel_miptree_release_map(mt
, level
, slice
);
899 intel_miptree_unmap(struct intel_context
*intel
,
900 struct intel_mipmap_tree
*mt
,
904 struct intel_miptree_map
*map
= mt
->level
[level
].slice
[slice
].map
;
909 DBG("%s: mt %p (%s) level %d slice %d\n", __func__
,
910 mt
, _mesa_get_format_name(mt
->format
), level
, slice
);
913 intel_miptree_unmap_blit(intel
, mt
, map
, level
, slice
);
915 intel_miptree_unmap_gtt(mt
);
918 intel_miptree_release_map(mt
, level
, slice
);