glx: delete __GLXDRIdisplay
this is useless now Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
This commit is contained in:

committed by
Marge Bot

parent
78abf0d145
commit
0d78711cfb
@@ -56,8 +56,6 @@
|
||||
|
||||
struct dri2_display
|
||||
{
|
||||
__GLXDRIdisplay base;
|
||||
|
||||
__glxHashTable *dri2Hash;
|
||||
|
||||
const __DRIextension *loader_extensions[5];
|
||||
@@ -148,11 +146,11 @@ dri2_unbind_context(struct glx_context *context)
|
||||
|
||||
static struct glx_context *
|
||||
dri2_create_context_attribs(struct glx_screen *base,
|
||||
struct glx_config *config_base,
|
||||
struct glx_context *shareList,
|
||||
unsigned num_attribs,
|
||||
const uint32_t *attribs,
|
||||
unsigned *error)
|
||||
struct glx_config *config_base,
|
||||
struct glx_context *shareList,
|
||||
unsigned num_attribs,
|
||||
const uint32_t *attribs,
|
||||
unsigned *error)
|
||||
{
|
||||
struct glx_context *pcp = NULL;
|
||||
struct dri2_screen *psc = (struct dri2_screen *) base;
|
||||
@@ -238,13 +236,13 @@ dri2_create_context_attribs(struct glx_screen *base,
|
||||
|
||||
pcp->driContext =
|
||||
psc->dri2->createContextAttribs(psc->driScreen,
|
||||
dca.api,
|
||||
config ? config->driConfig : NULL,
|
||||
shared,
|
||||
num_ctx_attribs / 2,
|
||||
ctx_attribs,
|
||||
error,
|
||||
pcp);
|
||||
dca.api,
|
||||
config ? config->driConfig : NULL,
|
||||
shared,
|
||||
num_ctx_attribs / 2,
|
||||
ctx_attribs,
|
||||
error,
|
||||
pcp);
|
||||
|
||||
*error = dri_context_error_to_glx_error(*error);
|
||||
|
||||
@@ -344,7 +342,7 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable,
|
||||
|
||||
static int
|
||||
dri2DrawableGetMSC(struct glx_screen *psc, __GLXDRIdrawable *pdraw,
|
||||
int64_t *ust, int64_t *msc, int64_t *sbc)
|
||||
int64_t *ust, int64_t *msc, int64_t *sbc)
|
||||
{
|
||||
xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy);
|
||||
xcb_dri2_get_msc_cookie_t get_msc_cookie;
|
||||
@@ -366,7 +364,7 @@ dri2DrawableGetMSC(struct glx_screen *psc, __GLXDRIdrawable *pdraw,
|
||||
|
||||
static int
|
||||
dri2WaitForMSC(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc)
|
||||
int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc)
|
||||
{
|
||||
xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy);
|
||||
xcb_dri2_wait_msc_cookie_t wait_msc_cookie;
|
||||
@@ -398,7 +396,7 @@ dri2WaitForMSC(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
|
||||
|
||||
static int
|
||||
dri2WaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc)
|
||||
int64_t *msc, int64_t *sbc)
|
||||
{
|
||||
xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy);
|
||||
xcb_dri2_wait_sbc_cookie_t wait_sbc_cookie;
|
||||
@@ -439,8 +437,8 @@ dri2GetCurrentContext()
|
||||
*/
|
||||
static void
|
||||
dri2Throttle(struct dri2_screen *psc,
|
||||
struct dri2_drawable *draw,
|
||||
enum __DRI2throttleReason reason)
|
||||
struct dri2_drawable *draw,
|
||||
enum __DRI2throttleReason reason)
|
||||
{
|
||||
if (psc->throttle) {
|
||||
__DRIcontext *ctx = dri2GetCurrentContext();
|
||||
@@ -477,8 +475,8 @@ dri2Flush(struct dri2_screen *psc,
|
||||
|
||||
static void
|
||||
__dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y,
|
||||
int width, int height,
|
||||
enum __DRI2throttleReason reason, Bool flush)
|
||||
int width, int height,
|
||||
enum __DRI2throttleReason reason, Bool flush)
|
||||
{
|
||||
struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
|
||||
struct dri2_screen *psc = (struct dri2_screen *) pdraw->psc;
|
||||
@@ -510,17 +508,17 @@ __dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y,
|
||||
*/
|
||||
if (priv->have_fake_front)
|
||||
DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region,
|
||||
DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
|
||||
DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
|
||||
|
||||
XFixesDestroyRegion(psc->base.dpy, region);
|
||||
}
|
||||
|
||||
static void
|
||||
dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y,
|
||||
int width, int height, Bool flush)
|
||||
int width, int height, Bool flush)
|
||||
{
|
||||
__dri2CopySubBuffer(pdraw, x, y, width, height,
|
||||
__DRI2_THROTTLE_COPYSUBBUFFER, flush);
|
||||
__DRI2_THROTTLE_COPYSUBBUFFER, flush);
|
||||
}
|
||||
|
||||
|
||||
@@ -705,7 +703,7 @@ dri2XcbSwapBuffers(Display *dpy,
|
||||
|
||||
static int64_t
|
||||
dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder, Bool flush)
|
||||
int64_t remainder, Bool flush)
|
||||
{
|
||||
struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
|
||||
struct dri2_screen *psc = (struct dri2_screen *) priv->base.psc;
|
||||
@@ -713,7 +711,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
|
||||
|
||||
/* Check we have the right attachments */
|
||||
if (!priv->have_back)
|
||||
return ret;
|
||||
return ret;
|
||||
|
||||
__DRIcontext *ctx = dri2GetCurrentContext();
|
||||
unsigned flags = __DRI2_FLUSH_DRAWABLE;
|
||||
@@ -826,7 +824,7 @@ dri2InvalidateBuffers(Display *dpy, XID drawable)
|
||||
|
||||
static void
|
||||
dri2_bind_tex_image(__GLXDRIdrawable *base,
|
||||
int buffer, const int *attrib_list)
|
||||
int buffer, const int *attrib_list)
|
||||
{
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
|
||||
@@ -836,16 +834,16 @@ dri2_bind_tex_image(__GLXDRIdrawable *base,
|
||||
psc = (struct dri2_screen *) base->psc;
|
||||
|
||||
if (psc->texBuffer->base.version >= 2 &&
|
||||
psc->texBuffer->setTexBuffer2 != NULL) {
|
||||
psc->texBuffer->setTexBuffer2(gc->driContext,
|
||||
pdraw->base.textureTarget,
|
||||
pdraw->base.textureFormat,
|
||||
pdraw->driDrawable);
|
||||
psc->texBuffer->setTexBuffer2 != NULL) {
|
||||
psc->texBuffer->setTexBuffer2(gc->driContext,
|
||||
pdraw->base.textureTarget,
|
||||
pdraw->base.textureFormat,
|
||||
pdraw->driDrawable);
|
||||
}
|
||||
else {
|
||||
psc->texBuffer->setTexBuffer(gc->driContext,
|
||||
pdraw->base.textureTarget,
|
||||
pdraw->driDrawable);
|
||||
psc->texBuffer->setTexBuffer(gc->driContext,
|
||||
pdraw->base.textureTarget,
|
||||
pdraw->driDrawable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -971,7 +969,7 @@ static const struct glx_screen_vtable dri2_screen_vtable = {
|
||||
.get_driver_name = dri2_get_driver_name,
|
||||
};
|
||||
|
||||
static struct glx_screen *
|
||||
struct glx_screen *
|
||||
dri2CreateScreen(int screen, struct glx_display * priv, bool driver_name_is_inferred)
|
||||
{
|
||||
const __DRIconfig **driver_configs;
|
||||
@@ -996,7 +994,7 @@ dri2CreateScreen(int screen, struct glx_display * priv, bool driver_name_is_infe
|
||||
}
|
||||
|
||||
if (!DRI2Connect(priv->dpy, RootWindow(priv->dpy, screen),
|
||||
&driverName, &deviceName)) {
|
||||
&driverName, &deviceName)) {
|
||||
glx_screen_cleanup(&psc->base);
|
||||
free(psc);
|
||||
InfoMessageF("screen %d does not appear to be DRI2 capable\n", screen);
|
||||
@@ -1159,7 +1157,7 @@ handle_error:
|
||||
|
||||
/* Called from __glXFreeDisplayPrivate.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
dri2DestroyDisplay(__GLXDRIdisplay * dpy)
|
||||
{
|
||||
struct dri2_display *pdp = (struct dri2_display *) dpy;
|
||||
@@ -1206,9 +1204,6 @@ dri2CreateDisplay(Display * dpy)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pdp->base.destroyDisplay = dri2DestroyDisplay;
|
||||
pdp->base.createScreen = dri2CreateScreen;
|
||||
|
||||
i = 0;
|
||||
pdp->loader_extensions[i++] = &dri2LoaderExtension.base;
|
||||
pdp->loader_extensions[i++] = &dri2UseInvalidate.base;
|
||||
@@ -1221,7 +1216,7 @@ dri2CreateDisplay(Display * dpy)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &pdp->base;
|
||||
return (void*)pdp;
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -789,7 +789,7 @@ static const struct glx_screen_vtable dri3_screen_vtable = {
|
||||
* Initializes the driver for the screen and sets up our structures
|
||||
*/
|
||||
|
||||
static struct glx_screen *
|
||||
struct glx_screen *
|
||||
dri3_create_screen(int screen, struct glx_display * priv, bool driver_name_is_inferred)
|
||||
{
|
||||
xcb_connection_t *c = XGetXCBConnection(priv->dpy);
|
||||
@@ -1045,7 +1045,7 @@ handle_error:
|
||||
*
|
||||
* Called from __glXFreeDisplayPrivate.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
dri3_destroy_display(__GLXDRIdisplay * dpy)
|
||||
{
|
||||
free(dpy);
|
||||
@@ -1072,12 +1072,9 @@ dri3_create_display(Display * dpy)
|
||||
return NULL;
|
||||
pdp->has_multibuffer = has_multibuffer;
|
||||
|
||||
pdp->base.destroyDisplay = dri3_destroy_display;
|
||||
pdp->base.createScreen = dri3_create_screen;
|
||||
|
||||
pdp->loader_extensions = loader_extensions;
|
||||
|
||||
return &pdp->base;
|
||||
return (void*)pdp;
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -64,8 +64,6 @@
|
||||
|
||||
struct dri3_display
|
||||
{
|
||||
__GLXDRIdisplay base;
|
||||
|
||||
const __DRIextension **loader_extensions;
|
||||
int has_multibuffer;
|
||||
};
|
||||
|
@@ -1055,7 +1055,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct glx_screen *
|
||||
struct glx_screen *
|
||||
driswCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred)
|
||||
{
|
||||
const struct drisw_display *pdpyp = (struct drisw_display *)priv->driswDisplay;
|
||||
@@ -1068,7 +1068,7 @@ driswCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_infe
|
||||
|
||||
/* Called from __glXFreeDisplayPrivate.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
driswDestroyDisplay(__GLXDRIdisplay * dpy)
|
||||
{
|
||||
free(dpy);
|
||||
@@ -1088,11 +1088,9 @@ driswCreateDisplay(Display * dpy, enum try_zink zink)
|
||||
if (pdpyp == NULL)
|
||||
return NULL;
|
||||
|
||||
pdpyp->base.destroyDisplay = driswDestroyDisplay;
|
||||
pdpyp->base.createScreen = driswCreateScreen;
|
||||
pdpyp->zink = zink;
|
||||
|
||||
return &pdpyp->base;
|
||||
return (void*)pdpyp;
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -31,7 +31,6 @@
|
||||
|
||||
struct drisw_display
|
||||
{
|
||||
__GLXDRIdisplay base;
|
||||
enum try_zink zink;
|
||||
};
|
||||
|
||||
|
@@ -30,7 +30,6 @@
|
||||
|
||||
struct driwindows_display
|
||||
{
|
||||
__GLXDRIdisplay base;
|
||||
int event_base;
|
||||
};
|
||||
|
||||
@@ -561,9 +560,6 @@ driwindowsCreateDisplay(Display * dpy)
|
||||
if (pdpyp == NULL)
|
||||
return NULL;
|
||||
|
||||
pdpyp->base.destroyDisplay = driwindowsDestroyDisplay;
|
||||
pdpyp->base.createScreen = driwindowsCreateScreen;
|
||||
|
||||
pdpyp->event_base = eventBase;
|
||||
|
||||
return &pdpyp->base;
|
||||
|
@@ -64,7 +64,7 @@ struct glx_context;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
extern void DRI_glXUseXFont(struct glx_context *ctx,
|
||||
Font font, int first, int count, int listbase);
|
||||
Font font, int first, int count, int listbase);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -74,43 +74,33 @@ extern void DRI_glXUseXFont(struct glx_context *ctx,
|
||||
* Display dependent methods. This structure is initialized during the
|
||||
* \c driCreateDisplay call.
|
||||
*/
|
||||
typedef struct __GLXDRIdisplayRec __GLXDRIdisplay;
|
||||
typedef struct __GLXDRIdisplay __GLXDRIdisplay;
|
||||
typedef struct __GLXDRIscreenRec __GLXDRIscreen;
|
||||
typedef struct __GLXDRIdrawableRec __GLXDRIdrawable;
|
||||
|
||||
#define GLX_LOADER_USE_ZINK ((struct glx_screen *)(uintptr_t)-1)
|
||||
|
||||
struct __GLXDRIdisplayRec
|
||||
{
|
||||
/**
|
||||
* Method to destroy the private DRI display data.
|
||||
*/
|
||||
void (*destroyDisplay) (__GLXDRIdisplay * display);
|
||||
|
||||
struct glx_screen *(*createScreen)(int screen, struct glx_display * priv, bool driver_name_is_inferred);
|
||||
};
|
||||
|
||||
struct __GLXDRIscreenRec {
|
||||
|
||||
void (*destroyScreen)(struct glx_screen *psc);
|
||||
|
||||
__GLXDRIdrawable *(*createDrawable)(struct glx_screen *psc,
|
||||
XID drawable,
|
||||
GLXDrawable glxDrawable,
|
||||
int type,
|
||||
struct glx_config *config);
|
||||
XID drawable,
|
||||
GLXDrawable glxDrawable,
|
||||
int type,
|
||||
struct glx_config *config);
|
||||
|
||||
int64_t (*swapBuffers)(__GLXDRIdrawable *pdraw, int64_t target_msc,
|
||||
int64_t divisor, int64_t remainder, Bool flush);
|
||||
int64_t divisor, int64_t remainder, Bool flush);
|
||||
void (*copySubBuffer)(__GLXDRIdrawable *pdraw,
|
||||
int x, int y, int width, int height, Bool flush);
|
||||
int x, int y, int width, int height, Bool flush);
|
||||
int (*getDrawableMSC)(struct glx_screen *psc, __GLXDRIdrawable *pdraw,
|
||||
int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
int (*waitForMSC)(__GLXDRIdrawable *pdraw, int64_t target_msc,
|
||||
int64_t divisor, int64_t remainder, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc);
|
||||
int64_t divisor, int64_t remainder, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc);
|
||||
int (*waitForSBC)(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc);
|
||||
int64_t *msc, int64_t *sbc);
|
||||
int (*setSwapInterval)(__GLXDRIdrawable *pdraw, int interval);
|
||||
int (*getSwapInterval)(__GLXDRIdrawable *pdraw);
|
||||
int (*getBufferAge)(__GLXDRIdrawable *pdraw);
|
||||
@@ -148,6 +138,24 @@ extern __GLXDRIdisplay *dri2CreateDisplay(Display * dpy);
|
||||
extern __GLXDRIdisplay *dri3_create_display(Display * dpy);
|
||||
extern __GLXDRIdisplay *driwindowsCreateDisplay(Display * dpy);
|
||||
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
#ifdef HAVE_DRI3
|
||||
struct glx_screen *dri3_create_screen(int screen, struct glx_display * priv, bool driver_name_is_inferred);
|
||||
void dri3_destroy_display(__GLXDRIdisplay * dpy);
|
||||
#endif
|
||||
|
||||
struct glx_screen *dri2CreateScreen(int screen, struct glx_display * priv, bool driver_name_is_inferred);
|
||||
void dri2DestroyDisplay(__GLXDRIdisplay * dpy);
|
||||
|
||||
struct glx_screen *driswCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred);
|
||||
void driswDestroyDisplay(__GLXDRIdisplay * dpy);
|
||||
#endif
|
||||
|
||||
#ifdef GLX_USE_WINDOWSGL
|
||||
struct glx_screen *driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred);
|
||||
void driwindowsDestroyDisplay(__GLXDRIdisplay * dpy);
|
||||
#endif
|
||||
/*
|
||||
**
|
||||
*/
|
||||
@@ -418,7 +426,7 @@ struct glx_context
|
||||
|
||||
extern Bool
|
||||
glx_context_init(struct glx_context *gc,
|
||||
struct glx_screen *psc, struct glx_config *fbconfig);
|
||||
struct glx_screen *psc, struct glx_config *fbconfig);
|
||||
|
||||
#define __glXSetError(gc,code) \
|
||||
if (!(gc)->error) { \
|
||||
@@ -459,9 +467,9 @@ glx_context_init(struct glx_context *gc,
|
||||
*/
|
||||
struct glx_screen_vtable {
|
||||
struct glx_context *(*create_context)(struct glx_screen *psc,
|
||||
struct glx_config *config,
|
||||
struct glx_context *shareList,
|
||||
int renderType);
|
||||
struct glx_config *config,
|
||||
struct glx_context *shareList,
|
||||
int renderType);
|
||||
|
||||
/* The error outparameter abuses the fact that the only possible errors are
|
||||
* GLXBadContext (0), GLXBadFBConfig (9), GLXBadProfileARB (13), BadValue
|
||||
@@ -469,11 +477,11 @@ struct glx_screen_vtable {
|
||||
* use them directly rather than try to offset or use a sign convention.
|
||||
*/
|
||||
struct glx_context *(*create_context_attribs)(struct glx_screen *psc,
|
||||
struct glx_config *config,
|
||||
struct glx_context *shareList,
|
||||
unsigned num_attrib,
|
||||
const uint32_t *attribs,
|
||||
unsigned *error);
|
||||
struct glx_config *config,
|
||||
struct glx_context *shareList,
|
||||
unsigned num_attrib,
|
||||
const uint32_t *attribs,
|
||||
unsigned *error);
|
||||
int (*query_renderer_integer)(struct glx_screen *psc,
|
||||
int attribute,
|
||||
unsigned int *value);
|
||||
@@ -609,7 +617,7 @@ struct glx_drawable {
|
||||
|
||||
extern int
|
||||
glx_screen_init(struct glx_screen *psc,
|
||||
int screen, struct glx_display * priv);
|
||||
int screen, struct glx_display * priv);
|
||||
extern void
|
||||
glx_screen_cleanup(struct glx_screen *psc);
|
||||
|
||||
@@ -735,7 +743,7 @@ extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
|
||||
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
extern GLboolean
|
||||
__glxGetMscRate(struct glx_screen *psc,
|
||||
int32_t * numerator, int32_t * denominator);
|
||||
int32_t * numerator, int32_t * denominator);
|
||||
|
||||
/* So that dri2.c:DRI2WireToEvent() can access
|
||||
* glx_info->codes->first_event */
|
||||
@@ -753,8 +761,8 @@ applegl_create_screen(int screen, struct glx_display * priv);
|
||||
|
||||
extern struct glx_context *
|
||||
applegl_create_context(struct glx_screen *psc,
|
||||
struct glx_config *mode,
|
||||
struct glx_context *shareList, int renderType);
|
||||
struct glx_config *mode,
|
||||
struct glx_context *shareList, int renderType);
|
||||
|
||||
extern int
|
||||
applegl_create_display(struct glx_display *display);
|
||||
@@ -769,7 +777,7 @@ extern Bool validate_renderType_against_config(const struct glx_config *config,
|
||||
|
||||
extern struct glx_drawable *GetGLXDrawable(Display *dpy, GLXDrawable drawable);
|
||||
extern int InitGLXDrawable(Display *dpy, struct glx_drawable *glxDraw,
|
||||
XID xDrawable, GLXDrawable drawable);
|
||||
XID xDrawable, GLXDrawable drawable);
|
||||
extern void DestroyGLXDrawable(Display *dpy, GLXDrawable drawable);
|
||||
|
||||
extern struct glx_context dummyContext;
|
||||
@@ -778,8 +786,8 @@ extern struct glx_screen *
|
||||
indirect_create_screen(int screen, struct glx_display * priv);
|
||||
extern struct glx_context *
|
||||
indirect_create_context(struct glx_screen *psc,
|
||||
struct glx_config *mode,
|
||||
struct glx_context *shareList, int renderType);
|
||||
struct glx_config *mode,
|
||||
struct glx_context *shareList, int renderType);
|
||||
extern struct glx_context *
|
||||
indirect_create_context_attribs(struct glx_screen *base,
|
||||
struct glx_config *config_base,
|
||||
|
@@ -36,8 +36,8 @@
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/glx.h>
|
||||
|
||||
#define __GLX_MIN_CONFIG_PROPS 18
|
||||
#define __GLX_EXT_CONFIG_PROPS 32
|
||||
#define __GLX_MIN_CONFIG_PROPS 18
|
||||
#define __GLX_EXT_CONFIG_PROPS 32
|
||||
|
||||
/*
|
||||
** Since we send all non-core visual properties as token, value pairs,
|
||||
@@ -152,7 +152,7 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
|
||||
struct glx_drawable *glxDraw = GetGLXDrawable(dpy, awire->drawable);
|
||||
|
||||
if (!glxDraw)
|
||||
return False;
|
||||
return False;
|
||||
|
||||
aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
|
||||
aevent->send_event = (awire->type & 0x80) != 0;
|
||||
@@ -234,7 +234,7 @@ FreeScreenConfigs(struct glx_display * priv)
|
||||
if (psc->driScreen) {
|
||||
psc->driScreen->destroyScreen(psc);
|
||||
} else {
|
||||
free(psc);
|
||||
free(psc);
|
||||
}
|
||||
#else
|
||||
free(psc);
|
||||
@@ -282,22 +282,22 @@ glx_display_free(struct glx_display *priv)
|
||||
|
||||
/* Free the direct rendering per display data */
|
||||
if (priv->driswDisplay)
|
||||
priv->driswDisplay->destroyDisplay(priv->driswDisplay);
|
||||
driswDestroyDisplay(priv->driswDisplay);
|
||||
priv->driswDisplay = NULL;
|
||||
|
||||
#if defined (GLX_USE_DRM)
|
||||
if (priv->dri2Display)
|
||||
priv->dri2Display->destroyDisplay(priv->dri2Display);
|
||||
dri2DestroyDisplay(priv->dri2Display);
|
||||
priv->dri2Display = NULL;
|
||||
|
||||
if (priv->dri3Display)
|
||||
priv->dri3Display->destroyDisplay(priv->dri3Display);
|
||||
dri3_destroy_display(priv->dri3Display);
|
||||
priv->dri3Display = NULL;
|
||||
#endif /* GLX_USE_DRM */
|
||||
|
||||
#if defined(GLX_USE_WINDOWSGL)
|
||||
if (priv->windowsdriDisplay)
|
||||
priv->windowsdriDisplay->destroyDisplay(priv->windowsdriDisplay);
|
||||
driwindowsDestroyDisplay(priv->windowsdriDisplay);
|
||||
priv->windowsdriDisplay = NULL;
|
||||
#endif /* GLX_USE_WINDOWSGL */
|
||||
|
||||
@@ -316,7 +316,7 @@ __glXCloseDisplay(Display * dpy, XExtCodes * codes)
|
||||
for (priv = glx_displays; priv; prev = &priv->next, priv = priv->next) {
|
||||
if (priv->dpy == dpy) {
|
||||
*prev = priv->next;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
@@ -661,7 +661,7 @@ createConfigsFromProperties(Display * dpy, int nvisuals, int nprops,
|
||||
|
||||
static GLboolean
|
||||
getVisualConfigs(struct glx_screen *psc,
|
||||
struct glx_display *priv, int screen)
|
||||
struct glx_display *priv, int screen)
|
||||
{
|
||||
xGLXGetVisualConfigsReq *req;
|
||||
xGLXGetVisualConfigsReply reply;
|
||||
@@ -724,7 +724,7 @@ getFBConfigs(struct glx_screen *psc, struct glx_display *priv, int screen)
|
||||
|
||||
_X_HIDDEN Bool
|
||||
glx_screen_init(struct glx_screen *psc,
|
||||
int screen, struct glx_display * priv)
|
||||
int screen, struct glx_display * priv)
|
||||
{
|
||||
/* Initialize per screen dynamic client GLX extensions */
|
||||
psc->ext_list_first_time = GL_TRUE;
|
||||
@@ -783,25 +783,25 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink,
|
||||
#if defined(GLX_USE_DRM)
|
||||
#if defined(HAVE_DRI3)
|
||||
if (priv->dri3Display)
|
||||
psc = priv->dri3Display->createScreen(i, priv, driver_name_is_inferred);
|
||||
psc = dri3_create_screen(i, priv, driver_name_is_inferred);
|
||||
#endif /* HAVE_DRI3 */
|
||||
#if defined(HAVE_X11_DRI2)
|
||||
if (psc == NULL && priv->dri2Display)
|
||||
psc = priv->dri2Display->createScreen(i, priv, driver_name_is_inferred);
|
||||
psc = dri2CreateScreen(i, priv, driver_name_is_inferred);
|
||||
#endif /* GLX_USE_DRM */
|
||||
|
||||
#ifdef GLX_USE_WINDOWSGL
|
||||
if (psc == NULL && priv->windowsdriDisplay)
|
||||
psc = priv->windowsdriDisplay->createScreen(i, priv, driver_name_is_inferred);
|
||||
psc = driwindowsCreateScreen(i, priv, driver_name_is_inferred);
|
||||
#endif
|
||||
|
||||
if ((psc == GLX_LOADER_USE_ZINK || psc == NULL) && priv->driswDisplay)
|
||||
psc = priv->driswDisplay->createScreen(i, priv, psc == GLX_LOADER_USE_ZINK ? false : driver_name_is_inferred);
|
||||
psc = driswCreateScreen(i, priv, psc == GLX_LOADER_USE_ZINK ? false : driver_name_is_inferred);
|
||||
#endif /* GLX_DIRECT_RENDERING && !GLX_USE_APPLEGL */
|
||||
|
||||
#if defined(GLX_USE_APPLE)
|
||||
if (psc == NULL && priv->driswDisplay) {
|
||||
psc = priv->driswDisplay->createScreen(i, priv);
|
||||
psc = driswCreateScreen(i, priv);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -844,8 +844,8 @@ __glXInitialize(Display * dpy)
|
||||
|
||||
for (dpyPriv = glx_displays; dpyPriv; dpyPriv = dpyPriv->next) {
|
||||
if (dpyPriv->dpy == dpy) {
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
return dpyPriv;
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
return dpyPriv;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,7 +867,7 @@ __glXInitialize(Display * dpy)
|
||||
|
||||
/* This GLX implementation requires GLX 1.3 */
|
||||
if (!QueryVersion(dpy, dpyPriv->codes.major_opcode,
|
||||
&majorVersion, &dpyPriv->minorVersion)
|
||||
&majorVersion, &dpyPriv->minorVersion)
|
||||
|| (majorVersion != 1)
|
||||
|| (majorVersion == 1 && dpyPriv->minorVersion < 3)) {
|
||||
free(dpyPriv);
|
||||
@@ -951,7 +951,7 @@ __glXInitialize(Display * dpy)
|
||||
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
if (try_zink) {
|
||||
free(dpyPriv->screens);
|
||||
dpyPriv->driswDisplay->destroyDisplay(dpyPriv->driswDisplay);
|
||||
driswDestroyDisplay(dpyPriv->driswDisplay);
|
||||
dpyPriv->driswDisplay = driswCreateDisplay(dpy, TRY_ZINK_NO);
|
||||
fail = !AllocAndFetchScreenConfigs(dpy, dpyPriv, False, true);
|
||||
}
|
||||
@@ -970,9 +970,9 @@ __glXInitialize(Display * dpy)
|
||||
|
||||
for (d = glx_displays; d; d = d->next) {
|
||||
if (d->dpy == dpy) {
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
glx_display_free(dpyPriv);
|
||||
return d;
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
glx_display_free(dpyPriv);
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user