dri: drop drisw_util.h
This commit is contained in:
@@ -32,8 +32,8 @@
|
||||
#ifndef DRI_CONTEXT_H
|
||||
#define DRI_CONTEXT_H
|
||||
|
||||
#include "dri_util.h"
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "dri_wrapper.h"
|
||||
#include "postprocess/filters.h"
|
||||
|
||||
struct pipe_context;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef DRI_SCREEN_H
|
||||
#define DRI_SCREEN_H
|
||||
|
||||
#include "dri_wrapper.h"
|
||||
#include "dri_util.h"
|
||||
#include "xmlconfig.h"
|
||||
|
||||
#include "pipe/p_compiler.h"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef DRI_WRAPPER_H
|
||||
#define DRI_WRAPPER_H
|
||||
|
||||
#ifndef __NOT_HAVE_DRM_H
|
||||
#include "dri_util.h"
|
||||
#else
|
||||
#include "drisw_util.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef DRI2_BUFFER_H
|
||||
#define DRI2_BUFFER_H
|
||||
|
||||
#include "dri_wrapper.h"
|
||||
#include "dri_util.h"
|
||||
|
||||
struct pipe_surface;
|
||||
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
* \author Brian Paul <brian@precisioninsight.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* The following structs are shared between DRISW and DRI2, the DRISW structs
|
||||
* are essentially base classes of the DRI2 structs. DRISW needs to compile on
|
||||
* platforms without DRM, so keep the structs opaque to DRM.
|
||||
*/
|
||||
|
||||
#ifndef _DRI_UTIL_H_
|
||||
#define _DRI_UTIL_H_
|
||||
|
||||
@@ -52,11 +58,11 @@
|
||||
#include "main/mtypes.h"
|
||||
#include "xmlconfig.h"
|
||||
|
||||
|
||||
/**
|
||||
* Extensions.
|
||||
*/
|
||||
extern const __DRIcoreExtension driCoreExtension;
|
||||
extern const __DRIswrastExtension driSWRastExtension;
|
||||
extern const __DRIdri2Extension driDRI2Extension;
|
||||
extern const __DRI2configQueryExtension dri2ConfigQueryExtension;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* DRISW utility functions, i.e. dri_util.c stripped from drm-specific bits.
|
||||
*/
|
||||
|
||||
#include "drisw_util.h"
|
||||
#include "dri_util.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
/*
|
||||
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
* All Rights Reserved.
|
||||
* Copyright 2010 George Sapountzis <gsapountzis@gmail.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Binding of the DRI interface (dri_interface.h) for DRISW.
|
||||
*
|
||||
* The DRISW structs are 'base classes' of the corresponding DRI1 / DRI2 (DRM)
|
||||
* structs. The bindings for SW and DRM can be unified by making the DRM structs
|
||||
* 'sub-classes' of the SW structs, either proper or with field re-ordering.
|
||||
*
|
||||
* The code can also be unified but that requires cluttering the common code
|
||||
* with ifdef's and guarding with (__DRIscreen::fd >= 0) for DRM.
|
||||
*/
|
||||
|
||||
#ifndef _DRISW_UTIL_H
|
||||
#define _DRISW_UTIL_H
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/internal/dri_interface.h>
|
||||
#include "main/mtypes.h"
|
||||
|
||||
|
||||
/**
|
||||
* Extensions
|
||||
*/
|
||||
extern const __DRIcoreExtension driCoreExtension;
|
||||
extern const __DRIswrastExtension driSWRastExtension;
|
||||
|
||||
|
||||
/**
|
||||
* Driver callback functions
|
||||
*/
|
||||
struct __DriverAPIRec {
|
||||
const __DRIconfig **(*InitScreen) (__DRIscreen * priv);
|
||||
|
||||
void (*DestroyScreen)(__DRIscreen *driScrnPriv);
|
||||
|
||||
GLboolean (*CreateContext)(gl_api api,
|
||||
const struct gl_config *glVis,
|
||||
__DRIcontext *driContextPriv,
|
||||
void *sharedContextPrivate);
|
||||
|
||||
void (*DestroyContext)(__DRIcontext *driContextPriv);
|
||||
|
||||
GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv,
|
||||
__DRIdrawable *driDrawPriv,
|
||||
const struct gl_config *glVis,
|
||||
GLboolean pixmapBuffer);
|
||||
|
||||
void (*DestroyBuffer)(__DRIdrawable *driDrawPriv);
|
||||
|
||||
void (*SwapBuffers)(__DRIdrawable *driDrawPriv);
|
||||
|
||||
GLboolean (*MakeCurrent)(__DRIcontext *driContextPriv,
|
||||
__DRIdrawable *driDrawPriv,
|
||||
__DRIdrawable *driReadPriv);
|
||||
|
||||
GLboolean (*UnbindContext)(__DRIcontext *driContextPriv);
|
||||
|
||||
__DRIbuffer *(*AllocateBuffer) (__DRIscreen *screenPrivate,
|
||||
unsigned int attachment,
|
||||
unsigned int format,
|
||||
int width, int height);
|
||||
|
||||
void (*ReleaseBuffer) (__DRIscreen *screenPrivate, __DRIbuffer *buffer);
|
||||
};
|
||||
|
||||
extern const struct __DriverAPIRec driDriverAPI;
|
||||
|
||||
|
||||
/**
|
||||
* Data types
|
||||
*/
|
||||
struct __DRIscreenRec {
|
||||
int myNum;
|
||||
|
||||
int fd;
|
||||
|
||||
void *driverPrivate;
|
||||
|
||||
const __DRIextension **extensions;
|
||||
|
||||
const __DRIswrastLoaderExtension *swrast_loader;
|
||||
};
|
||||
|
||||
struct __DRIcontextRec {
|
||||
|
||||
void *driverPrivate;
|
||||
|
||||
void *loaderPrivate;
|
||||
|
||||
__DRIdrawable *driDrawablePriv;
|
||||
|
||||
__DRIdrawable *driReadablePriv;
|
||||
|
||||
__DRIscreen *driScreenPriv;
|
||||
};
|
||||
|
||||
struct __DRIdrawableRec {
|
||||
|
||||
void *driverPrivate;
|
||||
|
||||
void *loaderPrivate;
|
||||
|
||||
__DRIcontext *driContextPriv;
|
||||
|
||||
__DRIscreen *driScreenPriv;
|
||||
|
||||
int refcount;
|
||||
|
||||
/* gallium */
|
||||
unsigned int lastStamp;
|
||||
|
||||
int w, h;
|
||||
};
|
||||
|
||||
#endif /* _DRISW_UTIL_H */
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <GL/gl.h>
|
||||
#include <GL/internal/dri_interface.h>
|
||||
#include "main/mtypes.h"
|
||||
#include "drisw_util.h"
|
||||
#include "dri_util.h"
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user