2 * Copyright 2006 VMware, Inc.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial portions
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 /** @file intel_image.h
31 * Structure definitions and prototypes for __DRIimage, the driver-private
32 * structure backing EGLImage or a drawable in DRI3.
34 * The __DRIimage is passed around the loader code (src/glx and src/egl), but
35 * it's opaque to that code and may only be accessed by loader extensions
36 * (mostly located in intel_screen.c).
42 #include "main/mtypes.h"
43 #include "intel_bufmgr.h"
44 #include <GL/internal/dri_interface.h>
51 * Used with images created with image_from_names
52 * to help support planar images.
54 struct intel_image_format
{
67 struct __DRIimageRec
{
69 uint32_t pitch
; /**< in bytes */
70 GLenum internal_format
;
76 * Need to save these here between calls to
77 * image_from_names and calls to image_from_planar.
81 struct intel_image_format
*planar_format
;
83 /* particular miptree level */
88 bool has_depthstencil
;
90 /** The image was created with EGL_EXT_image_dma_buf_import. */
91 bool dma_buf_imported
;
94 * Provided by EGL_EXT_image_dma_buf_import.
97 enum __DRIYUVColorSpace yuv_color_space
;
98 enum __DRISampleRange sample_range
;
99 enum __DRIChromaSiting horizontal_siting
;
100 enum __DRIChromaSiting vertical_siting
;