Blame va/glx/va_glx_private.h

Packit Service 9402ce
/*
Packit Service 9402ce
 * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
Packit Service 9402ce
 *
Packit Service 9402ce
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit Service 9402ce
 * copy of this software and associated documentation files (the
Packit Service 9402ce
 * "Software"), to deal in the Software without restriction, including
Packit Service 9402ce
 * without limitation the rights to use, copy, modify, merge, publish,
Packit Service 9402ce
 * distribute, sub license, and/or sell copies of the Software, and to
Packit Service 9402ce
 * permit persons to whom the Software is furnished to do so, subject to
Packit Service 9402ce
 * the following conditions:
Packit Service 9402ce
 * 
Packit Service 9402ce
 * The above copyright notice and this permission notice (including the
Packit Service 9402ce
 * next paragraph) shall be included in all copies or substantial portions
Packit Service 9402ce
 * of the Software.
Packit Service 9402ce
 * 
Packit Service 9402ce
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit Service 9402ce
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit Service 9402ce
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
Packit Service 9402ce
 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
Packit Service 9402ce
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
Packit Service 9402ce
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
Packit Service 9402ce
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Packit Service 9402ce
 */
Packit Service 9402ce
Packit Service 9402ce
#ifndef VA_GLX_PRIVATE_H
Packit Service 9402ce
#define VA_GLX_PRIVATE_H
Packit Service 9402ce
Packit Service 9402ce
#include "sysdeps.h"
Packit Service 9402ce
#include "va.h"
Packit Service 9402ce
#include "va_backend.h"
Packit Service 9402ce
#include "va_x11.h"
Packit Service 9402ce
#include "va_glx.h"
Packit Service 9402ce
#include "va_backend_glx.h"
Packit Service 9402ce
#include <GL/glxext.h>
Packit Service 9402ce
Packit Service 9402ce
#if GLX_GLXEXT_VERSION < 18
Packit Service 9402ce
typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *);
Packit Service 9402ce
typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int);
Packit Service 9402ce
#endif
Packit Service 9402ce
Packit Service 9402ce
#if GLX_GLXEXT_VERSION < 27
Packit Service 9402ce
/* XXX: this is not exactly that version but this is the only means to
Packit Service 9402ce
   make sure we have the correct <GL/glx.h> with those signatures */
Packit Service 9402ce
typedef GLXPixmap (*PFNGLXCREATEPIXMAPPROC)(Display *, GLXFBConfig, Pixmap, const int *);
Packit Service 9402ce
typedef void (*PFNGLXDESTROYPIXMAPPROC)(Display *, GLXPixmap);
Packit Service 9402ce
#endif
Packit Service 9402ce
Packit Service 9402ce
typedef struct VAOpenGLVTable *VAOpenGLVTableP;
Packit Service 9402ce
Packit Service 9402ce
struct VAOpenGLVTable {
Packit Service 9402ce
    PFNGLXCREATEPIXMAPPROC              glx_create_pixmap;
Packit Service 9402ce
    PFNGLXDESTROYPIXMAPPROC             glx_destroy_pixmap;
Packit Service 9402ce
    PFNGLXBINDTEXIMAGEEXTPROC           glx_bind_tex_image;
Packit Service 9402ce
    PFNGLXRELEASETEXIMAGEEXTPROC        glx_release_tex_image;
Packit Service 9402ce
    PFNGLGENFRAMEBUFFERSEXTPROC         gl_gen_framebuffers;
Packit Service 9402ce
    PFNGLDELETEFRAMEBUFFERSEXTPROC      gl_delete_framebuffers;
Packit Service 9402ce
    PFNGLBINDFRAMEBUFFEREXTPROC         gl_bind_framebuffer;
Packit Service 9402ce
    PFNGLGENRENDERBUFFERSEXTPROC        gl_gen_renderbuffers;
Packit Service 9402ce
    PFNGLDELETERENDERBUFFERSEXTPROC     gl_delete_renderbuffers;
Packit Service 9402ce
    PFNGLBINDRENDERBUFFEREXTPROC        gl_bind_renderbuffer;
Packit Service 9402ce
    PFNGLRENDERBUFFERSTORAGEEXTPROC     gl_renderbuffer_storage;
Packit Service 9402ce
    PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC gl_framebuffer_renderbuffer;
Packit Service 9402ce
    PFNGLFRAMEBUFFERTEXTURE2DEXTPROC    gl_framebuffer_texture_2d;
Packit Service 9402ce
    PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC  gl_check_framebuffer_status;
Packit Service 9402ce
};
Packit Service 9402ce
Packit Service 9402ce
typedef struct VADisplayContextGLX *VADisplayContextGLXP;
Packit Service 9402ce
typedef struct VADriverContextGLX  *VADriverContextGLXP;
Packit Service 9402ce
typedef struct VASurfaceGLX        *VASurfaceGLXP;
Packit Service 9402ce
typedef struct VADriverVTableGLX   *VADriverVTableGLXP;
Packit Service 9402ce
Packit Service 9402ce
typedef void (*vaDestroyFunc)(VADisplayContextP);
Packit Service 9402ce
Packit Service 9402ce
struct VADisplayContextGLX {
Packit Service 9402ce
    vaDestroyFunc vaDestroy;
Packit Service 9402ce
};
Packit Service 9402ce
Packit Service 9402ce
#define VA_DRIVER_CONTEXT_GLX(ctx) ((VADriverContextGLXP)((ctx)->glx))
Packit Service 9402ce
Packit Service 9402ce
struct VADriverContextGLX {
Packit Service 9402ce
    struct VADriverVTableGLX    vtable;
Packit Service 9402ce
    struct VAOpenGLVTable       gl_vtable;
Packit Service 9402ce
    unsigned int                is_initialized  : 1;
Packit Service 9402ce
};
Packit Service 9402ce
Packit Service 9402ce
#endif /* VA_GLX_PRIVATE_H */