502a9bf421884e1790deff19b416989fc410b12d
[mesa.git] / src / mesa / drivers / dri / i965 / intel_mipmap_tree.h
1 /**************************************************************************
2 *
3 * Copyright 2006 VMware, Inc.
4 * All Rights Reserved.
5 *
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:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
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.
25 *
26 **************************************************************************/
27
28 /** @file intel_mipmap_tree.h
29 *
30 * This file defines the structure that wraps a BO and describes how the
31 * mipmap levels and slices of a texture are laid out.
32 *
33 * The hardware has a fixed layout of a texture depending on parameters such
34 * as the target/type (2D, 3D, CUBE), width, height, pitch, and number of
35 * mipmap levels. The individual level/layer slices are each 2D rectangles of
36 * pixels at some x/y offset from the start of the drm_intel_bo.
37 *
38 * Original OpenGL allowed texture miplevels to be specified in arbitrary
39 * order, and a texture may change size over time. Thus, each
40 * intel_texture_image has a reference to a miptree that contains the pixel
41 * data sized appropriately for it, which will later be referenced by/copied
42 * to the intel_texture_object at draw time (intel_finalize_mipmap_tree()) so
43 * that there's a single miptree for the complete texture.
44 */
45
46 #ifndef INTEL_MIPMAP_TREE_H
47 #define INTEL_MIPMAP_TREE_H
48
49 #include <assert.h>
50
51 #include "intel_regions.h"
52 #include "intel_resolve_map.h"
53 #include <GL/internal/dri_interface.h>
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 struct intel_renderbuffer;
60
61 struct intel_resolve_map;
62 struct intel_texture_image;
63
64 /**
65 * When calling intel_miptree_map() on an ETC-transcoded-to-RGB miptree or a
66 * depthstencil-split-to-separate-stencil miptree, we'll normally make a
67 * tmeporary and recreate the kind of data requested by Mesa core, since we're
68 * satisfying some glGetTexImage() request or something.
69 *
70 * However, occasionally you want to actually map the miptree's current data
71 * without transcoding back. This flag to intel_miptree_map() gets you that.
72 */
73 #define BRW_MAP_DIRECT_BIT 0x80000000
74
75 struct intel_miptree_map {
76 /** Bitfield of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT, GL_MAP_INVALIDATE_BIT */
77 GLbitfield mode;
78 /** Region of interest for the map. */
79 int x, y, w, h;
80 /** Possibly malloced temporary buffer for the mapping. */
81 void *buffer;
82 /** Possible pointer to a temporary linear miptree for the mapping. */
83 struct intel_mipmap_tree *mt;
84 /** Pointer to the start of (map_x, map_y) returned by the mapping. */
85 void *ptr;
86 /** Stride of the mapping. */
87 int stride;
88 };
89
90 /**
91 * Describes the location of each texture image within a miptree.
92 */
93 struct intel_mipmap_level
94 {
95 /** Offset to this miptree level, used in computing x_offset. */
96 GLuint level_x;
97 /** Offset to this miptree level, used in computing y_offset. */
98 GLuint level_y;
99
100 /**
101 * \brief Number of 2D slices in this miplevel.
102 *
103 * The exact semantics of depth varies according to the texture target:
104 * - For GL_TEXTURE_CUBE_MAP, depth is 6.
105 * - For GL_TEXTURE_2D_ARRAY, depth is the number of array slices. It is
106 * identical for all miplevels in the texture.
107 * - For GL_TEXTURE_3D, it is the texture's depth at this miplevel. Its
108 * value, like width and height, varies with miplevel.
109 * - For other texture types, depth is 1.
110 * - Additionally, for UMS and CMS miptrees, depth is multiplied by
111 * sample count.
112 */
113 GLuint depth;
114
115 /**
116 * \brief List of 2D images in this mipmap level.
117 *
118 * This may be a list of cube faces, array slices in 2D array texture, or
119 * layers in a 3D texture. The list's length is \c depth.
120 */
121 struct intel_mipmap_slice {
122 /**
123 * \name Offset to slice
124 * \{
125 *
126 * Hardware formats are so diverse that that there is no unified way to
127 * compute the slice offsets, so we store them in this table.
128 *
129 * The (x, y) offset to slice \c s at level \c l relative the miptrees
130 * base address is
131 * \code
132 * x = mt->level[l].slice[s].x_offset
133 * y = mt->level[l].slice[s].y_offset
134 */
135 GLuint x_offset;
136 GLuint y_offset;
137 /** \} */
138
139 /**
140 * Mapping information. Persistent for the duration of
141 * intel_miptree_map/unmap on this slice.
142 */
143 struct intel_miptree_map *map;
144
145 /**
146 * \brief Is HiZ enabled for this slice?
147 *
148 * If \c mt->level[l].slice[s].has_hiz is set, then (1) \c mt->hiz_mt
149 * has been allocated and (2) the HiZ memory corresponding to this slice
150 * resides at \c mt->hiz_mt->level[l].slice[s].
151 */
152 bool has_hiz;
153 } *slice;
154 };
155
156 /**
157 * Enum for keeping track of the different MSAA layouts supported by Gen7.
158 */
159 enum intel_msaa_layout
160 {
161 /**
162 * Ordinary surface with no MSAA.
163 */
164 INTEL_MSAA_LAYOUT_NONE,
165
166 /**
167 * Interleaved Multisample Surface. The additional samples are
168 * accommodated by scaling up the width and the height of the surface so
169 * that all the samples corresponding to a pixel are located at nearby
170 * memory locations.
171 */
172 INTEL_MSAA_LAYOUT_IMS,
173
174 /**
175 * Uncompressed Multisample Surface. The surface is stored as a 2D array,
176 * with array slice n containing all pixel data for sample n.
177 */
178 INTEL_MSAA_LAYOUT_UMS,
179
180 /**
181 * Compressed Multisample Surface. The surface is stored as in
182 * INTEL_MSAA_LAYOUT_UMS, but there is an additional buffer called the MCS
183 * (Multisample Control Surface) buffer. Each pixel in the MCS buffer
184 * indicates the mapping from sample number to array slice. This allows
185 * the common case (where all samples constituting a pixel have the same
186 * color value) to be stored efficiently by just using a single array
187 * slice.
188 */
189 INTEL_MSAA_LAYOUT_CMS,
190 };
191
192
193 /**
194 * Enum for keeping track of the fast clear state of a buffer associated with
195 * a miptree.
196 *
197 * Fast clear works by deferring the memory writes that would be used to clear
198 * the buffer, so that instead of performing them at the time of the clear
199 * operation, the hardware automatically performs them at the time that the
200 * buffer is later accessed for rendering. The MCS buffer keeps track of
201 * which regions of the buffer still have pending clear writes.
202 *
203 * This enum keeps track of the driver's knowledge of pending fast clears in
204 * the MCS buffer.
205 *
206 * MCS buffers only exist on Gen7+.
207 */
208 enum intel_fast_clear_state
209 {
210 /**
211 * There is no MCS buffer for this miptree, and one should never be
212 * allocated.
213 */
214 INTEL_FAST_CLEAR_STATE_NO_MCS,
215
216 /**
217 * No deferred clears are pending for this miptree, and the contents of the
218 * color buffer are entirely correct. An MCS buffer may or may not exist
219 * for this miptree. If it does exist, it is entirely in the "no deferred
220 * clears pending" state. If it does not exist, it will be created the
221 * first time a fast color clear is executed.
222 *
223 * In this state, the color buffer can be used for purposes other than
224 * rendering without needing a render target resolve.
225 *
226 * Since there is no such thing as a "fast color clear resolve" for MSAA
227 * buffers, an MSAA buffer will never be in this state.
228 */
229 INTEL_FAST_CLEAR_STATE_RESOLVED,
230
231 /**
232 * An MCS buffer exists for this miptree, and deferred clears are pending
233 * for some regions of the color buffer, as indicated by the MCS buffer.
234 * The contents of the color buffer are only correct for the regions where
235 * the MCS buffer doesn't indicate a deferred clear.
236 *
237 * If a single-sample buffer is in this state, a render target resolve must
238 * be performed before it can be used for purposes other than rendering.
239 */
240 INTEL_FAST_CLEAR_STATE_UNRESOLVED,
241
242 /**
243 * An MCS buffer exists for this miptree, and deferred clears are pending
244 * for the entire color buffer, and the contents of the MCS buffer reflect
245 * this. The contents of the color buffer are undefined.
246 *
247 * If a single-sample buffer is in this state, a render target resolve must
248 * be performed before it can be used for purposes other than rendering.
249 *
250 * If the client attempts to clear a buffer which is already in this state,
251 * the clear can be safely skipped, since the buffer is already clear.
252 */
253 INTEL_FAST_CLEAR_STATE_CLEAR,
254 };
255
256 struct intel_mipmap_tree
257 {
258 /** Buffer object containing the pixel data. */
259 drm_intel_bo *bo;
260
261 uint32_t pitch; /**< pitch in bytes. */
262
263 uint32_t tiling; /**< One of the I915_TILING_* flags */
264
265 /* Effectively the key:
266 */
267 GLenum target;
268
269 /**
270 * Generally, this is just the same as the gl_texture_image->TexFormat or
271 * gl_renderbuffer->Format.
272 *
273 * However, for textures and renderbuffers with packed depth/stencil formats
274 * on hardware where we want or need to use separate stencil, there will be
275 * two miptrees for storing the data. If the depthstencil texture or rb is
276 * MESA_FORMAT_Z32_FLOAT_S8X24_UINT, then mt->format will be
277 * MESA_FORMAT_Z_FLOAT32, otherwise for MESA_FORMAT_Z24_UNORM_S8_UINT objects it will be
278 * MESA_FORMAT_Z24_UNORM_X8_UINT.
279 *
280 * For ETC1/ETC2 textures, this is one of the uncompressed mesa texture
281 * formats if the hardware lacks support for ETC1/ETC2. See @ref wraps_etc.
282 */
283 mesa_format format;
284
285 /** This variable stores the value of ETC compressed texture format */
286 mesa_format etc_format;
287
288 /**
289 * The X offset of each image in the miptree must be aligned to this.
290 * See the comments in brw_tex_layout.c.
291 */
292 unsigned int align_w;
293 unsigned int align_h; /**< \see align_w */
294
295 GLuint first_level;
296 GLuint last_level;
297
298 /**
299 * Level zero image dimensions. These dimensions correspond to the
300 * physical layout of data in memory. Accordingly, they account for the
301 * extra width, height, and or depth that must be allocated in order to
302 * accommodate multisample formats, and they account for the extra factor
303 * of 6 in depth that must be allocated in order to accommodate cubemap
304 * textures.
305 */
306 GLuint physical_width0, physical_height0, physical_depth0;
307
308 GLuint cpp; /**< bytes per pixel */
309 GLuint num_samples;
310 bool compressed;
311
312 /**
313 * Level zero image dimensions. These dimensions correspond to the
314 * logical width, height, and depth of the texture as seen by client code.
315 * Accordingly, they do not account for the extra width, height, and/or
316 * depth that must be allocated in order to accommodate multisample
317 * formats, nor do they account for the extra factor of 6 in depth that
318 * must be allocated in order to accommodate cubemap textures.
319 */
320 uint32_t logical_width0, logical_height0, logical_depth0;
321
322 /**
323 * For 1D array, 2D array, cube, and 2D multisampled surfaces on Gen7: true
324 * if the surface only contains LOD 0, and hence no space is for LOD's
325 * other than 0 in between array slices.
326 *
327 * Corresponds to the surface_array_spacing bit in gen7_surface_state.
328 */
329 bool array_spacing_lod0;
330
331 /**
332 * The distance in rows between array slices in an uncompressed surface.
333 *
334 * For compressed surfaces, slices are stored closer together physically;
335 * the real distance is (qpitch / block height).
336 */
337 uint32_t qpitch;
338
339 /**
340 * MSAA layout used by this buffer.
341 */
342 enum intel_msaa_layout msaa_layout;
343
344 /* Derived from the above:
345 */
346 GLuint total_width;
347 GLuint total_height;
348
349 /* The 3DSTATE_CLEAR_PARAMS value associated with the last depth clear to
350 * this depth mipmap tree, if any.
351 */
352 uint32_t depth_clear_value;
353
354 /* Includes image offset tables:
355 */
356 struct intel_mipmap_level level[MAX_TEXTURE_LEVELS];
357
358 /* Offset into bo where miptree starts:
359 */
360 uint32_t offset;
361
362 /**
363 * \brief HiZ miptree
364 *
365 * The hiz miptree contains the miptree's hiz buffer. To allocate the hiz
366 * miptree, use intel_miptree_alloc_hiz().
367 *
368 * To determine if hiz is enabled, do not check this pointer. Instead, use
369 * intel_miptree_slice_has_hiz().
370 */
371 struct intel_mipmap_tree *hiz_mt;
372
373 /**
374 * \brief Map of miptree slices to needed resolves.
375 *
376 * This is used only when the miptree has a child HiZ miptree.
377 *
378 * Let \c mt be a depth miptree with HiZ enabled. Then the resolve map is
379 * \c mt->hiz_map. The resolve map of the child HiZ miptree, \c
380 * mt->hiz_mt->hiz_map, is unused.
381 */
382 struct intel_resolve_map hiz_map;
383
384 /**
385 * \brief Stencil miptree for depthstencil textures.
386 *
387 * This miptree is used for depthstencil textures and renderbuffers that
388 * require separate stencil. It always has the true copy of the stencil
389 * bits, regardless of mt->format.
390 *
391 * \see intel_miptree_map_depthstencil()
392 * \see intel_miptree_unmap_depthstencil()
393 */
394 struct intel_mipmap_tree *stencil_mt;
395
396 /**
397 * \brief MCS miptree.
398 *
399 * This miptree contains the "multisample control surface", which stores
400 * the necessary information to implement compressed MSAA
401 * (INTEL_MSAA_FORMAT_CMS) and "fast color clear" behaviour on Gen7+.
402 *
403 * NULL if no MCS miptree is in use for this surface.
404 */
405 struct intel_mipmap_tree *mcs_mt;
406
407 /**
408 * Fast clear state for this buffer.
409 */
410 enum intel_fast_clear_state fast_clear_state;
411
412 /**
413 * The SURFACE_STATE bits associated with the last fast color clear to this
414 * color mipmap tree, if any.
415 *
416 * This value will only ever contain ones in bits 28-31, so it is safe to
417 * OR into dword 7 of SURFACE_STATE.
418 */
419 uint32_t fast_clear_color_value;
420
421 /* These are also refcounted:
422 */
423 GLuint refcount;
424 };
425
426 enum intel_miptree_tiling_mode {
427 INTEL_MIPTREE_TILING_ANY,
428 INTEL_MIPTREE_TILING_Y,
429 INTEL_MIPTREE_TILING_NONE,
430 };
431
432 bool
433 intel_is_non_msrt_mcs_buffer_supported(struct brw_context *brw,
434 struct intel_mipmap_tree *mt);
435
436 void
437 intel_get_non_msrt_mcs_alignment(struct brw_context *brw,
438 struct intel_mipmap_tree *mt,
439 unsigned *width_px, unsigned *height);
440
441 bool
442 intel_miptree_alloc_non_msrt_mcs(struct brw_context *brw,
443 struct intel_mipmap_tree *mt);
444
445 struct intel_mipmap_tree *intel_miptree_create(struct brw_context *brw,
446 GLenum target,
447 mesa_format format,
448 GLuint first_level,
449 GLuint last_level,
450 GLuint width0,
451 GLuint height0,
452 GLuint depth0,
453 bool expect_accelerated_upload,
454 GLuint num_samples,
455 enum intel_miptree_tiling_mode);
456
457 struct intel_mipmap_tree *
458 intel_miptree_create_layout(struct brw_context *brw,
459 GLenum target,
460 mesa_format format,
461 GLuint first_level,
462 GLuint last_level,
463 GLuint width0,
464 GLuint height0,
465 GLuint depth0,
466 bool for_bo,
467 GLuint num_samples);
468
469 struct intel_mipmap_tree *
470 intel_miptree_create_for_bo(struct brw_context *brw,
471 drm_intel_bo *bo,
472 mesa_format format,
473 uint32_t offset,
474 uint32_t width,
475 uint32_t height,
476 int pitch);
477
478 void
479 intel_update_winsys_renderbuffer_miptree(struct brw_context *intel,
480 struct intel_renderbuffer *irb,
481 drm_intel_bo *bo,
482 uint32_t width, uint32_t height,
483 uint32_t pitch);
484
485 /**
486 * Create a miptree appropriate as the storage for a non-texture renderbuffer.
487 * The miptree has the following properties:
488 * - The target is GL_TEXTURE_2D.
489 * - There are no levels other than the base level 0.
490 * - Depth is 1.
491 */
492 struct intel_mipmap_tree*
493 intel_miptree_create_for_renderbuffer(struct brw_context *brw,
494 mesa_format format,
495 uint32_t width,
496 uint32_t height,
497 uint32_t num_samples);
498
499 mesa_format
500 intel_depth_format_for_depthstencil_format(mesa_format format);
501
502 mesa_format
503 intel_lower_compressed_format(struct brw_context *brw, mesa_format format);
504
505 /** \brief Assert that the level and layer are valid for the miptree. */
506 static inline void
507 intel_miptree_check_level_layer(struct intel_mipmap_tree *mt,
508 uint32_t level,
509 uint32_t layer)
510 {
511 assert(level >= mt->first_level);
512 assert(level <= mt->last_level);
513 assert(layer < mt->level[level].depth);
514 }
515
516 void intel_miptree_reference(struct intel_mipmap_tree **dst,
517 struct intel_mipmap_tree *src);
518
519 void intel_miptree_release(struct intel_mipmap_tree **mt);
520
521 /* Check if an image fits an existing mipmap tree layout
522 */
523 bool intel_miptree_match_image(struct intel_mipmap_tree *mt,
524 struct gl_texture_image *image);
525
526 void
527 intel_miptree_get_image_offset(const struct intel_mipmap_tree *mt,
528 GLuint level, GLuint slice,
529 GLuint *x, GLuint *y);
530
531 void
532 intel_miptree_get_dimensions_for_image(struct gl_texture_image *image,
533 int *width, int *height, int *depth);
534
535 void
536 intel_miptree_get_tile_masks(const struct intel_mipmap_tree *mt,
537 uint32_t *mask_x, uint32_t *mask_y,
538 bool map_stencil_as_y_tiled);
539
540 uint32_t
541 intel_miptree_get_tile_offsets(const struct intel_mipmap_tree *mt,
542 GLuint level, GLuint slice,
543 uint32_t *tile_x,
544 uint32_t *tile_y);
545 uint32_t
546 intel_miptree_get_aligned_offset(const struct intel_mipmap_tree *mt,
547 uint32_t x, uint32_t y,
548 bool map_stencil_as_y_tiled);
549
550 void intel_miptree_set_level_info(struct intel_mipmap_tree *mt,
551 GLuint level,
552 GLuint x, GLuint y, GLuint d);
553
554 void intel_miptree_set_image_offset(struct intel_mipmap_tree *mt,
555 GLuint level,
556 GLuint img, GLuint x, GLuint y);
557
558 void
559 intel_miptree_copy_teximage(struct brw_context *brw,
560 struct intel_texture_image *intelImage,
561 struct intel_mipmap_tree *dst_mt, bool invalidate);
562
563 bool
564 intel_miptree_alloc_mcs(struct brw_context *brw,
565 struct intel_mipmap_tree *mt,
566 GLuint num_samples);
567
568 /**
569 * \name Miptree HiZ functions
570 * \{
571 *
572 * It is safe to call the "slice_set_need_resolve" and "slice_resolve"
573 * functions on a miptree without HiZ. In that case, each function is a no-op.
574 */
575
576 /**
577 * \brief Allocate the miptree's embedded HiZ miptree.
578 * \see intel_mipmap_tree:hiz_mt
579 * \return false if allocation failed
580 */
581
582 bool
583 intel_miptree_alloc_hiz(struct brw_context *brw,
584 struct intel_mipmap_tree *mt);
585
586 bool
587 intel_miptree_slice_has_hiz(struct intel_mipmap_tree *mt,
588 uint32_t level,
589 uint32_t layer);
590
591 void
592 intel_miptree_slice_set_needs_hiz_resolve(struct intel_mipmap_tree *mt,
593 uint32_t level,
594 uint32_t depth);
595 void
596 intel_miptree_slice_set_needs_depth_resolve(struct intel_mipmap_tree *mt,
597 uint32_t level,
598 uint32_t depth);
599
600 void
601 intel_miptree_set_all_slices_need_depth_resolve(struct intel_mipmap_tree *mt,
602 uint32_t level);
603
604 /**
605 * \return false if no resolve was needed
606 */
607 bool
608 intel_miptree_slice_resolve_hiz(struct brw_context *brw,
609 struct intel_mipmap_tree *mt,
610 unsigned int level,
611 unsigned int depth);
612
613 /**
614 * \return false if no resolve was needed
615 */
616 bool
617 intel_miptree_slice_resolve_depth(struct brw_context *brw,
618 struct intel_mipmap_tree *mt,
619 unsigned int level,
620 unsigned int depth);
621
622 /**
623 * \return false if no resolve was needed
624 */
625 bool
626 intel_miptree_all_slices_resolve_hiz(struct brw_context *brw,
627 struct intel_mipmap_tree *mt);
628
629 /**
630 * \return false if no resolve was needed
631 */
632 bool
633 intel_miptree_all_slices_resolve_depth(struct brw_context *brw,
634 struct intel_mipmap_tree *mt);
635
636 /**\}*/
637
638 /**
639 * Update the fast clear state for a miptree to indicate that it has been used
640 * for rendering.
641 */
642 static inline void
643 intel_miptree_used_for_rendering(struct intel_mipmap_tree *mt)
644 {
645 /* If the buffer was previously in fast clear state, change it to
646 * unresolved state, since it won't be guaranteed to be clear after
647 * rendering occurs.
648 */
649 if (mt->fast_clear_state == INTEL_FAST_CLEAR_STATE_CLEAR)
650 mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
651 }
652
653 void
654 intel_miptree_resolve_color(struct brw_context *brw,
655 struct intel_mipmap_tree *mt);
656
657 void
658 intel_miptree_make_shareable(struct brw_context *brw,
659 struct intel_mipmap_tree *mt);
660
661 void
662 intel_miptree_updownsample(struct brw_context *brw,
663 struct intel_mipmap_tree *src,
664 struct intel_mipmap_tree *dst);
665
666 void brw_miptree_layout(struct brw_context *brw, struct intel_mipmap_tree *mt);
667
668 void *intel_miptree_map_raw(struct brw_context *brw,
669 struct intel_mipmap_tree *mt);
670
671 void intel_miptree_unmap_raw(struct brw_context *brw,
672 struct intel_mipmap_tree *mt);
673
674 void
675 intel_miptree_map(struct brw_context *brw,
676 struct intel_mipmap_tree *mt,
677 unsigned int level,
678 unsigned int slice,
679 unsigned int x,
680 unsigned int y,
681 unsigned int w,
682 unsigned int h,
683 GLbitfield mode,
684 void **out_ptr,
685 int *out_stride);
686
687 void
688 intel_miptree_unmap(struct brw_context *brw,
689 struct intel_mipmap_tree *mt,
690 unsigned int level,
691 unsigned int slice);
692
693 void
694 intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
695 unsigned int level, unsigned int layer, enum gen6_hiz_op op);
696
697 #ifdef __cplusplus
698 }
699 #endif
700
701 #endif