xref: /OK3568_Linux_fs/external/xserver/glamor/glamor_egl_ext.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
3*4882a593Smuzhiyun  * All Rights Reserved.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining
6*4882a593Smuzhiyun  * a copy of this software and associated documentation files (the
7*4882a593Smuzhiyun  * "Software"), to deal in the Software without restriction, including
8*4882a593Smuzhiyun  * without limitation the rights to use, copy, modify, merge, publish,
9*4882a593Smuzhiyun  * distribute, sublicense, and/or sell copies of the Software, and to
10*4882a593Smuzhiyun  * permit persons to whom the Software is furnished to do so, subject to
11*4882a593Smuzhiyun  * the following conditions:
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * The above copyright notice and this permission notice (including the
14*4882a593Smuzhiyun  * next paragraph) shall be included in all copies or substantial
15*4882a593Smuzhiyun  * portions of the Software.
16*4882a593Smuzhiyun  *
17*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18*4882a593Smuzhiyun  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19*4882a593Smuzhiyun  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20*4882a593Smuzhiyun  * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
21*4882a593Smuzhiyun  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
22*4882a593Smuzhiyun  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23*4882a593Smuzhiyun  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24*4882a593Smuzhiyun  * SOFTWARE.
25*4882a593Smuzhiyun  */
26*4882a593Smuzhiyun /* Extensions used by Glamor, copied from Mesa's eglmesaext.h, */
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun #ifndef GLAMOR_EGL_EXT_H
29*4882a593Smuzhiyun #define GLAMOR_EGL_EXT_H
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun /* Define needed tokens from EGL_EXT_image_dma_buf_import extension
32*4882a593Smuzhiyun  * here to avoid having to add ifdefs everywhere.*/
33*4882a593Smuzhiyun #ifndef EGL_EXT_image_dma_buf_import
34*4882a593Smuzhiyun #define EGL_LINUX_DMA_BUF_EXT					0x3270
35*4882a593Smuzhiyun #define EGL_LINUX_DRM_FOURCC_EXT				0x3271
36*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE0_FD_EXT				0x3272
37*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE0_OFFSET_EXT				0x3273
38*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE0_PITCH_EXT				0x3274
39*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE1_FD_EXT				0x3275
40*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE1_OFFSET_EXT				0x3276
41*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE1_PITCH_EXT				0x3277
42*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE2_FD_EXT				0x3278
43*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE2_OFFSET_EXT				0x3279
44*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE2_PITCH_EXT				0x327A
45*4882a593Smuzhiyun #endif
46*4882a593Smuzhiyun 
47*4882a593Smuzhiyun /* Define tokens from EGL_EXT_image_dma_buf_import_modifiers */
48*4882a593Smuzhiyun #ifndef EGL_EXT_image_dma_buf_import_modifiers
49*4882a593Smuzhiyun #define EGL_EXT_image_dma_buf_import_modifiers 1
50*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE3_FD_EXT         0x3440
51*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE3_OFFSET_EXT     0x3441
52*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE3_PITCH_EXT      0x3442
53*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
54*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
55*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
56*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
57*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
58*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
59*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
60*4882a593Smuzhiyun #define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
61*4882a593Smuzhiyun typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFFORMATSEXTPROC) (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats);
62*4882a593Smuzhiyun typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFMODIFIERSEXTPROC) (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers);
63*4882a593Smuzhiyun #endif
64*4882a593Smuzhiyun 
65*4882a593Smuzhiyun #endif /* GLAMOR_EGL_EXT_H */
66