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 **************************************************************************/
31 /** @file intel_image.h
33 * Structure definitions and prototypes for __DRIimage, the driver-private
34 * structure backing EGLImage or a drawable in DRI3.
36 * The __DRIimage is passed around the loader code (src/glx and src/egl), but
37 * it's opaque to that code and may only be accessed by loader extensions
38 * (mostly located in intel_screen.c).
44 #include "main/mtypes.h"
45 #include "intel_bufmgr.h"
46 #include <GL/internal/dri_interface.h>
53 * Used with images created with image_from_names
54 * to help support planar images.
56 struct intel_image_format
{
69 struct __DRIimageRec
{
71 uint32_t pitch
; /**< in bytes */
72 GLenum internal_format
;
78 * Need to save these here between calls to
79 * image_from_names and calls to image_from_planar.
83 struct intel_image_format
*planar_format
;
85 /* particular miptree level */
90 bool has_depthstencil
;
93 * Provided by EGL_EXT_image_dma_buf_import.
95 * The flag is set in order to restrict the use of the image later on.
97 * See intel_image_target_texture_2d()
99 bool dma_buf_imported
;
100 enum __DRIYUVColorSpace yuv_color_space
;
101 enum __DRISampleRange sample_range
;
102 enum __DRIChromaSiting horizontal_siting
;
103 enum __DRIChromaSiting vertical_siting
;