2 * Mesa 3-D graphics library
5 * Copyright (C) 2009-2010 Chia-I Wu <olv@0xlab.org>
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 #include "pipe/p_compiler.h"
29 #include "pipe/p_screen.h"
30 #include "pipe/p_context.h"
31 #include "pipe/p_format.h"
32 #include "egldriver.h"
33 #include "egldisplay.h"
34 #include "eglcontext.h"
35 #include "eglsurface.h"
36 #include "eglconfig.h"
38 #include "eglscreen.h"
44 struct egl_g3d_driver
{
46 const struct egl_g3d_st
*stapis
[NUM_EGL_G3D_STS
];
52 struct egl_g3d_display
{
53 struct native_display
*native
;
56 struct egl_g3d_buffer
{
57 struct st_framebuffer
*st_fb
;
61 struct egl_g3d_context
{
64 const struct egl_g3d_st
*stapi
;
65 struct pipe_context
*pipe
;
67 struct st_context
*st_ctx
;
68 EGLBoolean force_validate
;
69 struct egl_g3d_buffer draw
, read
;
72 struct egl_g3d_surface
{
74 struct native_surface
*native
;
75 enum native_attachment render_att
;
76 struct pipe_surface
*render_surface
;
77 unsigned int sequence_number
;
80 struct egl_g3d_config
{
82 const struct native_config
*native
;
85 struct egl_g3d_image
{
87 struct pipe_texture
*texture
;
93 struct egl_g3d_screen
{
95 const struct native_connector
*native
;
96 const struct native_mode
**native_modes
;
99 /* standard typecasts */
100 _EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d
)
101 _EGL_DRIVER_TYPECAST(egl_g3d_screen
, _EGLScreen
, obj
)
102 _EGL_DRIVER_TYPECAST(egl_g3d_image
, _EGLImage
, obj
)
106 egl_g3d_find_pixmap_config(_EGLDisplay
*dpy
, EGLNativePixmapType pix
);
108 #endif /* _EGL_G3D_H_ */