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 OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
29 #include "pipe/p_compiler.h"
30 #include "pipe/p_screen.h"
31 #include "pipe/p_context.h"
32 #include "pipe/p_format.h"
33 #include "egldriver.h"
34 #include "egldisplay.h"
35 #include "eglcontext.h"
36 #include "eglsurface.h"
37 #include "eglconfig.h"
39 #include "eglscreen.h"
43 #include "egl_g3d_st.h"
45 struct egl_g3d_driver
{
47 struct st_api
*stapis
[ST_API_COUNT
];
50 const struct native_platform
*platforms
[_EGL_NUM_PLATFORMS
];
54 struct egl_g3d_display
{
55 struct native_display
*native
;
57 struct st_manager
*smapi
;
58 struct pipe_context
*pipe
;
61 struct egl_g3d_context
{
66 struct st_context_iface
*stctxi
;
69 struct egl_g3d_surface
{
72 struct st_visual stvis
;
73 struct st_framebuffer_iface
*stfbi
;
75 /* the native surface; NULL for pbuffers */
76 struct native_surface
*native
;
77 struct pipe_resource
*render_texture
;
79 EGLenum client_buffer_type
;
80 EGLClientBuffer client_buffer
;
82 unsigned int sequence_number
;
85 struct egl_g3d_config
{
87 const struct native_config
*native
;
88 struct st_visual stvis
;
91 struct egl_g3d_image
{
93 struct pipe_resource
*texture
;
99 struct egl_g3d_screen
{
101 const struct native_connector
*native
;
102 const struct native_mode
**native_modes
;
105 /* standard typecasts */
106 _EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d
)
107 _EGL_DRIVER_TYPECAST(egl_g3d_screen
, _EGLScreen
, obj
)
108 _EGL_DRIVER_TYPECAST(egl_g3d_image
, _EGLImage
, obj
)
110 #endif /* _EGL_G3D_H_ */