OSDN Git Service

remove vaDisplayIsValid from libva-glx
[android-x86/hardware-intel-common-libva.git] / va / glx / va_glx_private.h
1 /*
2  * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24
25 #ifndef VA_GLX_PRIVATE_H
26 #define VA_GLX_PRIVATE_H
27
28 #include "config.h"
29 #include "va.h"
30 #include "va_backend.h"
31 #include "va_x11.h"
32 #include "va_glx.h"
33 #include "va_backend_glx.h"
34
35 #if GLX_GLXEXT_VERSION < 18
36 typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *);
37 typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int);
38 #endif
39
40 typedef struct VAOpenGLVTable *VAOpenGLVTableP;
41
42 struct VAOpenGLVTable {
43     PFNGLXBINDTEXIMAGEEXTPROC           glx_bind_tex_image;
44     PFNGLXRELEASETEXIMAGEEXTPROC        glx_release_tex_image;
45     PFNGLGENFRAMEBUFFERSEXTPROC         gl_gen_framebuffers;
46     PFNGLDELETEFRAMEBUFFERSEXTPROC      gl_delete_framebuffers;
47     PFNGLBINDFRAMEBUFFEREXTPROC         gl_bind_framebuffer;
48     PFNGLGENRENDERBUFFERSEXTPROC        gl_gen_renderbuffers;
49     PFNGLDELETERENDERBUFFERSEXTPROC     gl_delete_renderbuffers;
50     PFNGLBINDRENDERBUFFEREXTPROC        gl_bind_renderbuffer;
51     PFNGLRENDERBUFFERSTORAGEEXTPROC     gl_renderbuffer_storage;
52     PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC gl_framebuffer_renderbuffer;
53     PFNGLFRAMEBUFFERTEXTURE2DEXTPROC    gl_framebuffer_texture_2d;
54     PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC  gl_check_framebuffer_status;
55 };
56
57 typedef struct VADisplayContextGLX *VADisplayContextGLXP;
58 typedef struct VADriverContextGLX  *VADriverContextGLXP;
59 typedef struct VASurfaceGLX        *VASurfaceGLXP;
60 typedef struct VADriverVTableGLX   *VADriverVTableGLXP;
61
62 typedef void (*vaDestroyFunc)(VADisplayContextP);
63
64 struct VADisplayContextGLX {
65     vaDestroyFunc vaDestroy;
66 };
67
68 #define VA_DRIVER_CONTEXT_GLX(ctx) ((VADriverContextGLXP)((ctx)->glx))
69
70 struct VADriverContextGLX {
71     struct VADriverVTableGLX    vtable;
72     struct VAOpenGLVTable       gl_vtable;
73     unsigned int                is_initialized  : 1;
74 };
75
76 #endif /* VA_GLX_PRIVATE_H */