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 **************************************************************************/
28 #ifndef INTEL_REGIONS_H
29 #define INTEL_REGIONS_H
31 /** @file intel_regions.h
33 * Structure definitions and prototypes for intel_region handling,
34 * which is the basic structure for rectangular collections of pixels
35 * stored in a drm_intel_bo.
41 #include "main/mtypes.h"
42 #include "intel_bufmgr.h"
43 #include <GL/internal/dri_interface.h>
50 * Used with images created with image_from_names
51 * to help support planar images.
53 struct intel_image_format
{
66 struct __DRIimageRec
{
68 uint32_t pitch
; /**< in bytes */
69 GLenum internal_format
;
75 * Need to save these here between calls to
76 * image_from_names and calls to image_from_planar.
80 struct intel_image_format
*planar_format
;
82 /* particular miptree level */
87 bool has_depthstencil
;
90 * Provided by EGL_EXT_image_dma_buf_import.
92 * The flag is set in order to restrict the use of the image later on.
94 * See intel_image_target_texture_2d()
96 bool dma_buf_imported
;
97 enum __DRIYUVColorSpace yuv_color_space
;
98 enum __DRISampleRange sample_range
;
99 enum __DRIChromaSiting horizontal_siting
;
100 enum __DRIChromaSiting vertical_siting
;