ext_gpu_shader4: add compiler tests for everything
[piglit.git] / tests / spec / ext_image_dma_buf_import / image_common.h
blobf9845c7cb2ceb1dbc71a94cce1db711d83b7db3c
1 /*
2 * Copyright © 2013 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
23 #ifndef IMAGE_COMMON_H
24 #define IMAGE_COMMON_H
26 /**
27 * Temporary local dispatcer for EGL extensions. This can be replaced with the
28 * proper support once it is in place for EGL in the piglit core.
30 * A call in the tests is re-directed by the precompiler to a dispatcher that
31 * checks the availability of the real extension and takes care of the linking.
34 #include <unistd.h>
35 #include <drm_fourcc.h>
37 #include "piglit-util-egl.h"
38 #include "piglit-util-gl.h"
40 /* We define here the enums for EGL_EXT_image_dma_buf_import because, as of
41 * today (2013-09-10), the eglext.h on many systems lack them. The first Mesa
42 * version in which eglext.h defined the enums was Mesa 9.2 (2013-08-27).
44 #ifndef EGL_EXT_image_dma_buf_import
45 #define EGL_EXT_image_dma_buf_import 1
46 #define EGL_LINUX_DMA_BUF_EXT 0x3270
47 #define EGL_LINUX_DRM_FOURCC_EXT 0x3271
48 #define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
49 #define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
50 #define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
51 #define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
52 #define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
53 #define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
54 #define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
55 #define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
56 #define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
57 #define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
58 #define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
59 #define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
60 #define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
61 #define EGL_ITU_REC601_EXT 0x327F
62 #define EGL_ITU_REC709_EXT 0x3280
63 #define EGL_ITU_REC2020_EXT 0x3281
64 #define EGL_YUV_FULL_RANGE_EXT 0x3282
65 #define EGL_YUV_NARROW_RANGE_EXT 0x3283
66 #define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
67 #define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
68 #endif
70 extern PFNEGLCREATEIMAGEKHRPROC image_common_dispatch_eglCreateImageKHR;
71 #define eglCreateImageKHR image_common_dispatch_eglCreateImageKHR
73 extern PFNEGLDESTROYIMAGEKHRPROC image_common_dispatch_eglDestroyImageKHR;
74 #define eglDestroyImageKHR image_common_dispatch_eglDestroyImageKHR
76 #endif /* IMAGE_COMMON_H */