Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular
This commit is contained in:
commit
c2535f6792
21
.gitignore
vendored
21
.gitignore
vendored
|
@ -116,6 +116,24 @@ hw/dmx/examples/xdmx
|
|||
hw/dmx/examples/xinput
|
||||
hw/dmx/examples/xled
|
||||
hw/dmx/examples/xtest
|
||||
hw/kdrive/ati/Xati
|
||||
hw/kdrive/chips/Xchips
|
||||
hw/kdrive/ephyr/Xephyr
|
||||
hw/kdrive/epson/Xepson
|
||||
hw/kdrive/fake/Xfake
|
||||
hw/kdrive/fbdev/Xfbdev
|
||||
hw/kdrive/i810/Xi810
|
||||
hw/kdrive/mach64/Xmach64
|
||||
hw/kdrive/mga/Xmga
|
||||
hw/kdrive/neomagic/Xneomagic
|
||||
hw/kdrive/nvidia/Xnvidia
|
||||
hw/kdrive/pm2/Xpm2
|
||||
hw/kdrive/r128/Xr128
|
||||
hw/kdrive/sdl/Xsdl
|
||||
hw/kdrive/sis300/Xsis
|
||||
hw/kdrive/smi/Xsmi
|
||||
hw/kdrive/vesa/Xvesa
|
||||
hw/kdrive/via/Xvia
|
||||
hw/vfb/Xvfb
|
||||
hw/vfb/Xvfb.1x
|
||||
hw/vfb/Xvfb.man
|
||||
|
@ -126,6 +144,9 @@ hw/xfree86/doc/man/Xorg.1x
|
|||
hw/xfree86/doc/man/Xorg.man
|
||||
hw/xfree86/doc/man/xorg.conf.5x
|
||||
hw/xfree86/doc/man/xorg.conf.man
|
||||
hw/xfree86/exa/exa.4
|
||||
hw/xfree86/exa/exa.4x
|
||||
hw/xfree86/exa/exa.man
|
||||
hw/xfree86/fbdevhw/fbdevhw.4x
|
||||
hw/xfree86/fbdevhw/fbdevhw.man
|
||||
hw/xfree86/getconfig/cfg.man
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS = glx mesa include
|
||||
SUBDIRS = glx mesa
|
||||
|
||||
# someone could get really crazy someday and add support for the SI...
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/GL/apple/aglGlx.c,v 1.2 2003/09/16 00:36:11 torrey Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/GL/apple/indirect.c,v 1.2 2003/09/16 00:36:11 torrey Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -13,9 +13,7 @@ AM_CFLAGS = \
|
|||
@DRIPROTO_CFLAGS@ \
|
||||
-I@MESA_SOURCE@/src/mesa/glapi \
|
||||
-I@MESA_SOURCE@/src/mesa/main \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
-DNO_LIBCWRAPPER \
|
||||
@GLX_DEFINES@
|
||||
|
||||
|
@ -43,13 +41,11 @@ libglx_la_SOURCES = \
|
|||
glapi.c \
|
||||
glcontextmodes.c \
|
||||
glcontextmodes.h \
|
||||
global.c \
|
||||
glthread.c \
|
||||
glxcmds.c \
|
||||
glxcmdsswap.c \
|
||||
glxcontext.h \
|
||||
glxdrawable.h \
|
||||
glxerror.h \
|
||||
glxext.c \
|
||||
glxext.h \
|
||||
glxvisuals.c \
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.5 2004/01/28 18:11:50 alanh Exp $ */
|
||||
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
|
@ -47,7 +46,7 @@ __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
|
|||
__glXMakeCurrent,
|
||||
__glXIsDirect,
|
||||
__glXQueryVersion,
|
||||
__glXWaitGL,
|
||||
__glXWaitGL, /* 0x08 */
|
||||
__glXWaitX,
|
||||
__glXCopyContext,
|
||||
__glXSwapBuffers,
|
||||
|
@ -55,23 +54,23 @@ __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
|
|||
__glXCreateGLXPixmap,
|
||||
__glXGetVisualConfigs,
|
||||
__glXDestroyGLXPixmap,
|
||||
__glXVendorPrivate,
|
||||
__glXVendorPrivate, /* 0x10 */
|
||||
__glXVendorPrivateWithReply,
|
||||
__glXQueryExtensionsString,
|
||||
__glXQueryServerString,
|
||||
__glXClientInfo,
|
||||
__glXGetFBConfigs,
|
||||
__glXCreatePixmap,
|
||||
__glXDestroyGLXPixmap, /* glXDestroyPixmap */
|
||||
__glXCreateNewContext,
|
||||
__glXNoSuchSingleOpcode, /* glXQueryContext */
|
||||
__glXDestroyPixmap,
|
||||
__glXCreateNewContext, /* 0x18 */
|
||||
__glXQueryContext,
|
||||
__glXMakeContextCurrent,
|
||||
__glXNoSuchSingleOpcode, /* glXCreatePbuffer */
|
||||
__glXNoSuchSingleOpcode, /* glXDestroyPbuffer */
|
||||
__glXNoSuchSingleOpcode, /* glXGetDrawableAttributes */
|
||||
__glXNoSuchSingleOpcode, /* glXChangeDrawableAttributes */
|
||||
__glXNoSuchSingleOpcode, /* glXCreateWindow */
|
||||
__glXNoSuchSingleOpcode, /* glXDestroyWindow */
|
||||
__glXCreatePbuffer,
|
||||
__glXDestroyPbuffer,
|
||||
__glXGetDrawableAttributes,
|
||||
__glXChangeDrawableAttributes,
|
||||
__glXCreateWindow,
|
||||
__glXDestroyWindow, /* 0x20 */
|
||||
__glXNoSuchSingleOpcode,
|
||||
__glXNoSuchSingleOpcode,
|
||||
__glXNoSuchSingleOpcode,
|
||||
|
@ -448,7 +447,7 @@ __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
|
|||
__glXSwapMakeCurrent,
|
||||
__glXSwapIsDirect,
|
||||
__glXSwapQueryVersion,
|
||||
__glXSwapWaitGL,
|
||||
__glXSwapWaitGL, /* 0x08 */
|
||||
__glXSwapWaitX,
|
||||
__glXSwapCopyContext,
|
||||
__glXSwapSwapBuffers,
|
||||
|
@ -456,23 +455,23 @@ __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
|
|||
__glXSwapCreateGLXPixmap,
|
||||
__glXSwapGetVisualConfigs,
|
||||
__glXSwapDestroyGLXPixmap,
|
||||
__glXSwapVendorPrivate,
|
||||
__glXSwapVendorPrivate, /* 0x10 */
|
||||
__glXSwapVendorPrivateWithReply,
|
||||
__glXSwapQueryExtensionsString,
|
||||
__glXSwapQueryServerString,
|
||||
__glXSwapClientInfo,
|
||||
__glXSwapGetFBConfigs,
|
||||
__glXSwapCreatePixmap,
|
||||
__glXSwapDestroyGLXPixmap, /* glXDestroyPixmap */
|
||||
__glXSwapCreateNewContext,
|
||||
__glXNoSuchSingleOpcode, /* glXQueryContext */
|
||||
__glXSwapDestroyPixmap,
|
||||
__glXSwapCreateNewContext, /* 0x18 */
|
||||
__glXSwapQueryContext,
|
||||
__glXSwapMakeContextCurrent,
|
||||
__glXNoSuchSingleOpcode, /* glXCreatePbuffer */
|
||||
__glXNoSuchSingleOpcode, /* glXDestroyPbuffer */
|
||||
__glXNoSuchSingleOpcode, /* glXGetDrawableAttributes */
|
||||
__glXNoSuchSingleOpcode, /* glXChangeDrawableAttributes */
|
||||
__glXNoSuchSingleOpcode, /* glXCreateWindow */
|
||||
__glXNoSuchSingleOpcode, /* glXDestroyWindow */
|
||||
__glXSwapCreatePbuffer,
|
||||
__glXSwapDestroyPbuffer,
|
||||
__glXSwapGetDrawableAttributes,
|
||||
__glXSwapChangeDrawableAttributes,
|
||||
__glXSwapCreateWindow,
|
||||
__glXSwapDestroyWindow, /* 0x20 */
|
||||
__glXNoSuchSingleOpcode,
|
||||
__glXNoSuchSingleOpcode,
|
||||
__glXNoSuchSingleOpcode,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.4 2003/09/28 20:15:42 alanh Exp $ */
|
||||
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
@ -48,6 +47,7 @@ extern int __glXCopyContext(__GLXclientState*, GLbyte*);
|
|||
extern int __glXSwapBuffers(__GLXclientState*, GLbyte*);
|
||||
extern int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXUseXFont(__GLXclientState*, GLbyte*);
|
||||
extern int __glXCreateGLXPixmap(__GLXclientState*, GLbyte*);
|
||||
|
@ -60,8 +60,17 @@ extern int __glXQueryServerString(__GLXclientState*, GLbyte*);
|
|||
extern int __glXClientInfo(__GLXclientState*, GLbyte*);
|
||||
extern int __glXMakeContextCurrent(__GLXclientState*, GLbyte*);
|
||||
extern int __glXGetFBConfigs(__GLXclientState*, GLbyte*);
|
||||
extern int __glXCreateNewContext(__GLXclientState*, GLbyte*);
|
||||
extern int __glXCreatePixmap(__GLXclientState*, GLbyte*);
|
||||
extern int __glXDestroyPixmap(__GLXclientState*, GLbyte*);
|
||||
extern int __glXCreateNewContext(__GLXclientState*, GLbyte*);
|
||||
extern int __glXQueryContext(__GLXclientState*, GLbyte*);
|
||||
extern int __glXMakeContextCurrent(__GLXclientState*, GLbyte*);
|
||||
extern int __glXCreatePbuffer(__GLXclientState*, GLbyte*);
|
||||
extern int __glXDestroyPbuffer(__GLXclientState*, GLbyte*);
|
||||
extern int __glXGetDrawableAttributes(__GLXclientState*, GLbyte*);
|
||||
extern int __glXChangeDrawableAttributes(__GLXclientState*, GLbyte*);
|
||||
extern int __glXCreateWindow(__GLXclientState*, GLbyte*);
|
||||
extern int __glXDestroyWindow(__GLXclientState*, GLbyte*);
|
||||
|
||||
extern int __glXSwapRender(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapRenderLarge(__GLXclientState*, GLbyte*);
|
||||
|
@ -76,6 +85,7 @@ extern int __glXSwapCopyContext(__GLXclientState*, GLbyte*);
|
|||
extern int __glXSwapSwapBuffers(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXSwapUseXFont(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapCreateGLXPixmap(__GLXclientState*, GLbyte*);
|
||||
|
@ -88,8 +98,18 @@ extern int __glXSwapQueryServerString(__GLXclientState*, GLbyte*);
|
|||
extern int __glXSwapClientInfo(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapMakeContextCurrent(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapGetFBConfigs(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapCreateNewContext(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapCreatePixmap(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapDestroyPixmap(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapCreateNewContext(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapQueryContext(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapMakeContextCurrent(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapCreatePbuffer(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapDestroyPbuffer(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapGetDrawableAttributes(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapChangeDrawableAttributes(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapCreateWindow(__GLXclientState*, GLbyte*);
|
||||
extern int __glXSwapDestroyWindow(__GLXclientState*, GLbyte*);
|
||||
|
||||
|
||||
#define __GLX_MIN_GLXCMD_OPCODE 1
|
||||
#define __GLX_MAX_GLXCMD_OPCODE 20
|
||||
|
@ -105,4 +125,11 @@ extern __GLXdispatchRenderProcPtr __glXRenderTable[__GLX_RENDER_TABLE_SIZE];
|
|||
extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE];
|
||||
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE];
|
||||
extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE];
|
||||
|
||||
/* Copied from mesa src/glx/x11/glxcmds.c
|
||||
*
|
||||
* Apparently there's no standardized opcode for this extension.
|
||||
*/
|
||||
#define X_GLXvop_CopySubBufferMESA 5154 /* temporary */
|
||||
|
||||
#endif /* _GLX_g_disptab_h_ */
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.c,v 1.5 2004/01/28 18:11:50 alanh Exp $ */
|
||||
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.5 2004/01/28 18:11:50 alanh Exp $ */
|
||||
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
/* $XFree86$ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: The application programming interfaces
|
||||
** established by SGI in conjunction with the Original Code are The
|
||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
|
||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
|
||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
|
||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
|
||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
*/
|
||||
|
||||
#define NEED_REPLIES
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "glxserver.h"
|
||||
|
||||
/*
|
||||
** The last context used by the server. It is the context that is current
|
||||
** from the server's perspective.
|
||||
*/
|
||||
__GLXcontext *__glXLastContext;
|
||||
|
||||
/*
|
||||
** X resources.
|
||||
*/
|
||||
RESTYPE __glXContextRes;
|
||||
RESTYPE __glXClientRes;
|
||||
RESTYPE __glXPixmapRes;
|
||||
RESTYPE __glXDrawableRes;
|
||||
RESTYPE __glXSwapBarrierRes;
|
||||
|
||||
/*
|
||||
** Error codes with the extension error base already added in.
|
||||
*/
|
||||
int __glXBadContext, __glXBadContextState, __glXBadDrawable, __glXBadPixmap;
|
||||
int __glXBadContextTag, __glXBadCurrentWindow;
|
||||
int __glXBadRenderRequest, __glXBadLargeRequest;
|
||||
int __glXUnsupportedPrivateRequest;
|
||||
|
||||
/*
|
||||
** Reply for most singles.
|
||||
*/
|
||||
xGLXSingleReply __glXReply;
|
||||
|
||||
/*
|
||||
** A set of state for each client. The 0th one is unused because client
|
||||
** indices start at 1, not 0.
|
||||
*/
|
||||
__GLXclientState *__glXClients[MAXCLIENTS+1];
|
||||
|
542
GL/glx/glxcmds.c
542
GL/glx/glxcmds.c
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.12 2004/01/28 18:11:50 alanh Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -188,7 +187,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
|
|||
shareglxc = (__GLXcontext *) LookupIDByType(shareList, __glXContextRes);
|
||||
if (!shareglxc) {
|
||||
client->errorValue = shareList;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
if (shareglxc->isDirect) {
|
||||
/*
|
||||
|
@ -301,7 +300,7 @@ int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
} else {
|
||||
client->errorValue = gcId;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -445,61 +444,95 @@ int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
|
|||
* is added.
|
||||
*/
|
||||
static int GetDrawableOrPixmap( __GLXcontext *glxc, GLXDrawable drawId,
|
||||
DrawablePtr *ppDraw, __GLXpixmap **ppPixmap,
|
||||
__GLXdrawable **ppGlxDraw,
|
||||
__GLXpixmap **ppPixmap,
|
||||
ClientPtr client )
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
__GLcontextModes *modes;
|
||||
__GLXdrawable *pGlxDraw;
|
||||
__GLXpixmap *drawPixmap = NULL;
|
||||
|
||||
/* This is the GLX 1.3 case - the client passes in a GLXWindow and
|
||||
* we just return the __GLXdrawable. The first time a GLXPixmap
|
||||
* comes in, it doesn't have a corresponding __GLXdrawable, so it
|
||||
* falls through to the else-case below, but after that it'll have
|
||||
* a __GLXdrawable and we'll handle it here. */
|
||||
pGlxDraw = (__GLXdrawable *) LookupIDByType(drawId, __glXDrawableRes);
|
||||
if (pGlxDraw != NULL) {
|
||||
if (glxc != NULL && pGlxDraw->modes != glxc->modes) {
|
||||
client->errorValue = drawId;
|
||||
return BadMatch;
|
||||
}
|
||||
|
||||
*ppGlxDraw = pGlxDraw;
|
||||
*ppPixmap = pGlxDraw->pGlxPixmap;
|
||||
return Success;
|
||||
}
|
||||
|
||||
/* The drawId wasn't a GLXWindow, so presumably it's a regular X
|
||||
* window. In that case, we create a shadow GLXWindow for it on
|
||||
* demand here for pre GLX 1.3 compatibility and use the X Window
|
||||
* XID as its GLXWindow XID. The client can't explicitly create a
|
||||
* GLXWindow with the same XID as an X Window, so we wont get any
|
||||
* resource ID clashes. Effectively, the X Window is now also a
|
||||
* GLXWindow. */
|
||||
pDraw = (DrawablePtr) LookupDrawable(drawId, client);
|
||||
if (pDraw) {
|
||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
||||
/*
|
||||
** Drawable is an X Window.
|
||||
*/
|
||||
WindowPtr pWin = (WindowPtr)pDraw;
|
||||
VisualID vid = wVisual(pWin);
|
||||
VisualID vid = wVisual((WindowPtr)pDraw);
|
||||
|
||||
/*
|
||||
** Check if window and context are similar.
|
||||
*/
|
||||
if ((vid != glxc->pVisual->vid) ||
|
||||
(pWin->drawable.pScreen != glxc->pScreen)) {
|
||||
client->errorValue = drawId;
|
||||
return BadMatch;
|
||||
}
|
||||
modes = _gl_context_modes_find_visual(glxc->pGlxScreen->modes,
|
||||
vid);
|
||||
} else {
|
||||
/*
|
||||
** An X Pixmap is not allowed as a parameter (a GLX Pixmap
|
||||
** is, but it must first be created with glxCreateGLXPixmap).
|
||||
*/
|
||||
client->errorValue = drawId;
|
||||
return __glXBadDrawable;
|
||||
return __glXError(GLXBadDrawable);
|
||||
}
|
||||
} else {
|
||||
drawPixmap = (__GLXpixmap *) LookupIDByType(drawId, __glXPixmapRes);
|
||||
if (drawPixmap) {
|
||||
/*
|
||||
** Check if pixmap and context are similar.
|
||||
*/
|
||||
if (drawPixmap->pScreen != glxc->pScreen ||
|
||||
drawPixmap->modes->visualID != glxc->modes->visualID) {
|
||||
client->errorValue = drawId;
|
||||
return BadMatch;
|
||||
}
|
||||
pDraw = drawPixmap->pDraw;
|
||||
|
||||
modes = drawPixmap->modes;
|
||||
} else {
|
||||
/*
|
||||
** Drawable is neither a Window nor a GLXPixmap.
|
||||
*/
|
||||
client->errorValue = drawId;
|
||||
return __glXBadDrawable;
|
||||
return __glXError(GLXBadDrawable);
|
||||
}
|
||||
}
|
||||
|
||||
/* If we're not given a context, don't create the __GLXdrawable */
|
||||
if (glxc == NULL) {
|
||||
*ppPixmap = NULL;
|
||||
*ppGlxDraw = NULL;
|
||||
return Success;
|
||||
}
|
||||
|
||||
/* We're binding an X Window or a GLX Pixmap for the first time
|
||||
* and need to create a GLX drawable for it. First check that the
|
||||
* drawable screen and fbconfig matches the context ditto. */
|
||||
if (pDraw->pScreen != glxc->pScreen || modes != glxc->modes) {
|
||||
client->errorValue = drawId;
|
||||
return BadMatch;
|
||||
}
|
||||
|
||||
pGlxDraw =
|
||||
glxc->pGlxScreen->createDrawable(glxc->pGlxScreen,
|
||||
pDraw, drawId, modes);
|
||||
|
||||
/* since we are creating the drawablePrivate, drawId should be new */
|
||||
if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) {
|
||||
pGlxDraw->destroy (pGlxDraw);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
*ppPixmap = drawPixmap;
|
||||
*ppDraw = pDraw;
|
||||
*ppGlxDraw = pGlxDraw;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -510,8 +543,6 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
GLXContextID contextId, GLXContextTag tag )
|
||||
{
|
||||
ClientPtr client = cl->client;
|
||||
DrawablePtr pDraw;
|
||||
DrawablePtr pRead;
|
||||
xGLXMakeCurrentReply reply;
|
||||
__GLXpixmap *drawPixmap = NULL;
|
||||
__GLXpixmap *readPixmap = NULL;
|
||||
|
@ -542,12 +573,12 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
/*
|
||||
** Tag for previous context is invalid.
|
||||
*/
|
||||
return __glXBadContextTag;
|
||||
return __glXError(GLXBadContextTag);
|
||||
}
|
||||
if (prevglxc->renderMode != GL_RENDER) {
|
||||
/* Oops. Not in render mode render. */
|
||||
client->errorValue = prevglxc->id;
|
||||
return __glXBadContextState;
|
||||
return __glXError(GLXBadContextState);
|
||||
}
|
||||
} else {
|
||||
prevglxc = 0;
|
||||
|
@ -562,7 +593,7 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
glxc = (__GLXcontext *) LookupIDByType(contextId, __glXContextRes);
|
||||
if (!glxc) {
|
||||
client->errorValue = contextId;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
if ((glxc != prevglxc) && glxc->isCurrent) {
|
||||
/* Context is current to somebody else */
|
||||
|
@ -572,36 +603,18 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
assert( drawId != None );
|
||||
assert( readId != None );
|
||||
|
||||
status = GetDrawableOrPixmap( glxc, drawId, & pDraw, & drawPixmap,
|
||||
client );
|
||||
status = GetDrawableOrPixmap(glxc, drawId, &drawPriv, &drawPixmap,
|
||||
client);
|
||||
if ( status != 0 ) {
|
||||
return status;
|
||||
}
|
||||
|
||||
if ( readId != drawId ) {
|
||||
status = GetDrawableOrPixmap( glxc, readId, & pRead, & readPixmap,
|
||||
client );
|
||||
status = GetDrawableOrPixmap(glxc, readId, &readPriv, &readPixmap,
|
||||
client);
|
||||
if ( status != 0 ) {
|
||||
return status;
|
||||
}
|
||||
} else {
|
||||
pRead = pDraw;
|
||||
}
|
||||
|
||||
/* FIXME: Finish refactoring this. - idr */
|
||||
/* get the drawable private */
|
||||
if (pDraw) {
|
||||
drawPriv = __glXGetDrawable(glxc, pDraw, drawId);
|
||||
if (drawPriv == NULL) {
|
||||
return __glXBadDrawable;
|
||||
}
|
||||
}
|
||||
|
||||
if (pRead != pDraw) {
|
||||
readPriv = __glXGetDrawable(glxc, pRead, readId);
|
||||
if (readPriv == NULL) {
|
||||
return __glXBadDrawable;
|
||||
}
|
||||
} else {
|
||||
readPriv = drawPriv;
|
||||
}
|
||||
|
@ -609,8 +622,8 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
} else {
|
||||
/* Switching to no context. Ignore new drawable. */
|
||||
glxc = 0;
|
||||
pDraw = 0;
|
||||
pRead = 0;
|
||||
drawPriv = 0;
|
||||
readPriv = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -631,7 +644,7 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
** Make the previous context not current.
|
||||
*/
|
||||
if (!(*prevglxc->loseCurrent)(prevglxc)) {
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
__glXFlushContextCache();
|
||||
__glXDeassociateContext(prevglxc);
|
||||
|
@ -647,7 +660,7 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
if (!(*glxc->makeCurrent)(glxc)) {
|
||||
glxc->drawPriv = NULL;
|
||||
glxc->readPriv = NULL;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
/* resize the buffers */
|
||||
|
@ -656,7 +669,7 @@ int DoMakeCurrent( __GLXclientState *cl,
|
|||
(*glxc->loseCurrent)(glxc);
|
||||
glxc->drawPriv = NULL;
|
||||
glxc->readPriv = NULL;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
glxc->isCurrent = GL_TRUE;
|
||||
|
@ -750,7 +763,7 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
|
|||
glxc = (__GLXcontext *) LookupIDByType(req->context, __glXContextRes);
|
||||
if (!glxc) {
|
||||
client->errorValue = req->context;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
reply.isDirect = glxc->isDirect;
|
||||
|
@ -844,12 +857,12 @@ int __glXCopyContext(__GLXclientState *cl, GLbyte *pc)
|
|||
src = (__GLXcontext *) LookupIDByType(source, __glXContextRes);
|
||||
if (!src) {
|
||||
client->errorValue = source;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
dst = (__GLXcontext *) LookupIDByType(dest, __glXContextRes);
|
||||
if (!dst) {
|
||||
client->errorValue = dest;
|
||||
return __glXBadContext;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -874,7 +887,7 @@ int __glXCopyContext(__GLXclientState *cl, GLbyte *pc)
|
|||
__GLXcontext *tagcx = __glXLookupContextByTag(cl, tag);
|
||||
|
||||
if (!tagcx) {
|
||||
return __glXBadContextTag;
|
||||
return __glXError(GLXBadContextTag);
|
||||
}
|
||||
if (tagcx != src) {
|
||||
/*
|
||||
|
@ -1187,82 +1200,84 @@ int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
|
|||
return DoGetFBConfigs( cl, req->screen, GL_FALSE );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Create a GLX Pixmap from an X Pixmap.
|
||||
*/
|
||||
int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual,
|
||||
GLuint screenNum, XID pixmapId, XID glxpixmapId)
|
||||
static int ValidateCreateDrawable(ClientPtr client,
|
||||
int screenNum, XID fbconfigId,
|
||||
XID drawablId, XID glxDrawableId,
|
||||
int type, __GLcontextModes **modes,
|
||||
DrawablePtr *ppDraw)
|
||||
{
|
||||
ClientPtr client = cl->client;
|
||||
DrawablePtr pDraw;
|
||||
ScreenPtr pScreen;
|
||||
VisualPtr pVisual;
|
||||
__GLXpixmap *pGlxPixmap;
|
||||
__GLXscreen *pGlxScreen;
|
||||
__GLcontextModes *modes;
|
||||
int i;
|
||||
|
||||
LEGAL_NEW_RESOURCE(glxpixmapId, client);
|
||||
|
||||
pDraw = (DrawablePtr) LookupDrawable(pixmapId, client);
|
||||
if (!pDraw || pDraw->type != DRAWABLE_PIXMAP) {
|
||||
client->errorValue = pixmapId;
|
||||
return BadPixmap;
|
||||
LEGAL_NEW_RESOURCE(glxDrawableId, client);
|
||||
|
||||
pDraw = (DrawablePtr) LookupDrawable(drawablId, client);
|
||||
if (!pDraw || pDraw->type != type) {
|
||||
client->errorValue = drawablId;
|
||||
return type == DRAWABLE_WINDOW ? BadWindow : BadPixmap;
|
||||
}
|
||||
|
||||
/*
|
||||
** Check if screen of visual matches screen of pixmap.
|
||||
*/
|
||||
/* Check if screen of the fbconfig matches screen of drawable. */
|
||||
pScreen = pDraw->pScreen;
|
||||
if (screenNum != pScreen->myNum) {
|
||||
return BadMatch;
|
||||
}
|
||||
|
||||
/*
|
||||
** Find the VisualRec for this visual.
|
||||
*/
|
||||
/* If this fbconfig has a corresponding VisualRec the number of
|
||||
* planes must match the drawable depth. */
|
||||
pVisual = pScreen->visuals;
|
||||
for (i=0; i < pScreen->numVisuals; i++, pVisual++) {
|
||||
if (pVisual->vid == visual) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == pScreen->numVisuals) {
|
||||
client->errorValue = visual;
|
||||
return BadValue;
|
||||
}
|
||||
/*
|
||||
** Check if depth of visual matches depth of pixmap.
|
||||
*/
|
||||
if (pVisual->nplanes != pDraw->depth) {
|
||||
return BadMatch;
|
||||
for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
|
||||
if (pVisual->vid == fbconfigId && pVisual->nplanes != pDraw->depth)
|
||||
return BadMatch;
|
||||
}
|
||||
|
||||
/*
|
||||
** Get configuration of the visual.
|
||||
*/
|
||||
pGlxScreen = __glXActiveScreens[screenNum];
|
||||
modes = _gl_context_modes_find_visual( pGlxScreen->modes, visual );
|
||||
if (modes == NULL) {
|
||||
/*
|
||||
** Visual not support on this screen by this OpenGL implementation.
|
||||
*/
|
||||
client->errorValue = visual;
|
||||
/* Get configuration of the visual. */
|
||||
pGlxScreen = __glXgetActiveScreen(screenNum);
|
||||
*modes = _gl_context_modes_find_visual(pGlxScreen->modes, fbconfigId);
|
||||
if (*modes == NULL) {
|
||||
/* Visual not support on this screen by this OpenGL implementation. */
|
||||
client->errorValue = fbconfigId;
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
*ppDraw = pDraw;
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
/*
|
||||
** Create a GLX Pixmap from an X Pixmap.
|
||||
*/
|
||||
int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId,
|
||||
GLuint screenNum, XID pixmapId, XID glxPixmapId)
|
||||
{
|
||||
ClientPtr client = cl->client;
|
||||
DrawablePtr pDraw;
|
||||
__GLXpixmap *pGlxPixmap;
|
||||
__GLcontextModes *modes;
|
||||
int retval;
|
||||
|
||||
retval = ValidateCreateDrawable (client, screenNum, fbconfigId,
|
||||
pixmapId, glxPixmapId,
|
||||
DRAWABLE_PIXMAP, &modes, &pDraw);
|
||||
if (retval != Success)
|
||||
return retval;
|
||||
|
||||
pGlxPixmap = (__GLXpixmap *) xalloc(sizeof(__GLXpixmap));
|
||||
if (!pGlxPixmap) {
|
||||
return BadAlloc;
|
||||
}
|
||||
if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
|
||||
if (!(AddResource(glxPixmapId, __glXPixmapRes, pGlxPixmap))) {
|
||||
return BadAlloc;
|
||||
}
|
||||
pGlxPixmap->pDraw = pDraw;
|
||||
pGlxPixmap->pGlxScreen = pGlxScreen;
|
||||
pGlxPixmap->pScreen = pScreen;
|
||||
pGlxPixmap->pGlxScreen = __glXgetActiveScreen(screenNum);
|
||||
pGlxPixmap->pScreen = pDraw->pScreen;
|
||||
pGlxPixmap->idExists = True;
|
||||
pGlxPixmap->pDamage = NULL;
|
||||
pGlxPixmap->refcnt = 0;
|
||||
|
||||
pGlxPixmap->modes = modes;
|
||||
|
@ -1298,28 +1313,114 @@ int __glXCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Destroy a GLX pixmap. This function is used for both
|
||||
* \c glXDestroyGLXPixmap and \c glXDestroyPixmap.
|
||||
*/
|
||||
|
||||
int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
|
||||
int DoDestroyPixmap(__GLXclientState *cl, XID glxpixmap)
|
||||
{
|
||||
ClientPtr client = cl->client;
|
||||
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
||||
XID glxpixmap = req->glxpixmap;
|
||||
|
||||
/*
|
||||
** Check if it's a valid GLX pixmap.
|
||||
*/
|
||||
if (!LookupIDByType(glxpixmap, __glXPixmapRes)) {
|
||||
client->errorValue = glxpixmap;
|
||||
return __glXBadPixmap;
|
||||
return __glXError(GLXBadPixmap);
|
||||
}
|
||||
FreeResource(glxpixmap, FALSE);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
||||
|
||||
return DoDestroyPixmap(cl, req->glxpixmap);
|
||||
}
|
||||
|
||||
int __glXDestroyPixmap(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXDestroyPixmapReq *req = (xGLXDestroyPixmapReq *) pc;
|
||||
|
||||
return DoDestroyPixmap(cl, req->glxpixmap);
|
||||
}
|
||||
|
||||
int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
|
||||
|
||||
(void) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
|
||||
|
||||
(void) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXChangeDrawableAttributesReq *req =
|
||||
(xGLXChangeDrawableAttributesReq *) pc;
|
||||
|
||||
(void) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
|
||||
ClientPtr client = cl->client;
|
||||
DrawablePtr pDraw;
|
||||
__GLXdrawable *glxPriv;
|
||||
__GLXscreen *screen;
|
||||
__GLcontextModes *modes;
|
||||
int retval;
|
||||
|
||||
retval = ValidateCreateDrawable (client, req->screen, req->fbconfig,
|
||||
req->window, req->glxwindow,
|
||||
DRAWABLE_WINDOW, &modes, &pDraw);
|
||||
if (retval != Success)
|
||||
return retval;
|
||||
|
||||
/* FIXME: We need to check that the window visual is compatible
|
||||
* with the specified fbconfig. */
|
||||
|
||||
screen = __glXgetActiveScreen(req->screen);
|
||||
glxPriv = screen->createDrawable(screen, pDraw, req->glxwindow, modes);
|
||||
if (glxPriv == NULL)
|
||||
return BadAlloc;
|
||||
|
||||
if (!AddResource(req->glxwindow, __glXDrawableRes, glxPriv)) {
|
||||
glxPriv->destroy (glxPriv);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
|
||||
ClientPtr client = cl->client;
|
||||
|
||||
/*
|
||||
** Check if it's a valid GLX window.
|
||||
*/
|
||||
if (!LookupIDByType(req->glxwindow, __glXDrawableRes)) {
|
||||
client->errorValue = req->glxwindow;
|
||||
return __glXError(GLXBadWindow);
|
||||
}
|
||||
FreeResource(req->glxwindow, FALSE);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -1330,50 +1431,18 @@ int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
|
|||
int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
ClientPtr client = cl->client;
|
||||
DrawablePtr pDraw;
|
||||
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
|
||||
GLXContextTag tag = req->contextTag;
|
||||
XID drawId = req->drawable;
|
||||
__GLXpixmap *pGlxPixmap;
|
||||
__GLXcontext *glxc = NULL;
|
||||
__GLXdrawable *pGlxDraw;
|
||||
__GLXpixmap *pPixmap;
|
||||
int error;
|
||||
|
||||
/*
|
||||
** Check that the GLX drawable is valid.
|
||||
*/
|
||||
pDraw = (DrawablePtr) LookupDrawable(drawId, client);
|
||||
if (pDraw) {
|
||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
||||
/*
|
||||
** Drawable is an X window.
|
||||
*/
|
||||
} else {
|
||||
/*
|
||||
** Drawable is an X pixmap, which is not allowed.
|
||||
*/
|
||||
client->errorValue = drawId;
|
||||
return __glXBadDrawable;
|
||||
}
|
||||
} else {
|
||||
pGlxPixmap = (__GLXpixmap *) LookupIDByType(drawId,
|
||||
__glXPixmapRes);
|
||||
if (pGlxPixmap) {
|
||||
/*
|
||||
** Drawable is a GLX pixmap.
|
||||
*/
|
||||
} else {
|
||||
/*
|
||||
** Drawable is neither a X window nor a GLX pixmap.
|
||||
*/
|
||||
client->errorValue = drawId;
|
||||
return __glXBadDrawable;
|
||||
}
|
||||
}
|
||||
|
||||
if (tag) {
|
||||
glxc = __glXLookupContextByTag(cl, tag);
|
||||
if (!glxc) {
|
||||
return __glXBadContextTag;
|
||||
return __glXError(GLXBadContextTag);
|
||||
}
|
||||
/*
|
||||
** The calling thread is swapping its current drawable. In this case,
|
||||
|
@ -1392,47 +1461,31 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
|
|||
}
|
||||
}
|
||||
|
||||
if (pDraw) {
|
||||
__GLXdrawable *glxPriv;
|
||||
error = GetDrawableOrPixmap(glxc, drawId, &pGlxDraw, &pPixmap, client);
|
||||
if (error != Success)
|
||||
return error;
|
||||
|
||||
if (glxc) {
|
||||
glxPriv = __glXGetDrawable(glxc, pDraw, drawId);
|
||||
if (glxPriv == NULL) {
|
||||
return __glXBadDrawable;
|
||||
}
|
||||
}
|
||||
else {
|
||||
glxPriv = __glXFindDrawable(drawId);
|
||||
if (glxPriv == NULL) {
|
||||
/* This is a window we've never seen before, do nothing */
|
||||
return Success;
|
||||
}
|
||||
}
|
||||
|
||||
if ((*glxPriv->swapBuffers)(glxPriv) == GL_FALSE) {
|
||||
return __glXBadDrawable;
|
||||
}
|
||||
}
|
||||
if (pGlxDraw != NULL && pGlxDraw->type == DRAWABLE_WINDOW &&
|
||||
(*pGlxDraw->swapBuffers)(pGlxDraw) == GL_FALSE)
|
||||
return __glXError(GLXBadDrawable);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
int DoQueryContext(__GLXclientState *cl, GLXContextID gcId)
|
||||
{
|
||||
ClientPtr client = cl->client;
|
||||
__GLXcontext *ctx;
|
||||
xGLXQueryContextInfoEXTReq *req;
|
||||
xGLXQueryContextInfoEXTReply reply;
|
||||
int nProps;
|
||||
int *sendBuf, *pSendBuf;
|
||||
int nReplyBytes;
|
||||
|
||||
req = (xGLXQueryContextInfoEXTReq *)pc;
|
||||
ctx = (__GLXcontext *) LookupIDByType(req->context, __glXContextRes);
|
||||
ctx = (__GLXcontext *) LookupIDByType(gcId, __glXContextRes);
|
||||
if (!ctx) {
|
||||
client->errorValue = req->context;
|
||||
return __glXBadContext;
|
||||
client->errorValue = gcId;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
nProps = 3;
|
||||
|
@ -1444,7 +1497,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
nReplyBytes = reply.length << 2;
|
||||
sendBuf = (int *)xalloc((size_t)nReplyBytes);
|
||||
if (sendBuf == NULL) {
|
||||
return __glXBadContext; /* XXX: Is this correct? */
|
||||
return __glXError(GLXBadContext); /* XXX: Is this correct? */
|
||||
}
|
||||
pSendBuf = sendBuf;
|
||||
*pSendBuf++ = GLX_SHARE_CONTEXT_EXT;
|
||||
|
@ -1465,6 +1518,19 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
|
||||
|
||||
return DoQueryContext(cl, req->context);
|
||||
}
|
||||
|
||||
int __glXQueryContext(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
|
||||
|
||||
return DoQueryContext(cl, req->context);
|
||||
}
|
||||
|
||||
int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
|
@ -1482,7 +1548,7 @@ int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
buffer = *((INT32 *) (pc + 4));
|
||||
|
||||
if (buffer != GLX_FRONT_LEFT_EXT)
|
||||
return __glXBadPixmap;
|
||||
return __glXError(GLXBadPixmap);
|
||||
|
||||
context = __glXForceCurrent (cl, req->contextTag, &error);
|
||||
if (!context)
|
||||
|
@ -1491,11 +1557,11 @@ int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes);
|
||||
if (!pGlxPixmap) {
|
||||
client->errorValue = drawId;
|
||||
return __glXBadPixmap;
|
||||
return __glXError(GLXBadPixmap);
|
||||
}
|
||||
|
||||
if (!context->textureFromPixmap)
|
||||
return __glXUnsupportedPrivateRequest;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
|
||||
return context->textureFromPixmap->bindTexImage(context,
|
||||
buffer,
|
||||
|
@ -1524,17 +1590,76 @@ int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes);
|
||||
if (!pGlxPixmap) {
|
||||
client->errorValue = drawId;
|
||||
return __glXBadDrawable;
|
||||
return __glXError(GLXBadDrawable);
|
||||
}
|
||||
|
||||
if (!context->textureFromPixmap)
|
||||
return __glXUnsupportedPrivateRequest;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
|
||||
return context->textureFromPixmap->releaseTexImage(context,
|
||||
buffer,
|
||||
pGlxPixmap);
|
||||
}
|
||||
|
||||
int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
|
||||
GLXContextTag tag = req->contextTag;
|
||||
__GLXcontext *glxc = NULL;
|
||||
__GLXdrawable *pGlxDraw;
|
||||
__GLXpixmap *pPixmap;
|
||||
ClientPtr client = cl->client;
|
||||
GLXDrawable drawId;
|
||||
int error;
|
||||
int x, y, width, height;
|
||||
|
||||
(void) client;
|
||||
(void) req;
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
|
||||
drawId = *((CARD32 *) (pc));
|
||||
x = *((INT32 *) (pc + 4));
|
||||
y = *((INT32 *) (pc + 8));
|
||||
width = *((INT32 *) (pc + 12));
|
||||
height = *((INT32 *) (pc + 16));
|
||||
|
||||
if (tag) {
|
||||
glxc = __glXLookupContextByTag(cl, tag);
|
||||
if (!glxc) {
|
||||
return __glXError(GLXBadContextTag);
|
||||
}
|
||||
/*
|
||||
** The calling thread is swapping its current drawable. In this case,
|
||||
** glxSwapBuffers is in both GL and X streams, in terms of
|
||||
** sequentiality.
|
||||
*/
|
||||
if (__glXForceCurrent(cl, tag, &error)) {
|
||||
/*
|
||||
** Do whatever is needed to make sure that all preceding requests
|
||||
** in both streams are completed before the swap is executed.
|
||||
*/
|
||||
CALL_Finish( GET_DISPATCH(), () );
|
||||
__GLX_NOTE_FLUSHED_CMDS(glxc);
|
||||
} else {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
error = GetDrawableOrPixmap(glxc, drawId, &pGlxDraw, &pPixmap, client);
|
||||
if (error != Success)
|
||||
return error;
|
||||
|
||||
if (pGlxDraw == NULL ||
|
||||
pGlxDraw->type != DRAWABLE_WINDOW ||
|
||||
pGlxDraw->copySubBuffer == NULL)
|
||||
return __glXError(GLXBadDrawable);
|
||||
|
||||
(*pGlxDraw->copySubBuffer)(pGlxDraw, x, y, width, height);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
/*
|
||||
** Get drawable attributes
|
||||
*/
|
||||
|
@ -1550,7 +1675,7 @@ DoGetDrawableAttributes(__GLXclientState *cl, XID drawId)
|
|||
glxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes);
|
||||
if (!glxPixmap) {
|
||||
client->errorValue = drawId;
|
||||
return __glXBadPixmap;
|
||||
return __glXError(GLXBadPixmap);
|
||||
}
|
||||
|
||||
numAttribs = 2;
|
||||
|
@ -1588,6 +1713,13 @@ int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
|
|||
return DoGetDrawableAttributes(cl, drawable);
|
||||
}
|
||||
|
||||
int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
|
||||
|
||||
return DoGetDrawableAttributes(cl, req->drawable);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -1654,13 +1786,13 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc)
|
|||
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
|
||||
} else {
|
||||
client->errorValue = commandsDone;
|
||||
return __glXBadRenderRequest;
|
||||
return __glXError(GLXBadRenderRequest);
|
||||
}
|
||||
|
||||
if (!entry->bytes) {
|
||||
/* unused opcode */
|
||||
client->errorValue = commandsDone;
|
||||
return __glXBadRenderRequest;
|
||||
return __glXError(GLXBadRenderRequest);
|
||||
}
|
||||
if (entry->varsize) {
|
||||
/* variable size command */
|
||||
|
@ -1746,7 +1878,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
*/
|
||||
if (req->requestNumber != 1) {
|
||||
client->errorValue = req->requestNumber;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
hdr = (__GLXrenderLargeHeader *) pc;
|
||||
|
@ -1767,13 +1899,13 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
|
||||
} else {
|
||||
client->errorValue = opcode;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
if (!entry->bytes) {
|
||||
/* unused opcode */
|
||||
client->errorValue = opcode;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
if (entry->varsize) {
|
||||
/*
|
||||
|
@ -1830,12 +1962,12 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
if (req->requestNumber != cl->largeCmdRequestsSoFar + 1) {
|
||||
client->errorValue = req->requestNumber;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
if (req->requestTotal != cl->largeCmdRequestsTotal) {
|
||||
client->errorValue = req->requestTotal;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1844,7 +1976,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
if ((cl->largeCmdBytesSoFar + dataBytes) > cl->largeCmdBytesTotal) {
|
||||
client->errorValue = dataBytes;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, dataBytes);
|
||||
cl->largeCmdBytesSoFar += dataBytes;
|
||||
|
@ -1868,7 +2000,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
__GLX_PAD(cl->largeCmdBytesTotal)) {
|
||||
client->errorValue = dataBytes;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
hdr = (__GLXrenderLargeHeader *) cl->largeCmdBuf;
|
||||
opcode = hdr->opcode;
|
||||
|
@ -1887,7 +2019,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
|
||||
} else {
|
||||
client->errorValue = opcode;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1937,7 +2069,7 @@ static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
|
|||
}
|
||||
}
|
||||
client->errorValue = drawable;
|
||||
return __glXBadDrawable;
|
||||
return __glXError(GLXBadDrawable);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2164,7 +2296,9 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
|
|||
case X_GLXvop_BindTexImageEXT:
|
||||
return __glXBindTexImageEXT(cl, pc);
|
||||
case X_GLXvop_ReleaseTexImageEXT:
|
||||
return __glXReleaseTexImageEXT(cl, pc);
|
||||
return __glXReleaseTexImageEXT(cl, pc);
|
||||
case X_GLXvop_CopySubBufferMESA:
|
||||
return __glXCopySubBufferMESA(cl, pc);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2178,7 +2312,7 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
|
|||
** This sample implemention does not support any private requests.
|
||||
*/
|
||||
cl->client->errorValue = req->vendorCode;
|
||||
return __glXUnsupportedPrivateRequest;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
}
|
||||
|
||||
int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
|
||||
|
@ -2238,7 +2372,7 @@ int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
|
|||
}
|
||||
|
||||
cl->client->errorValue = vendorcode;
|
||||
return __glXUnsupportedPrivateRequest;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
}
|
||||
|
||||
int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.10 2004/01/28 18:11:50 alanh Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -315,6 +314,68 @@ int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
|
|||
return __glXDestroyGLXPixmap(cl, pc);
|
||||
}
|
||||
|
||||
int __glXSwapDestroyPixmap(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
__GLX_SWAP_SHORT(&req->length);
|
||||
__GLX_SWAP_INT(&req->glxpixmap);
|
||||
|
||||
return __glXDestroyGLXPixmap(cl, pc);
|
||||
}
|
||||
|
||||
int __glXSwapQueryContext(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
|
||||
|
||||
(void) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXSwapCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
|
||||
|
||||
(void) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXSwapDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXSwapChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXChangeDrawableAttributesReq *req =
|
||||
(xGLXChangeDrawableAttributesReq *) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXSwapCreateWindow(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
|
||||
|
||||
(void) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXSwapDestroyWindow(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
|
||||
|
||||
(void) req;
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
|
||||
|
@ -432,6 +493,31 @@ int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
return __glXReleaseTexImageEXT(cl, (GLbyte *)pc);
|
||||
}
|
||||
|
||||
int __glXSwapCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
|
||||
GLXDrawable *drawId;
|
||||
int *buffer;
|
||||
|
||||
(void) drawId;
|
||||
(void) buffer;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
|
||||
__GLX_SWAP_SHORT(&req->length);
|
||||
__GLX_SWAP_INT(&req->contextTag);
|
||||
__GLX_SWAP_INT(pc);
|
||||
__GLX_SWAP_INT(pc + 4);
|
||||
__GLX_SWAP_INT(pc + 8);
|
||||
__GLX_SWAP_INT(pc + 12);
|
||||
__GLX_SWAP_INT(pc + 16);
|
||||
|
||||
return __glXCopySubBufferMESA(cl, pc);
|
||||
|
||||
}
|
||||
|
||||
int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc;
|
||||
|
@ -444,7 +530,19 @@ int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
|
|||
__GLX_SWAP_INT(&req->contextTag);
|
||||
__GLX_SWAP_INT(data);
|
||||
|
||||
return __glXGetDrawableAttributesSGIX(cl, (GLbyte *)pc);
|
||||
return __glXGetDrawableAttributesSGIX(cl, pc);
|
||||
}
|
||||
|
||||
int __glXSwapGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
__GLX_SWAP_SHORT(&req->length);
|
||||
__GLX_SWAP_INT(&req->drawable);
|
||||
|
||||
return __glXGetDrawableAttributes(cl, pc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -600,12 +698,12 @@ int __glXSwapRender(__GLXclientState *cl, GLbyte *pc)
|
|||
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
|
||||
} else {
|
||||
client->errorValue = commandsDone;
|
||||
return __glXBadRenderRequest;
|
||||
return __glXError(GLXBadRenderRequest);
|
||||
}
|
||||
if (!entry->bytes) {
|
||||
/* unused opcode */
|
||||
client->errorValue = commandsDone;
|
||||
return __glXBadRenderRequest;
|
||||
return __glXError(GLXBadRenderRequest);
|
||||
}
|
||||
if (entry->varsize) {
|
||||
/* variable size command */
|
||||
|
@ -698,7 +796,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
*/
|
||||
if (req->requestNumber != 1) {
|
||||
client->errorValue = req->requestNumber;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
hdr = (__GLXrenderLargeHeader *) pc;
|
||||
__GLX_SWAP_INT(&hdr->length);
|
||||
|
@ -719,13 +817,13 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
|
||||
} else {
|
||||
client->errorValue = opcode;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
if (!entry->bytes) {
|
||||
/* unused opcode */
|
||||
client->errorValue = opcode;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
if (entry->varsize) {
|
||||
/*
|
||||
|
@ -781,12 +879,12 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
if (req->requestNumber != cl->largeCmdRequestsSoFar + 1) {
|
||||
client->errorValue = req->requestNumber;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
if (req->requestTotal != cl->largeCmdRequestsTotal) {
|
||||
client->errorValue = req->requestTotal;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -795,7 +893,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
if ((cl->largeCmdBytesSoFar + dataBytes) > cl->largeCmdBytesTotal) {
|
||||
client->errorValue = dataBytes;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, dataBytes);
|
||||
cl->largeCmdBytesSoFar += dataBytes;
|
||||
|
@ -819,7 +917,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
__GLX_PAD(cl->largeCmdBytesTotal)) {
|
||||
client->errorValue = dataBytes;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
hdr = (__GLXrenderLargeHeader *) cl->largeCmdBuf;
|
||||
/*
|
||||
|
@ -842,7 +940,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
|||
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
|
||||
} else {
|
||||
client->errorValue = opcode;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -899,7 +997,9 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
|
|||
case X_GLXvop_BindTexImageEXT:
|
||||
return __glXSwapBindTexImageEXT(cl, pc);
|
||||
case X_GLXvop_ReleaseTexImageEXT:
|
||||
return __glXSwapReleaseTexImageEXT(cl, pc);
|
||||
return __glXSwapReleaseTexImageEXT(cl, pc);
|
||||
case X_GLXvop_CopySubBufferMESA:
|
||||
return __glXSwapCopySubBufferMESA(cl, pc);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -910,7 +1010,7 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
cl->client->errorValue = req->vendorCode;
|
||||
return __glXUnsupportedPrivateRequest;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
}
|
||||
|
||||
int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
|
||||
|
@ -963,5 +1063,5 @@ int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
|
|||
return (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req);
|
||||
}
|
||||
cl->client->errorValue = req->vendorCode;
|
||||
return __glXUnsupportedPrivateRequest;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.4 2002/02/22 21:45:07 dawes Exp $ */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
@ -58,7 +57,7 @@ struct __GLXtextureFromPixmap {
|
|||
|
||||
|
||||
struct __GLXcontext {
|
||||
void (*destroy) (__GLXcontext *context);
|
||||
void (*destroy) (__GLXcontext *context);
|
||||
int (*makeCurrent) (__GLXcontext *context);
|
||||
int (*loseCurrent) (__GLXcontext *context);
|
||||
int (*copy) (__GLXcontext *dst,
|
||||
|
@ -66,10 +65,6 @@ struct __GLXcontext {
|
|||
unsigned long mask);
|
||||
int (*forceCurrent) (__GLXcontext *context);
|
||||
|
||||
__GLXdrawable *(*createDrawable)(__GLXcontext *context,
|
||||
DrawablePtr pDraw,
|
||||
XID drawId);
|
||||
|
||||
__GLXtextureFromPixmap *textureFromPixmap;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxdrawable.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
@ -41,6 +40,8 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include <damage.h>
|
||||
|
||||
typedef struct {
|
||||
|
||||
DrawablePtr pDraw;
|
||||
|
@ -49,13 +50,15 @@ typedef struct {
|
|||
ScreenPtr pScreen;
|
||||
Bool idExists;
|
||||
int refcnt;
|
||||
|
||||
DamagePtr pDamage;
|
||||
} __GLXpixmap;
|
||||
|
||||
struct __GLXdrawable {
|
||||
void (*destroy)(__GLXdrawable *private);
|
||||
GLboolean (*resize)(__GLXdrawable *private);
|
||||
GLboolean (*swapBuffers)(__GLXdrawable *);
|
||||
void (*copySubBuffer)(__GLXdrawable *drawable,
|
||||
int x, int y, int w, int h);
|
||||
|
||||
/*
|
||||
** list of drawable private structs
|
||||
|
|
267
GL/glx/glxdri.c
267
GL/glx/glxdri.c
|
@ -112,28 +112,38 @@ struct __GLXDRIdrawable {
|
|||
* months ago. :(
|
||||
* 20050727 - Gut all the old interfaces. This breaks compatability with
|
||||
* any DRI driver built to any previous version.
|
||||
* 20060314 - Added support for GLX_MESA_copy_sub_buffer.
|
||||
*/
|
||||
|
||||
#define INTERNAL_VERSION 20050727
|
||||
|
||||
static const char CREATE_NEW_SCREEN_FUNC[] =
|
||||
"__driCreateNewScreen_" STRINGIFY (INTERNAL_VERSION);
|
||||
|
||||
/* The DRI driver entry point version wasn't bumped when the
|
||||
* copySubBuffer functionality was added to the DRI drivers, but the
|
||||
* functionality is still conditional on the value of the
|
||||
* internal_api_version passed to __driCreateNewScreen. However, the
|
||||
* screen constructor doesn't fail for a DRI driver that's older than
|
||||
* the passed in version number, so there's no way we can know for
|
||||
* sure that we can actually use the copySubBuffer functionality. But
|
||||
* since the earliest (and at this point only) released mesa version
|
||||
* (6.5) that uses the 20050727 entry point does have copySubBuffer,
|
||||
* we'll just settle for that. We still have to pass in a higher to
|
||||
* the screen constructor to enable the functionality.
|
||||
*/
|
||||
#define COPY_SUB_BUFFER_INTERNAL_VERSION 20060314
|
||||
|
||||
static void
|
||||
__glXDRIleaveServer(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < screenInfo.numScreens; i++)
|
||||
DRIDoBlockHandler(i, NULL, NULL, NULL);
|
||||
DRIBlockHandler(NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
__glXDRIenterServer(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < screenInfo.numScreens; i++)
|
||||
DRIDoWakeupHandler(i, NULL, 0, NULL);
|
||||
DRIWakeupHandler(NULL, 0, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -177,48 +187,27 @@ __glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static __GLXdrawable *
|
||||
__glXDRIcontextCreateDrawable(__GLXcontext *context,
|
||||
DrawablePtr pDraw,
|
||||
XID drawId)
|
||||
static void
|
||||
__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
__GLXDRIdrawable *private;
|
||||
__GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
|
||||
__GLXDRIscreen *screen;
|
||||
|
||||
private = xalloc(sizeof *private);
|
||||
if (private == NULL)
|
||||
return NULL;
|
||||
/* FIXME: We're jumping through hoops here to get the DRIdrawable
|
||||
* which the dri driver tries to keep to it self... cf. FIXME in
|
||||
* createDrawable. */
|
||||
|
||||
memset(private, 0, sizeof *private);
|
||||
screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum);
|
||||
private->driDrawable = (screen->driScreen.getDrawable)(NULL,
|
||||
private->base.drawId,
|
||||
screen->driScreen.private);
|
||||
|
||||
if (!__glXDrawableInit(&private->base, context, pDraw, drawId)) {
|
||||
xfree(private);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
private->base.destroy = __glXDRIdrawableDestroy;
|
||||
private->base.resize = __glXDRIdrawableResize;
|
||||
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
||||
|
||||
#if 0
|
||||
/* FIXME: It would only be natural that we called
|
||||
* driScreen->createNewDrawable here but the DRI drivers manage
|
||||
* them a little oddly. FIXME: describe this better.*/
|
||||
|
||||
/* The last argument is 'attrs', which is used with pbuffers which
|
||||
* we currently don't support. */
|
||||
|
||||
glxPriv->driDrawable.private =
|
||||
(pGlxScreen->driScreen.createNewDrawable)(NULL, modes,
|
||||
drawId,
|
||||
&glxPriv->driDrawable,
|
||||
0,
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
return &private->base;
|
||||
(*private->driDrawable->copySubBuffer)(NULL,
|
||||
private->driDrawable->private,
|
||||
x, y, w, h);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
__glXDRIcontextDestroy(__GLXcontext *baseContext)
|
||||
{
|
||||
|
@ -296,24 +285,18 @@ glxCountBits(int word)
|
|||
}
|
||||
|
||||
static void
|
||||
glxFillAlphaChannel (PixmapPtr pixmap)
|
||||
glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
CARD32 *pixels = (CARD32 *)pixmap->devPrivate.ptr;
|
||||
int i;
|
||||
CARD32 *p, *end, *pixels = (CARD32 *)pixmap->devPrivate.ptr;
|
||||
CARD32 rowstride = pixmap->devKind / 4;
|
||||
CARD32 x, y;
|
||||
|
||||
x = pixmap->drawable.x;
|
||||
y = pixmap->drawable.y;
|
||||
|
||||
for (i = y; i < pixmap->drawable.height + y; ++i)
|
||||
for (i = y; i < y + height; i++)
|
||||
{
|
||||
for (j = x; j < pixmap->drawable.width + x; ++j)
|
||||
{
|
||||
int index = i * rowstride + j;
|
||||
|
||||
pixels[index] |= 0xFF000000;
|
||||
}
|
||||
p = &pixels[i * rowstride + x];
|
||||
end = p + width;
|
||||
while (p < end)
|
||||
*p++ |= 0xFF000000;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -326,7 +309,6 @@ glxFillAlphaChannel (PixmapPtr pixmap)
|
|||
* - No fbconfig handling for TEXTURE_TARGET
|
||||
* - No fbconfig exposure of Y inversion state
|
||||
* - No GenerateMipmapEXT support (due to no FBO support)
|
||||
* - No damage tracking between binds
|
||||
* - No support for anything but 16bpp and 32bpp-sparse pixmaps
|
||||
*/
|
||||
|
||||
|
@ -335,38 +317,103 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
|||
int buffer,
|
||||
__GLXpixmap *glxPixmap)
|
||||
{
|
||||
RegionPtr pRegion;
|
||||
PixmapPtr pixmap;
|
||||
int bpp;
|
||||
Bool npot;
|
||||
GLenum target, format, type;
|
||||
|
||||
pixmap = (PixmapPtr) glxPixmap->pDraw;
|
||||
bpp = pixmap->drawable.depth >= 24 ? 4 : 2; /* XXX 24bpp packed, 8, etc */
|
||||
|
||||
if (!glxPixmap->pDamage) {
|
||||
glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
|
||||
TRUE, glxPixmap->pScreen, NULL);
|
||||
if (!glxPixmap->pDamage)
|
||||
return BadAlloc;
|
||||
|
||||
DamageRegister ((DrawablePtr) pixmap, glxPixmap->pDamage);
|
||||
pRegion = NULL;
|
||||
} else {
|
||||
pRegion = DamageRegion(glxPixmap->pDamage);
|
||||
if (REGION_NIL(pRegion))
|
||||
return Success;
|
||||
}
|
||||
|
||||
/* XXX 24bpp packed, 8, etc */
|
||||
if (pixmap->drawable.depth >= 24) {
|
||||
bpp = 4;
|
||||
format = GL_BGRA;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
} else {
|
||||
bpp = 2;
|
||||
format = GL_RGB;
|
||||
type = GL_UNSIGNED_SHORT_5_6_5;
|
||||
}
|
||||
|
||||
if (!(glxCountBits(pixmap->drawable.width) == 1 &&
|
||||
glxCountBits(pixmap->drawable.height) == 1)
|
||||
/* || strstr(CALL_GetString(GL_EXTENSIONS,
|
||||
"GL_ARB_texture_non_power_of_two")) */)
|
||||
target = GL_TEXTURE_RECTANGLE_ARB;
|
||||
else
|
||||
target = GL_TEXTURE_2D;
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
|
||||
pixmap->devKind / bpp) );
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
|
||||
pixmap->drawable.y) );
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
|
||||
pixmap->drawable.x) );
|
||||
pixmap->devKind / bpp) );
|
||||
if (pRegion == NULL)
|
||||
{
|
||||
if (pixmap->drawable.depth == 24)
|
||||
glxFillAlphaChannel(pixmap,
|
||||
pixmap->drawable.x,
|
||||
pixmap->drawable.y,
|
||||
pixmap->drawable.width,
|
||||
pixmap->drawable.height);
|
||||
|
||||
if (pixmap->drawable.depth == 24)
|
||||
glxFillAlphaChannel(pixmap);
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
|
||||
pixmap->drawable.x) );
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
|
||||
pixmap->drawable.y) );
|
||||
|
||||
npot = !(glxCountBits(pixmap->drawable.width) == 1 &&
|
||||
glxCountBits(pixmap->drawable.height) == 1) /* ||
|
||||
strstr(CALL_GetString(GL_EXTENSIONS,
|
||||
"GL_ARB_texture_non_power_of_two")) */ ;
|
||||
|
||||
CALL_TexImage2D( GET_DISPATCH(),
|
||||
( npot ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D,
|
||||
0,
|
||||
bpp == 4 ? 4 : 3,
|
||||
pixmap->drawable.width,
|
||||
pixmap->drawable.height,
|
||||
0,
|
||||
bpp == 4 ? GL_BGRA : GL_RGB,
|
||||
bpp == 4 ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT_5_6_5,
|
||||
pixmap->devPrivate.ptr ) );
|
||||
CALL_TexImage2D( GET_DISPATCH(),
|
||||
(target,
|
||||
0,
|
||||
bpp == 4 ? 4 : 3,
|
||||
pixmap->drawable.width,
|
||||
pixmap->drawable.height,
|
||||
0,
|
||||
format,
|
||||
type,
|
||||
pixmap->devPrivate.ptr) );
|
||||
} else {
|
||||
int i, numRects;
|
||||
BoxPtr p;
|
||||
|
||||
numRects = REGION_NUM_RECTS (pRegion);
|
||||
p = REGION_RECTS (pRegion);
|
||||
for (i = 0; i < numRects; i++)
|
||||
{
|
||||
if (pixmap->drawable.depth == 24)
|
||||
glxFillAlphaChannel(pixmap,
|
||||
pixmap->drawable.x + p[i].x1,
|
||||
pixmap->drawable.y + p[i].y1,
|
||||
p[i].x2 - p[i].x1,
|
||||
p[i].y2 - p[i].y1);
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
|
||||
pixmap->drawable.x + p[i].x1) );
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
|
||||
pixmap->drawable.y + p[i].y1) );
|
||||
|
||||
CALL_TexSubImage2D( GET_DISPATCH(),
|
||||
(target,
|
||||
0,
|
||||
p[i].x1, p[i].y1,
|
||||
p[i].x2 - p[i].x1, p[i].y2 - p[i].y1,
|
||||
format,
|
||||
type,
|
||||
pixmap->devPrivate.ptr) );
|
||||
}
|
||||
}
|
||||
|
||||
DamageEmpty(glxPixmap->pDamage);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
@ -425,7 +472,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
|||
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
|
||||
context->base.copy = __glXDRIcontextCopy;
|
||||
context->base.forceCurrent = __glXDRIcontextForceCurrent;
|
||||
context->base.createDrawable = __glXDRIcontextCreateDrawable;
|
||||
|
||||
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
|
||||
|
||||
|
@ -440,6 +486,50 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
|||
return &context->base;
|
||||
}
|
||||
|
||||
static __GLXdrawable *
|
||||
__glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
||||
DrawablePtr pDraw,
|
||||
XID drawId,
|
||||
__GLcontextModes *modes)
|
||||
{
|
||||
__GLXDRIdrawable *private;
|
||||
|
||||
private = xalloc(sizeof *private);
|
||||
if (private == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(private, 0, sizeof *private);
|
||||
|
||||
if (!__glXDrawableInit(&private->base, screen, pDraw, drawId, modes)) {
|
||||
xfree(private);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
private->base.destroy = __glXDRIdrawableDestroy;
|
||||
private->base.resize = __glXDRIdrawableResize;
|
||||
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
||||
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
||||
|
||||
#if 0
|
||||
/* FIXME: It would only be natural that we called
|
||||
* driScreen->createNewDrawable here but the DRI drivers manage
|
||||
* them a little oddly. FIXME: describe this better.*/
|
||||
|
||||
/* The last argument is 'attrs', which is used with pbuffers which
|
||||
* we currently don't support. */
|
||||
|
||||
glxPriv->driDrawable.private =
|
||||
(screen->driScreen.createNewDrawable)(NULL, modes,
|
||||
drawId,
|
||||
&glxPriv->driDrawable,
|
||||
0,
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
return &private->base;
|
||||
}
|
||||
|
||||
|
||||
static unsigned
|
||||
filter_modes(__GLcontextModes **server_modes,
|
||||
const __GLcontextModes *driver_modes)
|
||||
|
@ -712,7 +802,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
__DRIframebuffer framebuffer;
|
||||
int fd = -1;
|
||||
int status;
|
||||
int api_ver = INTERNAL_VERSION;
|
||||
int api_ver = COPY_SUB_BUFFER_INTERNAL_VERSION;
|
||||
drm_magic_t magic;
|
||||
drmVersionPtr version;
|
||||
char *driverName;
|
||||
|
@ -740,8 +830,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
return NULL;
|
||||
memset(screen, 0, sizeof *screen);
|
||||
|
||||
screen->base.destroy = __glXDRIscreenDestroy;
|
||||
screen->base.createContext = __glXDRIscreenCreateContext;
|
||||
screen->base.destroy = __glXDRIscreenDestroy;
|
||||
screen->base.createContext = __glXDRIscreenCreateContext;
|
||||
screen->base.createDrawable = __glXDRIscreenCreateDrawable;
|
||||
screen->base.pScreen = pScreen;
|
||||
|
||||
/* DRI protocol version. */
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
/* $XFree86$ */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GLX_error_h_
|
||||
#define _GLX_error_h_
|
||||
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: The application programming interfaces
|
||||
** established by SGI in conjunction with the Original Code are The
|
||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
|
||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
|
||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
|
||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
|
||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
*/
|
||||
|
||||
/*
|
||||
** Error codes. These have the extension error base added to them
|
||||
** when the extension initializes.
|
||||
*/
|
||||
extern int __glXBadContext;
|
||||
extern int __glXBadContextState;
|
||||
extern int __glXBadDrawable;
|
||||
extern int __glXBadPixmap;
|
||||
extern int __glXBadCurrentWindow;
|
||||
extern int __glXBadContextTag;
|
||||
extern int __glXBadRenderRequest;
|
||||
extern int __glXBadLargeRequest;
|
||||
extern int __glXUnsupportedPrivateRequest;
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.9 2003/09/28 20:15:43 alanh Exp $
|
||||
/*
|
||||
** The contents of this file are subject to the GLX Public License Version 1.0
|
||||
** (the "License"). You may not use this file except in compliance with the
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
|
@ -33,6 +33,33 @@
|
|||
#include "glxutil.h"
|
||||
#include "glxext.h"
|
||||
|
||||
/*
|
||||
** The last context used by the server. It is the context that is current
|
||||
** from the server's perspective.
|
||||
*/
|
||||
__GLXcontext *__glXLastContext;
|
||||
|
||||
/*
|
||||
** X resources.
|
||||
*/
|
||||
RESTYPE __glXContextRes;
|
||||
RESTYPE __glXClientRes;
|
||||
RESTYPE __glXPixmapRes;
|
||||
RESTYPE __glXDrawableRes;
|
||||
RESTYPE __glXSwapBarrierRes;
|
||||
|
||||
/*
|
||||
** Reply for most singles.
|
||||
*/
|
||||
xGLXSingleReply __glXReply;
|
||||
|
||||
/*
|
||||
** A set of state for each client. The 0th one is unused because client
|
||||
** indices start at 1, not 0.
|
||||
*/
|
||||
__GLXclientState *__glXClients[MAXCLIENTS+1];
|
||||
|
||||
|
||||
static Bool inDispatch;
|
||||
|
||||
/*
|
||||
|
@ -141,6 +168,10 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
|
|||
|
||||
pGlxPixmap->idExists = False;
|
||||
if (!pGlxPixmap->refcnt) {
|
||||
if (pGlxPixmap->pDamage) {
|
||||
DamageUnregister (pGlxPixmap->pDraw, pGlxPixmap->pDamage);
|
||||
DamageDestroy(pGlxPixmap->pDamage);
|
||||
}
|
||||
/*
|
||||
** The DestroyPixmap routine should decrement the refcount and free
|
||||
** only if it's zero.
|
||||
|
@ -261,6 +292,13 @@ GLboolean __glXErrorOccured(void)
|
|||
return errorOccured;
|
||||
}
|
||||
|
||||
static int __glXErrorBase;
|
||||
|
||||
int __glXError(int error)
|
||||
{
|
||||
return __glXErrorBase + error;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -270,11 +308,12 @@ void GlxExtensionInit(void)
|
|||
{
|
||||
ExtensionEntry *extEntry;
|
||||
int i;
|
||||
|
||||
|
||||
__glXContextRes = CreateNewResourceType((DeleteType)ContextGone);
|
||||
__glXClientRes = CreateNewResourceType((DeleteType)ClientGone);
|
||||
__glXPixmapRes = CreateNewResourceType((DeleteType)PixmapGone);
|
||||
__glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone);
|
||||
__glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone);
|
||||
|
||||
/*
|
||||
** Add extension to server extensions.
|
||||
|
@ -292,18 +331,7 @@ void GlxExtensionInit(void)
|
|||
return;
|
||||
}
|
||||
|
||||
__glXBadContext = extEntry->errorBase + GLXBadContext;
|
||||
__glXBadContextState = extEntry->errorBase + GLXBadContextState;
|
||||
__glXBadDrawable = extEntry->errorBase + GLXBadDrawable;
|
||||
__glXBadPixmap = extEntry->errorBase + GLXBadPixmap;
|
||||
__glXBadContextTag = extEntry->errorBase + GLXBadContextTag;
|
||||
__glXBadCurrentWindow = extEntry->errorBase + GLXBadCurrentWindow;
|
||||
__glXBadRenderRequest = extEntry->errorBase + GLXBadRenderRequest;
|
||||
__glXBadLargeRequest = extEntry->errorBase + GLXBadLargeRequest;
|
||||
__glXUnsupportedPrivateRequest = extEntry->errorBase +
|
||||
GLXUnsupportedPrivateRequest;
|
||||
|
||||
__glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone);
|
||||
__glXErrorBase = extEntry->errorBase;
|
||||
|
||||
/*
|
||||
** Initialize table of client state. There is never a client 0.
|
||||
|
@ -343,7 +371,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
|
|||
cx = (__GLXcontext *) __glXLookupContextByTag(cl, tag);
|
||||
if (!cx) {
|
||||
cl->client->errorValue = tag;
|
||||
*error = __glXBadContextTag;
|
||||
*error = __glXError(GLXBadContextTag);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -354,7 +382,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
|
|||
** windows can be destroyed from under us; GLX pixmaps are
|
||||
** refcounted and don't go away until no one is using them.
|
||||
*/
|
||||
*error = __glXBadCurrentWindow;
|
||||
*error = __glXError(GLXBadCurrentWindow);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -369,7 +397,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
|
|||
if (!(*cx->forceCurrent)(cx)) {
|
||||
/* Bind failed, and set the error code. Bummer */
|
||||
cl->client->errorValue = cx->id;
|
||||
*error = __glXBadContextState;
|
||||
*error = __glXError(GLXBadContextState);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -465,7 +493,7 @@ static int __glXDispatch(ClientPtr client)
|
|||
*/
|
||||
if ((cl->largeCmdRequestsSoFar != 0) && (opcode != X_GLXRenderLarge)) {
|
||||
client->errorValue = stuff->glxCode;
|
||||
return __glXBadLargeRequest;
|
||||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.7 2003/11/17 22:20:26 dawes Exp $ */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
@ -85,8 +84,11 @@ extern int DoGetFBConfigs(__GLXclientState *cl, unsigned screen,
|
|||
GLboolean do_swap);
|
||||
extern int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
|
||||
GLXContextID shareList, VisualID visual, GLuint screen, GLboolean isDirect);
|
||||
extern int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual,
|
||||
extern int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId,
|
||||
GLuint screenNum, XID pixmapId, XID glxpixmapId);
|
||||
extern int DoDestroyPixmap(__GLXclientState *cl, XID glxpixmapId);
|
||||
|
||||
extern int DoQueryContext(__GLXclientState *cl, GLXContextID gcId);
|
||||
|
||||
extern void GlxExtensionInit(void);
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.14 2004/02/09 23:46:31 alanh Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -139,6 +138,7 @@ static char GLXServerExtensions[] =
|
|||
"GLX_SGIX_swap_barrier "
|
||||
#endif
|
||||
"GLX_SGIX_fbconfig "
|
||||
"GLX_MESA_copy_sub_buffer "
|
||||
;
|
||||
|
||||
__GLXscreen **__glXActiveScreens;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef _GLX_screens_h_
|
||||
#define _GLX_screens_h_
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.4 2001/03/21 16:29:37 dawes Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -53,11 +52,16 @@
|
|||
*/
|
||||
typedef struct __GLXscreen __GLXscreen;
|
||||
struct __GLXscreen {
|
||||
void (*destroy)(__GLXscreen *screen);
|
||||
void (*destroy) (__GLXscreen *screen);
|
||||
|
||||
__GLXcontext *(*createContext)(__GLXscreen *screen,
|
||||
__GLcontextModes *modes,
|
||||
__GLXcontext *shareContext);
|
||||
__GLXcontext *(*createContext) (__GLXscreen *screen,
|
||||
__GLcontextModes *modes,
|
||||
__GLXcontext *shareContext);
|
||||
|
||||
__GLXdrawable *(*createDrawable)(__GLXscreen *context,
|
||||
DrawablePtr pDraw,
|
||||
XID drawId,
|
||||
__GLcontextModes *modes);
|
||||
|
||||
ScreenPtr pScreen;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.5 2003/09/28 20:15:43 alanh Exp $ */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
@ -70,7 +69,6 @@ typedef struct __GLXcontext __GLXcontext;
|
|||
#include "glxscreens.h"
|
||||
#include "glxdrawable.h"
|
||||
#include "glxcontext.h"
|
||||
#include "glxerror.h"
|
||||
|
||||
|
||||
#define GLX_SERVER_MAJOR_VERSION 1
|
||||
|
@ -112,6 +110,8 @@ void __glXScreenInitVisuals(__GLXscreen *screen);
|
|||
extern __GLXcontext *__glXLastContext;
|
||||
extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*);
|
||||
|
||||
int __glXError(int error);
|
||||
|
||||
/*
|
||||
** Macros to set, unset, and retrieve the flag that says whether a context
|
||||
** has unflushed commands.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -140,12 +139,14 @@ __glXUnrefDrawable(__GLXdrawable *glxPriv)
|
|||
|
||||
GLboolean
|
||||
__glXDrawableInit(__GLXdrawable *drawable,
|
||||
__GLXcontext *ctx, DrawablePtr pDraw, XID drawId)
|
||||
__GLXscreen *screen, DrawablePtr pDraw, XID drawId,
|
||||
__GLcontextModes *modes)
|
||||
{
|
||||
drawable->type = pDraw->type;
|
||||
drawable->pDraw = pDraw;
|
||||
drawable->drawId = drawId;
|
||||
drawable->refCount = 1;
|
||||
drawable->modes = modes;
|
||||
|
||||
/* if not a pixmap, lookup will fail, so pGlxPixmap will be NULL */
|
||||
drawable->pGlxPixmap = (__GLXpixmap *)
|
||||
|
@ -153,35 +154,3 @@ __glXDrawableInit(__GLXdrawable *drawable,
|
|||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
__GLXdrawable *
|
||||
__glXFindDrawable(XID drawId)
|
||||
{
|
||||
__GLXdrawable *glxPriv;
|
||||
|
||||
glxPriv = (__GLXdrawable *)LookupIDByType(drawId, __glXDrawableRes);
|
||||
|
||||
return glxPriv;
|
||||
}
|
||||
|
||||
__GLXdrawable *
|
||||
__glXGetDrawable(__GLXcontext *ctx, DrawablePtr pDraw, XID drawId)
|
||||
{
|
||||
__GLXdrawable *glxPriv;
|
||||
|
||||
glxPriv = __glXFindDrawable(drawId);
|
||||
|
||||
if (glxPriv == NULL)
|
||||
{
|
||||
glxPriv = ctx->createDrawable(ctx, pDraw, drawId);
|
||||
|
||||
/* since we are creating the drawablePrivate, drawId should be new */
|
||||
if (!AddResource(drawId, __glXDrawableRes, glxPriv))
|
||||
{
|
||||
glxPriv->destroy (glxPriv);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return glxPriv;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
@ -58,11 +57,13 @@ extern GLboolean __glXResizeDrawableBuffers(__GLXdrawable *glxPriv);
|
|||
extern void __glXRefDrawable(__GLXdrawable *glxPriv);
|
||||
extern void __glXUnrefDrawable(__GLXdrawable *glxPriv);
|
||||
|
||||
extern __GLXdrawable *__glXCreateDrawable(__GLXcontext *ctx,
|
||||
DrawablePtr pDraw,
|
||||
XID glxpixmapId);
|
||||
extern GLboolean __glXDrawableInit(__GLXdrawable *drawable, __GLXcontext *ctx,
|
||||
DrawablePtr pDraw, XID drawID);
|
||||
extern __GLXdrawable *__glXCreateDrawable(__GLXscreen *screen,
|
||||
DrawablePtr pDraw, XID drawId,
|
||||
__GLcontextModes *modes);
|
||||
extern GLboolean __glXDrawableInit(__GLXdrawable *drawable,
|
||||
__GLXscreen *screen,
|
||||
DrawablePtr pDraw, XID drawID,
|
||||
__GLcontextModes *modes);
|
||||
extern GLboolean __glXDestroyDrawable(__GLXdrawable *glxPriv);
|
||||
extern __GLXdrawable *__glXFindDrawable(XID glxpixmapId);
|
||||
extern __GLXdrawable *__glXGetDrawable(__GLXcontext *ctx,
|
||||
|
|
|
@ -185,8 +185,8 @@ __glXSendReplySwap( ClientPtr client, const void * data, size_t elements,
|
|||
}
|
||||
|
||||
__glXReply.length = bswap_32( reply_ints );
|
||||
__glXReply.type = bswap_32( X_Reply );
|
||||
__glXReply.sequenceNumber = bswap_32( client->sequence );
|
||||
__glXReply.type = X_Reply;
|
||||
__glXReply.sequenceNumber = bswap_16( client->sequence );
|
||||
__glXReply.size = bswap_32( elements );
|
||||
__glXReply.retval = bswap_32( retval );
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.8 2004/02/03 23:04:08 alanh Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/render2swap.c,v 1.6 2002/01/14 22:47:08 tsi Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.6 2003/09/28 20:15:43 alanh Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.5 2004/01/28 18:11:53 alanh Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.8 2004/02/10 22:54:15 alanh Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/single2swap.c,v 1.7 2002/01/14 22:47:08 tsi Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.7tsi Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.4 2002/01/14 22:47:08 tsi Exp $ */
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
|
|
@ -179,7 +179,7 @@ int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
|
|||
** to try to make a font during another lists construction.
|
||||
*/
|
||||
client->errorValue = cx->id;
|
||||
return __glXBadContextState;
|
||||
return __glXError(GLXBadContextState);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
EXTRA_DIST = glx_ansic.h xf86glx.h
|
|
@ -1,112 +0,0 @@
|
|||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#ifndef _glx_ansic_h_
|
||||
#define _glx_ansic_h_
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.5 2001/03/21 20:49:08 dawes Exp $ */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: The application programming interfaces
|
||||
** established by SGI in conjunction with the Original Code are The
|
||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
|
||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
|
||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
|
||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
|
||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
*/
|
||||
|
||||
/*
|
||||
** this needs to check whether we're using XFree86 at all, and then
|
||||
** which version we're using. Use these macros if version is 3.9+, else
|
||||
** use normal commands below.
|
||||
*/
|
||||
|
||||
/*
|
||||
** turns out this include file only exists for XFree86 3.9+
|
||||
** I notice that not having it is not an error and does not stop the build,
|
||||
** but having it will allow opengl and glx to be built for 3.9+. We no longer
|
||||
** need an explicit define in the Makefile, just point to the correct X source
|
||||
** tree and all should be taken care of.
|
||||
*/
|
||||
|
||||
#ifdef XFree86Server
|
||||
|
||||
#ifndef assert
|
||||
#define assert(a)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if defined(Lynx) && defined(__assert_h)
|
||||
#undef __assert_h
|
||||
#endif
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define GLX_STDOUT stdout
|
||||
#define GLX_STDERR stderr
|
||||
#define __glXPrintf printf
|
||||
#define __glXFprintf fprintf
|
||||
#define __glXSprintf sprintf
|
||||
#define __glXVfprintf vfprintf
|
||||
#define __glXVsprintf vsprintf
|
||||
#define __glXFopen fopen
|
||||
#define __glXFclose fclose
|
||||
#define __glXCos(x) cos(x)
|
||||
#define __glXSin(x) sin(x)
|
||||
#define __glXAtan(x) atan(x)
|
||||
#define __glXAbs(x) abs(x)
|
||||
#define __glXLog(x) log(x)
|
||||
#define __glXCeil(x) ceil(x)
|
||||
#define __glXFloor(x) floor(x)
|
||||
#define __glXSqrt(x) sqrt(x)
|
||||
#define __glXPow(x, y) pow(x, y)
|
||||
#define __glXMemmove(dest, src, n) memmove(dest, src, n)
|
||||
#define __glXMemcpy(dest, src, n) memcpy(dest, src, n)
|
||||
#define __glXMemset(s, c, n) memset(s, c, n)
|
||||
#define __glXStrdup(str) xstrdup(str)
|
||||
#define __glXStrcpy(dest, src) strcpy(dest, src)
|
||||
#define __glXStrncpy(dest, src, n) strncpy(dest, src, n)
|
||||
#define __glXStrcat(dest, src) strcat(dest, src)
|
||||
#define __glXStrncat(dest, src, n) strncat(dest, src, n)
|
||||
#define __glXStrcmp(s1, s2) strcmp(s1, s2)
|
||||
#define __glXStrncmp(s1, s2, n) strncmp(s1, s2, n)
|
||||
#define __glXStrlen(str) strlen(str)
|
||||
#define __glXAbort() abort()
|
||||
#define __glXStrtok(s, delim) strtok(s, delim)
|
||||
#define __glXStrcspn(s, reject) strcspn(s, reject)
|
||||
#define __glXGetenv(a) getenv(a)
|
||||
#define __glXAtoi(a) atoi(a)
|
||||
|
||||
#endif /* _glx_ansic_h_ */
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/include/GL/xf86glx.h,v 1.3 1999/06/14 07:31:41 dawes Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
All Rights Reserved.
|
||||
|
||||
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, sub license, 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 (including the
|
||||
next paragraph) 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 NON-INFRINGEMENT.
|
||||
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
/*
|
||||
* Authors:
|
||||
* Kevin E. Martin <kevin@precisioninsight.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "miscstruct.h"
|
|
@ -1 +0,0 @@
|
|||
SUBDIRS = GL
|
|
@ -20,9 +20,7 @@ INCLUDES = -I@MESA_SOURCE@/include \
|
|||
# symbol means "being built in the server"
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@ \
|
||||
-DXFree86Server
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.19 2003/07/16 01:38:27 dawes Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
@ -54,7 +53,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <glxutil.h>
|
||||
#include "context.h"
|
||||
#include "xmesaP.h"
|
||||
#include <GL/xf86glx.h>
|
||||
#include "context.h"
|
||||
|
||||
#include "glcontextmodes.h"
|
||||
|
@ -140,12 +138,12 @@ __glXMesaDrawableSwapBuffers(__GLXdrawable *base)
|
|||
|
||||
|
||||
static __GLXdrawable *
|
||||
__glXMesaContextCreateDrawable(__GLXcontext *context,
|
||||
DrawablePtr pDraw,
|
||||
XID drawId)
|
||||
__glXMesaScreenCreateDrawable(__GLXscreen *screen,
|
||||
DrawablePtr pDraw,
|
||||
XID drawId,
|
||||
__GLcontextModes *modes)
|
||||
{
|
||||
__GLXMESAdrawable *glxPriv;
|
||||
__GLXscreen *pGlxScreen;
|
||||
XMesaVisual xm_vis;
|
||||
|
||||
glxPriv = xalloc(sizeof *glxPriv);
|
||||
|
@ -154,30 +152,19 @@ __glXMesaContextCreateDrawable(__GLXcontext *context,
|
|||
|
||||
memset(glxPriv, 0, sizeof *glxPriv);
|
||||
|
||||
if (!__glXDrawableInit(&glxPriv->base, context, pDraw, drawId)) {
|
||||
if (!__glXDrawableInit(&glxPriv->base, screen, pDraw, drawId, modes)) {
|
||||
xfree(glxPriv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
glxPriv->base.destroy = __glXMesaDrawableDestroy;
|
||||
glxPriv->base.resize = __glXMesaDrawableResize;
|
||||
glxPriv->base.swapBuffers = __glXMesaDrawableSwapBuffers;
|
||||
glxPriv->base.destroy = __glXMesaDrawableDestroy;
|
||||
glxPriv->base.resize = __glXMesaDrawableResize;
|
||||
glxPriv->base.swapBuffers = __glXMesaDrawableSwapBuffers;
|
||||
|
||||
pGlxScreen = __glXActiveScreens[pDraw->pScreen->myNum];
|
||||
|
||||
if (glxPriv->base.type == DRAWABLE_WINDOW) {
|
||||
VisualID vid = wVisual((WindowPtr)pDraw);
|
||||
|
||||
glxPriv->base.modes = _gl_context_modes_find_visual(pGlxScreen->modes,
|
||||
vid);
|
||||
} else {
|
||||
glxPriv->base.modes = glxPriv->base.pGlxPixmap->modes;
|
||||
}
|
||||
|
||||
xm_vis = find_mesa_visual(pGlxScreen, glxPriv->base.modes->visualID);
|
||||
xm_vis = find_mesa_visual(screen, modes->visualID);
|
||||
if (xm_vis == NULL) {
|
||||
ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n",
|
||||
glxPriv->base.modes->visualID);
|
||||
modes->visualID);
|
||||
xfree(glxPriv);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -197,7 +184,7 @@ __glXMesaContextDestroy(__GLXcontext *baseContext)
|
|||
__GLXMESAcontext *context = (__GLXMESAcontext *) baseContext;
|
||||
|
||||
XMesaDestroyContext(context->xmesa);
|
||||
__glXContextDestroy(context);
|
||||
__glXContextDestroy(&context->base);
|
||||
xfree(context);
|
||||
}
|
||||
|
||||
|
@ -268,7 +255,6 @@ __glXMesaScreenCreateContext(__GLXscreen *screen,
|
|||
context->base.loseCurrent = __glXMesaContextLoseCurrent;
|
||||
context->base.copy = __glXMesaContextCopy;
|
||||
context->base.forceCurrent = __glXMesaContextForceCurrent;
|
||||
context->base.createDrawable = __glXMesaContextCreateDrawable;
|
||||
|
||||
xm_vis = find_mesa_visual(screen, modes->visualID);
|
||||
if (!xm_vis) {
|
||||
|
@ -417,8 +403,9 @@ __glXMesaScreenProbe(ScreenPtr pScreen)
|
|||
|
||||
__glXScreenInit(&screen->base, pScreen);
|
||||
|
||||
screen->base.destroy = __glXMesaScreenDestroy;
|
||||
screen->base.createContext = __glXMesaScreenCreateContext;
|
||||
screen->base.destroy = __glXMesaScreenDestroy;
|
||||
screen->base.createContext = __glXMesaScreenCreateContext;
|
||||
screen->base.createDrawable = __glXMesaScreenCreateDrawable;
|
||||
screen->base.pScreen = pScreen;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c,v 1.5 2000/03/02 16:07:39 martin Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
@ -42,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "pixmapstr.h"
|
||||
#include "xf86glx_util.h"
|
||||
#include <X11/Xmd.h>
|
||||
#include "GL/xf86glx.h"
|
||||
|
||||
#ifdef ROUNDUP
|
||||
#undef ROUNDUP
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h,v 1.5 2000/08/10 17:40:29 dawes Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.4 2002/02/22 21:45:08 dawes Exp $ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libac.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libglapi.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmain.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmath.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -4,9 +4,7 @@ noinst_LTLIBRARIES = libshader.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libgrammar.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libslang.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libswrast.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libss.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libtnl.la
|
|||
|
||||
AM_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
@SERVER_DEFINES@ \
|
||||
@MODULE_DEFINES@ \
|
||||
@LOADER_DEFINES@ \
|
||||
-DXFree86Server \
|
||||
@GLX_DEFINES@
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
noinst_LTLIBRARIES = libxtrap.la
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
||||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
||||
libxtrap_la_SOURCES = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/XTrap/xtrapddmi.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */
|
||||
/*****************************************************************************
|
||||
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* $XdotOrg: xserver/xorg/XTrap/xtrapdi.c,v 1.6 2006/02/10 22:00:19 anholt Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.6tsi Exp $ */
|
||||
/*****************************************************************************
|
||||
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
|
||||
X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: EVI.c,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */
|
||||
/************************************************************
|
||||
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
|
||||
Permission to use, copy, modify, and distribute this
|
||||
|
@ -21,7 +20,6 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
||||
THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
********************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.10tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: EVIstruct.h,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */
|
||||
/************************************************************
|
||||
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
|
||||
Permission to use, copy, modify, and distribute this
|
||||
|
@ -21,7 +20,6 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
||||
THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
********************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/EVIstruct.h,v 3.5 2003/07/16 01:38:28 dawes Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -12,7 +12,7 @@ endif
|
|||
|
||||
INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
||||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
||||
if XORG
|
||||
sdk_HEADERS = xvdix.h xvmcext.h
|
||||
|
@ -73,7 +73,7 @@ BUILTIN_SRCS += $(XACE_SRCS)
|
|||
endif
|
||||
|
||||
# Security extension: multi-level security to protect clients from each other
|
||||
XCSECURITY_SRCS = security.c
|
||||
XCSECURITY_SRCS = security.c securitysrv.h
|
||||
if XCSECURITY
|
||||
BUILTIN_SRCS += $(XCSECURITY_SRCS)
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.10tsi Exp $ */
|
||||
/*
|
||||
Copyright 1996, 1998, 2001 The Open Group
|
||||
|
||||
|
@ -24,7 +23,6 @@ not be used in advertising or otherwise to promote the sale, use or
|
|||
other dealings in this Software without prior written authorization
|
||||
from The Open Group.
|
||||
*/
|
||||
/* $Xorg: appgroup.c,v 1.6 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: bigreq.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1992, 1998 The Open Group
|
||||
|
@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
|
|||
from The Open Group.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.8 2003/10/28 23:08:43 tsi Exp $ */
|
||||
|
||||
#define NEED_EVENTS
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: cup.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1997, 1998 The Open Group
|
||||
|
@ -24,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
|
|||
in this Software without prior written authorization from The Open Group.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.11tsi Exp $ */
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: dpms.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */
|
||||
/*****************************************************************
|
||||
|
||||
Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
|
@ -33,7 +32,6 @@ Equipment Corporation.
|
|||
* @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.10tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/dpmsproc.h,v 1.3 2001/10/28 03:32:50 tsi Exp $ */
|
||||
|
||||
/* Prototypes for functions that the DDX must provide */
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: dpmsstubs.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */
|
||||
/*****************************************************************
|
||||
|
||||
Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
|
@ -26,7 +25,6 @@ dealings in this Software without prior written authorization from Digital
|
|||
Equipment Corporation.
|
||||
|
||||
******************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/dpmsstubs.c,v 3.4 2001/01/17 22:13:15 dawes Exp $ */
|
||||
|
||||
typedef int Bool;
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*
|
||||
* Id: fontcache.c,v 1.12 1999/01/31 13:47:45 akiyama Exp $
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.7 2003/10/28 23:08:43 tsi Exp $ */
|
||||
|
||||
/* THIS IS NOT AN X CONSORTIUM STANDARD */
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.15 2003/10/28 23:08:43 tsi Exp $ */
|
||||
/************************************************************
|
||||
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
********************************************************/
|
||||
|
||||
/* $Xorg: mbuf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.5tsi Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
*/
|
||||
|
||||
/* $Xorg: mbufbf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.3 2001/07/23 13:15:44 dawes Exp $ */
|
||||
/************************************************************
|
||||
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
********************************************************/
|
||||
|
||||
/* $Xorg: mbufpx.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.6 2003/10/28 23:08:43 tsi Exp $ */
|
||||
/************************************************************
|
||||
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
@ -27,7 +26,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
|
||||
|
||||
/* $Xorg: mitmisc.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
|
||||
#define NEED_EVENTS
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
|
@ -44,8 +42,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <X11/extensions/mitmiscstr.h>
|
||||
#include "modinit.h"
|
||||
|
||||
extern Bool permitOldBugs;
|
||||
|
||||
#if 0
|
||||
static unsigned char MITReqCode;
|
||||
#endif
|
||||
|
@ -92,12 +88,8 @@ ProcMITSetBugMode(client)
|
|||
REQUEST(xMITSetBugModeReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xMITSetBugModeReq);
|
||||
if ((stuff->onOff != xTrue) && (stuff->onOff != xFalse))
|
||||
{
|
||||
client->errorValue = stuff->onOff;
|
||||
return BadValue;
|
||||
}
|
||||
permitOldBugs = stuff->onOff;
|
||||
if (stuff->onOff != xFalse)
|
||||
return BadRequest;
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
||||
|
@ -112,7 +104,7 @@ ProcMITGetBugMode(client)
|
|||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.onOff = permitOldBugs;
|
||||
rep.onOff = FALSE;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: panoramiX.c,v 1.5 2000/08/17 19:47:57 cpqbld Exp $ */
|
||||
/*****************************************************************
|
||||
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -23,7 +22,6 @@ shall not be used in advertising or otherwise to promote the sale, use or other
|
|||
dealings in this Software without prior written authorization from Digital
|
||||
Equipment Corporation.
|
||||
******************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.37tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $TOG: panoramiX.h /main/4 1998/03/17 06:51:02 kaleb $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/Xext/panoramiX.h,v 1.3 2005/04/20 12:25:12 daniels Exp $ */
|
||||
/*****************************************************************
|
||||
|
||||
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
|
@ -28,7 +27,6 @@ Equipment Corporation.
|
|||
|
||||
******************************************************************/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.5 2001/01/03 02:54:17 keithp Exp $ */
|
||||
|
||||
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: panoramiXSwap.c,v 1.4 2000/08/17 19:47:57 cpqbld Exp $ */
|
||||
/*****************************************************************
|
||||
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -23,7 +22,6 @@ shall not be used in advertising or otherwise to promote the sale, use or other
|
|||
dealings in this Software without prior written authorization from Digital
|
||||
Equipment Corporation.
|
||||
******************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.9 2003/07/16 01:38:29 dawes Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/panoramiXh.h,v 1.2 2003/09/13 21:33:03 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Server dispatcher function replacements
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: panoramiXprocs.c,v 1.5 2000/08/17 19:47:57 cpqbld Exp $ */
|
||||
/*****************************************************************
|
||||
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -26,7 +25,6 @@ Equipment Corporation.
|
|||
|
||||
/* Massively rewritten by Mark Vojkovich <markv@valinux.com> */
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.36tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.8 2001/08/01 00:44:44 tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: sampleEVI.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */
|
||||
/************************************************************
|
||||
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
|
||||
Permission to use, copy, modify, and distribute this
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/* $XdotOrg: xserver/xorg/Xext/saver.c,v 1.12 2006/03/31 18:49:38 fredrik Exp $ */
|
||||
/*
|
||||
* $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $
|
||||
*
|
||||
Copyright (c) 1992 X Consortium
|
||||
|
||||
|
@ -28,7 +26,6 @@ in this Software without prior written authorization from the X Consortium.
|
|||
* Author: Keith Packard, MIT X Consortium
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/Xext/saver.c,v 3.7 2003/10/28 23:08:43 tsi Exp $ */
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* $XdotOrg: xserver/xorg/Xext/security.c,v 1.6 2006/03/28 01:20:59 ajax Exp $ */
|
||||
/* $Xorg: security.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1996, 1998 The Open Group
|
||||
|
@ -25,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
|
|||
in this Software without prior written authorization from The Open Group.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.16tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* $XdotOrg: xserver/xorg/Xext/shape.c,v 1.9 2005/07/03 08:53:36 daniels Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.18 2003/10/28 23:08:43 tsi Exp $ */
|
||||
/************************************************************
|
||||
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
@ -26,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
********************************************************/
|
||||
|
||||
/* $Xorg: shape.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.41 2003/12/17 23:28:56 alanh Exp $ */
|
||||
/************************************************************
|
||||
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
@ -27,7 +26,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
|
||||
|
||||
/* $Xorg: shm.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
|
||||
|
||||
#define SHM
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
* $Xorg: sleepuntil.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $
|
||||
*
|
||||
Copyright 1992, 1998 The Open Group
|
||||
|
||||
|
@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
*
|
||||
* Author: Keith Packard, MIT X Consortium
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.6 2003/07/16 01:38:30 dawes Exp $ */
|
||||
|
||||
/* dixsleep.c - implement millisecond timeouts for X clients */
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.h,v 1.2 2003/11/17 22:20:27 dawes Exp $ */
|
||||
/*
|
||||
* Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: sync.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1991, 1993, 1998 The Open Group
|
||||
|
@ -50,7 +49,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.13 2003/09/02 18:19:01 tsi Exp $ */
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: xcmisc.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1993, 1998 The Open Group
|
||||
|
@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
|
|||
from The Open Group.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.7 2003/10/28 23:08:43 tsi Exp $ */
|
||||
|
||||
#define NEED_EVENTS
|
||||
#define NEED_REPLIES
|
||||
|
|
25
Xext/xevie.c
25
Xext/xevie.c
|
@ -30,7 +30,6 @@ or other dealings in this Software without prior written authorization
|
|||
of the copyright holder.
|
||||
|
||||
************************************************************/
|
||||
/* $XdotOrg: xserver/xorg/Xext/xevie.c,v 1.11 2005/10/06 17:55:54 alanc Exp $ */
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
|
@ -59,7 +58,9 @@ of the copyright holder.
|
|||
|
||||
#define NoSuchEvent 0x80000000
|
||||
|
||||
#ifdef XKB
|
||||
extern Bool noXkbExtension;
|
||||
#endif
|
||||
extern int xeviegrabState;
|
||||
|
||||
static int ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client);
|
||||
|
@ -201,12 +202,14 @@ int ProcStart (register ClientPtr client)
|
|||
return BadAlloc;
|
||||
} else
|
||||
return BadAccess;
|
||||
#ifdef XKB
|
||||
if (!noXkbExtension) {
|
||||
if (!XevieStart()) {
|
||||
DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL);
|
||||
return BadAlloc;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
xevieModifiersOn = FALSE;
|
||||
|
||||
|
@ -255,19 +258,23 @@ int ProcSend (register ClientPtr client)
|
|||
case KeyPress:
|
||||
case KeyRelease:
|
||||
xevieKBEventSent = 1;
|
||||
if(noXkbExtension)
|
||||
CoreProcessKeyboardEvent (xE, xeviekb, 1);
|
||||
else
|
||||
#ifdef XKB
|
||||
if(!noXkbExtension)
|
||||
doSendEvent(xE, inputInfo.keyboard);
|
||||
else
|
||||
#endif
|
||||
CoreProcessKeyboardEvent (xE, xeviekb, 1);
|
||||
break;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
case MotionNotify:
|
||||
xevieEventSent = 1;
|
||||
if(noXkbExtension)
|
||||
CoreProcessPointerEvent(xE, xeviemouse, 1);
|
||||
else
|
||||
#ifdef XKB
|
||||
if(!noXkbExtension)
|
||||
doSendEvent(xE, inputInfo.pointer);
|
||||
else
|
||||
#endif
|
||||
CoreProcessPointerEvent(xE, xeviemouse, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -464,6 +471,7 @@ XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count)
|
|||
xE->u.keyButtonPointer.state = keyc->state | inputInfo.pointer->button->state;
|
||||
/* fix bug: sequence lost in Xlib */
|
||||
xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence;
|
||||
#ifdef XKB
|
||||
/* fix for bug5092586 */
|
||||
if(!noXkbExtension) {
|
||||
switch(xE->u.u.type) {
|
||||
|
@ -471,6 +479,7 @@ XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count)
|
|||
case KeyRelease: *kptr &= ~bit; break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
keycq[keycqHead].time = xE->u.keyButtonPointer.time;
|
||||
memcpy(keycq[keycqHead].keyc, keyc, sizeof(KeyClassRec) - sizeof(KeyClassPtr));
|
||||
memcpy(keycq[keycqHead].keyc->xkbInfo, keyc->xkbInfo, sizeof(XkbSrvInfoRec));
|
||||
|
@ -525,6 +534,7 @@ XevieEnd(int clientIndex)
|
|||
{
|
||||
if (!clientIndex || clientIndex == xevieClientIndex) {
|
||||
|
||||
#ifdef XKB
|
||||
if(!noXkbExtension) {
|
||||
|
||||
XevieRemove(inputInfo.keyboard,NULL);
|
||||
|
@ -540,6 +550,7 @@ XevieEnd(int clientIndex)
|
|||
inputInfo.pointer->public.realInputProc = CoreProcessPointerEvent;
|
||||
XkbSetExtension(inputInfo.pointer,ProcessPointerEvent);
|
||||
}
|
||||
#endif
|
||||
|
||||
xevieFlag = 0;
|
||||
xevieClientIndex = 0;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.17 2003/10/28 23:08:43 tsi Exp $ */
|
||||
/*
|
||||
* BIGFONT extension for sharing font metrics between clients (if possible)
|
||||
* and for transmitting font metrics to clients in a compressed form.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $Xorg: xprint.c,v 1.5 2001/03/05 20:42:26 pookie Exp $ */
|
||||
/*
|
||||
(c) Copyright 1996 Hewlett-Packard Company
|
||||
(c) Copyright 1996 International Business Machines Corp.
|
||||
|
@ -64,7 +63,6 @@ copyright holders.
|
|||
** *********************************************************
|
||||
**
|
||||
********************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.14tsi Exp $ */
|
||||
|
||||
#define _XP_PRINT_SERVER_
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
|
|
66
Xext/xres.c
66
Xext/xres.c
|
@ -1,8 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2002 XFree86 Inc
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xres.c,v 1.7tsi Exp $ */
|
||||
/* $XdotOrg: xserver/xorg/Xext/xres.c,v 1.8 2006/02/11 19:16:50 alanc Exp $ */
|
||||
|
||||
#define NEED_EVENTS
|
||||
#define NEED_REPLIES
|
||||
|
@ -21,6 +19,8 @@
|
|||
#include "swaprep.h"
|
||||
#include <X11/extensions/XResproto.h>
|
||||
#include "pixmapstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "gcstruct.h"
|
||||
#include "modinit.h"
|
||||
|
||||
static int
|
||||
|
@ -156,6 +156,7 @@ ProcXResQueryClientResources (ClientPtr client)
|
|||
swapl (&rep.length, n);
|
||||
swapl (&rep.num_types, n);
|
||||
}
|
||||
|
||||
WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep);
|
||||
|
||||
if(num_types) {
|
||||
|
@ -187,13 +188,54 @@ ProcXResQueryClientResources (ClientPtr client)
|
|||
return (client->noClientException);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
ResGetApproxPixmapBytes (PixmapPtr pix)
|
||||
{
|
||||
unsigned long nPixels;
|
||||
int bytesPerPixel;
|
||||
|
||||
bytesPerPixel = pix->drawable.bitsPerPixel>>3;
|
||||
nPixels = pix->drawable.width * pix->drawable.height;
|
||||
|
||||
/* Divide by refcnt as pixmap could be shared between clients,
|
||||
* so total pixmap mem is shared between these.
|
||||
*/
|
||||
return ( nPixels * bytesPerPixel ) / pix->refcnt;
|
||||
}
|
||||
|
||||
static void
|
||||
ResFindPixmaps (pointer value, XID id, pointer cdata)
|
||||
{
|
||||
unsigned long *bytes = (unsigned long *)cdata;
|
||||
PixmapPtr pix = (PixmapPtr)value;
|
||||
|
||||
*bytes += (pix->devKind * pix->drawable.height);
|
||||
*bytes += ResGetApproxPixmapBytes(pix);
|
||||
}
|
||||
|
||||
static void
|
||||
ResFindWindowPixmaps (pointer value, XID id, pointer cdata)
|
||||
{
|
||||
unsigned long *bytes = (unsigned long *)cdata;
|
||||
WindowPtr pWin = (WindowPtr)value;
|
||||
|
||||
if (pWin->backgroundState == BackgroundPixmap)
|
||||
*bytes += ResGetApproxPixmapBytes(pWin->background.pixmap);
|
||||
|
||||
if (pWin->border.pixmap != NULL && !pWin->borderIsPixel)
|
||||
*bytes += ResGetApproxPixmapBytes(pWin->border.pixmap);
|
||||
}
|
||||
|
||||
static void
|
||||
ResFindGCPixmaps (pointer value, XID id, pointer cdata)
|
||||
{
|
||||
unsigned long *bytes = (unsigned long *)cdata;
|
||||
GCPtr pGC = (GCPtr)value;
|
||||
|
||||
if (pGC->stipple != NULL)
|
||||
*bytes += ResGetApproxPixmapBytes(pGC->stipple);
|
||||
|
||||
if (pGC->tile.pixmap != NULL && !pGC->tileIsPixel)
|
||||
*bytes += ResGetApproxPixmapBytes(pGC->tile.pixmap);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -220,6 +262,24 @@ ProcXResQueryClientPixmapBytes (ClientPtr client)
|
|||
FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps,
|
||||
(pointer)(&bytes));
|
||||
|
||||
/*
|
||||
* Make sure win background pixmaps also held to account.
|
||||
*/
|
||||
FindClientResourcesByType(clients[clientID], RT_WINDOW,
|
||||
ResFindWindowPixmaps,
|
||||
(pointer)(&bytes));
|
||||
|
||||
/*
|
||||
* GC Tile & Stipple pixmaps too.
|
||||
*/
|
||||
FindClientResourcesByType(clients[clientID], RT_GC,
|
||||
ResFindGCPixmaps,
|
||||
(pointer)(&bytes));
|
||||
|
||||
#ifdef COMPOSITE
|
||||
/* FIXME: include composite pixmaps too */
|
||||
#endif
|
||||
|
||||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.length = 0;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* $XdotOrg: xserver/xorg/Xext/xtest.c,v 1.6 2005/07/03 08:53:36 daniels Exp $ */
|
||||
/* $Xorg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1992, 1998 The Open Group
|
||||
|
@ -27,7 +25,6 @@ other dealings in this Software without prior written authorization
|
|||
from The Open Group.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.10 2003/10/28 23:08:44 tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg: xserver/xorg/Xext/xvdisp.c,v 1.6 2005/07/03 08:53:36 daniels Exp $ */
|
||||
/***********************************************************
|
||||
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
|
||||
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
|
||||
|
@ -22,7 +21,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.27 2003/07/16 01:38:31 dawes Exp $ */
|
||||
|
||||
/*
|
||||
** File:
|
||||
|
|
|
@ -21,7 +21,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xvdix.h,v 1.7 2001/05/07 21:37:51 tsi Exp $ */
|
||||
|
||||
#ifndef XVDIX_H
|
||||
#define XVDIX_H
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg: xserver/xorg/Xext/xvmain.c,v 1.7 2006/02/10 22:00:20 anholt Exp $ */
|
||||
/***********************************************************
|
||||
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
|
||||
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
|
||||
|
@ -22,7 +21,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xvmain.c,v 1.15tsi Exp $ */
|
||||
|
||||
/*
|
||||
** File:
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/xvmc.c,v 1.8 2003/07/16 01:38:31 dawes Exp $ */
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/xvmcext.h,v 1.1 2001/04/07 11:04:21 alanh Exp $ */
|
||||
|
||||
#ifndef _XVMC_H
|
||||
#define _XVMC_H
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
noinst_LTLIBRARIES = libXi.la
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
||||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
||||
libXi_la_SOURCES = \
|
||||
allowev.c \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
noinst_LTLIBRARIES = libafb.la
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
|
||||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
||||
libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/afb/afb.h,v 3.10 2003/10/29 22:15:19 tsi Exp $ */
|
||||
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
|
||||
/***********************************************************
|
||||
|
||||
|
@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
/* $XConsortium: afb.h,v 5.31 94/04/17 20:28:15 dpw Exp $ */
|
||||
/* Monochrome Frame Buffer definitions
|
||||
written by drewry, september 1986
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/afb/afbbitblt.c,v 3.5tsi Exp $ */
|
||||
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
|
||||
/***********************************************************
|
||||
|
||||
|
@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
/* $XConsortium: afbbitblt.c,v 5.25 94/04/17 20:28:16 dpw Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XFree86: xc/programs/Xserver/afb/afbblt.c,v 3.0 1996/08/18 01:45:24 dawes Exp $ */
|
||||
/*
|
||||
* afb copy area
|
||||
*/
|
||||
|
@ -31,7 +30,6 @@ in this Software without prior written authorization from the X Consortium.
|
|||
Author: Keith Packard
|
||||
|
||||
*/
|
||||
/* $XConsortium: afbblt.c,v 1.11 94/04/17 20:28:16 dpw Exp $ */
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user