Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts: hw/xfree86/Makefile.am hw/xfree86/common/xf86.h hw/xfree86/common/xf86DoScanPci.c hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/scanpci/extrapci.ids hw/xfree86/scanpci/pci.ids hw/xfree86/scanpci/pciid2c.pl hw/xfree86/scanpci/xf86PciStdIds.h
This commit is contained in:
commit
8b90913566
|
@ -31,7 +31,9 @@ INCLUDES = \
|
|||
nodist_libglx_la_SOURCES = indirect_size.h
|
||||
|
||||
libglxdri_la_SOURCES = \
|
||||
glxdri.c
|
||||
glxdri.c \
|
||||
extension_string.c \
|
||||
extension_string.h
|
||||
|
||||
libglx_la_SOURCES = \
|
||||
g_disptab.h \
|
||||
|
@ -54,12 +56,14 @@ libglx_la_SOURCES = \
|
|||
indirect_dispatch.c \
|
||||
indirect_dispatch.h \
|
||||
indirect_dispatch_swap.c \
|
||||
indirect_program.c \
|
||||
indirect_reqsize.c \
|
||||
indirect_reqsize.h \
|
||||
indirect_size_get.c \
|
||||
indirect_size_get.h \
|
||||
indirect_table.c \
|
||||
indirect_table.h \
|
||||
indirect_texture_compression.c \
|
||||
indirect_util.c \
|
||||
indirect_util.h \
|
||||
render2.c \
|
||||
|
@ -73,5 +77,6 @@ libglx_la_SOURCES = \
|
|||
singlepixswap.c \
|
||||
singlesize.c \
|
||||
singlesize.h \
|
||||
swap_interval.c \
|
||||
unpack.h \
|
||||
xfont.c
|
||||
|
|
165
GL/glx/extension_string.c
Normal file
165
GL/glx/extension_string.c
Normal file
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
* (C) Copyright IBM Corporation 2002-2006
|
||||
* 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
|
||||
* on 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
|
||||
* THE COPYRIGHT HOLDERS AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file extension_string.c
|
||||
* Routines to manage the GLX extension string and GLX version for AIGLX
|
||||
* drivers. This code is loosely based on src/glx/x11/glxextensions.c from
|
||||
* Mesa.
|
||||
*
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "extension_string.h"
|
||||
|
||||
#define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8)))
|
||||
#define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8)))
|
||||
#define IS_SET(m,b) ((m[ (b) / 8 ] & (1U << ((b) % 8))) != 0)
|
||||
#define CONCAT(a,b) a ## b
|
||||
#define GLX(n) "GLX_" # n, 4 + sizeof( # n ) - 1, CONCAT(n,_bit)
|
||||
#define VER(a,b) a, b
|
||||
#define Y 1
|
||||
#define N 0
|
||||
#define EXT_ENABLED(bit,supported) (IS_SET(supported, bit))
|
||||
|
||||
struct extension_info {
|
||||
const char * const name;
|
||||
unsigned name_len;
|
||||
|
||||
unsigned char bit;
|
||||
|
||||
/**
|
||||
* This is the lowest version of GLX that "requires" this extension.
|
||||
* For example, GLX 1.3 requires SGIX_fbconfig, SGIX_pbuffer, and
|
||||
* SGI_make_current_read. If the extension is not required by any known
|
||||
* version of GLX, use 0, 0.
|
||||
*/
|
||||
unsigned char version_major;
|
||||
unsigned char version_minor;
|
||||
|
||||
/**
|
||||
* Is driver support forced by the ABI?
|
||||
*/
|
||||
unsigned char driver_support;
|
||||
};
|
||||
|
||||
static const struct extension_info known_glx_extensions[] = {
|
||||
/* GLX_ARB_get_proc_address is implemented on the client. */
|
||||
{ GLX(ARB_multisample), VER(1,4), Y, },
|
||||
|
||||
{ GLX(EXT_import_context), VER(0,0), Y, },
|
||||
{ GLX(EXT_texture_from_pixmap), VER(0,0), Y, },
|
||||
{ GLX(EXT_visual_info), VER(0,0), Y, },
|
||||
{ GLX(EXT_visual_rating), VER(0,0), Y, },
|
||||
|
||||
{ GLX(MESA_copy_sub_buffer), VER(0,0), N, },
|
||||
{ GLX(OML_swap_method), VER(0,0), Y, },
|
||||
{ GLX(SGI_make_current_read), VER(1,3), N, },
|
||||
{ GLX(SGI_swap_control), VER(0,0), N, },
|
||||
{ GLX(SGIS_multisample), VER(0,0), Y, },
|
||||
{ GLX(SGIX_fbconfig), VER(1,3), Y, },
|
||||
{ GLX(SGIX_pbuffer), VER(1,3), N, },
|
||||
{ GLX(SGIX_visual_select_group), VER(0,0), Y, },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Create a GLX extension string for a set of enable bits.
|
||||
*
|
||||
* Creates a GLX extension string for the set of bit in \c enable_bits. This
|
||||
* string is then stored in \c buffer if buffer is not \c NULL. This allows
|
||||
* two-pass operation. On the first pass the caller passes \c NULL for
|
||||
* \c buffer, and the function determines how much space is required to store
|
||||
* the extension string. The caller allocates the buffer and calls the
|
||||
* function again.
|
||||
*
|
||||
* \param enable_bits Bits representing the enabled extensions.
|
||||
* \param buffer Buffer to store the extension string. May be \c NULL.
|
||||
*
|
||||
* \return
|
||||
* The number of characters in \c buffer that were written to. If \c buffer
|
||||
* is \c NULL, this is the size of buffer that must be allocated by the
|
||||
* caller.
|
||||
*/
|
||||
int
|
||||
__glXGetExtensionString(const unsigned char *enable_bits, char *buffer)
|
||||
{
|
||||
unsigned i;
|
||||
int length = 0;
|
||||
|
||||
|
||||
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
|
||||
const unsigned bit = known_glx_extensions[i].bit;
|
||||
const size_t len = known_glx_extensions[i].name_len;
|
||||
|
||||
if (EXT_ENABLED(bit, enable_bits)) {
|
||||
if (buffer != NULL) {
|
||||
(void) memcpy(& buffer[length], known_glx_extensions[i].name,
|
||||
len);
|
||||
|
||||
buffer[length + len + 0] = ' ';
|
||||
buffer[length + len + 1] = '\0';
|
||||
}
|
||||
|
||||
length += len + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return length + 1;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
__glXEnableExtension(unsigned char *enable_bits, const char *ext)
|
||||
{
|
||||
const size_t ext_name_len = strlen(ext);
|
||||
unsigned i;
|
||||
|
||||
|
||||
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
|
||||
if ((ext_name_len == known_glx_extensions[i].name_len)
|
||||
&& (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) {
|
||||
SET_BIT(enable_bits, known_glx_extensions[i].bit);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
__glXInitExtensionEnableBits(unsigned char *enable_bits)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
||||
(void) memset(enable_bits, 0, __GLX_EXT_BYTES);
|
||||
|
||||
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
|
||||
if (known_glx_extensions[i].driver_support) {
|
||||
SET_BIT(enable_bits, known_glx_extensions[i].bit);
|
||||
}
|
||||
}
|
||||
}
|
63
GL/glx/extension_string.h
Normal file
63
GL/glx/extension_string.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* (C) Copyright IBM Corporation 2002-2006
|
||||
* 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
|
||||
* on 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
|
||||
* THE COPYRIGHT HOLDERS AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file extension_string.h
|
||||
* Routines to manage the GLX extension string and GLX version for AIGLX
|
||||
* drivers. This code is loosely based on src/glx/x11/glxextensions.c from
|
||||
* Mesa.
|
||||
*
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#ifndef GLX_EXTENSION_STRING_H
|
||||
#define GLX_EXTENSION_STRING_H
|
||||
|
||||
enum {
|
||||
/* GLX_ARB_get_proc_address is implemented on the client. */
|
||||
ARB_multisample_bit = 0,
|
||||
EXT_import_context_bit,
|
||||
EXT_texture_from_pixmap_bit,
|
||||
EXT_visual_info_bit,
|
||||
EXT_visual_rating_bit,
|
||||
MESA_copy_sub_buffer_bit,
|
||||
OML_swap_method_bit,
|
||||
SGI_make_current_read_bit,
|
||||
SGI_swap_control_bit,
|
||||
SGI_video_sync_bit,
|
||||
SGIS_multisample_bit,
|
||||
SGIX_fbconfig_bit,
|
||||
SGIX_pbuffer_bit,
|
||||
SGIX_visual_select_group_bit,
|
||||
__NUM_GLX_EXTS,
|
||||
};
|
||||
|
||||
#define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8)
|
||||
|
||||
extern int __glXGetExtensionString(const unsigned char *enable_bits,
|
||||
char *buffer);
|
||||
extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext);
|
||||
extern void __glXInitExtensionEnableBits(unsigned char *enable_bits);
|
||||
|
||||
#endif /* GLX_EXTENSION_STRING_H */
|
|
@ -2274,9 +2274,6 @@ int __glXDisp_VendorPrivate(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
/*
|
||||
** This sample implemention does not support any private requests.
|
||||
*/
|
||||
cl->client->errorValue = req->vendorCode;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
}
|
||||
|
|
126
GL/glx/glxdri.c
126
GL/glx/glxdri.c
|
@ -57,6 +57,7 @@
|
|||
#include "glapi.h"
|
||||
#include "glthread.h"
|
||||
#include "dispatch.h"
|
||||
#include "extension_string.h"
|
||||
|
||||
|
||||
#define STRINGIFY(macro_or_string) STRINGIFY_ARG (macro_or_string)
|
||||
|
@ -71,6 +72,11 @@ struct __GLXDRIscreen {
|
|||
|
||||
__DRIscreen driScreen;
|
||||
void *driver;
|
||||
|
||||
xf86EnterVTProc *enterVT;
|
||||
xf86LeaveVTProc *leaveVT;
|
||||
|
||||
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
|
||||
};
|
||||
|
||||
struct __GLXDRIcontext {
|
||||
|
@ -145,6 +151,22 @@ __glXDRIenterServer(void)
|
|||
DRIWakeupHandler(NULL, 0, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* \bug
|
||||
* We're jumping through hoops here to get the DRIdrawable which the DRI
|
||||
* driver tries to keep to it self... cf. FIXME in \c createDrawable.
|
||||
*/
|
||||
static void
|
||||
__glXDRIdrawableFoo(__GLXDRIdrawable *draw)
|
||||
{
|
||||
__GLXDRIscreen * const screen =
|
||||
(__GLXDRIscreen *) __glXgetActiveScreen(draw->base.pDraw->pScreen->myNum);
|
||||
|
||||
draw->driDrawable = (*screen->driScreen.getDrawable)(NULL,
|
||||
draw->base.drawId,
|
||||
screen->driScreen.private);
|
||||
}
|
||||
|
||||
static void
|
||||
__glXDRIdrawableDestroy(__GLXdrawable *private)
|
||||
{
|
||||
|
@ -169,16 +191,8 @@ static GLboolean
|
|||
__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
|
||||
{
|
||||
__GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
|
||||
__GLXDRIscreen *screen;
|
||||
|
||||
/* 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. */
|
||||
|
||||
screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum);
|
||||
private->driDrawable = (screen->driScreen.getDrawable)(NULL,
|
||||
private->base.drawId,
|
||||
screen->driScreen.private);
|
||||
__glXDRIdrawableFoo(private);
|
||||
|
||||
(*private->driDrawable->swapBuffers)(NULL,
|
||||
private->driDrawable->private);
|
||||
|
@ -186,21 +200,26 @@ __glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval)
|
||||
{
|
||||
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable;
|
||||
|
||||
__glXDRIdrawableFoo(draw);
|
||||
|
||||
draw->driDrawable->swap_interval = interval;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
__GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
|
||||
__GLXDRIscreen *screen;
|
||||
|
||||
/* 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. */
|
||||
|
||||
screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum);
|
||||
private->driDrawable = (screen->driScreen.getDrawable)(NULL,
|
||||
private->base.drawId,
|
||||
screen->driScreen.private);
|
||||
__glXDRIdrawableFoo(private);
|
||||
|
||||
(*private->driDrawable->copySubBuffer)(NULL,
|
||||
private->driDrawable->private,
|
||||
|
@ -340,7 +359,12 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
|||
if (pixmap->drawable.depth >= 24) {
|
||||
bpp = 4;
|
||||
format = GL_BGRA;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
type =
|
||||
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
|
||||
GL_UNSIGNED_BYTE;
|
||||
#else
|
||||
GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||
#endif
|
||||
} else {
|
||||
bpp = 2;
|
||||
format = GL_RGB;
|
||||
|
@ -586,15 +610,27 @@ filter_modes(__GLcontextModes **server_modes,
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
enable_glx_extension(void *psc, const char *ext_name)
|
||||
{
|
||||
__GLXDRIscreen * const screen = (__GLXDRIscreen *) psc;
|
||||
|
||||
__glXEnableExtension(screen->glx_enable_bits, ext_name);
|
||||
}
|
||||
|
||||
|
||||
static __DRIfuncPtr getProcAddress(const char *proc_name)
|
||||
{
|
||||
if (strcmp(proc_name, "glxEnableExtension") == 0) {
|
||||
return (__DRIfuncPtr) enable_glx_extension;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static __DRIscreen *findScreen(__DRInativeDisplay *dpy, int scrn)
|
||||
{
|
||||
__GLXDRIscreen *screen =
|
||||
(__GLXDRIscreen *) __glXgetActiveScreen(scrn);
|
||||
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(scrn);
|
||||
|
||||
return &screen->driScreen;
|
||||
}
|
||||
|
@ -788,6 +824,30 @@ static const __DRIinterfaceMethods interface_methods = {
|
|||
|
||||
static const char dri_driver_path[] = DRI_DRIVER_PATH;
|
||||
|
||||
static Bool
|
||||
glxDRIEnterVT (int index, int flags)
|
||||
{
|
||||
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index);
|
||||
|
||||
LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
|
||||
|
||||
glxResumeClients();
|
||||
|
||||
return (*screen->enterVT) (index, flags);
|
||||
}
|
||||
|
||||
static void
|
||||
glxDRILeaveVT (int index, int flags)
|
||||
{
|
||||
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index);
|
||||
|
||||
LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
|
||||
|
||||
glxSuspendClients();
|
||||
|
||||
return (*screen->leaveVT) (index, flags);
|
||||
}
|
||||
|
||||
static __GLXscreen *
|
||||
__glXDRIscreenProbe(ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -812,6 +872,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
void *dev_priv = NULL;
|
||||
char filename[128];
|
||||
Bool isCapable;
|
||||
size_t buffer_size;
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
|
||||
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) {
|
||||
LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n");
|
||||
|
@ -832,8 +894,13 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
screen->base.destroy = __glXDRIscreenDestroy;
|
||||
screen->base.createContext = __glXDRIscreenCreateContext;
|
||||
screen->base.createDrawable = __glXDRIscreenCreateDrawable;
|
||||
screen->base.swapInterval = __glXDRIdrawableSwapInterval;
|
||||
screen->base.pScreen = pScreen;
|
||||
|
||||
__glXInitExtensionEnableBits(screen->glx_enable_bits);
|
||||
screen->driScreen.screenConfigs = screen;
|
||||
|
||||
|
||||
/* DRI protocol version. */
|
||||
dri_version.major = XF86DRI_MAJOR_VERSION;
|
||||
dri_version.minor = XF86DRI_MINOR_VERSION;
|
||||
|
@ -977,11 +1044,28 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
|
||||
__glXScreenInit(&screen->base, pScreen);
|
||||
|
||||
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
||||
if (buffer_size > 0) {
|
||||
if (screen->base.GLXextensions != NULL) {
|
||||
xfree(screen->base.GLXextensions);
|
||||
}
|
||||
|
||||
screen->base.GLXextensions = xnfalloc(buffer_size);
|
||||
(void) __glXGetExtensionString(screen->glx_enable_bits,
|
||||
screen->base.GLXextensions);
|
||||
}
|
||||
|
||||
|
||||
filter_modes(&screen->base.modes, driver_modes);
|
||||
_gl_context_modes_destroy(driver_modes);
|
||||
|
||||
__glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer);
|
||||
|
||||
screen->enterVT = pScrn->EnterVT;
|
||||
pScrn->EnterVT = glxDRIEnterVT;
|
||||
screen->leaveVT = pScrn->LeaveVT;
|
||||
pScrn->LeaveVT = glxDRILeaveVT;
|
||||
|
||||
LogMessage(X_INFO,
|
||||
"AIGLX: Loaded and initialized %s\n", filename);
|
||||
|
||||
|
|
|
@ -59,10 +59,7 @@ 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;
|
||||
static __GLXclientState *__glXClients[MAXCLIENTS + 1];
|
||||
|
||||
/*
|
||||
** Forward declarations.
|
||||
|
@ -219,6 +216,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
|
|||
return True;
|
||||
}
|
||||
|
||||
static __GLXcontext *glxPendingDestroyContexts;
|
||||
static int glxServerLeaveCount;
|
||||
static int glxBlockClients;
|
||||
|
||||
/*
|
||||
** Free a context.
|
||||
*/
|
||||
|
@ -236,13 +237,14 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
|
|||
* __glXDispatch() or as a callback from the resource manager. In
|
||||
* the latter case we need to lift the DRI lock manually. */
|
||||
|
||||
if (!inDispatch)
|
||||
__glXleaveServer();
|
||||
|
||||
cx->destroy(cx);
|
||||
|
||||
if (!inDispatch)
|
||||
__glXenterServer();
|
||||
if (glxBlockClients) {
|
||||
__glXleaveServer();
|
||||
cx->destroy(cx);
|
||||
__glXenterServer();
|
||||
} else {
|
||||
cx->next = glxPendingDestroyContexts;
|
||||
glxPendingDestroyContexts = cx;
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
@ -338,7 +340,7 @@ void GlxExtensionInit(void)
|
|||
/*
|
||||
** Initialize table of client state. There is never a client 0.
|
||||
*/
|
||||
for (i=1; i <= MAXCLIENTS; i++) {
|
||||
for (i = 1; i <= MAXCLIENTS; i++) {
|
||||
__glXClients[i] = 0;
|
||||
}
|
||||
|
||||
|
@ -409,11 +411,43 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
|
|||
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
** Top level dispatcher; all commands are executed from here down.
|
||||
*/
|
||||
void glxSuspendClients(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* I cried when I wrote this. Damn you XAA! */
|
||||
for (i = 1; i <= MAXCLIENTS; i++) {
|
||||
if (__glXClients[i] == NULL || !__glXClients[i]->inUse)
|
||||
continue;
|
||||
|
||||
IgnoreClient(__glXClients[i]->client);
|
||||
}
|
||||
|
||||
glxBlockClients = TRUE;
|
||||
}
|
||||
|
||||
void glxResumeClients(void)
|
||||
{
|
||||
__GLXcontext *cx, *next;
|
||||
int i;
|
||||
|
||||
glxBlockClients = FALSE;
|
||||
|
||||
for (i = 1; i <= MAXCLIENTS; i++) {
|
||||
if (__glXClients[i] == NULL || !__glXClients[i]->inUse)
|
||||
continue;
|
||||
|
||||
AttendClient(__glXClients[i]->client);
|
||||
}
|
||||
|
||||
__glXleaveServer();
|
||||
for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) {
|
||||
next = cx->next;
|
||||
|
||||
cx->destroy(cx);
|
||||
}
|
||||
glxPendingDestroyContexts = NULL;
|
||||
__glXenterServer();
|
||||
}
|
||||
|
||||
static void
|
||||
__glXnopEnterServer(void)
|
||||
|
@ -438,14 +472,19 @@ void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
|
|||
|
||||
void __glXenterServer(void)
|
||||
{
|
||||
(*__glXenterServerFunc)();
|
||||
glxServerLeaveCount--;
|
||||
|
||||
if (glxServerLeaveCount == 0)
|
||||
(*__glXenterServerFunc)();
|
||||
}
|
||||
|
||||
void __glXleaveServer(void)
|
||||
{
|
||||
(*__glXleaveServerFunc)();
|
||||
}
|
||||
if (glxServerLeaveCount == 0)
|
||||
(*__glXleaveServerFunc)();
|
||||
|
||||
glxServerLeaveCount++;
|
||||
}
|
||||
|
||||
/*
|
||||
** Top level dispatcher; all commands are executed from here down.
|
||||
|
@ -491,6 +530,15 @@ static int __glXDispatch(ClientPtr client)
|
|||
return __glXError(GLXBadLargeRequest);
|
||||
}
|
||||
|
||||
/* If we're currently blocking GLX clients, just put this guy to
|
||||
* sleep, reset the request and return. */
|
||||
if (glxBlockClients) {
|
||||
ResetCurrentRequest(client);
|
||||
client->sequence--;
|
||||
IgnoreClient(client);
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
||||
/*
|
||||
** Use the opcode to index into the procedure table.
|
||||
*/
|
||||
|
@ -500,12 +548,8 @@ static int __glXDispatch(ClientPtr client)
|
|||
if (proc != NULL) {
|
||||
__glXleaveServer();
|
||||
|
||||
inDispatch = True;
|
||||
|
||||
retval = (*proc)(cl, (GLbyte *) stuff);
|
||||
|
||||
inDispatch = False;
|
||||
|
||||
__glXenterServer();
|
||||
}
|
||||
else {
|
||||
|
@ -514,9 +558,3 @@ static int __glXDispatch(ClientPtr client)
|
|||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void __glXNoSuchRenderOpcode(GLbyte *pc)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,15 +66,11 @@ typedef struct {
|
|||
extern GLboolean __glXFreeContext(__GLXcontext *glxc);
|
||||
extern void __glXFlushContextCache(void);
|
||||
|
||||
extern void __glXNoSuchRenderOpcode(GLbyte*);
|
||||
extern void __glXErrorCallBack(__GLinterface *gc, GLenum code);
|
||||
extern void __glXClearErrorOccured(void);
|
||||
extern GLboolean __glXErrorOccured(void);
|
||||
extern void __glXResetLargeCommandStatus(__GLXclientState*);
|
||||
|
||||
extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
|
||||
extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
|
||||
|
||||
extern int DoMakeCurrent( __GLXclientState *cl, GLXDrawable drawId,
|
||||
GLXDrawable readId, GLXContextID contextId, GLXContextTag tag );
|
||||
extern int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen,
|
||||
|
@ -94,8 +90,6 @@ extern int DoRenderLarge(__GLXclientState *cl, GLbyte *pc, int do_swap);
|
|||
|
||||
extern void GlxExtensionInit(void);
|
||||
|
||||
extern Bool __glXCoreType(void);
|
||||
|
||||
extern const char GLServerVersion[];
|
||||
extern int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap);
|
||||
|
||||
|
|
|
@ -45,10 +45,12 @@
|
|||
#include "glxutil.h"
|
||||
#include "glxext.h"
|
||||
|
||||
const char GLServerVersion[] = "1.2";
|
||||
const char GLServerVersion[] = "1.4";
|
||||
static const char GLServerExtensions[] =
|
||||
"GL_ARB_depth_texture "
|
||||
"GL_ARB_draw_buffers "
|
||||
"GL_ARB_fragment_program "
|
||||
"GL_ARB_fragment_program_shadow "
|
||||
"GL_ARB_imaging "
|
||||
"GL_ARB_multisample "
|
||||
"GL_ARB_multitexture "
|
||||
|
@ -58,6 +60,7 @@ static const char GLServerExtensions[] =
|
|||
"GL_ARB_shadow "
|
||||
"GL_ARB_shadow_ambient "
|
||||
"GL_ARB_texture_border_clamp "
|
||||
"GL_ARB_texture_compression "
|
||||
"GL_ARB_texture_cube_map "
|
||||
"GL_ARB_texture_env_add "
|
||||
"GL_ARB_texture_env_combine "
|
||||
|
@ -66,10 +69,12 @@ static const char GLServerExtensions[] =
|
|||
"GL_ARB_texture_mirrored_repeat "
|
||||
"GL_ARB_texture_non_power_of_two "
|
||||
"GL_ARB_transpose_matrix "
|
||||
"GL_ARB_vertex_program "
|
||||
"GL_ARB_window_pos "
|
||||
"GL_EXT_abgr "
|
||||
"GL_EXT_bgra "
|
||||
"GL_EXT_blend_color "
|
||||
"GL_EXT_blend_equation_separate "
|
||||
"GL_EXT_blend_func_separate "
|
||||
"GL_EXT_blend_logic_op "
|
||||
"GL_EXT_blend_minmax "
|
||||
|
@ -94,16 +99,20 @@ static const char GLServerExtensions[] =
|
|||
"GL_EXT_subtexture "
|
||||
"GL_EXT_texture "
|
||||
"GL_EXT_texture3D "
|
||||
"GL_EXT_texture_compression_dxt1 "
|
||||
"GL_EXT_texture_compression_s3tc "
|
||||
"GL_EXT_texture_edge_clamp "
|
||||
"GL_EXT_texture_env_add "
|
||||
"GL_EXT_texture_env_combine "
|
||||
"GL_EXT_texture_env_dot3 "
|
||||
"GL_EXT_texture_filter_ansiotropic "
|
||||
"GL_EXT_texture_lod "
|
||||
"GL_EXT_texture_lod_bias "
|
||||
"GL_EXT_texture_mirror_clamp "
|
||||
"GL_EXT_texture_object "
|
||||
"GL_EXT_texture_rectangle "
|
||||
"GL_EXT_vertex_array "
|
||||
"GL_3DFX_texture_compression_FXT1 "
|
||||
"GL_APPLE_packed_pixels "
|
||||
"GL_ATI_draw_buffers "
|
||||
"GL_ATI_texture_env_combine3 "
|
||||
|
@ -116,13 +125,23 @@ static const char GLServerExtensions[] =
|
|||
"GL_NV_blend_square "
|
||||
"GL_NV_depth_clamp "
|
||||
"GL_NV_fog_distance "
|
||||
"GL_NV_fragment_program "
|
||||
"GL_NV_fragment_program_option "
|
||||
"GL_NV_fragment_program2 "
|
||||
"GL_NV_light_max_exponent "
|
||||
"GL_NV_multisample_filter_hint "
|
||||
"GL_NV_point_sprite "
|
||||
"GL_NV_texgen_reflection "
|
||||
"GL_NV_texture_compression_vtc "
|
||||
"GL_NV_texture_env_combine4 "
|
||||
"GL_NV_texture_expand_normal "
|
||||
"GL_NV_texture_rectangle "
|
||||
"GL_NV_vertex_program "
|
||||
"GL_NV_vertex_program1_1 "
|
||||
"GL_NV_vertex_program2 "
|
||||
"GL_NV_vertex_program2_option "
|
||||
"GL_NV_vertex_program3 "
|
||||
"GL_OES_compressed_paletted_texture "
|
||||
"GL_SGI_color_matrix "
|
||||
"GL_SGI_color_table "
|
||||
"GL_SGIS_generate_mipmap "
|
||||
|
|
|
@ -62,6 +62,8 @@ struct __GLXscreen {
|
|||
DrawablePtr pDraw,
|
||||
XID drawId,
|
||||
__GLcontextModes *modes);
|
||||
int (*swapInterval) (__GLXdrawable *drawable,
|
||||
int interval);
|
||||
|
||||
ScreenPtr pScreen;
|
||||
|
||||
|
|
|
@ -136,6 +136,9 @@ void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
|
|||
void __glXenterServer(void);
|
||||
void __glXleaveServer(void);
|
||||
|
||||
void glxSuspendClients(void);
|
||||
void glxResumeClients(void);
|
||||
|
||||
/*
|
||||
** State kept per client.
|
||||
*/
|
||||
|
@ -176,8 +179,6 @@ struct __GLXclientStateRec {
|
|||
char *GLClientextensions;
|
||||
};
|
||||
|
||||
extern __GLXclientState *__glXClients[];
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -191,7 +192,6 @@ typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *);
|
|||
* Dispatch for GLX commands.
|
||||
*/
|
||||
typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc);
|
||||
extern __GLXprocPtr __glXProcTable[];
|
||||
|
||||
/*
|
||||
* Tables for computing the size of each rendering command.
|
||||
|
@ -252,6 +252,4 @@ extern int __glXImageSize(GLenum format, GLenum type,
|
|||
GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows,
|
||||
GLint alignment);
|
||||
|
||||
extern int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap);
|
||||
|
||||
#endif /* !__GLX_server_h__ */
|
||||
|
|
|
@ -40,36 +40,18 @@
|
|||
**
|
||||
*/
|
||||
|
||||
extern void __glXNop(void);
|
||||
|
||||
/* relate contexts with drawables */
|
||||
extern void __glXAssociateContext(__GLXcontext *glxc);
|
||||
extern void __glXDeassociateContext(__GLXcontext *glxc);
|
||||
|
||||
/* drawable operation */
|
||||
extern void __glXGetDrawableSize(__GLdrawablePrivate *glPriv,
|
||||
GLint *x, GLint *y,
|
||||
GLuint *width, GLuint *height);
|
||||
extern GLboolean __glXResizeDrawable(__GLdrawablePrivate *glPriv);
|
||||
extern GLboolean __glXResizeDrawableBuffers(__GLXdrawable *glxPriv);
|
||||
|
||||
/* drawable management */
|
||||
extern void __glXRefDrawable(__GLXdrawable *glxPriv);
|
||||
extern void __glXUnrefDrawable(__GLXdrawable *glxPriv);
|
||||
|
||||
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,
|
||||
DrawablePtr pDraw,
|
||||
XID glxpixmapId);
|
||||
extern void __glXCacheDrawableSize(__GLXdrawable *glxPriv);
|
||||
|
||||
/* context helper routines */
|
||||
extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
|
||||
|
@ -79,4 +61,3 @@ extern void *__glXglDDXScreenInfo(void);
|
|||
extern void *__glXglDDXExtensionInfo(void);
|
||||
|
||||
#endif /* _glxcmds_h_ */
|
||||
|
||||
|
|
|
@ -2756,6 +2756,31 @@ int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||
|
||||
GLboolean retval;
|
||||
GLboolean answerBuffer[200];
|
||||
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
||||
retval = CALL_AreTexturesResident( GET_DISPATCH(), (
|
||||
n,
|
||||
(const GLuint *)(pc + 4),
|
||||
residences
|
||||
) );
|
||||
__glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDisp_CopyTexImage1D(GLbyte * pc)
|
||||
{
|
||||
CALL_CopyTexImage1D( GET_DISPATCH(), (
|
||||
|
@ -2810,6 +2835,26 @@ void __glXDisp_CopyTexSubImage2D(GLbyte * pc)
|
|||
}
|
||||
|
||||
int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||
|
||||
CALL_DeleteTextures( GET_DISPATCH(), (
|
||||
n,
|
||||
(const GLuint *)(pc + 4)
|
||||
) );
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
|
@ -2852,6 +2897,29 @@ int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||
|
||||
GLuint answerBuffer[200];
|
||||
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
CALL_GenTextures( GET_DISPATCH(), (
|
||||
n,
|
||||
textures
|
||||
) );
|
||||
__glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -2871,6 +2939,25 @@ int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
GLboolean retval;
|
||||
retval = CALL_IsTexture( GET_DISPATCH(), (
|
||||
*(GLuint *)(pc + 0)
|
||||
) );
|
||||
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDisp_PrioritizeTextures(GLbyte * pc)
|
||||
{
|
||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||
|
@ -3039,6 +3126,35 @@ int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameterfv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3068,6 +3184,35 @@ int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameteriv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDisp_ColorSubTable(GLbyte * pc)
|
||||
{
|
||||
const GLvoid * const data = (const GLvoid *) (pc + 40);
|
||||
|
@ -3244,6 +3389,35 @@ int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3273,6 +3447,35 @@ int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3302,6 +3505,35 @@ int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetHistogramParameterfv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3331,6 +3563,35 @@ int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetHistogramParameteriv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3360,6 +3621,35 @@ int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3389,6 +3679,35 @@ int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDisp_Histogram(GLbyte * pc)
|
||||
{
|
||||
CALL_Histogram( GET_DISPATCH(), (
|
||||
|
@ -4038,8 +4357,8 @@ void __glXDisp_VertexAttrib1dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib1dvARB( GET_DISPATCH(), (
|
||||
*(GLuint *)(pc + 8),
|
||||
(const GLdouble *)(pc + 0)
|
||||
*(GLuint *)(pc + 0),
|
||||
(const GLdouble *)(pc + 4)
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4069,8 +4388,8 @@ void __glXDisp_VertexAttrib2dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib2dvARB( GET_DISPATCH(), (
|
||||
*(GLuint *)(pc + 16),
|
||||
(const GLdouble *)(pc + 0)
|
||||
*(GLuint *)(pc + 0),
|
||||
(const GLdouble *)(pc + 4)
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4100,8 +4419,8 @@ void __glXDisp_VertexAttrib3dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib3dvARB( GET_DISPATCH(), (
|
||||
*(GLuint *)(pc + 24),
|
||||
(const GLdouble *)(pc + 0)
|
||||
*(GLuint *)(pc + 0),
|
||||
(const GLdouble *)(pc + 4)
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4187,8 +4506,8 @@ void __glXDisp_VertexAttrib4dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib4dvARB( GET_DISPATCH(), (
|
||||
*(GLuint *)(pc + 32),
|
||||
(const GLdouble *)(pc + 0)
|
||||
*(GLuint *)(pc + 0),
|
||||
(const GLdouble *)(pc + 4)
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4414,131 +4733,6 @@ void __glXDisp_DrawBuffersARB(GLbyte * pc)
|
|||
) );
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameterfvSGI_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameterfvSGI( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = *(GLenum *)(pc + 4);
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameterivSGI_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||
|
||||
GLboolean retval;
|
||||
GLboolean answerBuffer[200];
|
||||
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
||||
retval = CALL_AreTexturesResidentEXT( GET_DISPATCH(), (
|
||||
n,
|
||||
(const GLuint *)(pc + 4),
|
||||
residences
|
||||
) );
|
||||
__glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||
|
||||
GLuint answerBuffer[200];
|
||||
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
CALL_GenTexturesEXT( GET_DISPATCH(), (
|
||||
n,
|
||||
textures
|
||||
) );
|
||||
__glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
GLboolean retval;
|
||||
retval = CALL_IsTextureEXT( GET_DISPATCH(), (
|
||||
*(GLuint *)(pc + 0)
|
||||
) );
|
||||
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDisp_SampleMaskSGIS(GLbyte * pc)
|
||||
{
|
||||
CALL_SampleMaskSGIS( GET_DISPATCH(), (
|
||||
|
@ -5466,6 +5660,14 @@ void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc)
|
|||
) );
|
||||
}
|
||||
|
||||
void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc)
|
||||
{
|
||||
CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
*(GLenum *)(pc + 4)
|
||||
) );
|
||||
}
|
||||
|
||||
void __glXDisp_BindFramebufferEXT(GLbyte * pc)
|
||||
{
|
||||
CALL_BindFramebufferEXT( GET_DISPATCH(), (
|
||||
|
|
|
@ -61,8 +61,6 @@ extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Histogram(GLbyte * pc);
|
||||
|
@ -73,6 +71,8 @@ extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc);
|
||||
|
@ -161,6 +161,8 @@ extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -247,10 +249,10 @@ extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc);
|
||||
|
@ -319,6 +321,8 @@ extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyt
|
|||
extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc);
|
||||
|
@ -401,14 +405,16 @@ extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -469,6 +475,8 @@ extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -477,6 +485,8 @@ extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Frustum(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -493,6 +503,8 @@ extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc);
|
||||
|
@ -549,6 +561,8 @@ extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -585,6 +599,8 @@ extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -615,6 +631,8 @@ extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, G
|
|||
extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -633,8 +651,6 @@ extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_Lightf(GLbyte * pc);
|
||||
|
@ -679,10 +695,12 @@ extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -723,6 +741,8 @@ extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec
|
|||
extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc);
|
||||
|
@ -753,6 +773,8 @@ extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_CallList(GLbyte * pc);
|
||||
|
@ -771,8 +793,6 @@ extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc);
|
||||
|
@ -795,10 +815,10 @@ extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -825,8 +845,12 @@ extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStat
|
|||
extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
|
||||
|
@ -839,8 +863,6 @@ extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *);
|
||||
|
@ -859,6 +881,8 @@ extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
|
|||
extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_Materialf(GLbyte * pc);
|
||||
|
@ -891,6 +915,8 @@ extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *);
|
|||
extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_LoadName(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc);
|
||||
|
@ -917,8 +943,6 @@ extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc);
|
||||
|
@ -1001,6 +1025,8 @@ extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc);
|
|||
extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc);
|
||||
extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||
extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc);
|
||||
extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc);
|
||||
|
|
|
@ -2887,6 +2887,31 @@ int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||
|
||||
GLboolean retval;
|
||||
GLboolean answerBuffer[200];
|
||||
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
||||
retval = CALL_AreTexturesResident( GET_DISPATCH(), (
|
||||
n,
|
||||
(const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
|
||||
residences
|
||||
) );
|
||||
__glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDispSwap_CopyTexImage1D(GLbyte * pc)
|
||||
{
|
||||
CALL_CopyTexImage1D( GET_DISPATCH(), (
|
||||
|
@ -2941,6 +2966,26 @@ void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
|
|||
}
|
||||
|
||||
int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||
|
||||
CALL_DeleteTextures( GET_DISPATCH(), (
|
||||
n,
|
||||
(const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
|
||||
) );
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
|
@ -2984,6 +3029,30 @@ int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||
|
||||
GLuint answerBuffer[200];
|
||||
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
CALL_GenTextures( GET_DISPATCH(), (
|
||||
n,
|
||||
textures
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) textures, n );
|
||||
__glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3003,6 +3072,25 @@ int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
GLboolean retval;
|
||||
retval = CALL_IsTexture( GET_DISPATCH(), (
|
||||
(GLuint )bswap_CARD32 ( pc + 0 )
|
||||
) );
|
||||
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDispSwap_PrioritizeTextures(GLbyte * pc)
|
||||
{
|
||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||
|
@ -3172,6 +3260,36 @@ int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameterfv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3202,6 +3320,36 @@ int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameteriv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDispSwap_ColorSubTable(GLbyte * pc)
|
||||
{
|
||||
const GLvoid * const data = (const GLvoid *) (pc + 40);
|
||||
|
@ -3379,6 +3527,36 @@ int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3409,6 +3587,36 @@ int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3439,6 +3647,36 @@ int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetHistogramParameterfv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3469,6 +3707,36 @@ int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetHistogramParameteriv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3499,6 +3767,36 @@ int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
|
@ -3529,6 +3827,36 @@ int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDispSwap_Histogram(GLbyte * pc)
|
||||
{
|
||||
CALL_Histogram( GET_DISPATCH(), (
|
||||
|
@ -4186,8 +4514,8 @@ void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib1dvARB( GET_DISPATCH(), (
|
||||
(GLuint )bswap_CARD32 ( pc + 8 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
|
||||
(GLuint )bswap_CARD32 ( pc + 0 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 )
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4217,8 +4545,8 @@ void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib2dvARB( GET_DISPATCH(), (
|
||||
(GLuint )bswap_CARD32 ( pc + 16 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
|
||||
(GLuint )bswap_CARD32 ( pc + 0 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 )
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4248,8 +4576,8 @@ void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib3dvARB( GET_DISPATCH(), (
|
||||
(GLuint )bswap_CARD32 ( pc + 24 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
|
||||
(GLuint )bswap_CARD32 ( pc + 0 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 )
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4335,8 +4663,8 @@ void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc)
|
|||
#endif
|
||||
|
||||
CALL_VertexAttrib4dvARB( GET_DISPATCH(), (
|
||||
(GLuint )bswap_CARD32 ( pc + 32 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
|
||||
(GLuint )bswap_CARD32 ( pc + 0 ),
|
||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 )
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -4566,134 +4894,6 @@ void __glXDispSwap_DrawBuffersARB(GLbyte * pc)
|
|||
) );
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameterfvSGI_size(pname);
|
||||
GLfloat answerBuffer[200];
|
||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameterfvSGI( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||
|
||||
const GLuint compsize = __glGetColorTableParameterivSGI_size(pname);
|
||||
GLint answerBuffer[200];
|
||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
|
||||
if (params == NULL) return BadAlloc;
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
pname,
|
||||
params
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||
|
||||
GLboolean retval;
|
||||
GLboolean answerBuffer[200];
|
||||
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
||||
retval = CALL_AreTexturesResidentEXT( GET_DISPATCH(), (
|
||||
n,
|
||||
(const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
|
||||
residences
|
||||
) );
|
||||
__glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||
|
||||
GLuint answerBuffer[200];
|
||||
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||
CALL_GenTexturesEXT( GET_DISPATCH(), (
|
||||
n,
|
||||
textures
|
||||
) );
|
||||
(void) bswap_32_array( (uint32_t *) textures, n );
|
||||
__glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
GLboolean retval;
|
||||
retval = CALL_IsTextureEXT( GET_DISPATCH(), (
|
||||
(GLuint )bswap_CARD32 ( pc + 0 )
|
||||
) );
|
||||
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
|
||||
{
|
||||
CALL_SampleMaskSGIS( GET_DISPATCH(), (
|
||||
|
@ -5631,6 +5831,14 @@ void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc)
|
|||
) );
|
||||
}
|
||||
|
||||
void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc)
|
||||
{
|
||||
CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
|
||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||
(GLenum )bswap_ENUM ( pc + 4 )
|
||||
) );
|
||||
}
|
||||
|
||||
void __glXDispSwap_BindFramebufferEXT(GLbyte * pc)
|
||||
{
|
||||
CALL_BindFramebufferEXT( GET_DISPATCH(), (
|
||||
|
|
163
GL/glx/indirect_program.c
Normal file
163
GL/glx/indirect_program.c
Normal file
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* (C) Copyright IBM Corporation 2005, 2006
|
||||
* 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
|
||||
* THE COPYRIGHT HOLDERS, THE AUTHORS, AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file indirect_program.c
|
||||
* Hand-coded routines needed to support programmable pipeline extensions.
|
||||
*
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#define NEED_REPLIES
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "glxserver.h"
|
||||
#include "glxext.h"
|
||||
#include "singlesize.h"
|
||||
#include "unpack.h"
|
||||
#include "indirect_size_get.h"
|
||||
#include "indirect_dispatch.h"
|
||||
#include "glapitable.h"
|
||||
#include "glapi.h"
|
||||
#include "glthread.h"
|
||||
#include "dispatch.h"
|
||||
#include "glapioffsets.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <byteswap.h>
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
#define bswap_32 bswap32
|
||||
#define bswap_64 bswap64
|
||||
#endif
|
||||
|
||||
static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc,
|
||||
unsigned get_programiv_offset, unsigned get_program_string_offset,
|
||||
Bool do_swap);
|
||||
|
||||
/**
|
||||
* Handle both types of glGetProgramString calls.
|
||||
*
|
||||
* This single function handles both \c glGetProgramStringARB and
|
||||
* \c glGetProgramStringNV. The dispatch offsets for the functions to use
|
||||
* for \c glGetProgramivARB and \c glGetProgramStringARB are passed in by the
|
||||
* caller. These can be the offsets of either the ARB versions or the NV
|
||||
* versions.
|
||||
*/
|
||||
int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc,
|
||||
unsigned get_programiv_offset,
|
||||
unsigned get_program_string_offset,
|
||||
Bool do_swap)
|
||||
{
|
||||
xGLXVendorPrivateWithReplyReq * const req =
|
||||
(xGLXVendorPrivateWithReplyReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, & error);
|
||||
ClientPtr client = cl->client;
|
||||
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if (cx != NULL) {
|
||||
GLenum target;
|
||||
GLenum pname;
|
||||
GLint compsize = 0;
|
||||
char *answer = NULL, answerBuffer[200];
|
||||
|
||||
if (do_swap) {
|
||||
target = (GLenum) bswap_32(*(int *)(pc + 0));
|
||||
pname = (GLenum) bswap_32(*(int *)(pc + 4));
|
||||
}
|
||||
else {
|
||||
target = *(GLenum *)(pc + 0);
|
||||
pname = *(GLuint *)(pc + 4);
|
||||
}
|
||||
|
||||
/* The value of the GL_PROGRAM_LENGTH_ARB and GL_PROGRAM_LENGTH_NV
|
||||
* enumerants is the same.
|
||||
*/
|
||||
CALL_by_offset(GET_DISPATCH(),
|
||||
(void (GLAPIENTRYP)(GLuint, GLenum, GLint *)),
|
||||
get_programiv_offset,
|
||||
(target, GL_PROGRAM_LENGTH_ARB, &compsize));
|
||||
|
||||
if (compsize != 0) {
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
|
||||
CALL_by_offset(GET_DISPATCH(),
|
||||
(void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)),
|
||||
get_program_string_offset,
|
||||
(target, pname, answer));
|
||||
}
|
||||
|
||||
if (__glXErrorOccured()) {
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
__GLX_SEND_HEADER();
|
||||
} else {
|
||||
__GLX_BEGIN_REPLY(compsize);
|
||||
((xGLXGetTexImageReply *)&__glXReply)->width = compsize;
|
||||
__GLX_SEND_HEADER();
|
||||
__GLX_SEND_VOID_ARRAY(compsize);
|
||||
}
|
||||
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte *pc)
|
||||
{
|
||||
return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB,
|
||||
_gloffset_GetProgramStringARB, False);
|
||||
}
|
||||
|
||||
|
||||
int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte *pc)
|
||||
{
|
||||
return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB,
|
||||
_gloffset_GetProgramStringARB, True);
|
||||
}
|
||||
|
||||
|
||||
int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte *pc)
|
||||
{
|
||||
return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV,
|
||||
_gloffset_GetProgramStringNV, False);
|
||||
}
|
||||
|
||||
|
||||
int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte *pc)
|
||||
{
|
||||
return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV,
|
||||
_gloffset_GetProgramStringNV, True);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -73,8 +73,10 @@ extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
|
|||
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetConvolutionParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetConvolutionParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
|
||||
|
@ -86,13 +88,12 @@ extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
|
|||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfvSGI_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterivSGI_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetFramebufferAttachmentParameterivEXT_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
|
||||
|
||||
# undef PURE
|
||||
# undef FASTCALL
|
||||
|
|
|
@ -163,7 +163,7 @@ static const void *Single_function_table[112][2] = {
|
|||
/* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList},
|
||||
/* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush},
|
||||
/* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident},
|
||||
/* [ 88] = 144 */ {NULL, NULL},
|
||||
/* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures},
|
||||
/* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures},
|
||||
/* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture},
|
||||
/* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable},
|
||||
|
@ -199,7 +199,7 @@ const struct __glXDispatchInfo Single_dispatch_info = {
|
|||
|
||||
/*****************************************************************/
|
||||
/* tree depth = 8 */
|
||||
static const int_fast16_t Render_dispatch_tree[96] = {
|
||||
static const int_fast16_t Render_dispatch_tree[95] = {
|
||||
/* [0] -> opcode range [0, 8192], node depth 1 */
|
||||
2,
|
||||
5,
|
||||
|
@ -294,59 +294,52 @@ static const int_fast16_t Render_dispatch_tree[96] = {
|
|||
EMPTY_LEAF,
|
||||
|
||||
/* [63] -> opcode range [4096, 4352], node depth 5 */
|
||||
3,
|
||||
4,
|
||||
LEAF(264),
|
||||
72,
|
||||
78,
|
||||
LEAF(280),
|
||||
80,
|
||||
EMPTY_LEAF,
|
||||
EMPTY_LEAF,
|
||||
LEAF(296),
|
||||
81,
|
||||
EMPTY_LEAF,
|
||||
84,
|
||||
90,
|
||||
|
||||
/* [72] -> opcode range [4128, 4160], node depth 6 */
|
||||
1,
|
||||
75,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [75] -> opcode range [4128, 4144], node depth 7 */
|
||||
1,
|
||||
LEAF(312),
|
||||
LEAF(328),
|
||||
LEAF(344),
|
||||
EMPTY_LEAF,
|
||||
83,
|
||||
86,
|
||||
EMPTY_LEAF,
|
||||
89,
|
||||
92,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [78] -> opcode range [4160, 4192], node depth 6 */
|
||||
/* [80] -> opcode range [4128, 4144], node depth 6 */
|
||||
1,
|
||||
EMPTY_LEAF,
|
||||
LEAF(336),
|
||||
|
||||
/* [81] -> opcode range [4224, 4256], node depth 6 */
|
||||
1,
|
||||
LEAF(352),
|
||||
LEAF(360),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [84] -> opcode range [4288, 4320], node depth 6 */
|
||||
1,
|
||||
EMPTY_LEAF,
|
||||
87,
|
||||
|
||||
/* [87] -> opcode range [4304, 4320], node depth 7 */
|
||||
/* [83] -> opcode range [4256, 4272], node depth 6 */
|
||||
1,
|
||||
EMPTY_LEAF,
|
||||
LEAF(368),
|
||||
|
||||
/* [90] -> opcode range [4320, 4352], node depth 6 */
|
||||
1,
|
||||
93,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [93] -> opcode range [4320, 4336], node depth 7 */
|
||||
/* [86] -> opcode range [4272, 4288], node depth 6 */
|
||||
1,
|
||||
LEAF(376),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [89] -> opcode range [4304, 4320], node depth 6 */
|
||||
1,
|
||||
EMPTY_LEAF,
|
||||
LEAF(384),
|
||||
|
||||
/* [92] -> opcode range [4320, 4336], node depth 6 */
|
||||
1,
|
||||
LEAF(392),
|
||||
EMPTY_LEAF,
|
||||
|
||||
};
|
||||
|
||||
static const void *Render_function_table[384][2] = {
|
||||
static const void *Render_function_table[400][2] = {
|
||||
/* [ 0] = 0 */ {NULL, NULL},
|
||||
/* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList},
|
||||
/* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists},
|
||||
|
@ -643,97 +636,113 @@ static const void *Render_function_table[384][2] = {
|
|||
/* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT},
|
||||
/* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT},
|
||||
/* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT},
|
||||
/* [ 296] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB},
|
||||
/* [ 297] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB},
|
||||
/* [ 298] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB},
|
||||
/* [ 299] = 4195 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV},
|
||||
/* [ 300] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB},
|
||||
/* [ 301] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB},
|
||||
/* [ 302] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB},
|
||||
/* [ 303] = 4199 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV},
|
||||
/* [ 304] = 4200 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV},
|
||||
/* [ 305] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB},
|
||||
/* [ 306] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV},
|
||||
/* [ 307] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV},
|
||||
/* [ 308] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV},
|
||||
/* [ 309] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV},
|
||||
/* [ 310] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV},
|
||||
/* [ 311] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV},
|
||||
/* [ 312] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV},
|
||||
/* [ 313] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV},
|
||||
/* [ 314] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV},
|
||||
/* [ 315] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV},
|
||||
/* [ 316] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV},
|
||||
/* [ 317] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV},
|
||||
/* [ 318] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV},
|
||||
/* [ 319] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB},
|
||||
/* [ 320] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB},
|
||||
/* [ 321] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB},
|
||||
/* [ 322] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV},
|
||||
/* [ 323] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV},
|
||||
/* [ 324] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT},
|
||||
/* [ 325] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV},
|
||||
/* [ 326] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV},
|
||||
/* [ 327] = 4223 */ {NULL, NULL},
|
||||
/* [ 328] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT},
|
||||
/* [ 329] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT},
|
||||
/* [ 330] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT},
|
||||
/* [ 331] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT},
|
||||
/* [ 332] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT},
|
||||
/* [ 333] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT},
|
||||
/* [ 334] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT},
|
||||
/* [ 335] = 4135 */ {NULL, NULL},
|
||||
/* [ 336] = 4176 */ {NULL, NULL},
|
||||
/* [ 337] = 4177 */ {NULL, NULL},
|
||||
/* [ 338] = 4178 */ {NULL, NULL},
|
||||
/* [ 339] = 4179 */ {NULL, NULL},
|
||||
/* [ 340] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV},
|
||||
/* [ 341] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV},
|
||||
/* [ 342] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV},
|
||||
/* [ 343] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV},
|
||||
/* [ 344] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV},
|
||||
/* [ 345] = 4185 */ {__glXDisp_ProgramParameter4dvNV, __glXDispSwap_ProgramParameter4dvNV},
|
||||
/* [ 346] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV},
|
||||
/* [ 347] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV},
|
||||
/* [ 348] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV},
|
||||
/* [ 349] = 4189 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV},
|
||||
/* [ 350] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB},
|
||||
/* [ 351] = 4191 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV},
|
||||
/* [ 352] = 4224 */ {NULL, NULL},
|
||||
/* [ 353] = 4225 */ {NULL, NULL},
|
||||
/* [ 354] = 4226 */ {NULL, NULL},
|
||||
/* [ 355] = 4227 */ {NULL, NULL},
|
||||
/* [ 356] = 4228 */ {NULL, NULL},
|
||||
/* [ 357] = 4229 */ {NULL, NULL},
|
||||
/* [ 358] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB},
|
||||
/* [ 359] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB},
|
||||
/* [ 360] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB},
|
||||
/* [ 361] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB},
|
||||
/* [ 362] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB},
|
||||
/* [ 363] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB},
|
||||
/* [ 364] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB},
|
||||
/* [ 365] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB},
|
||||
/* [ 366] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB},
|
||||
/* [ 367] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB},
|
||||
/* [ 368] = 4312 */ {NULL, NULL},
|
||||
/* [ 369] = 4313 */ {NULL, NULL},
|
||||
/* [ 370] = 4314 */ {NULL, NULL},
|
||||
/* [ 371] = 4315 */ {NULL, NULL},
|
||||
/* [ 372] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT},
|
||||
/* [ 373] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT},
|
||||
/* [ 374] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT},
|
||||
/* [ 375] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT},
|
||||
/* [ 376] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT},
|
||||
/* [ 377] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT},
|
||||
/* [ 378] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT},
|
||||
/* [ 379] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT},
|
||||
/* [ 380] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT},
|
||||
/* [ 381] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT},
|
||||
/* [ 382] = 4326 */ {NULL, NULL},
|
||||
/* [ 383] = 4327 */ {NULL, NULL},
|
||||
/* [ 296] = 4176 */ {NULL, NULL},
|
||||
/* [ 297] = 4177 */ {NULL, NULL},
|
||||
/* [ 298] = 4178 */ {NULL, NULL},
|
||||
/* [ 299] = 4179 */ {NULL, NULL},
|
||||
/* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV},
|
||||
/* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV},
|
||||
/* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV},
|
||||
/* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV},
|
||||
/* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV},
|
||||
/* [ 305] = 4185 */ {__glXDisp_ProgramParameter4dvNV, __glXDispSwap_ProgramParameter4dvNV},
|
||||
/* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV},
|
||||
/* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV},
|
||||
/* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV},
|
||||
/* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB},
|
||||
/* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB},
|
||||
/* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB},
|
||||
/* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB},
|
||||
/* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB},
|
||||
/* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB},
|
||||
/* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB},
|
||||
/* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB},
|
||||
/* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB},
|
||||
/* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB},
|
||||
/* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB},
|
||||
/* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB},
|
||||
/* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB},
|
||||
/* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV},
|
||||
/* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV},
|
||||
/* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV},
|
||||
/* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV},
|
||||
/* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV},
|
||||
/* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV},
|
||||
/* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV},
|
||||
/* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV},
|
||||
/* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV},
|
||||
/* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV},
|
||||
/* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV},
|
||||
/* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV},
|
||||
/* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV},
|
||||
/* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB},
|
||||
/* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB},
|
||||
/* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB},
|
||||
/* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV},
|
||||
/* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV},
|
||||
/* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT},
|
||||
/* [ 341] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV},
|
||||
/* [ 342] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV},
|
||||
/* [ 343] = 4223 */ {NULL, NULL},
|
||||
/* [ 344] = 4224 */ {NULL, NULL},
|
||||
/* [ 345] = 4225 */ {NULL, NULL},
|
||||
/* [ 346] = 4226 */ {NULL, NULL},
|
||||
/* [ 347] = 4227 */ {NULL, NULL},
|
||||
/* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT},
|
||||
/* [ 349] = 4229 */ {NULL, NULL},
|
||||
/* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB},
|
||||
/* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB},
|
||||
/* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB},
|
||||
/* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB},
|
||||
/* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB},
|
||||
/* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB},
|
||||
/* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB},
|
||||
/* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB},
|
||||
/* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB},
|
||||
/* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB},
|
||||
/* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT},
|
||||
/* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT},
|
||||
/* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT},
|
||||
/* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT},
|
||||
/* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT},
|
||||
/* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT},
|
||||
/* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT},
|
||||
/* [ 367] = 4135 */ {NULL, NULL},
|
||||
/* [ 368] = 4264 */ {NULL, NULL},
|
||||
/* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV},
|
||||
/* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV},
|
||||
/* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV},
|
||||
/* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV},
|
||||
/* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV},
|
||||
/* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV},
|
||||
/* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV},
|
||||
/* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV},
|
||||
/* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV},
|
||||
/* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV},
|
||||
/* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV},
|
||||
/* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV},
|
||||
/* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV},
|
||||
/* [ 382] = 4278 */ {NULL, NULL},
|
||||
/* [ 383] = 4279 */ {NULL, NULL},
|
||||
/* [ 384] = 4312 */ {NULL, NULL},
|
||||
/* [ 385] = 4313 */ {NULL, NULL},
|
||||
/* [ 386] = 4314 */ {NULL, NULL},
|
||||
/* [ 387] = 4315 */ {NULL, NULL},
|
||||
/* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT},
|
||||
/* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT},
|
||||
/* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT},
|
||||
/* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT},
|
||||
/* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT},
|
||||
/* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT},
|
||||
/* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT},
|
||||
/* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT},
|
||||
/* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT},
|
||||
/* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT},
|
||||
/* [ 398] = 4326 */ {NULL, NULL},
|
||||
/* [ 399] = 4327 */ {NULL, NULL},
|
||||
};
|
||||
|
||||
static const int_fast16_t Render_size_table[384][2] = {
|
||||
static const int_fast16_t Render_size_table[400][2] = {
|
||||
/* [ 0] = 0 */ { 0, ~0},
|
||||
/* [ 1] = 1 */ { 8, ~0},
|
||||
/* [ 2] = 2 */ { 12, 0},
|
||||
|
@ -1030,94 +1039,110 @@ static const int_fast16_t Render_size_table[384][2] = {
|
|||
/* [293] = 4125 */ { 12, ~0},
|
||||
/* [294] = 4126 */ { 8, ~0},
|
||||
/* [295] = 4127 */ { 12, ~0},
|
||||
/* [296] = 4192 */ { 16, ~0},
|
||||
/* [297] = 4193 */ { 12, ~0},
|
||||
/* [298] = 4194 */ { 16, ~0},
|
||||
/* [299] = 4195 */ { 20, ~0},
|
||||
/* [300] = 4196 */ { 24, ~0},
|
||||
/* [301] = 4197 */ { 16, ~0},
|
||||
/* [302] = 4198 */ { 24, ~0},
|
||||
/* [303] = 4199 */ { 32, ~0},
|
||||
/* [304] = 4200 */ { 40, ~0},
|
||||
/* [305] = 4201 */ { 12, ~0},
|
||||
/* [306] = 4202 */ { 12, 51},
|
||||
/* [307] = 4203 */ { 12, 52},
|
||||
/* [308] = 4204 */ { 12, 53},
|
||||
/* [309] = 4205 */ { 12, 54},
|
||||
/* [310] = 4206 */ { 12, 55},
|
||||
/* [311] = 4207 */ { 12, 56},
|
||||
/* [312] = 4208 */ { 12, 57},
|
||||
/* [313] = 4209 */ { 12, 58},
|
||||
/* [314] = 4210 */ { 12, 59},
|
||||
/* [315] = 4211 */ { 12, 60},
|
||||
/* [316] = 4212 */ { 12, 61},
|
||||
/* [317] = 4213 */ { 12, 62},
|
||||
/* [318] = 4214 */ { 12, 63},
|
||||
/* [319] = 4215 */ { 28, ~0},
|
||||
/* [320] = 4216 */ { 44, ~0},
|
||||
/* [321] = 4217 */ { 16, 64},
|
||||
/* [322] = 4218 */ { 28, 65},
|
||||
/* [323] = 4219 */ { 44, 66},
|
||||
/* [324] = 4220 */ { 8, ~0},
|
||||
/* [325] = 4221 */ { 12, ~0},
|
||||
/* [326] = 4222 */ { 8, 67},
|
||||
/* [327] = 4223 */ { 0, ~0},
|
||||
/* [328] = 4128 */ { 16, ~0},
|
||||
/* [329] = 4129 */ { 16, ~0},
|
||||
/* [330] = 4130 */ { 28, ~0},
|
||||
/* [331] = 4131 */ { 8, ~0},
|
||||
/* [332] = 4132 */ { 12, ~0},
|
||||
/* [333] = 4133 */ { 16, ~0},
|
||||
/* [334] = 4134 */ { 20, ~0},
|
||||
/* [335] = 4135 */ { 0, ~0},
|
||||
/* [336] = 4176 */ { 0, ~0},
|
||||
/* [337] = 4177 */ { 0, ~0},
|
||||
/* [338] = 4178 */ { 0, ~0},
|
||||
/* [339] = 4179 */ { 0, ~0},
|
||||
/* [340] = 4180 */ { 12, ~0},
|
||||
/* [341] = 4181 */ { 28, ~0},
|
||||
/* [342] = 4182 */ { 8, 68},
|
||||
/* [343] = 4183 */ { 16, 69},
|
||||
/* [344] = 4184 */ { 28, ~0},
|
||||
/* [345] = 4185 */ { 44, ~0},
|
||||
/* [346] = 4186 */ { 16, 70},
|
||||
/* [347] = 4187 */ { 16, 71},
|
||||
/* [348] = 4188 */ { 20, ~0},
|
||||
/* [349] = 4189 */ { 12, ~0},
|
||||
/* [350] = 4190 */ { 12, ~0},
|
||||
/* [351] = 4191 */ { 16, ~0},
|
||||
/* [352] = 4224 */ { 0, ~0},
|
||||
/* [353] = 4225 */ { 0, ~0},
|
||||
/* [354] = 4226 */ { 0, ~0},
|
||||
/* [355] = 4227 */ { 0, ~0},
|
||||
/* [356] = 4228 */ { 0, ~0},
|
||||
/* [357] = 4229 */ { 0, ~0},
|
||||
/* [358] = 4230 */ { 12, ~0},
|
||||
/* [359] = 4231 */ { 24, ~0},
|
||||
/* [360] = 4232 */ { 12, ~0},
|
||||
/* [361] = 4233 */ { 16, ~0},
|
||||
/* [362] = 4234 */ { 24, ~0},
|
||||
/* [363] = 4235 */ { 12, ~0},
|
||||
/* [364] = 4236 */ { 16, ~0},
|
||||
/* [365] = 4237 */ { 24, ~0},
|
||||
/* [366] = 4238 */ { 16, ~0},
|
||||
/* [367] = 4239 */ { 24, ~0},
|
||||
/* [368] = 4312 */ { 0, ~0},
|
||||
/* [369] = 4313 */ { 0, ~0},
|
||||
/* [370] = 4314 */ { 0, ~0},
|
||||
/* [371] = 4315 */ { 0, ~0},
|
||||
/* [372] = 4316 */ { 12, ~0},
|
||||
/* [373] = 4317 */ { 8, 72},
|
||||
/* [374] = 4318 */ { 20, ~0},
|
||||
/* [375] = 4319 */ { 12, ~0},
|
||||
/* [376] = 4320 */ { 8, 73},
|
||||
/* [377] = 4321 */ { 24, ~0},
|
||||
/* [378] = 4322 */ { 24, ~0},
|
||||
/* [379] = 4323 */ { 28, ~0},
|
||||
/* [380] = 4324 */ { 20, ~0},
|
||||
/* [381] = 4325 */ { 8, ~0},
|
||||
/* [382] = 4326 */ { 0, ~0},
|
||||
/* [383] = 4327 */ { 0, ~0},
|
||||
/* [296] = 4176 */ { 0, ~0},
|
||||
/* [297] = 4177 */ { 0, ~0},
|
||||
/* [298] = 4178 */ { 0, ~0},
|
||||
/* [299] = 4179 */ { 0, ~0},
|
||||
/* [300] = 4180 */ { 12, ~0},
|
||||
/* [301] = 4181 */ { 28, ~0},
|
||||
/* [302] = 4182 */ { 8, 51},
|
||||
/* [303] = 4183 */ { 16, 52},
|
||||
/* [304] = 4184 */ { 28, ~0},
|
||||
/* [305] = 4185 */ { 44, ~0},
|
||||
/* [306] = 4186 */ { 16, 53},
|
||||
/* [307] = 4187 */ { 16, 54},
|
||||
/* [308] = 4188 */ { 20, ~0},
|
||||
/* [309] = 4189 */ { 12, ~0},
|
||||
/* [310] = 4190 */ { 12, ~0},
|
||||
/* [311] = 4191 */ { 16, ~0},
|
||||
/* [312] = 4192 */ { 16, ~0},
|
||||
/* [313] = 4193 */ { 12, ~0},
|
||||
/* [314] = 4194 */ { 16, ~0},
|
||||
/* [315] = 4195 */ { 20, ~0},
|
||||
/* [316] = 4196 */ { 24, ~0},
|
||||
/* [317] = 4197 */ { 16, ~0},
|
||||
/* [318] = 4198 */ { 24, ~0},
|
||||
/* [319] = 4199 */ { 32, ~0},
|
||||
/* [320] = 4200 */ { 40, ~0},
|
||||
/* [321] = 4201 */ { 12, ~0},
|
||||
/* [322] = 4202 */ { 12, 55},
|
||||
/* [323] = 4203 */ { 12, 56},
|
||||
/* [324] = 4204 */ { 12, 57},
|
||||
/* [325] = 4205 */ { 12, 58},
|
||||
/* [326] = 4206 */ { 12, 59},
|
||||
/* [327] = 4207 */ { 12, 60},
|
||||
/* [328] = 4208 */ { 12, 61},
|
||||
/* [329] = 4209 */ { 12, 62},
|
||||
/* [330] = 4210 */ { 12, 63},
|
||||
/* [331] = 4211 */ { 12, 64},
|
||||
/* [332] = 4212 */ { 12, 65},
|
||||
/* [333] = 4213 */ { 12, 66},
|
||||
/* [334] = 4214 */ { 12, 67},
|
||||
/* [335] = 4215 */ { 28, ~0},
|
||||
/* [336] = 4216 */ { 44, ~0},
|
||||
/* [337] = 4217 */ { 16, 68},
|
||||
/* [338] = 4218 */ { 28, 69},
|
||||
/* [339] = 4219 */ { 44, 70},
|
||||
/* [340] = 4220 */ { 8, ~0},
|
||||
/* [341] = 4221 */ { 12, ~0},
|
||||
/* [342] = 4222 */ { 8, 71},
|
||||
/* [343] = 4223 */ { 0, ~0},
|
||||
/* [344] = 4224 */ { 0, ~0},
|
||||
/* [345] = 4225 */ { 0, ~0},
|
||||
/* [346] = 4226 */ { 0, ~0},
|
||||
/* [347] = 4227 */ { 0, ~0},
|
||||
/* [348] = 4228 */ { 12, ~0},
|
||||
/* [349] = 4229 */ { 0, ~0},
|
||||
/* [350] = 4230 */ { 12, ~0},
|
||||
/* [351] = 4231 */ { 24, ~0},
|
||||
/* [352] = 4232 */ { 12, ~0},
|
||||
/* [353] = 4233 */ { 16, ~0},
|
||||
/* [354] = 4234 */ { 24, ~0},
|
||||
/* [355] = 4235 */ { 12, ~0},
|
||||
/* [356] = 4236 */ { 16, ~0},
|
||||
/* [357] = 4237 */ { 24, ~0},
|
||||
/* [358] = 4238 */ { 16, ~0},
|
||||
/* [359] = 4239 */ { 24, ~0},
|
||||
/* [360] = 4128 */ { 16, ~0},
|
||||
/* [361] = 4129 */ { 16, ~0},
|
||||
/* [362] = 4130 */ { 28, ~0},
|
||||
/* [363] = 4131 */ { 8, ~0},
|
||||
/* [364] = 4132 */ { 12, ~0},
|
||||
/* [365] = 4133 */ { 16, ~0},
|
||||
/* [366] = 4134 */ { 20, ~0},
|
||||
/* [367] = 4135 */ { 0, ~0},
|
||||
/* [368] = 4264 */ { 0, ~0},
|
||||
/* [369] = 4265 */ { 12, ~0},
|
||||
/* [370] = 4266 */ { 12, ~0},
|
||||
/* [371] = 4267 */ { 16, ~0},
|
||||
/* [372] = 4268 */ { 16, ~0},
|
||||
/* [373] = 4269 */ { 12, ~0},
|
||||
/* [374] = 4270 */ { 16, ~0},
|
||||
/* [375] = 4271 */ { 20, ~0},
|
||||
/* [376] = 4272 */ { 24, ~0},
|
||||
/* [377] = 4273 */ { 16, ~0},
|
||||
/* [378] = 4274 */ { 24, ~0},
|
||||
/* [379] = 4275 */ { 32, ~0},
|
||||
/* [380] = 4276 */ { 40, ~0},
|
||||
/* [381] = 4277 */ { 12, ~0},
|
||||
/* [382] = 4278 */ { 0, ~0},
|
||||
/* [383] = 4279 */ { 0, ~0},
|
||||
/* [384] = 4312 */ { 0, ~0},
|
||||
/* [385] = 4313 */ { 0, ~0},
|
||||
/* [386] = 4314 */ { 0, ~0},
|
||||
/* [387] = 4315 */ { 0, ~0},
|
||||
/* [388] = 4316 */ { 12, ~0},
|
||||
/* [389] = 4317 */ { 8, 72},
|
||||
/* [390] = 4318 */ { 20, ~0},
|
||||
/* [391] = 4319 */ { 12, ~0},
|
||||
/* [392] = 4320 */ { 8, 73},
|
||||
/* [393] = 4321 */ { 24, ~0},
|
||||
/* [394] = 4322 */ { 24, ~0},
|
||||
/* [395] = 4323 */ { 28, ~0},
|
||||
/* [396] = 4324 */ { 20, ~0},
|
||||
/* [397] = 4325 */ { 8, ~0},
|
||||
/* [398] = 4326 */ { 0, ~0},
|
||||
/* [399] = 4327 */ { 0, ~0},
|
||||
};
|
||||
|
||||
static const gl_proto_size_func Render_size_func_table[74] = {
|
||||
|
@ -1172,6 +1197,10 @@ static const gl_proto_size_func Render_size_func_table[74] = {
|
|||
__glXTexImage3DReqSize,
|
||||
__glXTexSubImage3DReqSize,
|
||||
__glXPrioritizeTexturesReqSize,
|
||||
__glXRequestResidentProgramsNVReqSize,
|
||||
__glXLoadProgramNVReqSize,
|
||||
__glXProgramParameters4fvNVReqSize,
|
||||
__glXProgramParameters4dvNVReqSize,
|
||||
__glXVertexAttribs1svNVReqSize,
|
||||
__glXVertexAttribs2svNVReqSize,
|
||||
__glXVertexAttribs3svNVReqSize,
|
||||
|
@ -1189,10 +1218,6 @@ static const gl_proto_size_func Render_size_func_table[74] = {
|
|||
__glXProgramNamedParameter4fvNVReqSize,
|
||||
__glXProgramNamedParameter4dvNVReqSize,
|
||||
__glXPointParameterivNVReqSize,
|
||||
__glXRequestResidentProgramsNVReqSize,
|
||||
__glXLoadProgramNVReqSize,
|
||||
__glXProgramParameters4fvNVReqSize,
|
||||
__glXProgramParameters4dvNVReqSize,
|
||||
__glXDeleteRenderbuffersEXTReqSize,
|
||||
__glXDeleteFramebuffersEXTReqSize,
|
||||
};
|
||||
|
@ -1236,7 +1261,7 @@ static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
|||
2,
|
||||
21,
|
||||
EMPTY_LEAF,
|
||||
39,
|
||||
36,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [21] -> opcode range [0, 512], node depth 6 */
|
||||
|
@ -1261,57 +1286,57 @@ static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
|||
|
||||
/* [33] -> opcode range [0, 32], node depth 10 */
|
||||
1,
|
||||
36,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [36] -> opcode range [0, 16], node depth 11 */
|
||||
1,
|
||||
EMPTY_LEAF,
|
||||
LEAF(0),
|
||||
|
||||
/* [39] -> opcode range [1024, 1536], node depth 6 */
|
||||
2,
|
||||
44,
|
||||
EMPTY_LEAF,
|
||||
56,
|
||||
|
||||
/* [36] -> opcode range [1024, 1536], node depth 6 */
|
||||
2,
|
||||
41,
|
||||
EMPTY_LEAF,
|
||||
53,
|
||||
67,
|
||||
|
||||
/* [44] -> opcode range [1024, 1152], node depth 7 */
|
||||
/* [41] -> opcode range [1024, 1152], node depth 7 */
|
||||
1,
|
||||
44,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [44] -> opcode range [1024, 1088], node depth 8 */
|
||||
1,
|
||||
47,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [47] -> opcode range [1024, 1088], node depth 8 */
|
||||
/* [47] -> opcode range [1024, 1056], node depth 9 */
|
||||
1,
|
||||
50,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [50] -> opcode range [1024, 1056], node depth 9 */
|
||||
/* [50] -> opcode range [1024, 1040], node depth 10 */
|
||||
1,
|
||||
53,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [53] -> opcode range [1024, 1040], node depth 10 */
|
||||
1,
|
||||
LEAF(8),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [56] -> opcode range [1280, 1408], node depth 7 */
|
||||
1,
|
||||
59,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [59] -> opcode range [1280, 1344], node depth 8 */
|
||||
1,
|
||||
62,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [62] -> opcode range [1280, 1312], node depth 9 */
|
||||
2,
|
||||
EMPTY_LEAF,
|
||||
LEAF(16),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [53] -> opcode range [1280, 1408], node depth 7 */
|
||||
1,
|
||||
56,
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [56] -> opcode range [1280, 1344], node depth 8 */
|
||||
2,
|
||||
61,
|
||||
LEAF(24),
|
||||
LEAF(32),
|
||||
EMPTY_LEAF,
|
||||
64,
|
||||
|
||||
/* [61] -> opcode range [1280, 1296], node depth 9 */
|
||||
1,
|
||||
EMPTY_LEAF,
|
||||
LEAF(40),
|
||||
|
||||
/* [64] -> opcode range [1328, 1344], node depth 9 */
|
||||
1,
|
||||
LEAF(48),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [67] -> opcode range [1408, 1536], node depth 7 */
|
||||
1,
|
||||
|
@ -1326,8 +1351,8 @@ static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
|||
/* [73] -> opcode range [1408, 1440], node depth 9 */
|
||||
2,
|
||||
EMPTY_LEAF,
|
||||
LEAF(40),
|
||||
LEAF(48),
|
||||
LEAF(56),
|
||||
LEAF(64),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [78] -> opcode range [4096, 6144], node depth 5 */
|
||||
|
@ -1364,7 +1389,7 @@ static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
|||
|
||||
/* [98] -> opcode range [4096, 4112], node depth 11 */
|
||||
1,
|
||||
LEAF(56),
|
||||
LEAF(72),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [101] -> opcode range [5120, 5632], node depth 6 */
|
||||
|
@ -1394,7 +1419,7 @@ static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
|||
|
||||
/* [116] -> opcode range [5152, 5168], node depth 11 */
|
||||
1,
|
||||
LEAF(64),
|
||||
LEAF(80),
|
||||
EMPTY_LEAF,
|
||||
|
||||
/* [119] -> opcode range [65536, 98304], node depth 2 */
|
||||
|
@ -1454,36 +1479,36 @@ static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
|||
|
||||
/* [152] -> opcode range [65536, 65552], node depth 13 */
|
||||
1,
|
||||
LEAF(72),
|
||||
LEAF(88),
|
||||
EMPTY_LEAF,
|
||||
|
||||
};
|
||||
|
||||
static const void *VendorPriv_function_table[80][2] = {
|
||||
/* [ 0] = 8 */ {NULL, NULL},
|
||||
/* [ 1] = 9 */ {NULL, NULL},
|
||||
/* [ 2] = 10 */ {NULL, NULL},
|
||||
/* [ 3] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT},
|
||||
/* [ 4] = 12 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures},
|
||||
/* [ 5] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT},
|
||||
/* [ 6] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT},
|
||||
/* [ 7] = 15 */ {NULL, NULL},
|
||||
/* [ 8] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT},
|
||||
/* [ 9] = 1025 */ {NULL, NULL},
|
||||
/* [ 10] = 1026 */ {NULL, NULL},
|
||||
/* [ 11] = 1027 */ {NULL, NULL},
|
||||
/* [ 12] = 1028 */ {NULL, NULL},
|
||||
/* [ 13] = 1029 */ {NULL, NULL},
|
||||
/* [ 14] = 1030 */ {NULL, NULL},
|
||||
/* [ 15] = 1031 */ {NULL, NULL},
|
||||
/* [ 16] = 1288 */ {NULL, NULL},
|
||||
/* [ 17] = 1289 */ {NULL, NULL},
|
||||
/* [ 18] = 1290 */ {NULL, NULL},
|
||||
/* [ 19] = 1291 */ {NULL, NULL},
|
||||
/* [ 20] = 1292 */ {NULL, NULL},
|
||||
/* [ 21] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV},
|
||||
/* [ 22] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV},
|
||||
/* [ 23] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV},
|
||||
static const void *VendorPriv_function_table[96][2] = {
|
||||
/* [ 0] = 0 */ {NULL, NULL},
|
||||
/* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT},
|
||||
/* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT},
|
||||
/* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT},
|
||||
/* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT},
|
||||
/* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT},
|
||||
/* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT},
|
||||
/* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT},
|
||||
/* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT},
|
||||
/* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT},
|
||||
/* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT},
|
||||
/* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT},
|
||||
/* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT},
|
||||
/* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT},
|
||||
/* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT},
|
||||
/* [ 15] = 15 */ {NULL, NULL},
|
||||
/* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT},
|
||||
/* [ 17] = 1025 */ {NULL, NULL},
|
||||
/* [ 18] = 1026 */ {NULL, NULL},
|
||||
/* [ 19] = 1027 */ {NULL, NULL},
|
||||
/* [ 20] = 1028 */ {NULL, NULL},
|
||||
/* [ 21] = 1029 */ {NULL, NULL},
|
||||
/* [ 22] = 1030 */ {NULL, NULL},
|
||||
/* [ 23] = 1031 */ {NULL, NULL},
|
||||
/* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB},
|
||||
/* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB},
|
||||
/* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV},
|
||||
|
@ -1500,46 +1525,62 @@ static const void *VendorPriv_function_table[80][2] = {
|
|||
/* [ 37] = 1309 */ {NULL, NULL},
|
||||
/* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV},
|
||||
/* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV},
|
||||
/* [ 40] = 1416 */ {NULL, NULL},
|
||||
/* [ 41] = 1417 */ {NULL, NULL},
|
||||
/* [ 42] = 1418 */ {NULL, NULL},
|
||||
/* [ 43] = 1419 */ {NULL, NULL},
|
||||
/* [ 44] = 1420 */ {NULL, NULL},
|
||||
/* [ 45] = 1421 */ {NULL, NULL},
|
||||
/* [ 46] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT},
|
||||
/* [ 47] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT},
|
||||
/* [ 48] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT},
|
||||
/* [ 49] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT},
|
||||
/* [ 50] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT},
|
||||
/* [ 51] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT},
|
||||
/* [ 52] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT},
|
||||
/* [ 53] = 1429 */ {NULL, NULL},
|
||||
/* [ 54] = 1430 */ {NULL, NULL},
|
||||
/* [ 55] = 1431 */ {NULL, NULL},
|
||||
/* [ 56] = 4096 */ {NULL, NULL},
|
||||
/* [ 57] = 4097 */ {NULL, NULL},
|
||||
/* [ 58] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI},
|
||||
/* [ 59] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI},
|
||||
/* [ 60] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI},
|
||||
/* [ 61] = 4101 */ {NULL, NULL},
|
||||
/* [ 62] = 4102 */ {NULL, NULL},
|
||||
/* [ 63] = 4103 */ {NULL, NULL},
|
||||
/* [ 64] = 5152 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT},
|
||||
/* [ 65] = 5153 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT},
|
||||
/* [ 66] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA},
|
||||
/* [ 67] = 5155 */ {NULL, NULL},
|
||||
/* [ 68] = 5156 */ {NULL, NULL},
|
||||
/* [ 69] = 5157 */ {NULL, NULL},
|
||||
/* [ 70] = 5158 */ {NULL, NULL},
|
||||
/* [ 71] = 5159 */ {NULL, NULL},
|
||||
/* [ 72] = 65536 */ {NULL, NULL},
|
||||
/* [ 73] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI},
|
||||
/* [ 74] = 65538 */ {NULL, NULL},
|
||||
/* [ 75] = 65539 */ {NULL, NULL},
|
||||
/* [ 76] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX},
|
||||
/* [ 77] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
|
||||
/* [ 78] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
|
||||
/* [ 79] = 65543 */ {NULL, NULL},
|
||||
/* [ 40] = 1288 */ {NULL, NULL},
|
||||
/* [ 41] = 1289 */ {NULL, NULL},
|
||||
/* [ 42] = 1290 */ {NULL, NULL},
|
||||
/* [ 43] = 1291 */ {NULL, NULL},
|
||||
/* [ 44] = 1292 */ {NULL, NULL},
|
||||
/* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV},
|
||||
/* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV},
|
||||
/* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV},
|
||||
/* [ 48] = 1328 */ {NULL, NULL},
|
||||
/* [ 49] = 1329 */ {NULL, NULL},
|
||||
/* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT},
|
||||
/* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT},
|
||||
/* [ 52] = 1332 */ {NULL, NULL},
|
||||
/* [ 53] = 1333 */ {NULL, NULL},
|
||||
/* [ 54] = 1334 */ {NULL, NULL},
|
||||
/* [ 55] = 1335 */ {NULL, NULL},
|
||||
/* [ 56] = 1416 */ {NULL, NULL},
|
||||
/* [ 57] = 1417 */ {NULL, NULL},
|
||||
/* [ 58] = 1418 */ {NULL, NULL},
|
||||
/* [ 59] = 1419 */ {NULL, NULL},
|
||||
/* [ 60] = 1420 */ {NULL, NULL},
|
||||
/* [ 61] = 1421 */ {NULL, NULL},
|
||||
/* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT},
|
||||
/* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT},
|
||||
/* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT},
|
||||
/* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT},
|
||||
/* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT},
|
||||
/* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT},
|
||||
/* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT},
|
||||
/* [ 69] = 1429 */ {NULL, NULL},
|
||||
/* [ 70] = 1430 */ {NULL, NULL},
|
||||
/* [ 71] = 1431 */ {NULL, NULL},
|
||||
/* [ 72] = 4096 */ {NULL, NULL},
|
||||
/* [ 73] = 4097 */ {NULL, NULL},
|
||||
/* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI},
|
||||
/* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI},
|
||||
/* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI},
|
||||
/* [ 77] = 4101 */ {NULL, NULL},
|
||||
/* [ 78] = 4102 */ {NULL, NULL},
|
||||
/* [ 79] = 4103 */ {NULL, NULL},
|
||||
/* [ 80] = 5152 */ {NULL, NULL},
|
||||
/* [ 81] = 5153 */ {NULL, NULL},
|
||||
/* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA},
|
||||
/* [ 83] = 5155 */ {NULL, NULL},
|
||||
/* [ 84] = 5156 */ {NULL, NULL},
|
||||
/* [ 85] = 5157 */ {NULL, NULL},
|
||||
/* [ 86] = 5158 */ {NULL, NULL},
|
||||
/* [ 87] = 5159 */ {NULL, NULL},
|
||||
/* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI},
|
||||
/* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI},
|
||||
/* [ 90] = 65538 */ {NULL, NULL},
|
||||
/* [ 91] = 65539 */ {NULL, NULL},
|
||||
/* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX},
|
||||
/* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
|
||||
/* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
|
||||
/* [ 95] = 65543 */ {NULL, NULL},
|
||||
};
|
||||
|
||||
const struct __glXDispatchInfo VendorPriv_dispatch_info = {
|
||||
|
|
133
GL/glx/indirect_texture_compression.c
Normal file
133
GL/glx/indirect_texture_compression.c
Normal file
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
* (C) Copyright IBM Corporation 2005, 2006
|
||||
* 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
|
||||
* IBM,
|
||||
* AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
#define NEED_REPLIES
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "glxserver.h"
|
||||
#include "glxext.h"
|
||||
#include "singlesize.h"
|
||||
#include "unpack.h"
|
||||
#include "indirect_size_get.h"
|
||||
#include "indirect_dispatch.h"
|
||||
#include "glapitable.h"
|
||||
#include "glapi.h"
|
||||
#include "glthread.h"
|
||||
#include "dispatch.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <byteswap.h>
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
#define bswap_32 bswap32
|
||||
#define bswap_64 bswap64
|
||||
#endif
|
||||
|
||||
int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent( cl, req->contextTag, & error );
|
||||
ClientPtr client = cl->client;
|
||||
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum target = *(GLenum *)(pc + 0);
|
||||
const GLint level = *(GLint *)(pc + 4);
|
||||
GLint compsize = 0;
|
||||
char *answer, answerBuffer[200];
|
||||
|
||||
CALL_GetTexLevelParameteriv(GET_DISPATCH(), (target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize));
|
||||
|
||||
if ( compsize != 0 ) {
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetCompressedTexImageARB(GET_DISPATCH(), (target, level, answer));
|
||||
}
|
||||
|
||||
if (__glXErrorOccured()) {
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
__GLX_SEND_HEADER();
|
||||
} else {
|
||||
__GLX_BEGIN_REPLY(compsize);
|
||||
((xGLXGetTexImageReply *)&__glXReply)->width = compsize;
|
||||
__GLX_SEND_HEADER();
|
||||
__GLX_SEND_VOID_ARRAY(compsize);
|
||||
}
|
||||
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *pc)
|
||||
{
|
||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||
int error;
|
||||
__GLXcontext * const cx = __glXForceCurrent( cl, bswap_32( req->contextTag ), & error );
|
||||
ClientPtr client = cl->client;
|
||||
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
if ( cx != NULL ) {
|
||||
const GLenum target = (GLenum) bswap_32( *(int *)(pc + 0) );
|
||||
const GLint level = (GLint ) bswap_32( *(int *)(pc + 4) );
|
||||
GLint compsize = 0;
|
||||
char *answer, answerBuffer[200];
|
||||
|
||||
CALL_GetTexLevelParameteriv(GET_DISPATCH(), (target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize));
|
||||
|
||||
if ( compsize != 0 ) {
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetCompressedTexImageARB(GET_DISPATCH(), (target, level, answer));
|
||||
}
|
||||
|
||||
if (__glXErrorOccured()) {
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
__GLX_SEND_HEADER();
|
||||
} else {
|
||||
__GLX_BEGIN_REPLY(compsize);
|
||||
((xGLXGetTexImageReply *)&__glXReply)->width = compsize;
|
||||
__GLX_SEND_HEADER();
|
||||
__GLX_SEND_VOID_ARRAY(compsize);
|
||||
}
|
||||
|
||||
error = Success;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
|
@ -392,13 +392,3 @@ int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc)
|
|||
{
|
||||
return DoGetString(cl, pc, GL_FALSE);
|
||||
}
|
||||
|
||||
int __glXDisp_GetProgramStringARB(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXDisp_GetProgramStringNV(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
|
@ -270,13 +270,3 @@ int __glXDispSwap_GetString(__GLXclientState *cl, GLbyte *pc)
|
|||
{
|
||||
return DoGetString(cl, pc, GL_TRUE);
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetProgramStringARB(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetProgramStringNV(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ int __glXDisp_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize, compsize2;
|
||||
GLenum format, type, target;
|
||||
|
@ -206,12 +206,11 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0, height=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
format = *(GLenum *)(pc + 4);
|
||||
type = *(GLenum *)(pc + 8);
|
||||
target = *(GLenum *)(pc + 0);
|
||||
|
@ -220,8 +219,8 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
/* target must be SEPARABLE_2D, however I guess we can let the GL
|
||||
barf on this one.... */
|
||||
|
||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) );
|
||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) );
|
||||
CALL_GetConvolutionParameteriv(GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width));
|
||||
CALL_GetConvolutionParameteriv(GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height));
|
||||
/*
|
||||
* The two queries above might fail if we're in a state where queries
|
||||
* are illegal, but then width and height would still be zero anyway.
|
||||
|
@ -234,7 +233,7 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
compsize = __GLX_PAD(compsize);
|
||||
compsize2 = __GLX_PAD(compsize2);
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize + compsize2,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetSeparableFilter( GET_DISPATCH(), (
|
||||
|
@ -260,7 +259,22 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDisp_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc,
|
||||
GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -271,22 +285,23 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0, height=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
format = *(GLenum *)(pc + 4);
|
||||
type = *(GLenum *)(pc + 8);
|
||||
target = *(GLenum *)(pc + 0);
|
||||
swapBytes = *(GLboolean *)(pc + 12);
|
||||
|
||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) );
|
||||
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
|
||||
(target, GL_CONVOLUTION_WIDTH, &width));
|
||||
if (target == GL_CONVOLUTION_1D) {
|
||||
height = 1;
|
||||
} else {
|
||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) );
|
||||
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
|
||||
(target, GL_CONVOLUTION_HEIGHT, &height));
|
||||
}
|
||||
/*
|
||||
* The two queries above might fail if we're in a state where queries
|
||||
|
@ -295,7 +310,7 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
compsize = __glGetTexImage_size(target,1,format,type,width,height,1);
|
||||
if (compsize < 0) compsize = 0;
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetConvolutionFilter( GET_DISPATCH(), (
|
||||
|
@ -319,7 +334,21 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDisp_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -330,19 +359,19 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
format = *(GLenum *)(pc + 4);
|
||||
type = *(GLenum *)(pc + 8);
|
||||
target = *(GLenum *)(pc + 0);
|
||||
swapBytes = *(GLboolean *)(pc + 12);
|
||||
reset = *(GLboolean *)(pc + 13);
|
||||
|
||||
CALL_GetHistogramParameteriv( GET_DISPATCH(), (target, GL_HISTOGRAM_WIDTH, &width) );
|
||||
CALL_GetHistogramParameteriv(GET_DISPATCH(),
|
||||
(target, GL_HISTOGRAM_WIDTH, &width));
|
||||
/*
|
||||
* The one query above might fail if we're in a state where queries
|
||||
* are illegal, but then width would still be zero anyway.
|
||||
|
@ -350,10 +379,10 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
|||
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
|
||||
if (compsize < 0) compsize = 0;
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetHistogram( GET_DISPATCH(), (target, reset, format, type, answer) );
|
||||
CALL_GetHistogram(GET_DISPATCH(), (target, reset, format, type, answer));
|
||||
|
||||
if (__glXErrorOccured()) {
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
|
@ -368,7 +397,21 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDisp_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -378,12 +421,11 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
|||
int error;
|
||||
char *answer, answerBuffer[200];
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
format = *(GLenum *)(pc + 4);
|
||||
type = *(GLenum *)(pc + 8);
|
||||
target = *(GLenum *)(pc + 0);
|
||||
|
@ -393,10 +435,10 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
|||
compsize = __glGetTexImage_size(target,1,format,type,2,1,1);
|
||||
if (compsize < 0) compsize = 0;
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetMinmax( GET_DISPATCH(), (target, reset, format, type, answer) );
|
||||
CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, answer));
|
||||
|
||||
if (__glXErrorOccured()) {
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
|
@ -410,7 +452,21 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDisp_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -421,18 +477,18 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
target = *(GLenum *)(pc + 0);
|
||||
format = *(GLenum *)(pc + 4);
|
||||
type = *(GLenum *)(pc + 8);
|
||||
swapBytes = *(GLboolean *)(pc + 12);
|
||||
|
||||
CALL_GetColorTableParameteriv( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) );
|
||||
CALL_GetColorTableParameteriv(GET_DISPATCH(),
|
||||
(target, GL_COLOR_TABLE_WIDTH, &width));
|
||||
/*
|
||||
* The one query above might fail if we're in a state where queries
|
||||
* are illegal, but then width would still be zero anyway.
|
||||
|
@ -440,7 +496,7 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
|||
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
|
||||
if (compsize < 0) compsize = 0;
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetColorTable( GET_DISPATCH(), (
|
||||
|
@ -463,60 +519,16 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDisp_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
GLboolean swapBytes;
|
||||
__GLXcontext *cx;
|
||||
ClientPtr client = cl->client;
|
||||
int error;
|
||||
char *answer, answerBuffer[200];
|
||||
GLint width=0;
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
target = *(GLenum *)(pc + 0);
|
||||
format = *(GLenum *)(pc + 4);
|
||||
type = *(GLenum *)(pc + 8);
|
||||
swapBytes = *(GLboolean *)(pc + 12);
|
||||
|
||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) );
|
||||
/*
|
||||
* The one query above might fail if we're in a state where queries
|
||||
* are illegal, but then width would still be zero anyway.
|
||||
*/
|
||||
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
|
||||
if (compsize < 0) compsize = 0;
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetColorTableSGI( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
*(GLenum *)(pc + 4),
|
||||
*(GLenum *)(pc + 8),
|
||||
answer
|
||||
) );
|
||||
|
||||
if (__glXErrorOccured()) {
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
__GLX_SEND_HEADER();
|
||||
} else {
|
||||
__GLX_BEGIN_REPLY(compsize);
|
||||
((xGLXGetColorTableReply *)&__glXReply)->width = width;
|
||||
__GLX_SEND_HEADER();
|
||||
__GLX_SEND_VOID_ARRAY(compsize);
|
||||
}
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetCompressedTexImageARB(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return BadRequest;
|
||||
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ int __glXDispSwap_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize, compsize2;
|
||||
GLenum format, type, target;
|
||||
|
@ -231,12 +231,11 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0, height=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
__GLX_SWAP_INT(pc+0);
|
||||
__GLX_SWAP_INT(pc+4);
|
||||
__GLX_SWAP_INT(pc+8);
|
||||
|
@ -291,7 +290,21 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -303,12 +316,11 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0, height=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
__GLX_SWAP_INT(pc+0);
|
||||
__GLX_SWAP_INT(pc+4);
|
||||
__GLX_SWAP_INT(pc+8);
|
||||
|
@ -357,7 +369,21 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -369,12 +395,11 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
__GLX_SWAP_INT(pc+0);
|
||||
__GLX_SWAP_INT(pc+4);
|
||||
__GLX_SWAP_INT(pc+8);
|
||||
|
@ -412,7 +437,21 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -423,12 +462,11 @@ int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
|||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
char *answer, answerBuffer[200];
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
__GLX_SWAP_INT(pc+0);
|
||||
__GLX_SWAP_INT(pc+4);
|
||||
__GLX_SWAP_INT(pc+8);
|
||||
|
@ -459,7 +497,21 @@ int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
|
@ -471,12 +523,11 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
|||
char *answer, answerBuffer[200];
|
||||
GLint width=0;
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
cx = __glXForceCurrent(cl, tag, &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
__GLX_SWAP_INT(pc+0);
|
||||
__GLX_SWAP_INT(pc+4);
|
||||
__GLX_SWAP_INT(pc+8);
|
||||
|
@ -518,66 +569,16 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
|
||||
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
GLint compsize;
|
||||
GLenum format, type, target;
|
||||
GLboolean swapBytes;
|
||||
__GLXcontext *cx;
|
||||
ClientPtr client = cl->client;
|
||||
int error;
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
char *answer, answerBuffer[200];
|
||||
GLint width=0;
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
}
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
__GLX_SWAP_INT(pc+0);
|
||||
__GLX_SWAP_INT(pc+4);
|
||||
__GLX_SWAP_INT(pc+8);
|
||||
|
||||
format = *(GLenum *)(pc + 4);
|
||||
type = *(GLenum *)(pc + 8);
|
||||
target = *(GLenum *)(pc + 0);
|
||||
swapBytes = *(GLboolean *)(pc + 12);
|
||||
|
||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) );
|
||||
/*
|
||||
* The one query above might fail if we're in a state where queries
|
||||
* are illegal, but then width would still be zero anyway.
|
||||
*/
|
||||
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
|
||||
if (compsize < 0) compsize = 0;
|
||||
|
||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) );
|
||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetColorTableSGI( GET_DISPATCH(), (
|
||||
*(GLenum *)(pc + 0),
|
||||
*(GLenum *)(pc + 4),
|
||||
*(GLenum *)(pc + 8),
|
||||
answer
|
||||
) );
|
||||
|
||||
if (__glXErrorOccured()) {
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
__GLX_SWAP_REPLY_HEADER();
|
||||
} else {
|
||||
__GLX_BEGIN_REPLY(compsize);
|
||||
__GLX_SWAP_REPLY_HEADER();
|
||||
__GLX_SWAP_INT(&width);
|
||||
((xGLXGetColorTableReply *)&__glXReply)->width = width;
|
||||
__GLX_SEND_VOID_ARRAY(compsize);
|
||||
}
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
int __glXDispSwap_GetCompressedTexImageARB(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return BadRequest;
|
||||
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
|
105
GL/glx/swap_interval.c
Normal file
105
GL/glx/swap_interval.c
Normal file
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* (C) Copyright IBM Corporation 2006
|
||||
* 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
|
||||
* on 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
|
||||
* THE COPYRIGHT HOLDERS AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
#define NEED_REPLIES
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include "glxserver.h"
|
||||
#include "glxutil.h"
|
||||
#include "glxext.h"
|
||||
#include "singlesize.h"
|
||||
#include "unpack.h"
|
||||
#include "indirect_size_get.h"
|
||||
#include "indirect_dispatch.h"
|
||||
#include "glapitable.h"
|
||||
#include "glapi.h"
|
||||
#include "glthread.h"
|
||||
#include "dispatch.h"
|
||||
#include "glapioffsets.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <byteswap.h>
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
#define bswap_32 bswap32
|
||||
#define bswap_64 bswap64
|
||||
#endif
|
||||
|
||||
static int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap);
|
||||
|
||||
int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
|
||||
{
|
||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||
ClientPtr client = cl->client;
|
||||
const GLXContextTag tag = req->contextTag;
|
||||
__GLXcontext *cx;
|
||||
GLint interval;
|
||||
|
||||
|
||||
cx = __glXLookupContextByTag(cl, tag);
|
||||
|
||||
LogMessage(X_ERROR, "%s: cx = %p, GLX screen = %p\n", __func__,
|
||||
cx, (cx == NULL) ? NULL : cx->pGlxScreen);
|
||||
if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
|
||||
client->errorValue = tag;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
if (cx->pGlxScreen->swapInterval == NULL) {
|
||||
LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n");
|
||||
client->errorValue = tag;
|
||||
return __glXError(GLXUnsupportedPrivateRequest);
|
||||
}
|
||||
|
||||
if (cx->drawPriv == NULL) {
|
||||
client->errorValue = tag;
|
||||
return __glXError(GLXBadDrawable);
|
||||
}
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
interval = (do_swap)
|
||||
? bswap_32(*(int *)(pc + 0))
|
||||
: *(int *)(pc + 0);
|
||||
|
||||
(void) (*cx->pGlxScreen->swapInterval)(cx->drawPriv, interval);
|
||||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return DoSwapInterval(cl, pc, 0);
|
||||
}
|
||||
|
||||
int __glXDispSwap_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return DoSwapInterval(cl, pc, 1);
|
||||
}
|
|
@ -62,414 +62,99 @@ symlink_mesa_glapi() {
|
|||
src_dir src/mesa/glapi
|
||||
dst_dir mesa/glapi
|
||||
|
||||
action dispatch.h
|
||||
action glapi.c
|
||||
action glapi.h
|
||||
action glapioffsets.h
|
||||
action glapitable.h
|
||||
action glapitemp.h
|
||||
action glprocs.h
|
||||
action glthread.c
|
||||
action glthread.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_main() {
|
||||
src_dir src/mesa/main
|
||||
dst_dir mesa/main
|
||||
|
||||
action accum.c
|
||||
action accum.h
|
||||
action api_arrayelt.c
|
||||
action api_arrayelt.h
|
||||
action api_eval.h
|
||||
action api_loopback.c
|
||||
action api_loopback.h
|
||||
action api_noop.c
|
||||
action api_noop.h
|
||||
action api_validate.c
|
||||
action api_validate.h
|
||||
action arrayobj.c
|
||||
action arrayobj.h
|
||||
action attrib.c
|
||||
action attrib.h
|
||||
action bitset.h
|
||||
action blend.c
|
||||
action blend.h
|
||||
action bufferobj.c
|
||||
action bufferobj.h
|
||||
action buffers.c
|
||||
action buffers.h
|
||||
action clip.c
|
||||
action clip.h
|
||||
action colormac.h
|
||||
action colortab.c
|
||||
action colortab.h
|
||||
action config.h
|
||||
action context.c
|
||||
action context.h
|
||||
action convolve.c
|
||||
action convolve.h
|
||||
action dd.h
|
||||
action debug.c
|
||||
action debug.h
|
||||
action depth.c
|
||||
action depth.h
|
||||
action depthstencil.c
|
||||
action depthstencil.h
|
||||
action dlist.c
|
||||
action dlist.h
|
||||
action drawpix.c
|
||||
action drawpix.h
|
||||
action enable.c
|
||||
action enable.h
|
||||
action enums.c
|
||||
action enums.h
|
||||
action eval.c
|
||||
action eval.h
|
||||
action execmem.c
|
||||
action extensions.c
|
||||
action extensions.h
|
||||
action fbobject.c
|
||||
action fbobject.h
|
||||
action feedback.c
|
||||
action feedback.h
|
||||
action fog.c
|
||||
action fog.h
|
||||
action framebuffer.c
|
||||
action framebuffer.h
|
||||
action get.c
|
||||
action get.h
|
||||
action getstring.c
|
||||
action glheader.h
|
||||
action hash.c
|
||||
action hash.h
|
||||
action hint.c
|
||||
action hint.h
|
||||
action histogram.c
|
||||
action histogram.h
|
||||
action image.c
|
||||
action image.h
|
||||
action imports.c
|
||||
action imports.h
|
||||
action light.c
|
||||
action light.h
|
||||
action lines.c
|
||||
action lines.h
|
||||
action macros.h
|
||||
action matrix.c
|
||||
action matrix.h
|
||||
action mm.c
|
||||
action mm.h
|
||||
action mtypes.h
|
||||
action occlude.c
|
||||
action occlude.h
|
||||
action pixel.c
|
||||
action pixel.h
|
||||
action points.c
|
||||
action points.h
|
||||
action polygon.c
|
||||
action polygon.h
|
||||
action rastpos.c
|
||||
action rastpos.h
|
||||
action rbadaptors.c
|
||||
action rbadaptors.h
|
||||
action renderbuffer.c
|
||||
action renderbuffer.h
|
||||
action simple_list.h
|
||||
action state.c
|
||||
action state.h
|
||||
action stencil.c
|
||||
action stencil.h
|
||||
action texcompress.c
|
||||
action texcompress.h
|
||||
action texcompress_fxt1.c
|
||||
action texcompress_s3tc.c
|
||||
action texenvprogram.c
|
||||
action texenvprogram.h
|
||||
action texformat.c
|
||||
action texformat.h
|
||||
action texformat_tmp.h
|
||||
action teximage.c
|
||||
action teximage.h
|
||||
action texobj.c
|
||||
action texobj.h
|
||||
action texrender.c
|
||||
action texrender.h
|
||||
action texstate.c
|
||||
action texstate.h
|
||||
action texstore.c
|
||||
action texstore.h
|
||||
action varray.c
|
||||
action varray.h
|
||||
action version.h
|
||||
action vsnprintf.c
|
||||
action vtxfmt.c
|
||||
action vtxfmt.h
|
||||
action vtxfmt_tmp.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_math() {
|
||||
src_dir src/mesa/math
|
||||
dst_dir mesa/math
|
||||
|
||||
action m_clip_tmp.h
|
||||
action m_copy_tmp.h
|
||||
action m_debug.h
|
||||
action m_debug_clip.c
|
||||
action m_debug_norm.c
|
||||
action m_debug_util.h
|
||||
action m_debug_xform.c
|
||||
action m_dotprod_tmp.h
|
||||
action m_eval.c
|
||||
action m_eval.h
|
||||
action m_matrix.c
|
||||
action m_matrix.h
|
||||
action m_norm_tmp.h
|
||||
action m_trans_tmp.h
|
||||
action m_translate.c
|
||||
action m_translate.h
|
||||
action m_vector.c
|
||||
action m_vector.h
|
||||
action m_xform.c
|
||||
action m_xform.h
|
||||
action m_xform_tmp.h
|
||||
action mathmod.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_ac() {
|
||||
src_dir src/mesa/array_cache
|
||||
dst_dir mesa/array_cache
|
||||
|
||||
action ac_context.c
|
||||
action ac_context.h
|
||||
action ac_import.c
|
||||
action acache.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_swrast() {
|
||||
src_dir src/mesa/swrast
|
||||
dst_dir mesa/swrast
|
||||
|
||||
action s_aaline.c
|
||||
action s_aaline.h
|
||||
action s_aalinetemp.h
|
||||
action s_aatriangle.c
|
||||
action s_aatriangle.h
|
||||
action s_aatritemp.h
|
||||
action s_accum.c
|
||||
action s_accum.h
|
||||
action s_alpha.c
|
||||
action s_alpha.h
|
||||
action s_arbshader.c
|
||||
action s_arbshader.h
|
||||
action s_atifragshader.c
|
||||
action s_atifragshader.h
|
||||
action s_bitmap.c
|
||||
action s_blend.c
|
||||
action s_blend.h
|
||||
action s_blit.c
|
||||
action s_buffers.c
|
||||
action s_context.c
|
||||
action s_context.h
|
||||
action s_copypix.c
|
||||
action s_depth.c
|
||||
action s_depth.h
|
||||
action s_drawpix.c
|
||||
action s_drawpix.h
|
||||
action s_feedback.c
|
||||
action s_feedback.h
|
||||
action s_fog.c
|
||||
action s_fog.h
|
||||
action s_imaging.c
|
||||
action s_lines.c
|
||||
action s_lines.h
|
||||
action s_linetemp.h
|
||||
action s_logic.c
|
||||
action s_logic.h
|
||||
action s_masking.c
|
||||
action s_masking.h
|
||||
action s_nvfragprog.c
|
||||
action s_nvfragprog.h
|
||||
action s_points.c
|
||||
action s_points.h
|
||||
action s_pointtemp.h
|
||||
action s_readpix.c
|
||||
action s_span.c
|
||||
action s_span.h
|
||||
action s_spantemp.h
|
||||
action s_stencil.c
|
||||
action s_stencil.h
|
||||
action s_texcombine.c
|
||||
action s_texcombine.h
|
||||
action s_texfilter.c
|
||||
action s_texfilter.h
|
||||
action s_texstore.c
|
||||
action s_triangle.c
|
||||
action s_triangle.h
|
||||
action s_trispan.h
|
||||
action s_tritemp.h
|
||||
action s_zoom.c
|
||||
action s_zoom.h
|
||||
action swrast.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_ss() {
|
||||
src_dir src/mesa/swrast_setup
|
||||
dst_dir mesa/swrast_setup
|
||||
|
||||
action ss_context.c
|
||||
action ss_context.h
|
||||
action ss_triangle.c
|
||||
action ss_triangle.h
|
||||
action ss_tritmp.h
|
||||
action ss_vb.h
|
||||
action swrast_setup.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_tnl() {
|
||||
src_dir src/mesa/tnl
|
||||
dst_dir mesa/tnl
|
||||
|
||||
action t_array_api.c
|
||||
action t_array_api.h
|
||||
action t_array_import.c
|
||||
action t_array_import.h
|
||||
action t_context.c
|
||||
action t_context.h
|
||||
action t_pipeline.c
|
||||
action t_pipeline.h
|
||||
action t_save_api.c
|
||||
action t_save_api.h
|
||||
action t_save_loopback.c
|
||||
action t_save_playback.c
|
||||
action t_vb_arbprogram.c
|
||||
action t_vb_arbprogram.h
|
||||
action t_vb_arbprogram_sse.c
|
||||
action t_vb_arbshader.c
|
||||
action t_vb_cliptmp.h
|
||||
action t_vb_cull.c
|
||||
action t_vb_fog.c
|
||||
action t_vb_light.c
|
||||
action t_vb_lighttmp.h
|
||||
action t_vb_normals.c
|
||||
action t_vb_points.c
|
||||
action t_vb_program.c
|
||||
action t_vb_render.c
|
||||
action t_vb_rendertmp.h
|
||||
action t_vb_texgen.c
|
||||
action t_vb_texmat.c
|
||||
action t_vb_vertex.c
|
||||
action t_vertex.c
|
||||
action t_vertex.h
|
||||
action t_vertex_generic.c
|
||||
action t_vertex_sse.c
|
||||
action t_vp_build.c
|
||||
action t_vp_build.h
|
||||
action t_vtx_api.c
|
||||
action t_vtx_api.h
|
||||
action t_vtx_eval.c
|
||||
action t_vtx_exec.c
|
||||
action t_vtx_generic.c
|
||||
action t_vtx_x86.c
|
||||
action tnl.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader() {
|
||||
src_dir src/mesa/shader
|
||||
dst_dir mesa/shader
|
||||
|
||||
action arbprogparse.c
|
||||
action arbprogparse.h
|
||||
action arbprogram.c
|
||||
action arbprogram.h
|
||||
action arbprogram_syn.h
|
||||
action atifragshader.c
|
||||
action atifragshader.h
|
||||
action nvfragparse.c
|
||||
action nvfragparse.h
|
||||
action nvprogram.c
|
||||
action nvprogram.h
|
||||
action nvvertexec.c
|
||||
action nvvertexec.h
|
||||
action nvvertparse.c
|
||||
action nvvertparse.h
|
||||
action program.c
|
||||
action program.h
|
||||
action program_instruction.h
|
||||
action shaderobjects.c
|
||||
action shaderobjects.h
|
||||
action shaderobjects_3dlabs.c
|
||||
action shaderobjects_3dlabs.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader_grammar() {
|
||||
src_dir src/mesa/shader/grammar
|
||||
dst_dir mesa/shader/grammar
|
||||
|
||||
action grammar.c
|
||||
action grammar.h
|
||||
action grammar_syn.h
|
||||
action grammar_mesa.c
|
||||
action grammar_mesa.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader_slang() {
|
||||
src_dir src/mesa/shader/slang
|
||||
dst_dir mesa/shader/slang
|
||||
|
||||
action slang_analyse.c
|
||||
action slang_analyse.h
|
||||
action slang_assemble.c
|
||||
action slang_assemble.h
|
||||
action slang_assemble_assignment.c
|
||||
action slang_assemble_assignment.h
|
||||
action slang_assemble_conditional.c
|
||||
action slang_assemble_conditional.h
|
||||
action slang_assemble_constructor.c
|
||||
action slang_assemble_constructor.h
|
||||
action slang_assemble_typeinfo.c
|
||||
action slang_assemble_typeinfo.h
|
||||
action slang_compile.c
|
||||
action slang_compile.h
|
||||
action slang_compile_function.c
|
||||
action slang_compile_function.h
|
||||
action slang_compile_operation.c
|
||||
action slang_compile_operation.h
|
||||
action slang_compile_struct.c
|
||||
action slang_compile_struct.h
|
||||
action slang_compile_variable.c
|
||||
action slang_compile_variable.h
|
||||
action slang_execute.c
|
||||
action slang_execute.h
|
||||
action slang_execute_x86.c
|
||||
action slang_export.c
|
||||
action slang_export.h
|
||||
action slang_library_noise.c
|
||||
action slang_library_noise.h
|
||||
action slang_library_texsample.c
|
||||
action slang_library_texsample.h
|
||||
action slang_link.c
|
||||
action slang_link.h
|
||||
action slang_mesa.h
|
||||
action slang_preprocess.c
|
||||
action slang_preprocess.h
|
||||
action slang_storage.c
|
||||
action slang_storage.h
|
||||
action slang_utility.c
|
||||
action slang_utility.h
|
||||
action traverse_wrap.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader_slang_library() {
|
||||
src_dir src/mesa/shader/slang/library
|
||||
dst_dir mesa/shader/slang/library
|
||||
|
||||
action slang_common_builtin_gc.h
|
||||
action slang_core_gc.h
|
||||
action slang_fragment_builtin_gc.h
|
||||
action slang_shader_syn.h
|
||||
action slang_pp_version_syn.h
|
||||
action slang_vertex_builtin_gc.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_x() {
|
||||
|
|
|
@ -33,6 +33,10 @@ MODULE_SRCS = \
|
|||
sync.c \
|
||||
xcmisc.c
|
||||
|
||||
# Extra configuration files ship with some extensions
|
||||
SERVERCONFIGdir = $(libdir)/xserver
|
||||
SERVERCONFIG_DATA =
|
||||
|
||||
# Optional sources included if extension enabled by configure.ac rules
|
||||
|
||||
# MIT Shared Memory extension
|
||||
|
@ -65,16 +69,28 @@ if XINERAMA
|
|||
BUILTIN_SRCS += $(XINERAMA_SRCS)
|
||||
endif
|
||||
|
||||
# X-ACE extension: provides hooks for building security policy extensions
|
||||
# like XC-Security, X-SELinux & XTSol
|
||||
XACE_SRCS = xace.c xace.h xacestr.h
|
||||
if XACE
|
||||
BUILTIN_SRCS += $(XACE_SRCS)
|
||||
endif
|
||||
|
||||
# Security extension: multi-level security to protect clients from each other
|
||||
XCSECURITY_SRCS = security.c securitysrv.h
|
||||
if XCSECURITY
|
||||
BUILTIN_SRCS += $(XCSECURITY_SRCS)
|
||||
|
||||
SERVERCONFIGdir = $(libdir)/xserver
|
||||
SERVERCONFIG_DATA = SecurityPolicy
|
||||
SERVERCONFIG_DATA += SecurityPolicy
|
||||
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
|
||||
endif
|
||||
|
||||
XCALIBRATE_SRCS = xcalibrate.c
|
||||
if XCALIBRATE
|
||||
BUILTIN_SRCS += $(XCALIBRATE_SRCS)
|
||||
# XCalibrare needs tslib
|
||||
endif
|
||||
|
||||
# X EVent Interception Extension: allows accessibility helpers & composite
|
||||
# managers to intercept events from input devices and transform as needed
|
||||
# before the clients see them.
|
||||
|
@ -144,12 +160,14 @@ libXextmodule_la_SOURCES = $(MODULE_SRCS)
|
|||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
SecurityPolicy \
|
||||
$(SERVERCONFIG_DATA) \
|
||||
$(MITSHM_SRCS) \
|
||||
$(XV_SRCS) \
|
||||
$(RES_SRCS) \
|
||||
$(SCREENSAVER_SRCS) \
|
||||
$(XACE_SRCS) \
|
||||
$(XCSECURITY_SRCS) \
|
||||
$(XCALIBRATE_SRCS) \
|
||||
$(XINERAMA_SRCS) \
|
||||
$(XEVIE_SRCS) \
|
||||
$(XPRINT_SRCS) \
|
||||
|
|
|
@ -41,6 +41,7 @@ from The Open Group.
|
|||
#include "servermd.h"
|
||||
#define _XAG_SERVER_
|
||||
#include <X11/extensions/Xagstr.h>
|
||||
#include "xacestr.h"
|
||||
#include "securitysrv.h"
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
|
@ -121,62 +122,11 @@ void XagClientStateChange(
|
|||
pointer nulldata,
|
||||
pointer calldata)
|
||||
{
|
||||
SecurityAuthorizationPtr pAuth;
|
||||
NewClientInfoRec* pci = (NewClientInfoRec*) calldata;
|
||||
ClientPtr pClient = pci->client;
|
||||
AppGroupPtr pAppGrp;
|
||||
XID authId = 0;
|
||||
AppGroupPtr pAppGrp = pClient->appgroup;
|
||||
int slot;
|
||||
|
||||
if (!pClient->appgroup) {
|
||||
switch (pClient->clientState) {
|
||||
|
||||
case ClientStateAuthenticating:
|
||||
case ClientStateRunning:
|
||||
case ClientStateCheckingSecurity:
|
||||
return;
|
||||
|
||||
case ClientStateInitial:
|
||||
case ClientStateCheckedSecurity:
|
||||
/*
|
||||
* If the client is connecting via a firewall proxy (which
|
||||
* uses XC-QUERY-SECURITY-1, then the authId is available
|
||||
* during ClientStateCheckedSecurity, otherwise it's
|
||||
* available during ClientStateInitial.
|
||||
*
|
||||
* Don't get it from pClient because can't guarantee the order
|
||||
* of the callbacks and the security extension might not have
|
||||
* plugged it in yet.
|
||||
*/
|
||||
authId = AuthorizationIDOfClient(pClient);
|
||||
break;
|
||||
|
||||
case ClientStateGone:
|
||||
case ClientStateRetained:
|
||||
/*
|
||||
* Don't get if from AuthorizationIDOfClient because can't
|
||||
* guarantee the order of the callbacks and the security
|
||||
* extension may have torn down the client's private data
|
||||
*/
|
||||
authId = pClient->authId;
|
||||
break;
|
||||
}
|
||||
|
||||
if (authId == None)
|
||||
return;
|
||||
|
||||
pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(pClient,
|
||||
authId, SecurityAuthorizationResType, SecurityReadAccess);
|
||||
|
||||
if (pAuth == NULL)
|
||||
return;
|
||||
|
||||
for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next)
|
||||
if (pAppGrp->appgroupId == pAuth->group) break;
|
||||
} else {
|
||||
pAppGrp = pClient->appgroup;
|
||||
}
|
||||
|
||||
if (!pAppGrp)
|
||||
return;
|
||||
|
||||
|
@ -233,6 +183,7 @@ XagExtensionInit(INITARGS)
|
|||
XagResetProc,
|
||||
StandardMinorOpcode)) {
|
||||
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
||||
XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -799,12 +750,33 @@ void XagGetDeltaInfo(
|
|||
}
|
||||
|
||||
void XagCallClientStateChange(
|
||||
ClientPtr client)
|
||||
CallbackListPtr *pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata)
|
||||
{
|
||||
if (appGrpList) {
|
||||
XaceAuthAvailRec* rec = (XaceAuthAvailRec*) calldata;
|
||||
ClientPtr pClient = rec->client;
|
||||
|
||||
if (!pClient->appgroup) {
|
||||
SecurityAuthorizationPtr pAuth;
|
||||
XID authId = rec->authId;
|
||||
|
||||
/* can't use SecurityLookupIDByType here -- client
|
||||
* security state hasn't been setup yet.
|
||||
*/
|
||||
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
||||
SecurityAuthorizationResType);
|
||||
if (!pAuth)
|
||||
return;
|
||||
|
||||
pClient->appgroup = (AppGroupPtr)LookupIDByType(pAuth->group,
|
||||
RT_APPGROUP);
|
||||
}
|
||||
|
||||
if (pClient->appgroup) {
|
||||
NewClientInfoRec clientinfo;
|
||||
|
||||
clientinfo.client = client;
|
||||
clientinfo.client = pClient;
|
||||
XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,9 @@ extern ClientPtr XagLeader(
|
|||
);
|
||||
|
||||
extern void XagCallClientStateChange(
|
||||
ClientPtr /* client */
|
||||
CallbackListPtr * /* pcbl */,
|
||||
pointer /* nulldata */,
|
||||
pointer /* calldata */
|
||||
);
|
||||
|
||||
extern Bool XagIsControlledRoot (
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
#include "inputstr.h"
|
||||
#include "servermd.h"
|
||||
#define _FONTCACHE_SERVER_
|
||||
#include "fontcacheP.h"
|
||||
#include "fontcachstr.h"
|
||||
#include <X11/extensions/fontcacheP.h>
|
||||
#include <X11/extensions/fontcachstr.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
|
||||
#include "swaprep.h"
|
||||
|
|
391
Xext/security.c
391
Xext/security.c
|
@ -36,6 +36,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "gcstruct.h"
|
||||
#include "colormapst.h"
|
||||
#include "propertyst.h"
|
||||
#include "xacestr.h"
|
||||
#include "securitysrv.h"
|
||||
#include <X11/extensions/securstr.h>
|
||||
#include <assert.h>
|
||||
|
@ -58,6 +59,23 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
static int SecurityErrorBase; /* first Security error number */
|
||||
static int SecurityEventBase; /* first Security event number */
|
||||
static int securityClientPrivateIndex;
|
||||
static int securityExtnsnPrivateIndex;
|
||||
|
||||
/* this is what we store as client security state */
|
||||
typedef struct {
|
||||
unsigned int trustLevel;
|
||||
XID authId;
|
||||
} SecurityClientStateRec;
|
||||
|
||||
#define STATEVAL(extnsn) \
|
||||
((extnsn)->devPrivates[securityExtnsnPrivateIndex].val)
|
||||
#define STATEPTR(client) \
|
||||
((client)->devPrivates[securityClientPrivateIndex].ptr)
|
||||
#define TRUSTLEVEL(client) \
|
||||
(((SecurityClientStateRec*)STATEPTR(client))->trustLevel)
|
||||
#define AUTHID(client) \
|
||||
(((SecurityClientStateRec*)STATEPTR(client))->authId)
|
||||
|
||||
CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */
|
||||
|
||||
|
@ -65,19 +83,8 @@ RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */
|
|||
|
||||
static RESTYPE RTEventClient;
|
||||
|
||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||
* These are the same as the normal proc vectors except that extensions
|
||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
int (*UntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
int (*SwappedUntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
#define CALLBACK(name) static void \
|
||||
name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
|
||||
|
||||
/* SecurityAudit
|
||||
*
|
||||
|
@ -91,7 +98,7 @@ int (*SwappedUntrustedProcVector[256])(
|
|||
* Writes the message to the log file if security logging is on.
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
SecurityAudit(char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -164,7 +171,7 @@ SecurityDeleteAuthorization(
|
|||
|
||||
for (i = 1; i<currentMaxClients; i++)
|
||||
{
|
||||
if (clients[i] && (clients[i]->authId == pAuth->id))
|
||||
if (clients[i] && (AUTHID(clients[i]) == pAuth->id))
|
||||
CloseDownClient(clients[i]);
|
||||
}
|
||||
|
||||
|
@ -318,7 +325,7 @@ ProcSecurityQueryVersion(
|
|||
/* paranoia: this "can't happen" because this extension is hidden
|
||||
* from untrusted clients, but just in case...
|
||||
*/
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||
return BadRequest;
|
||||
|
||||
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
||||
|
@ -404,7 +411,7 @@ ProcSecurityGenerateAuthorization(
|
|||
/* paranoia: this "can't happen" because this extension is hidden
|
||||
* from untrusted clients, but just in case...
|
||||
*/
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||
return BadRequest;
|
||||
|
||||
/* check request length */
|
||||
|
@ -587,7 +594,7 @@ ProcSecurityRevokeAuthorization(
|
|||
/* paranoia: this "can't happen" because this extension is hidden
|
||||
* from untrusted clients, but just in case...
|
||||
*/
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||
return BadRequest;
|
||||
|
||||
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
||||
|
@ -772,12 +779,12 @@ SecurityDetermineEventPropogationLimits(
|
|||
* An audit message is generated if access is denied.
|
||||
*/
|
||||
|
||||
Bool
|
||||
SecurityCheckDeviceAccess(client, dev, fromRequest)
|
||||
ClientPtr client;
|
||||
DeviceIntPtr dev;
|
||||
Bool fromRequest;
|
||||
CALLBACK(SecurityCheckDeviceAccess)
|
||||
{
|
||||
XaceDeviceAccessRec *rec = (XaceDeviceAccessRec*)calldata;
|
||||
ClientPtr client = rec->client;
|
||||
DeviceIntPtr dev = rec->dev;
|
||||
Bool fromRequest = rec->fromRequest;
|
||||
WindowPtr pWin, pStopWin;
|
||||
Bool untrusted_got_event;
|
||||
Bool found_event_window;
|
||||
|
@ -785,12 +792,12 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
|||
int reqtype = 0;
|
||||
|
||||
/* trusted clients always allowed to do anything */
|
||||
if (client->trustLevel == XSecurityClientTrusted)
|
||||
return TRUE;
|
||||
if (TRUSTLEVEL(client) == XSecurityClientTrusted)
|
||||
return;
|
||||
|
||||
/* device security other than keyboard is not implemented yet */
|
||||
if (dev != inputInfo.keyboard)
|
||||
return TRUE;
|
||||
return;
|
||||
|
||||
/* some untrusted client wants access */
|
||||
|
||||
|
@ -805,7 +812,8 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
|||
case X_SetModifierMapping:
|
||||
SecurityAudit("client %d attempted request %d\n",
|
||||
client->index, reqtype);
|
||||
return FALSE;
|
||||
rec->rval = FALSE;
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -817,7 +825,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
|||
if (dev->grab)
|
||||
{
|
||||
untrusted_got_event =
|
||||
((rClient(dev->grab))->trustLevel != XSecurityClientTrusted);
|
||||
(TRUSTLEVEL(rClient(dev->grab)) != XSecurityClientTrusted);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -832,7 +840,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
|||
{
|
||||
found_event_window = TRUE;
|
||||
client = wClient(pWin);
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||
{
|
||||
untrusted_got_event = TRUE;
|
||||
}
|
||||
|
@ -845,7 +853,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
|||
if (other->mask & eventmask)
|
||||
{
|
||||
client = rClient(other);
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||
{
|
||||
untrusted_got_event = TRUE;
|
||||
break;
|
||||
|
@ -873,8 +881,9 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
|||
else
|
||||
SecurityAudit("client %d attempted to access device %d (%s)\n",
|
||||
client->index, dev->id, devname);
|
||||
rec->rval = FALSE;
|
||||
}
|
||||
return untrusted_got_event;
|
||||
return;
|
||||
} /* SecurityCheckDeviceAccess */
|
||||
|
||||
|
||||
|
@ -946,20 +955,22 @@ SecurityAuditResourceIDAccess(
|
|||
* Disallowed resource accesses are audited.
|
||||
*/
|
||||
|
||||
static pointer
|
||||
SecurityCheckResourceIDAccess(
|
||||
ClientPtr client,
|
||||
XID id,
|
||||
RESTYPE rtype,
|
||||
Mask access_mode,
|
||||
pointer rval)
|
||||
CALLBACK(SecurityCheckResourceIDAccess)
|
||||
{
|
||||
int cid = CLIENT_ID(id);
|
||||
int reqtype = ((xReq *)client->requestBuffer)->reqType;
|
||||
XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata;
|
||||
ClientPtr client = rec->client;
|
||||
XID id = rec->id;
|
||||
RESTYPE rtype = rec->rtype;
|
||||
Mask access_mode = rec->access_mode;
|
||||
pointer rval = rec->res;
|
||||
int cid, reqtype;
|
||||
|
||||
if (SecurityUnknownAccess == access_mode)
|
||||
return rval; /* for compatibility, we have to allow access */
|
||||
if (TRUSTLEVEL(client) == XSecurityClientTrusted ||
|
||||
SecurityUnknownAccess == access_mode)
|
||||
return; /* for compatibility, we have to allow access */
|
||||
|
||||
cid = CLIENT_ID(id);
|
||||
reqtype = ((xReq *)client->requestBuffer)->reqType;
|
||||
switch (reqtype)
|
||||
{ /* these are always allowed */
|
||||
case X_QueryTree:
|
||||
|
@ -971,7 +982,7 @@ SecurityCheckResourceIDAccess(
|
|||
case X_DeleteProperty:
|
||||
case X_RotateProperties:
|
||||
case X_ListProperties:
|
||||
return rval;
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -991,15 +1002,15 @@ SecurityCheckResourceIDAccess(
|
|||
* competing alternative for grouping clients for security purposes is to
|
||||
* use app groups. dpw
|
||||
*/
|
||||
if (client->trustLevel == clients[cid]->trustLevel
|
||||
if (TRUSTLEVEL(client) == TRUSTLEVEL(clients[cid])
|
||||
#ifdef XAPPGROUP
|
||||
|| (RT_COLORMAP == rtype &&
|
||||
XagDefaultColormap (client) == (Colormap) id)
|
||||
#endif
|
||||
)
|
||||
return rval;
|
||||
return;
|
||||
else
|
||||
return SecurityAuditResourceIDAccess(client, id);
|
||||
goto deny;
|
||||
}
|
||||
else /* server-owned resource - probably a default colormap or root window */
|
||||
{
|
||||
|
@ -1035,7 +1046,7 @@ SecurityCheckResourceIDAccess(
|
|||
)
|
||||
)
|
||||
{ /* not an ICCCM event */
|
||||
return SecurityAuditResourceIDAccess(client, id);
|
||||
goto deny;
|
||||
}
|
||||
break;
|
||||
} /* case X_SendEvent on root */
|
||||
|
@ -1053,28 +1064,31 @@ SecurityCheckResourceIDAccess(
|
|||
~(PropertyChangeMask|StructureNotifyMask)) == 0)
|
||||
break;
|
||||
}
|
||||
return SecurityAuditResourceIDAccess(client, id);
|
||||
goto deny;
|
||||
} /* case X_ChangeWindowAttributes on root */
|
||||
|
||||
default:
|
||||
{
|
||||
/* others not allowed */
|
||||
return SecurityAuditResourceIDAccess(client, id);
|
||||
goto deny;
|
||||
}
|
||||
}
|
||||
} /* end server-owned window or drawable */
|
||||
else if (SecurityAuthorizationResType == rtype)
|
||||
{
|
||||
SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)rval;
|
||||
if (pAuth->trustLevel != client->trustLevel)
|
||||
return SecurityAuditResourceIDAccess(client, id);
|
||||
if (pAuth->trustLevel != TRUSTLEVEL(client))
|
||||
goto deny;
|
||||
}
|
||||
else if (RT_COLORMAP != rtype)
|
||||
{ /* don't allow anything else besides colormaps */
|
||||
return SecurityAuditResourceIDAccess(client, id);
|
||||
goto deny;
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
return;
|
||||
deny:
|
||||
SecurityAuditResourceIDAccess(client, id);
|
||||
rec->rval = FALSE; /* deny access */
|
||||
} /* SecurityCheckResourceIDAccess */
|
||||
|
||||
|
||||
|
@ -1093,30 +1107,32 @@ SecurityCheckResourceIDAccess(
|
|||
* If a new client is connecting, its authorization ID is copied to
|
||||
* client->authID. If this is a generated authorization, its reference
|
||||
* count is bumped, its timer is cancelled if it was running, and its
|
||||
* trustlevel is copied to client->trustLevel.
|
||||
* trustlevel is copied to TRUSTLEVEL(client).
|
||||
*
|
||||
* If a client is disconnecting and the client was using a generated
|
||||
* authorization, the authorization's reference count is decremented, and
|
||||
* if it is now zero, the timer for this authorization is started.
|
||||
*/
|
||||
|
||||
static void
|
||||
SecurityClientStateCallback(
|
||||
CallbackListPtr *pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata)
|
||||
CALLBACK(SecurityClientStateCallback)
|
||||
{
|
||||
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
|
||||
ClientPtr client = pci->client;
|
||||
|
||||
switch (client->clientState)
|
||||
{
|
||||
case ClientStateInitial:
|
||||
TRUSTLEVEL(serverClient) = XSecurityClientTrusted;
|
||||
AUTHID(serverClient) = None;
|
||||
break;
|
||||
|
||||
case ClientStateRunning:
|
||||
{
|
||||
XID authId = AuthorizationIDOfClient(client);
|
||||
SecurityAuthorizationPtr pAuth;
|
||||
|
||||
client->authId = authId;
|
||||
TRUSTLEVEL(client) = XSecurityClientTrusted;
|
||||
AUTHID(client) = authId;
|
||||
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
||||
SecurityAuthorizationResType);
|
||||
if (pAuth)
|
||||
|
@ -1126,23 +1142,20 @@ SecurityClientStateCallback(
|
|||
{
|
||||
if (pAuth->timer) TimerCancel(pAuth->timer);
|
||||
}
|
||||
client->trustLevel = pAuth->trustLevel;
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
{
|
||||
client->CheckAccess = SecurityCheckResourceIDAccess;
|
||||
client->requestVector = client->swapped ?
|
||||
SwappedUntrustedProcVector : UntrustedProcVector;
|
||||
}
|
||||
TRUSTLEVEL(client) = pAuth->trustLevel;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ClientStateGone:
|
||||
case ClientStateRetained: /* client disconnected */
|
||||
{
|
||||
XID authId = client->authId;
|
||||
SecurityAuthorizationPtr pAuth;
|
||||
|
||||
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
||||
/* client may not have any state (bad authorization) */
|
||||
if (!STATEPTR(client))
|
||||
break;
|
||||
|
||||
pAuth = (SecurityAuthorizationPtr)LookupIDByType(AUTHID(client),
|
||||
SecurityAuthorizationResType);
|
||||
if (pAuth)
|
||||
{ /* it is a generated authorization */
|
||||
|
@ -1158,124 +1171,68 @@ SecurityClientStateCallback(
|
|||
}
|
||||
} /* SecurityClientStateCallback */
|
||||
|
||||
/* SecurityCensorImage
|
||||
*
|
||||
* Called after pScreen->GetImage to prevent pieces or trusted windows from
|
||||
* being returned in image data from an untrusted window.
|
||||
*
|
||||
* Arguments:
|
||||
* client is the client doing the GetImage.
|
||||
* pVisibleRegion is the visible region of the window.
|
||||
* widthBytesLine is the width in bytes of one horizontal line in pBuf.
|
||||
* pDraw is the source window.
|
||||
* x, y, w, h is the rectangle of image data from pDraw in pBuf.
|
||||
* format is the format of the image data in pBuf: ZPixmap or XYPixmap.
|
||||
* pBuf is the image data.
|
||||
*
|
||||
* Returns: nothing.
|
||||
*
|
||||
* Side Effects:
|
||||
* Any part of the rectangle (x, y, w, h) that is outside the visible
|
||||
* region of the window will be destroyed (overwritten) in pBuf.
|
||||
*/
|
||||
void
|
||||
SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
|
||||
format, pBuf)
|
||||
ClientPtr client;
|
||||
RegionPtr pVisibleRegion;
|
||||
long widthBytesLine;
|
||||
DrawablePtr pDraw;
|
||||
int x, y, w, h;
|
||||
unsigned int format;
|
||||
char * pBuf;
|
||||
CALLBACK(SecurityCheckDrawableAccess)
|
||||
{
|
||||
RegionRec imageRegion; /* region representing x,y,w,h */
|
||||
RegionRec censorRegion; /* region to obliterate */
|
||||
BoxRec imageBox;
|
||||
int nRects;
|
||||
XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata;
|
||||
|
||||
imageBox.x1 = x;
|
||||
imageBox.y1 = y;
|
||||
imageBox.x2 = x + w;
|
||||
imageBox.y2 = y + h;
|
||||
REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
|
||||
REGION_NULL(pScreen, &censorRegion);
|
||||
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
|
||||
rec->rval = FALSE;
|
||||
}
|
||||
|
||||
/* censorRegion = imageRegion - visibleRegion */
|
||||
REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
|
||||
nRects = REGION_NUM_RECTS(&censorRegion);
|
||||
if (nRects > 0)
|
||||
{ /* we have something to censor */
|
||||
GCPtr pScratchGC = NULL;
|
||||
PixmapPtr pPix = NULL;
|
||||
xRectangle *pRects = NULL;
|
||||
Bool failed = FALSE;
|
||||
int depth = 1;
|
||||
int bitsPerPixel = 1;
|
||||
int i;
|
||||
BoxPtr pBox;
|
||||
CALLBACK(SecurityCheckMapAccess)
|
||||
{
|
||||
XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata;
|
||||
WindowPtr pWin = rec->pWin;
|
||||
|
||||
/* convert region to list-of-rectangles for PolyFillRect */
|
||||
if (STATEPTR(rec->client) &&
|
||||
(TRUSTLEVEL(rec->client) != XSecurityClientTrusted) &&
|
||||
(pWin->drawable.class == InputOnly) &&
|
||||
(TRUSTLEVEL(wClient(pWin->parent)) == XSecurityClientTrusted))
|
||||
|
||||
pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *));
|
||||
if (!pRects)
|
||||
{
|
||||
failed = TRUE;
|
||||
goto failSafe;
|
||||
}
|
||||
for (pBox = REGION_RECTS(&censorRegion), i = 0;
|
||||
i < nRects;
|
||||
i++, pBox++)
|
||||
{
|
||||
pRects[i].x = pBox->x1;
|
||||
pRects[i].y = pBox->y1 - imageBox.y1;
|
||||
pRects[i].width = pBox->x2 - pBox->x1;
|
||||
pRects[i].height = pBox->y2 - pBox->y1;
|
||||
}
|
||||
rec->rval = FALSE;
|
||||
}
|
||||
|
||||
/* use pBuf as a fake pixmap */
|
||||
CALLBACK(SecurityCheckBackgrndAccess)
|
||||
{
|
||||
XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata;
|
||||
|
||||
if (format == ZPixmap)
|
||||
{
|
||||
depth = pDraw->depth;
|
||||
bitsPerPixel = pDraw->bitsPerPixel;
|
||||
}
|
||||
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
|
||||
rec->rval = FALSE;
|
||||
}
|
||||
|
||||
pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h,
|
||||
depth, bitsPerPixel,
|
||||
widthBytesLine, (pointer)pBuf);
|
||||
if (!pPix)
|
||||
{
|
||||
failed = TRUE;
|
||||
goto failSafe;
|
||||
}
|
||||
CALLBACK(SecurityCheckExtAccess)
|
||||
{
|
||||
XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata;
|
||||
|
||||
pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen);
|
||||
if (!pScratchGC)
|
||||
{
|
||||
failed = TRUE;
|
||||
goto failSafe;
|
||||
}
|
||||
if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) &&
|
||||
!STATEVAL(rec->ext))
|
||||
|
||||
ValidateGC(&pPix->drawable, pScratchGC);
|
||||
(* pScratchGC->ops->PolyFillRect)(&pPix->drawable,
|
||||
pScratchGC, nRects, pRects);
|
||||
rec->rval = FALSE;
|
||||
}
|
||||
|
||||
failSafe:
|
||||
if (failed)
|
||||
{
|
||||
/* Censoring was not completed above. To be safe, wipe out
|
||||
* all the image data so that nothing trusted gets out.
|
||||
*/
|
||||
bzero(pBuf, (int)(widthBytesLine * h));
|
||||
}
|
||||
if (pRects) DEALLOCATE_LOCAL(pRects);
|
||||
if (pScratchGC) FreeScratchGC(pScratchGC);
|
||||
if (pPix) FreeScratchPixmapHeader(pPix);
|
||||
CALLBACK(SecurityCheckHostlistAccess)
|
||||
{
|
||||
XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata;
|
||||
|
||||
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
|
||||
{
|
||||
rec->rval = FALSE;
|
||||
if (rec->access_mode == SecurityWriteAccess)
|
||||
SecurityAudit("client %d attempted to change host access\n",
|
||||
rec->client->index);
|
||||
else
|
||||
SecurityAudit("client %d attempted to list hosts\n",
|
||||
rec->client->index);
|
||||
}
|
||||
REGION_UNINIT(pScreen, &imageRegion);
|
||||
REGION_UNINIT(pScreen, &censorRegion);
|
||||
} /* SecurityCensorImage */
|
||||
}
|
||||
|
||||
CALLBACK(SecurityDeclareExtSecure)
|
||||
{
|
||||
XaceDeclareExtSecureRec *rec = (XaceDeclareExtSecureRec*)calldata;
|
||||
|
||||
/* security state for extensions is simply a boolean trust value */
|
||||
STATEVAL(rec->ext) = rec->secure;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
|
@ -1734,21 +1691,21 @@ SecurityMatchString(
|
|||
#endif
|
||||
|
||||
|
||||
char
|
||||
SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
|
||||
ClientPtr client;
|
||||
WindowPtr pWin;
|
||||
ATOM propertyName;
|
||||
Mask access_mode;
|
||||
{
|
||||
CALLBACK(SecurityCheckPropertyAccess)
|
||||
{
|
||||
XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata;
|
||||
ClientPtr client = rec->client;
|
||||
WindowPtr pWin = rec->pWin;
|
||||
ATOM propertyName = rec->propertyName;
|
||||
Mask access_mode = rec->access_mode;
|
||||
PropertyAccessPtr pacl;
|
||||
char action = SecurityDefaultAction;
|
||||
|
||||
/* if client trusted or window untrusted, allow operation */
|
||||
|
||||
if ( (client->trustLevel == XSecurityClientTrusted) ||
|
||||
(wClient(pWin)->trustLevel != XSecurityClientTrusted) )
|
||||
return SecurityAllowOperation;
|
||||
if ( (TRUSTLEVEL(client) == XSecurityClientTrusted) ||
|
||||
(TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) )
|
||||
return;
|
||||
|
||||
#ifdef PROPDEBUG
|
||||
/* For testing, it's more convenient if the property rules file gets
|
||||
|
@ -1861,7 +1818,9 @@ SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
|
|||
client->index, reqtype, pWin->drawable.id,
|
||||
NameForAtom(propertyName), propertyName, cid, actionstr);
|
||||
}
|
||||
return action;
|
||||
/* return codes increase with strictness */
|
||||
if (action > rec->rval)
|
||||
rec->rval = action;
|
||||
} /* SecurityCheckPropertyAccess */
|
||||
|
||||
|
||||
|
@ -1901,6 +1860,46 @@ XSecurityOptions(argc, argv, i)
|
|||
} /* XSecurityOptions */
|
||||
|
||||
|
||||
/* SecurityExtensionSetup
|
||||
*
|
||||
* Arguments: none.
|
||||
*
|
||||
* Returns: nothing.
|
||||
*
|
||||
* Side Effects:
|
||||
* Sets up the Security extension if possible.
|
||||
* This function contains things that need to be done
|
||||
* before any other extension init functions get called.
|
||||
*/
|
||||
|
||||
void
|
||||
SecurityExtensionSetup(INITARGS)
|
||||
{
|
||||
/* Allocate the client private index */
|
||||
securityClientPrivateIndex = AllocateClientPrivateIndex();
|
||||
if (!AllocateClientPrivate(securityClientPrivateIndex,
|
||||
sizeof (SecurityClientStateRec)))
|
||||
FatalError("SecurityExtensionSetup: Can't allocate client private.\n");
|
||||
|
||||
/* Allocate the extension private index */
|
||||
securityExtnsnPrivateIndex = AllocateExtensionPrivateIndex();
|
||||
if (!AllocateExtensionPrivate(securityExtnsnPrivateIndex, 0))
|
||||
FatalError("SecurityExtensionSetup: Can't allocate extnsn private.\n");
|
||||
|
||||
/* register callbacks */
|
||||
#define XaceRC XaceRegisterCallback
|
||||
XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL);
|
||||
XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL);
|
||||
XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL);
|
||||
XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL);
|
||||
XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL);
|
||||
XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL);
|
||||
XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL);
|
||||
XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL);
|
||||
XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL);
|
||||
XaceRC(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, NULL);
|
||||
} /* SecurityExtensionSetup */
|
||||
|
||||
|
||||
/* SecurityExtensionInit
|
||||
*
|
||||
|
@ -1916,7 +1915,6 @@ void
|
|||
SecurityExtensionInit(INITARGS)
|
||||
{
|
||||
ExtensionEntry *extEntry;
|
||||
int i;
|
||||
|
||||
SecurityAuthorizationResType =
|
||||
CreateNewResourceType(SecurityDeleteAuthorization);
|
||||
|
@ -1943,25 +1941,6 @@ SecurityExtensionInit(INITARGS)
|
|||
EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] =
|
||||
(EventSwapPtr)SwapSecurityAuthorizationRevokedEvent;
|
||||
|
||||
/* initialize untrusted proc vectors */
|
||||
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
UntrustedProcVector[i] = ProcVector[i];
|
||||
SwappedUntrustedProcVector[i] = SwappedProcVector[i];
|
||||
}
|
||||
|
||||
/* make sure insecure extensions are not allowed */
|
||||
|
||||
for (i = 128; i < 256; i++)
|
||||
{
|
||||
if (!UntrustedProcVector[i])
|
||||
{
|
||||
UntrustedProcVector[i] = ProcBadRequest;
|
||||
SwappedUntrustedProcVector[i] = ProcBadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
SecurityLoadPropertyAccessList();
|
||||
|
||||
} /* SecurityExtensionInit */
|
||||
|
|
|
@ -86,46 +86,11 @@ typedef struct {
|
|||
Bool valid; /* did anyone recognize it? if so, set to TRUE */
|
||||
} SecurityValidateGroupInfoRec;
|
||||
|
||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||
* These are the same as the normal proc vectors except that extensions
|
||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
extern int (*UntrustedProcVector[256])(ClientPtr client);
|
||||
extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
|
||||
|
||||
extern Bool SecurityCheckDeviceAccess(ClientPtr client, DeviceIntPtr dev,
|
||||
Bool fromRequest);
|
||||
|
||||
extern void SecurityAudit(char *format, ...);
|
||||
|
||||
extern int XSecurityOptions(int argc, char **argv, int i);
|
||||
|
||||
/* Give this value or higher to the -audit option to get security messages */
|
||||
#define SECURITY_AUDIT_LEVEL 4
|
||||
|
||||
extern void SecurityCensorImage(
|
||||
ClientPtr client,
|
||||
RegionPtr pVisibleRegion,
|
||||
long widthBytesLine,
|
||||
DrawablePtr pDraw,
|
||||
int x, int y, int w, int h,
|
||||
unsigned int format,
|
||||
char * pBuf);
|
||||
|
||||
#define SecurityAllowOperation 0
|
||||
#define SecurityIgnoreOperation 1
|
||||
#define SecurityErrorOperation 2
|
||||
|
||||
extern char
|
||||
SecurityCheckPropertyAccess(
|
||||
ClientPtr client,
|
||||
WindowPtr pWin,
|
||||
ATOM propertyName,
|
||||
Mask access_mode);
|
||||
|
||||
#define SECURITY_POLICY_FILE_VERSION "version-1"
|
||||
|
||||
extern char **SecurityGetSitePolicyStrings(int *n);
|
||||
|
|
496
Xext/xace.c
Normal file
496
Xext/xace.c
Normal file
|
@ -0,0 +1,496 @@
|
|||
/************************************************************
|
||||
|
||||
Author: Eamon Walsh <ewalsh@epoch.ncsc.mil>
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
this permission notice appear in supporting documentation. This permission
|
||||
notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHOR 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windowstr.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "gcstruct.h"
|
||||
#include "xacestr.h"
|
||||
#include "modinit.h"
|
||||
|
||||
CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0};
|
||||
|
||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||
* These are the same as the normal proc vectors except that extensions
|
||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
int (*UntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
int (*SwappedUntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
|
||||
/* Entry point for hook functions. Called by Xserver.
|
||||
*/
|
||||
int XaceHook(int hook, ...)
|
||||
{
|
||||
pointer calldata; /* data passed to callback */
|
||||
int *prv = NULL; /* points to return value from callback */
|
||||
va_list ap; /* argument list */
|
||||
va_start(ap, hook);
|
||||
|
||||
/* Marshal arguments for passing to callback.
|
||||
* Each callback has its own case, which sets up a structure to hold
|
||||
* the arguments and integer return parameter, or in some cases just
|
||||
* sets calldata directly to a single argument (with no return result)
|
||||
*/
|
||||
switch (hook)
|
||||
{
|
||||
case XACE_CORE_DISPATCH: {
|
||||
XaceCoreDispatchRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
TRUE /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_RESOURCE_ACCESS: {
|
||||
XaceResourceAccessRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, XID),
|
||||
va_arg(ap, RESTYPE),
|
||||
va_arg(ap, Mask),
|
||||
va_arg(ap, pointer),
|
||||
TRUE /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_DEVICE_ACCESS: {
|
||||
XaceDeviceAccessRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, DeviceIntPtr),
|
||||
va_arg(ap, Bool),
|
||||
TRUE /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_PROPERTY_ACCESS: {
|
||||
XacePropertyAccessRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, WindowPtr),
|
||||
va_arg(ap, Atom),
|
||||
va_arg(ap, Mask),
|
||||
SecurityAllowOperation /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_DRAWABLE_ACCESS: {
|
||||
XaceDrawableAccessRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, DrawablePtr),
|
||||
TRUE /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_MAP_ACCESS:
|
||||
case XACE_BACKGRND_ACCESS: {
|
||||
XaceMapAccessRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, WindowPtr),
|
||||
TRUE /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_EXT_DISPATCH:
|
||||
case XACE_EXT_ACCESS: {
|
||||
XaceExtAccessRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, ExtensionEntry*),
|
||||
TRUE /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_HOSTLIST_ACCESS: {
|
||||
XaceHostlistAccessRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, Mask),
|
||||
TRUE /* default allow */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_SITE_POLICY: {
|
||||
XaceSitePolicyRec rec = {
|
||||
va_arg(ap, char*),
|
||||
va_arg(ap, int),
|
||||
FALSE /* default unrecognized */
|
||||
};
|
||||
calldata = &rec;
|
||||
prv = &rec.rval;
|
||||
break;
|
||||
}
|
||||
case XACE_DECLARE_EXT_SECURE: {
|
||||
XaceDeclareExtSecureRec rec = {
|
||||
va_arg(ap, ExtensionEntry*),
|
||||
va_arg(ap, Bool)
|
||||
};
|
||||
calldata = &rec;
|
||||
break;
|
||||
}
|
||||
case XACE_AUTH_AVAIL: {
|
||||
XaceAuthAvailRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, XID)
|
||||
};
|
||||
calldata = &rec;
|
||||
break;
|
||||
}
|
||||
case XACE_KEY_AVAIL: {
|
||||
XaceKeyAvailRec rec = {
|
||||
va_arg(ap, xEventPtr),
|
||||
va_arg(ap, DeviceIntPtr),
|
||||
va_arg(ap, int)
|
||||
};
|
||||
calldata = &rec;
|
||||
break;
|
||||
}
|
||||
case XACE_WINDOW_INIT: {
|
||||
XaceWindowRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, WindowPtr)
|
||||
};
|
||||
calldata = &rec;
|
||||
break;
|
||||
}
|
||||
case XACE_AUDIT_BEGIN: {
|
||||
XaceAuditRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
0
|
||||
};
|
||||
calldata = &rec;
|
||||
break;
|
||||
}
|
||||
case XACE_AUDIT_END: {
|
||||
XaceAuditRec rec = {
|
||||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, int)
|
||||
};
|
||||
calldata = &rec;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
va_end(ap);
|
||||
return 0; /* unimplemented hook number */
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
/* call callbacks and return result, if any. */
|
||||
CallCallbacks(&XaceHooks[hook], calldata);
|
||||
return prv ? *prv : 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ProcXaceDispatch(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
switch (stuff->data)
|
||||
{
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
} /* ProcXaceDispatch */
|
||||
|
||||
static int
|
||||
SProcXaceDispatch(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
switch (stuff->data)
|
||||
{
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
} /* SProcXaceDispatch */
|
||||
|
||||
|
||||
/* XaceResetProc
|
||||
*
|
||||
* Arguments:
|
||||
* extEntry is the extension information for the XACE extension.
|
||||
*
|
||||
* Returns: nothing.
|
||||
*
|
||||
* Side Effects:
|
||||
* Performs any cleanup needed by XACE at server shutdown time.
|
||||
*/
|
||||
static void
|
||||
XaceResetProc(ExtensionEntry *extEntry)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<XACE_NUM_HOOKS; i++)
|
||||
{
|
||||
DeleteCallbackList(&XaceHooks[i]);
|
||||
XaceHooks[i] = NULL;
|
||||
}
|
||||
} /* XaceResetProc */
|
||||
|
||||
|
||||
static int
|
||||
XaceCatchDispatchProc(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
int major = stuff->reqType;
|
||||
|
||||
if (!ProcVector[major])
|
||||
return (BadRequest);
|
||||
|
||||
if (!XaceHook(XACE_CORE_DISPATCH, client))
|
||||
return (BadAccess);
|
||||
|
||||
return client->swapped ?
|
||||
(* SwappedProcVector[major])(client) :
|
||||
(* ProcVector[major])(client);
|
||||
}
|
||||
|
||||
static int
|
||||
XaceCatchExtProc(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
int major = stuff->reqType;
|
||||
ExtensionEntry *ext = GetExtensionEntry(major);
|
||||
|
||||
if (!ext || !ProcVector[major])
|
||||
return (BadRequest);
|
||||
|
||||
if (!XaceHook(XACE_EXT_DISPATCH, client, ext))
|
||||
return (BadRequest); /* pretend extension doesn't exist */
|
||||
|
||||
return client->swapped ?
|
||||
(* SwappedProcVector[major])(client) :
|
||||
(* ProcVector[major])(client);
|
||||
}
|
||||
|
||||
|
||||
/* SecurityClientStateCallback
|
||||
*
|
||||
* Arguments:
|
||||
* pcbl is &ClientStateCallback.
|
||||
* nullata is NULL.
|
||||
* calldata is a pointer to a NewClientInfoRec (include/dixstruct.h)
|
||||
* which contains information about client state changes.
|
||||
*
|
||||
* Returns: nothing.
|
||||
*
|
||||
* Side Effects:
|
||||
*
|
||||
* If a new client is connecting, its authorization ID is copied to
|
||||
* client->authID. If this is a generated authorization, its reference
|
||||
* count is bumped, its timer is cancelled if it was running, and its
|
||||
* trustlevel is copied to TRUSTLEVEL(client).
|
||||
*
|
||||
* If a client is disconnecting and the client was using a generated
|
||||
* authorization, the authorization's reference count is decremented, and
|
||||
* if it is now zero, the timer for this authorization is started.
|
||||
*/
|
||||
|
||||
static void
|
||||
XaceClientStateCallback(
|
||||
CallbackListPtr *pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata)
|
||||
{
|
||||
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
|
||||
ClientPtr client = pci->client;
|
||||
|
||||
switch (client->clientState)
|
||||
{
|
||||
case ClientStateRunning:
|
||||
{
|
||||
client->requestVector = client->swapped ?
|
||||
SwappedUntrustedProcVector : UntrustedProcVector;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
} /* XaceClientStateCallback */
|
||||
|
||||
/* XaceExtensionInit
|
||||
*
|
||||
* Initialize the XACE Extension
|
||||
*/
|
||||
void XaceExtensionInit(INITARGS)
|
||||
{
|
||||
ExtensionEntry *extEntry;
|
||||
int i;
|
||||
|
||||
if (!AddCallback(&ClientStateCallback, XaceClientStateCallback, NULL))
|
||||
return;
|
||||
|
||||
extEntry = AddExtension(XACE_EXTENSION_NAME,
|
||||
XaceNumberEvents, XaceNumberErrors,
|
||||
ProcXaceDispatch, SProcXaceDispatch,
|
||||
XaceResetProc, StandardMinorOpcode);
|
||||
|
||||
/* initialize dispatching intercept functions */
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
UntrustedProcVector[i] = XaceCatchDispatchProc;
|
||||
SwappedUntrustedProcVector[i] = XaceCatchDispatchProc;
|
||||
}
|
||||
for (i = 128; i < 256; i++)
|
||||
{
|
||||
UntrustedProcVector[i] = XaceCatchExtProc;
|
||||
SwappedUntrustedProcVector[i] = XaceCatchExtProc;
|
||||
}
|
||||
}
|
||||
|
||||
/* XaceCensorImage
|
||||
*
|
||||
* Called after pScreen->GetImage to prevent pieces or trusted windows from
|
||||
* being returned in image data from an untrusted window.
|
||||
*
|
||||
* Arguments:
|
||||
* client is the client doing the GetImage.
|
||||
* pVisibleRegion is the visible region of the window.
|
||||
* widthBytesLine is the width in bytes of one horizontal line in pBuf.
|
||||
* pDraw is the source window.
|
||||
* x, y, w, h is the rectangle of image data from pDraw in pBuf.
|
||||
* format is the format of the image data in pBuf: ZPixmap or XYPixmap.
|
||||
* pBuf is the image data.
|
||||
*
|
||||
* Returns: nothing.
|
||||
*
|
||||
* Side Effects:
|
||||
* Any part of the rectangle (x, y, w, h) that is outside the visible
|
||||
* region of the window will be destroyed (overwritten) in pBuf.
|
||||
*/
|
||||
void
|
||||
XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
|
||||
format, pBuf)
|
||||
ClientPtr client;
|
||||
RegionPtr pVisibleRegion;
|
||||
long widthBytesLine;
|
||||
DrawablePtr pDraw;
|
||||
int x, y, w, h;
|
||||
unsigned int format;
|
||||
char * pBuf;
|
||||
{
|
||||
ScreenPtr pScreen = pDraw->pScreen;
|
||||
RegionRec imageRegion; /* region representing x,y,w,h */
|
||||
RegionRec censorRegion; /* region to obliterate */
|
||||
BoxRec imageBox;
|
||||
int nRects;
|
||||
|
||||
imageBox.x1 = x;
|
||||
imageBox.y1 = y;
|
||||
imageBox.x2 = x + w;
|
||||
imageBox.y2 = y + h;
|
||||
REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
|
||||
REGION_NULL(pScreen, &censorRegion);
|
||||
|
||||
/* censorRegion = imageRegion - visibleRegion */
|
||||
REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
|
||||
nRects = REGION_NUM_RECTS(&censorRegion);
|
||||
if (nRects > 0)
|
||||
{ /* we have something to censor */
|
||||
GCPtr pScratchGC = NULL;
|
||||
PixmapPtr pPix = NULL;
|
||||
xRectangle *pRects = NULL;
|
||||
Bool failed = FALSE;
|
||||
int depth = 1;
|
||||
int bitsPerPixel = 1;
|
||||
int i;
|
||||
BoxPtr pBox;
|
||||
|
||||
/* convert region to list-of-rectangles for PolyFillRect */
|
||||
|
||||
pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *));
|
||||
if (!pRects)
|
||||
{
|
||||
failed = TRUE;
|
||||
goto failSafe;
|
||||
}
|
||||
for (pBox = REGION_RECTS(&censorRegion), i = 0;
|
||||
i < nRects;
|
||||
i++, pBox++)
|
||||
{
|
||||
pRects[i].x = pBox->x1;
|
||||
pRects[i].y = pBox->y1 - imageBox.y1;
|
||||
pRects[i].width = pBox->x2 - pBox->x1;
|
||||
pRects[i].height = pBox->y2 - pBox->y1;
|
||||
}
|
||||
|
||||
/* use pBuf as a fake pixmap */
|
||||
|
||||
if (format == ZPixmap)
|
||||
{
|
||||
depth = pDraw->depth;
|
||||
bitsPerPixel = pDraw->bitsPerPixel;
|
||||
}
|
||||
|
||||
pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h,
|
||||
depth, bitsPerPixel,
|
||||
widthBytesLine, (pointer)pBuf);
|
||||
if (!pPix)
|
||||
{
|
||||
failed = TRUE;
|
||||
goto failSafe;
|
||||
}
|
||||
|
||||
pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen);
|
||||
if (!pScratchGC)
|
||||
{
|
||||
failed = TRUE;
|
||||
goto failSafe;
|
||||
}
|
||||
|
||||
ValidateGC(&pPix->drawable, pScratchGC);
|
||||
(* pScratchGC->ops->PolyFillRect)(&pPix->drawable,
|
||||
pScratchGC, nRects, pRects);
|
||||
|
||||
failSafe:
|
||||
if (failed)
|
||||
{
|
||||
/* Censoring was not completed above. To be safe, wipe out
|
||||
* all the image data so that nothing trusted gets out.
|
||||
*/
|
||||
bzero(pBuf, (int)(widthBytesLine * h));
|
||||
}
|
||||
if (pRects) DEALLOCATE_LOCAL(pRects);
|
||||
if (pScratchGC) FreeScratchGC(pScratchGC);
|
||||
if (pPix) FreeScratchPixmapHeader(pPix);
|
||||
}
|
||||
REGION_UNINIT(pScreen, &imageRegion);
|
||||
REGION_UNINIT(pScreen, &censorRegion);
|
||||
} /* XaceCensorImage */
|
103
Xext/xace.h
Normal file
103
Xext/xace.h
Normal file
|
@ -0,0 +1,103 @@
|
|||
/************************************************************
|
||||
|
||||
Author: Eamon Walsh <ewalsh@epoch.ncsc.mil>
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
this permission notice appear in supporting documentation. This permission
|
||||
notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHOR 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifndef _XACE_H
|
||||
#define _XACE_H
|
||||
|
||||
#define XACE_EXTENSION_NAME "XAccessControlExtension"
|
||||
#define XACE_MAJOR_VERSION 1
|
||||
#define XACE_MINOR_VERSION 0
|
||||
|
||||
#include "pixmap.h" /* for DrawablePtr */
|
||||
#include "regionstr.h" /* for RegionPtr */
|
||||
|
||||
#define XaceNumberEvents 0
|
||||
#define XaceNumberErrors 0
|
||||
|
||||
/* security hooks */
|
||||
/* Constants used to identify the available security hooks
|
||||
*/
|
||||
#define XACE_CORE_DISPATCH 0
|
||||
#define XACE_EXT_DISPATCH 1
|
||||
#define XACE_RESOURCE_ACCESS 2
|
||||
#define XACE_DEVICE_ACCESS 3
|
||||
#define XACE_PROPERTY_ACCESS 4
|
||||
#define XACE_DRAWABLE_ACCESS 5
|
||||
#define XACE_MAP_ACCESS 6
|
||||
#define XACE_BACKGRND_ACCESS 7
|
||||
#define XACE_EXT_ACCESS 8
|
||||
#define XACE_HOSTLIST_ACCESS 9
|
||||
#define XACE_SITE_POLICY 10
|
||||
#define XACE_DECLARE_EXT_SECURE 11
|
||||
#define XACE_AUTH_AVAIL 12
|
||||
#define XACE_KEY_AVAIL 13
|
||||
#define XACE_WINDOW_INIT 14
|
||||
#define XACE_AUDIT_BEGIN 15
|
||||
#define XACE_AUDIT_END 16
|
||||
#define XACE_NUM_HOOKS 17
|
||||
|
||||
extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
|
||||
|
||||
/* Entry point for hook functions. Called by Xserver.
|
||||
*/
|
||||
extern int XaceHook(
|
||||
int /*hook*/,
|
||||
... /*appropriate args for hook*/
|
||||
);
|
||||
|
||||
/* Register a callback for a given hook.
|
||||
*/
|
||||
#define XaceRegisterCallback(hook,callback,data) \
|
||||
AddCallback(XaceHooks+(hook), callback, data)
|
||||
|
||||
/* Unregister an existing callback for a given hook.
|
||||
*/
|
||||
#define XaceDeleteCallback(hook,callback,data) \
|
||||
DeleteCallback(XaceHooks+(hook), callback, data)
|
||||
|
||||
|
||||
/* From the original Security extension...
|
||||
*/
|
||||
|
||||
/* Hook return codes */
|
||||
#define SecurityAllowOperation 0
|
||||
#define SecurityIgnoreOperation 1
|
||||
#define SecurityErrorOperation 2
|
||||
|
||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||
* These are the same as the normal proc vectors except that extensions
|
||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
extern int (*UntrustedProcVector[256])(ClientPtr client);
|
||||
extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
|
||||
|
||||
extern void XaceCensorImage(
|
||||
ClientPtr client,
|
||||
RegionPtr pVisibleRegion,
|
||||
long widthBytesLine,
|
||||
DrawablePtr pDraw,
|
||||
int x, int y, int w, int h,
|
||||
unsigned int format,
|
||||
char * pBuf
|
||||
);
|
||||
|
||||
#endif /* _XACE_H */
|
135
Xext/xacestr.h
Normal file
135
Xext/xacestr.h
Normal file
|
@ -0,0 +1,135 @@
|
|||
/************************************************************
|
||||
|
||||
Author: Eamon Walsh <ewalsh@epoch.ncsc.mil>
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
this permission notice appear in supporting documentation. This permission
|
||||
notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHOR 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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifndef _XACESTR_H
|
||||
#define _XACESTR_H
|
||||
|
||||
#include <X11/Xdefs.h>
|
||||
#include "dixstruct.h"
|
||||
#include "resource.h"
|
||||
#include "extnsionst.h"
|
||||
#include "gcstruct.h"
|
||||
#include "windowstr.h"
|
||||
#include "inputstr.h"
|
||||
#include "xace.h"
|
||||
|
||||
/* XACE_CORE_DISPATCH */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
int rval;
|
||||
} XaceCoreDispatchRec;
|
||||
|
||||
/* XACE_RESOURCE_ACCESS */
|
||||
/* XACE_RESOURCE_CREATE */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
XID id;
|
||||
RESTYPE rtype;
|
||||
Mask access_mode;
|
||||
pointer res;
|
||||
int rval;
|
||||
} XaceResourceAccessRec;
|
||||
|
||||
/* XACE_DEVICE_ACCESS */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
DeviceIntPtr dev;
|
||||
Bool fromRequest;
|
||||
int rval;
|
||||
} XaceDeviceAccessRec;
|
||||
|
||||
/* XACE_PROPERTY_ACCESS */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
WindowPtr pWin;
|
||||
Atom propertyName;
|
||||
Mask access_mode;
|
||||
int rval;
|
||||
} XacePropertyAccessRec;
|
||||
|
||||
/* XACE_DRAWABLE_ACCESS */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
DrawablePtr pDraw;
|
||||
int rval;
|
||||
} XaceDrawableAccessRec;
|
||||
|
||||
/* XACE_MAP_ACCESS */
|
||||
/* XACE_BACKGRND_ACCESS */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
WindowPtr pWin;
|
||||
int rval;
|
||||
} XaceMapAccessRec;
|
||||
|
||||
/* XACE_EXT_DISPATCH_ACCESS */
|
||||
/* XACE_EXT_ACCESS */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
ExtensionEntry *ext;
|
||||
int rval;
|
||||
} XaceExtAccessRec;
|
||||
|
||||
/* XACE_HOSTLIST_ACCESS */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
Mask access_mode;
|
||||
int rval;
|
||||
} XaceHostlistAccessRec;
|
||||
|
||||
/* XACE_SITE_POLICY */
|
||||
typedef struct {
|
||||
char *policyString;
|
||||
int len;
|
||||
int rval;
|
||||
} XaceSitePolicyRec;
|
||||
|
||||
/* XACE_DECLARE_EXT_SECURE */
|
||||
typedef struct {
|
||||
ExtensionEntry *ext;
|
||||
Bool secure;
|
||||
} XaceDeclareExtSecureRec;
|
||||
|
||||
/* XACE_AUTH_AVAIL */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
XID authId;
|
||||
} XaceAuthAvailRec;
|
||||
|
||||
/* XACE_KEY_AVAIL */
|
||||
typedef struct {
|
||||
xEventPtr event;
|
||||
DeviceIntPtr keybd;
|
||||
int count;
|
||||
} XaceKeyAvailRec;
|
||||
|
||||
/* XACE_WINDOW_INIT */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
WindowPtr pWin;
|
||||
} XaceWindowRec;
|
||||
|
||||
/* XACE_AUDIT_BEGIN */
|
||||
/* XACE_AUDIT_END */
|
||||
typedef struct {
|
||||
ClientPtr client;
|
||||
int requestResult;
|
||||
} XaceAuditRec;
|
||||
|
||||
#endif /* _XACESTR_H */
|
262
Xext/xcalibrate.c
Normal file
262
Xext/xcalibrate.c
Normal file
|
@ -0,0 +1,262 @@
|
|||
/*
|
||||
* $Id: xcalibrate.c,v 3.1 2004/06/02 20:49:50 pb Exp $
|
||||
*
|
||||
* Copyright © 2003 Philip Blundell
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of Philip Blundell not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Philip Blundell makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_KDRIVE_CONFIG_H
|
||||
#include <kdrive-config.h>
|
||||
#endif
|
||||
|
||||
#define NEED_EVENTS
|
||||
#define NEED_REPLIES
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
#include "dixstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "swaprep.h"
|
||||
|
||||
#include <X11/extensions/xcalibrateproto.h>
|
||||
#include <X11/extensions/xcalibratewire.h>
|
||||
|
||||
extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
|
||||
extern void *tslib_raw_event_closure;
|
||||
|
||||
static CARD8 XCalibrateReqCode;
|
||||
int XCalibrateEventBase;
|
||||
int XCalibrateReqBase;
|
||||
int XCalibrateErrorBase;
|
||||
|
||||
static ClientPtr xcalibrate_client;
|
||||
|
||||
static void
|
||||
xcalibrate_event_hook (int x, int y, int pressure, void *closure)
|
||||
{
|
||||
ClientPtr pClient = (ClientPtr) closure;
|
||||
xXCalibrateRawTouchscreenEvent ev;
|
||||
|
||||
ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen;
|
||||
ev.sequenceNumber = pClient->sequence;
|
||||
ev.x = x;
|
||||
ev.y = y;
|
||||
ev.pressure = pressure;
|
||||
|
||||
if (!pClient->clientGone)
|
||||
WriteEventsToClient (pClient, 1, (xEvent *) &ev);
|
||||
}
|
||||
|
||||
static int
|
||||
ProcXCalibrateQueryVersion (ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCalibrateQueryVersionReq);
|
||||
xXCalibrateQueryVersionReply rep;
|
||||
CARD16 client_major, client_minor; /* not used */
|
||||
|
||||
REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
|
||||
|
||||
client_major = stuff->majorVersion;
|
||||
client_minor = stuff->minorVersion;
|
||||
|
||||
fprintf(stderr, "%s(): called\n", __func__);
|
||||
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.majorVersion = XCALIBRATE_MAJOR_VERSION;
|
||||
rep.minorVersion = XCALIBRATE_MINOR_VERSION;
|
||||
if (client->swapped) {
|
||||
int n;
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.majorVersion, n);
|
||||
swaps(&rep.minorVersion, n);
|
||||
}
|
||||
WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep);
|
||||
return (client->noClientException);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXCalibrateQueryVersion (ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCalibrateQueryVersionReq);
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
|
||||
swaps(&stuff->majorVersion,n);
|
||||
swaps(&stuff->minorVersion,n);
|
||||
return ProcXCalibrateQueryVersion(client);
|
||||
}
|
||||
|
||||
static int
|
||||
ProcXCalibrateSetRawMode (ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCalibrateRawModeReq);
|
||||
xXCalibrateRawModeReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
|
||||
|
||||
memset (&rep, 0, sizeof (rep));
|
||||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
|
||||
if (stuff->on)
|
||||
{
|
||||
if (xcalibrate_client == NULL)
|
||||
{
|
||||
/* Start calibrating. */
|
||||
xcalibrate_client = client;
|
||||
tslib_raw_event_hook = xcalibrate_event_hook;
|
||||
tslib_raw_event_closure = client;
|
||||
rep.status = GrabSuccess;
|
||||
}
|
||||
else
|
||||
{
|
||||
rep.status = AlreadyGrabbed;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (xcalibrate_client == client)
|
||||
{
|
||||
/* Stop calibrating. */
|
||||
xcalibrate_client = NULL;
|
||||
tslib_raw_event_hook = NULL;
|
||||
tslib_raw_event_closure = NULL;
|
||||
rep.status = GrabSuccess;
|
||||
|
||||
/* Cycle input off and on to reload configuration. */
|
||||
KdDisableInput ();
|
||||
KdEnableInput ();
|
||||
}
|
||||
else
|
||||
{
|
||||
rep.status = AlreadyGrabbed;
|
||||
}
|
||||
}
|
||||
|
||||
if (client->swapped)
|
||||
{
|
||||
int n;
|
||||
|
||||
swaps (&rep.sequenceNumber, n);
|
||||
swaps (&rep.status, n);
|
||||
}
|
||||
WriteToClient(client, sizeof (rep), (char *) &rep);
|
||||
return (client->noClientException);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
SProcXCalibrateSetRawMode (ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCalibrateRawModeReq);
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
|
||||
|
||||
swaps(&stuff->on, n);
|
||||
|
||||
return ProcXCalibrateSetRawMode(client);
|
||||
}
|
||||
|
||||
static void
|
||||
XCalibrateResetProc (ExtensionEntry *extEntry)
|
||||
{
|
||||
}
|
||||
|
||||
static int
|
||||
ProcXCalibrateDispatch (ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
switch (stuff->data) {
|
||||
case X_XCalibrateQueryVersion:
|
||||
return ProcXCalibrateQueryVersion(client);
|
||||
case X_XCalibrateRawMode:
|
||||
return ProcXCalibrateSetRawMode(client);
|
||||
default: break;
|
||||
}
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXCalibrateDispatch (ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
int n;
|
||||
|
||||
swaps(&stuff->length,n);
|
||||
|
||||
switch (stuff->data) {
|
||||
case X_XCalibrateQueryVersion:
|
||||
return SProcXCalibrateQueryVersion(client);
|
||||
case X_XCalibrateRawMode:
|
||||
return SProcXCalibrateSetRawMode(client);
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
static void
|
||||
XCalibrateClientCallback (CallbackListPtr *list,
|
||||
pointer closure,
|
||||
pointer data)
|
||||
{
|
||||
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
|
||||
ClientPtr pClient = clientinfo->client;
|
||||
|
||||
if (clientinfo->setup == NULL
|
||||
&& xcalibrate_client != NULL
|
||||
&& xcalibrate_client == pClient)
|
||||
{
|
||||
/* Stop calibrating. */
|
||||
xcalibrate_client = NULL;
|
||||
tslib_raw_event_hook = NULL;
|
||||
tslib_raw_event_closure = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
XCalibrateExtensionInit(void)
|
||||
{
|
||||
ExtensionEntry *extEntry;
|
||||
|
||||
if (!AddCallback (&ClientStateCallback, XCalibrateClientCallback, 0))
|
||||
return;
|
||||
|
||||
extEntry = AddExtension(XCALIBRATE_NAME, XCalibrateNumberEvents, XCalibrateNumberErrors,
|
||||
ProcXCalibrateDispatch, SProcXCalibrateDispatch,
|
||||
XCalibrateResetProc, StandardMinorOpcode);
|
||||
|
||||
if (!extEntry)
|
||||
return;
|
||||
|
||||
XCalibrateReqCode = (unsigned char)extEntry->base;
|
||||
XCalibrateEventBase = extEntry->eventBase;
|
||||
XCalibrateErrorBase = extEntry->errorBase;
|
||||
|
||||
xcalibrate_client = 0;
|
||||
}
|
|
@ -301,7 +301,7 @@ typedef unsigned int *glyphPointer;
|
|||
#define StorePixels(o,p) dst[o] = p
|
||||
#define Loop dst += widthDst;
|
||||
#else
|
||||
#define StorePixels(o,p) *dst++ = (p)
|
||||
#define StorePixels(o,p) do { *dst = (p); dst++; } while (0)
|
||||
#define Loop dst += widthLeft;
|
||||
#endif
|
||||
|
||||
|
|
72
configure.ac
72
configure.ac
|
@ -82,7 +82,8 @@ AC_TYPE_PID_T
|
|||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
|
||||
strtol getopt getopt_long vsnprintf walkcontext backtrace])
|
||||
strtol getopt getopt_long vsnprintf walkcontext backtrace \
|
||||
getisax])
|
||||
AC_FUNC_ALLOCA
|
||||
dnl Old HAS_* names used in os/*.c.
|
||||
AC_CHECK_FUNC([getdtablesize],
|
||||
|
@ -413,9 +414,12 @@ AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extensio
|
|||
AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
|
||||
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
|
||||
AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
|
||||
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes])
|
||||
AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
|
||||
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE])
|
||||
AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY])
|
||||
AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
|
||||
AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
|
||||
AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
|
||||
AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes])
|
||||
AC_ARG_ENABLE(cup, AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes])
|
||||
AC_ARG_ENABLE(evi, AS_HELP_STRING([--disable-evi], [Build Extended-Visual-Information extension (default: enabled)]), [EVI=$enableval], [EVI=yes])
|
||||
AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
|
||||
|
@ -424,6 +428,7 @@ AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extensi
|
|||
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
|
||||
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
|
||||
AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
|
||||
AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
|
||||
|
||||
dnl DDXes.
|
||||
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
|
||||
|
@ -578,7 +583,12 @@ if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then
|
|||
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
|
||||
GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la'
|
||||
test -d GL || mkdir GL
|
||||
$srcdir/GL/symlink-mesa.sh $MESA_SOURCE GL/
|
||||
case $host_os in
|
||||
solaris*)
|
||||
SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh" ;;
|
||||
*) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;;
|
||||
esac
|
||||
$SYMLINK_MESA $MESA_SOURCE GL/
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.])
|
||||
fi
|
||||
|
@ -619,8 +629,16 @@ if test "x$XINERAMA" = xyes; then
|
|||
REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
|
||||
if test "x$XACE" = xyes; then
|
||||
AC_DEFINE(XACE, 1, [Build X-ACE extension])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes])
|
||||
if test "x$XCSECURITY" = xyes; then
|
||||
if test "x$XACE" != xyes; then
|
||||
AC_MSG_ERROR([cannot build Security extension without X-ACE])
|
||||
fi
|
||||
AC_DEFINE(XCSECURITY, 1, [Build Security extension])
|
||||
fi
|
||||
|
||||
|
@ -630,12 +648,11 @@ if test "x$XEVIE" = xyes; then
|
|||
REQUIRED_MODULES="$REQUIRED_MODULES evieproto"
|
||||
fi
|
||||
|
||||
if test "x$APPGROUP" = xyes && test "x$XCSECURITY" != xyes; then
|
||||
AC_MSG_NOTICE([Disabling APPGROUP extension])
|
||||
APPGROUP=no
|
||||
fi
|
||||
AM_CONDITIONAL(APPGROUP, [test "x$APPGROUP" = xyes])
|
||||
if test "x$APPGROUP" = xyes; then
|
||||
if test "x$XACE" != xyes || test "x$XCSECURITY" != xyes; then
|
||||
AC_MSG_ERROR([cannot build APPGROUP extension without X-ACE and XC-SECURITY])
|
||||
fi
|
||||
AC_DEFINE(XAPPGROUP, 1, [Build APPGROUP extension])
|
||||
fi
|
||||
|
||||
|
@ -696,6 +713,14 @@ if test "x$XPRINT" = xyes; then
|
|||
REQUIRED_MODULES="$REQUIRED_MODULES printproto"
|
||||
fi
|
||||
|
||||
if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then
|
||||
AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
|
||||
REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
|
||||
else
|
||||
XCALIBRATE=no
|
||||
fi
|
||||
AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes])
|
||||
|
||||
AC_DEFINE(RENDER, 1, [Support RENDER extension])
|
||||
RENDER_LIB='$(top_builddir)/render/librender.la'
|
||||
RENDER_INC='-I$(top_srcdir)/render'
|
||||
|
@ -725,6 +750,8 @@ if test "x$XINPUT" = xyes; then
|
|||
XI_INC='-I$(top_srcdir)/Xi'
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes)
|
||||
|
||||
AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
|
||||
|
||||
AC_DEFINE(XKB, 1, [Build XKB])
|
||||
|
@ -794,6 +821,7 @@ VENDOR_MAN_VERSION="Version ${VENDOR_VERSION_STRING}"
|
|||
|
||||
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
|
||||
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
|
||||
AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
|
||||
AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
|
||||
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
|
||||
AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_STRING_SHORT"], [Short vendor name])
|
||||
|
@ -1419,7 +1447,6 @@ AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
|
|||
|
||||
|
||||
dnl kdrive DDX
|
||||
dnl utterly incomplete yet
|
||||
|
||||
XEYPHR_LIBS=
|
||||
XEPHYR_INCS=
|
||||
|
@ -1443,6 +1470,13 @@ if test "$KDRIVE" = yes; then
|
|||
fi
|
||||
|
||||
# tslib...
|
||||
if test "x$TSLIB" = xyes; then
|
||||
PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
|
||||
if test "x$HAVE_TSLIB" = xno; then
|
||||
AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
|
||||
fi
|
||||
AC_DEFINE(TSLIB, 1, [Have tslib support])
|
||||
fi
|
||||
|
||||
# damage shadow extension glx (NOTYET) fb mi
|
||||
KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
|
||||
|
@ -1450,7 +1484,7 @@ if test "$KDRIVE" = yes; then
|
|||
KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
|
||||
KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
|
||||
|
||||
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H"
|
||||
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
|
||||
|
||||
# dix os fb mi extension glx (NOTYET) damage shadow xpstubs
|
||||
#KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \
|
||||
|
@ -1459,25 +1493,26 @@ if test "$KDRIVE" = yes; then
|
|||
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
|
||||
KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
|
||||
KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
|
||||
KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
|
||||
KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB $TSLIB_LIBS"
|
||||
|
||||
# check if we can build Xephyr
|
||||
PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
|
||||
|
||||
# check for SDL SDK
|
||||
AC_CHECK_HEADERS([SDL/SDL.h])
|
||||
if test "x$XSDL" = xauto; then
|
||||
XSDL="$ac_cv_header_SDL_SDL_h"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(KDRIVE_INCS)
|
||||
AC_SUBST(KDRIVE_PURE_INCS)
|
||||
AC_SUBST(KDRIVE_CFLAGS)
|
||||
AC_SUBST(KDRIVE_PURE_LIBS)
|
||||
AC_SUBST(KDRIVE_LIBS)
|
||||
AM_CONDITIONAL(TSLIB, false)
|
||||
AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes])
|
||||
AM_CONDITIONAL(H3600_TS, false)
|
||||
AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
|
||||
AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
|
||||
#AM_CONDITIONAL(KDRIVEVESA, false)
|
||||
#AM_CONDITIONAL(KDRIVEFBDEV, false)
|
||||
|
||||
# Xephyr needs nanosleep() which is in librt on Solaris
|
||||
AC_CHECK_FUNC([nanosleep], [],
|
||||
|
@ -1488,13 +1523,12 @@ XEPHYR_LIBS="$XEPHYR_LIBS $XSERVER_LIBS"
|
|||
AC_SUBST([XEPHYR_LIBS])
|
||||
AC_SUBST([XEPHYR_INCS])
|
||||
|
||||
AM_CONDITIONAL(XSDLSERVER, [test x"$ac_cv_header_SDL_SDL_h" = xyes])
|
||||
if test x"$ac_cv_header_SDL_SDL_h" = xyes -o x"$XSDL" = xyes; then
|
||||
# PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES)
|
||||
if test x"$XSDL" = xyes; then
|
||||
AC_DEFINE(XSDLSERVER,,[Build Xsdl server])
|
||||
XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS"
|
||||
XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS"
|
||||
fi
|
||||
AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes])
|
||||
AC_SUBST([XSDL_LIBS])
|
||||
AC_SUBST([XSDL_INCS])
|
||||
|
||||
|
@ -1550,8 +1584,8 @@ AC_SUBST(XORGCONFIG_DEP_LIBS)
|
|||
|
||||
dnl xorgcfg GUI configuration utility
|
||||
AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
|
||||
[Build xorgcfg GUI configuration utility (default: yes)]),
|
||||
[XORGCFG=$enableval],[XORGCFG=yes])
|
||||
[Build xorgcfg GUI configuration utility (default: no)]),
|
||||
[XORGCFG=$enableval],[XORGCFG=no])
|
||||
if test x$XORGCFG = xyes ; then
|
||||
PKG_CHECK_MODULES([XORGCFG_DEP],
|
||||
[xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
|
||||
|
|
|
@ -69,8 +69,8 @@ SOFTWARE.
|
|||
#ifdef XKB
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
#include "securitysrv.h"
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
|
||||
#include "dispatch.h"
|
||||
|
@ -946,8 +946,8 @@ ProcSetModifierMapping(ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(client, keybd, TRUE))
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, keybd, TRUE))
|
||||
return BadAccess;
|
||||
#endif
|
||||
|
||||
|
@ -1063,9 +1063,8 @@ ProcChangeKeyboardMapping(ClientPtr client)
|
|||
client->errorValue = stuff->keySymsPerKeyCode;
|
||||
return BadValue;
|
||||
}
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard,
|
||||
TRUE))
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||
return BadAccess;
|
||||
#endif
|
||||
keysyms.minKeyCode = stuff->firstKeyCode;
|
||||
|
@ -1211,8 +1210,8 @@ ProcChangeKeyboardControl (ClientPtr client)
|
|||
vmask = stuff->mask;
|
||||
if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask))
|
||||
return BadLength;
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(client, keybd, TRUE))
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, keybd, TRUE))
|
||||
return BadAccess;
|
||||
#endif
|
||||
vlist = (XID *)&stuff[1]; /* first word of values */
|
||||
|
@ -1600,8 +1599,8 @@ ProcQueryKeymap(ClientPtr client)
|
|||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.length = 2;
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||
{
|
||||
bzero((char *)&rep.map[0], 32);
|
||||
}
|
||||
|
|
|
@ -104,8 +104,8 @@ int ProcInitialConnection();
|
|||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
#include "securitysrv.h"
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
#include "appgroup.h"
|
||||
|
@ -451,7 +451,15 @@ Dispatch(void)
|
|||
if (result > (maxBigRequestSize << 2))
|
||||
result = BadLength;
|
||||
else
|
||||
#ifdef XACE
|
||||
{
|
||||
XaceHook(XACE_AUDIT_BEGIN, client);
|
||||
result = (* client->requestVector[MAJOROP])(client);
|
||||
XaceHook(XACE_AUDIT_END, client, result);
|
||||
}
|
||||
#else
|
||||
result = (* client->requestVector[MAJOROP])(client);
|
||||
#endif /* XACE */
|
||||
|
||||
if (result != Success)
|
||||
{
|
||||
|
@ -1099,11 +1107,10 @@ ProcConvertSelection(register ClientPtr client)
|
|||
CurrentSelections[i].selection != stuff->selection) i++;
|
||||
if ((i < NumCurrentSelections) &&
|
||||
(CurrentSelections[i].window != None)
|
||||
#ifdef XCSECURITY
|
||||
&& (!client->CheckAccess ||
|
||||
(* client->CheckAccess)(client, CurrentSelections[i].window,
|
||||
RT_WINDOW, SecurityReadAccess,
|
||||
CurrentSelections[i].pWin))
|
||||
#ifdef XACE
|
||||
&& XaceHook(XACE_RESOURCE_ACCESS, client,
|
||||
CurrentSelections[i].window, RT_WINDOW,
|
||||
SecurityReadAccess, CurrentSelections[i].pWin)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
@ -2095,7 +2102,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
Mask plane = 0;
|
||||
char *pBuf;
|
||||
xGetImageReply xgi;
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
RegionPtr pVisibleRegion = NULL;
|
||||
#endif
|
||||
|
||||
|
@ -2201,9 +2208,9 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
|
||||
}
|
||||
|
||||
#ifdef XCSECURITY
|
||||
if (client->trustLevel != XSecurityClientTrusted &&
|
||||
pDraw->type == DRAWABLE_WINDOW)
|
||||
#ifdef XACE
|
||||
if (pDraw->type == DRAWABLE_WINDOW &&
|
||||
!XaceHook(XACE_DRAWABLE_ACCESS, client, pDraw))
|
||||
{
|
||||
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
|
||||
if (pVisibleRegion)
|
||||
|
@ -2231,9 +2238,9 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
format,
|
||||
planemask,
|
||||
(pointer) pBuf);
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
if (pVisibleRegion)
|
||||
SecurityCensorImage(client, pVisibleRegion, widthBytesLine,
|
||||
XaceCensorImage(client, pVisibleRegion, widthBytesLine,
|
||||
pDraw, x, y + linesDone, width,
|
||||
nlines, format, pBuf);
|
||||
#endif
|
||||
|
@ -2272,9 +2279,9 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
format,
|
||||
plane,
|
||||
(pointer)pBuf);
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
if (pVisibleRegion)
|
||||
SecurityCensorImage(client, pVisibleRegion,
|
||||
XaceCensorImage(client, pVisibleRegion,
|
||||
widthBytesLine,
|
||||
pDraw, x, y + linesDone, width,
|
||||
nlines, format, pBuf);
|
||||
|
@ -2300,7 +2307,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
if (pVisibleRegion)
|
||||
REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
|
||||
#endif
|
||||
|
@ -3274,11 +3281,10 @@ ProcListHosts(register ClientPtr client)
|
|||
/* REQUEST(xListHostsReq); */
|
||||
|
||||
REQUEST_SIZE_MATCH(xListHostsReq);
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
/* untrusted clients can't list hosts */
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
if (!XaceHook(XACE_HOSTLIST_ACCESS, client, SecurityReadAccess))
|
||||
{
|
||||
SecurityAudit("client %d attempted to list hosts\n", client->index);
|
||||
return BadAccess;
|
||||
}
|
||||
#endif
|
||||
|
@ -3606,8 +3612,13 @@ CloseDownRetainedResources()
|
|||
}
|
||||
}
|
||||
|
||||
extern int clientPrivateLen;
|
||||
extern unsigned *clientPrivateSizes;
|
||||
extern unsigned totalClientSize;
|
||||
|
||||
void InitClient(ClientPtr client, int i, pointer ospriv)
|
||||
{
|
||||
bzero(client, totalClientSize);
|
||||
client->index = i;
|
||||
client->sequence = 0;
|
||||
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
|
||||
|
@ -3646,11 +3657,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
|||
}
|
||||
#endif
|
||||
client->replyBytesRemaining = 0;
|
||||
#ifdef XCSECURITY
|
||||
client->trustLevel = XSecurityClientTrusted;
|
||||
client->CheckAccess = NULL;
|
||||
client->authId = 0;
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
client->appgroup = NULL;
|
||||
#endif
|
||||
|
@ -3663,10 +3669,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
|||
#endif
|
||||
}
|
||||
|
||||
extern int clientPrivateLen;
|
||||
extern unsigned *clientPrivateSizes;
|
||||
extern unsigned totalClientSize;
|
||||
|
||||
int
|
||||
InitClientPrivates(ClientPtr client)
|
||||
{
|
||||
|
@ -3699,6 +3701,17 @@ InitClientPrivates(ClientPtr client)
|
|||
else
|
||||
ppriv->ptr = (pointer)NULL;
|
||||
}
|
||||
|
||||
/* Allow registrants to initialize the serverClient devPrivates */
|
||||
if (!client->index && ClientStateCallback)
|
||||
{
|
||||
NewClientInfoRec clientinfo;
|
||||
|
||||
clientinfo.client = client;
|
||||
clientinfo.prefix = (xConnSetupPrefix *)NULL;
|
||||
clientinfo.setup = (xConnSetup *) NULL;
|
||||
CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,8 +95,8 @@ Author: Adobe Systems Incorporated
|
|||
#include "scrnintstr.h"
|
||||
#define XK_LATIN1
|
||||
#include <X11/keysymdef.h>
|
||||
#ifdef XCSECURITY
|
||||
#include "securitysrv.h"
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -196,7 +196,7 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len,
|
|||
return (int) c1 - (int) c2;
|
||||
}
|
||||
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
|
||||
/* SecurityLookupWindow and SecurityLookupDrawable:
|
||||
* Look up the window/drawable taking into account the client doing
|
||||
|
@ -204,32 +204,16 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len,
|
|||
* if it exists and the client is allowed access, else return NULL.
|
||||
* Most Proc* functions should be calling these instead of
|
||||
* LookupWindow and LookupDrawable, which do no access checks.
|
||||
* XACE note: need to see if client->lastDrawableID can still be used here.
|
||||
*/
|
||||
|
||||
_X_EXPORT WindowPtr
|
||||
SecurityLookupWindow(XID rid, ClientPtr client, Mask access_mode)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
|
||||
client->errorValue = rid;
|
||||
if(rid == INVALID)
|
||||
return NULL;
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
|
||||
if (client->lastDrawableID == rid)
|
||||
{
|
||||
if (client->lastDrawable->type == DRAWABLE_WINDOW)
|
||||
return ((WindowPtr) client->lastDrawable);
|
||||
return (WindowPtr) NULL;
|
||||
}
|
||||
pWin = (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
|
||||
if (pWin && pWin->drawable.type == DRAWABLE_WINDOW) {
|
||||
client->lastDrawable = (DrawablePtr) pWin;
|
||||
client->lastDrawableID = rid;
|
||||
client->lastGCID = INVALID;
|
||||
client->lastGC = (GCPtr)NULL;
|
||||
}
|
||||
return pWin;
|
||||
return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
|
||||
}
|
||||
|
||||
|
||||
|
@ -240,11 +224,6 @@ SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode)
|
|||
|
||||
if(rid == INVALID)
|
||||
return (pointer) NULL;
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
return (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
|
||||
access_mode);
|
||||
if (client->lastDrawableID == rid)
|
||||
return ((pointer) client->lastDrawable);
|
||||
pDraw = (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
|
||||
access_mode);
|
||||
if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW))
|
||||
|
@ -268,7 +247,7 @@ LookupDrawable(XID rid, ClientPtr client)
|
|||
return SecurityLookupDrawable(rid, client, SecurityUnknownAccess);
|
||||
}
|
||||
|
||||
#else /* not XCSECURITY */
|
||||
#else /* not XACE */
|
||||
|
||||
WindowPtr
|
||||
LookupWindow(XID rid, ClientPtr client)
|
||||
|
@ -310,7 +289,7 @@ LookupDrawable(XID rid, ClientPtr client)
|
|||
return (pointer)NULL;
|
||||
}
|
||||
|
||||
#endif /* XCSECURITY */
|
||||
#endif /* XACE */
|
||||
|
||||
_X_EXPORT ClientPtr
|
||||
LookupClient(XID rid, ClientPtr client)
|
||||
|
|
28
dix/events.c
28
dix/events.c
|
@ -135,8 +135,8 @@ of the copyright holder.
|
|||
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
|
||||
#endif
|
||||
|
||||
#ifdef XCSECURITY
|
||||
#include "securitysrv.h"
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
|
||||
#ifdef XEVIE
|
||||
|
@ -2476,8 +2476,8 @@ CheckPassiveGrabsOnWindow(
|
|||
(grab->confineTo->realized &&
|
||||
BorderSizeNotEmpty(grab->confineTo))))
|
||||
{
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(wClient(pWin), device, FALSE))
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE))
|
||||
return FALSE;
|
||||
#endif
|
||||
#ifdef XKB
|
||||
|
@ -2846,6 +2846,10 @@ drawable.id:0;
|
|||
DeliverFocusedEvent(keybd, xE, sprite.win, count);
|
||||
if (deactivateGrab)
|
||||
(*keybd->DeactivateGrab)(keybd);
|
||||
|
||||
#ifdef XACE
|
||||
XaceHook(XACE_KEY_AVAIL, xE, keybd, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef XKB
|
||||
|
@ -3279,10 +3283,10 @@ EnterLeaveEvent(
|
|||
{
|
||||
xKeymapEvent ke;
|
||||
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
ClientPtr client = grab ? rClient(grab)
|
||||
: clients[CLIENT_ID(pWin->drawable.id)];
|
||||
if (!SecurityCheckDeviceAccess(client, keybd, FALSE))
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE))
|
||||
{
|
||||
bzero((char *)&ke.map[0], 31);
|
||||
}
|
||||
|
@ -3374,9 +3378,9 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr
|
|||
((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask))
|
||||
{
|
||||
xKeymapEvent ke;
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)];
|
||||
if (!SecurityCheckDeviceAccess(client, dev, FALSE))
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE))
|
||||
{
|
||||
bzero((char *)&ke.map[0], 31);
|
||||
}
|
||||
|
@ -3645,8 +3649,8 @@ ProcSetInputFocus(client)
|
|||
REQUEST(xSetInputFocusReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xSetInputFocusReq);
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||
return Success;
|
||||
#endif
|
||||
return SetInputFocus(client, inputInfo.keyboard, stuff->focus,
|
||||
|
@ -3910,8 +3914,8 @@ ProcGrabKeyboard(ClientPtr client)
|
|||
int result;
|
||||
|
||||
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||
{
|
||||
result = Success;
|
||||
rep.status = AlreadyGrabbed;
|
||||
|
|
|
@ -59,8 +59,8 @@ SOFTWARE.
|
|||
#include "gcstruct.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "dispatch.h"
|
||||
#ifdef XCSECURITY
|
||||
#include "securitysrv.h"
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
|
||||
#define EXTENSION_BASE 128
|
||||
|
@ -76,6 +76,39 @@ int lastEvent = EXTENSION_EVENT_BASE;
|
|||
static int lastError = FirstExtensionError;
|
||||
static unsigned int NumExtensions = 0;
|
||||
|
||||
extern int extensionPrivateLen;
|
||||
extern unsigned *extensionPrivateSizes;
|
||||
extern unsigned totalExtensionSize;
|
||||
|
||||
static void
|
||||
InitExtensionPrivates(ExtensionEntry *ext)
|
||||
{
|
||||
register char *ptr;
|
||||
DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
|
||||
if (totalExtensionSize == sizeof(ExtensionEntry))
|
||||
ppriv = (DevUnion *)NULL;
|
||||
else
|
||||
ppriv = (DevUnion *)(ext + 1);
|
||||
|
||||
ext->devPrivates = ppriv;
|
||||
sizes = extensionPrivateSizes;
|
||||
ptr = (char *)(ppriv + extensionPrivateLen);
|
||||
for (i = extensionPrivateLen; --i >= 0; ppriv++, sizes++)
|
||||
{
|
||||
if ( (size = *sizes) )
|
||||
{
|
||||
ppriv->ptr = (pointer)ptr;
|
||||
ptr += size;
|
||||
}
|
||||
else
|
||||
ppriv->ptr = (pointer)NULL;
|
||||
}
|
||||
}
|
||||
|
||||
_X_EXPORT ExtensionEntry *
|
||||
AddExtension(char *name, int NumEvents, int NumErrors,
|
||||
int (*MainProc)(ClientPtr c1),
|
||||
|
@ -92,9 +125,11 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
|||
(unsigned)(lastError + NumErrors > LAST_ERROR))
|
||||
return((ExtensionEntry *) NULL);
|
||||
|
||||
ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry));
|
||||
ext = (ExtensionEntry *) xalloc(totalExtensionSize);
|
||||
if (!ext)
|
||||
return((ExtensionEntry *) NULL);
|
||||
bzero(ext, totalExtensionSize);
|
||||
InitExtensionPrivates(ext);
|
||||
ext->name = (char *)xalloc(strlen(name) + 1);
|
||||
ext->num_aliases = 0;
|
||||
ext->aliases = (char **)NULL;
|
||||
|
@ -144,9 +179,6 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
|||
ext->errorBase = 0;
|
||||
ext->errorLast = 0;
|
||||
}
|
||||
#ifdef XCSECURITY
|
||||
ext->secure = FALSE;
|
||||
#endif
|
||||
|
||||
return(ext);
|
||||
}
|
||||
|
@ -207,26 +239,27 @@ CheckExtension(const char *extname)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Added as part of Xace.
|
||||
*/
|
||||
ExtensionEntry *
|
||||
GetExtensionEntry(int major)
|
||||
{
|
||||
if (major < EXTENSION_BASE)
|
||||
return NULL;
|
||||
major -= EXTENSION_BASE;
|
||||
if (major >= NumExtensions)
|
||||
return NULL;
|
||||
return extensions[major];
|
||||
}
|
||||
|
||||
_X_EXPORT void
|
||||
DeclareExtensionSecurity(char *extname, Bool secure)
|
||||
{
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
int i = FindExtension(extname, strlen(extname));
|
||||
if (i >= 0)
|
||||
{
|
||||
int majorop = extensions[i]->base;
|
||||
extensions[i]->secure = secure;
|
||||
if (secure)
|
||||
{
|
||||
UntrustedProcVector[majorop] = ProcVector[majorop];
|
||||
SwappedUntrustedProcVector[majorop] = SwappedProcVector[majorop];
|
||||
}
|
||||
else
|
||||
{
|
||||
UntrustedProcVector[majorop] = ProcBadRequest;
|
||||
SwappedUntrustedProcVector[majorop] = ProcBadRequest;
|
||||
}
|
||||
}
|
||||
XaceHook(XACE_DECLARE_EXT_SECURE, extensions[i], secure);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -304,10 +337,9 @@ ProcQueryExtension(ClientPtr client)
|
|||
{
|
||||
i = FindExtension((char *)&stuff[1], stuff->nbytes);
|
||||
if (i < 0
|
||||
#ifdef XCSECURITY
|
||||
/* don't show insecure extensions to untrusted clients */
|
||||
|| (client->trustLevel == XSecurityClientUntrusted &&
|
||||
!extensions[i]->secure)
|
||||
#ifdef XACE
|
||||
/* call callbacks to find out whether to show extension */
|
||||
|| !XaceHook(XACE_EXT_ACCESS, client, extensions[i])
|
||||
#endif
|
||||
)
|
||||
reply.present = xFalse;
|
||||
|
@ -344,10 +376,9 @@ ProcListExtensions(ClientPtr client)
|
|||
|
||||
for (i=0; i<NumExtensions; i++)
|
||||
{
|
||||
#ifdef XCSECURITY
|
||||
/* don't show insecure extensions to untrusted clients */
|
||||
if (client->trustLevel == XSecurityClientUntrusted &&
|
||||
!extensions[i]->secure)
|
||||
#ifdef XACE
|
||||
/* call callbacks to find out whether to show extension */
|
||||
if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i]))
|
||||
continue;
|
||||
#endif
|
||||
total_length += strlen(extensions[i]->name) + 1;
|
||||
|
@ -362,9 +393,8 @@ ProcListExtensions(ClientPtr client)
|
|||
for (i=0; i<NumExtensions; i++)
|
||||
{
|
||||
int len;
|
||||
#ifdef XCSECURITY
|
||||
if (client->trustLevel == XSecurityClientUntrusted &&
|
||||
!extensions[i]->secure)
|
||||
#ifdef XACE
|
||||
if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i]))
|
||||
continue;
|
||||
#endif
|
||||
*bufptr++ = len = strlen(extensions[i]->name);
|
||||
|
|
|
@ -354,6 +354,7 @@ main(int argc, char *argv[], char *envp[])
|
|||
InitAtoms();
|
||||
InitEvents();
|
||||
InitGlyphCaching();
|
||||
ResetExtensionPrivates();
|
||||
ResetClientPrivates();
|
||||
ResetScreenPrivates();
|
||||
ResetWindowPrivates();
|
||||
|
|
|
@ -42,6 +42,7 @@ from The Open Group.
|
|||
#include "servermd.h"
|
||||
#include "site.h"
|
||||
#include "inputstr.h"
|
||||
#include "extnsionst.h"
|
||||
|
||||
/*
|
||||
* See the Wrappers and devPrivates section in "Definition of the
|
||||
|
@ -49,6 +50,63 @@ from The Open Group.
|
|||
* for information on how to use devPrivates.
|
||||
*/
|
||||
|
||||
/*
|
||||
* extension private machinery
|
||||
*/
|
||||
|
||||
static int extensionPrivateCount;
|
||||
int extensionPrivateLen;
|
||||
unsigned *extensionPrivateSizes;
|
||||
unsigned totalExtensionSize;
|
||||
|
||||
void
|
||||
ResetExtensionPrivates()
|
||||
{
|
||||
extensionPrivateCount = 0;
|
||||
extensionPrivateLen = 0;
|
||||
xfree(extensionPrivateSizes);
|
||||
extensionPrivateSizes = (unsigned *)NULL;
|
||||
totalExtensionSize =
|
||||
((sizeof(ExtensionEntry) + sizeof(long) - 1) / sizeof(long)) * sizeof(long);
|
||||
}
|
||||
|
||||
_X_EXPORT int
|
||||
AllocateExtensionPrivateIndex()
|
||||
{
|
||||
return extensionPrivateCount++;
|
||||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
AllocateExtensionPrivate(int index2, unsigned amount)
|
||||
{
|
||||
unsigned oldamount;
|
||||
|
||||
/* Round up sizes for proper alignment */
|
||||
amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long);
|
||||
|
||||
if (index2 >= extensionPrivateLen)
|
||||
{
|
||||
unsigned *nsizes;
|
||||
nsizes = (unsigned *)xrealloc(extensionPrivateSizes,
|
||||
(index2 + 1) * sizeof(unsigned));
|
||||
if (!nsizes)
|
||||
return FALSE;
|
||||
while (extensionPrivateLen <= index2)
|
||||
{
|
||||
nsizes[extensionPrivateLen++] = 0;
|
||||
totalExtensionSize += sizeof(DevUnion);
|
||||
}
|
||||
extensionPrivateSizes = nsizes;
|
||||
}
|
||||
oldamount = extensionPrivateSizes[index2];
|
||||
if (amount > oldamount)
|
||||
{
|
||||
extensionPrivateSizes[index2] = amount;
|
||||
totalExtensionSize += (amount - oldamount);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* client private machinery
|
||||
*/
|
||||
|
|
|
@ -58,8 +58,8 @@ SOFTWARE.
|
|||
#include "dixstruct.h"
|
||||
#include "dispatch.h"
|
||||
#include "swaprep.h"
|
||||
#ifdef XCSECURITY
|
||||
#include "securitysrv.h"
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
|
||||
/*****************************************************************
|
||||
|
@ -118,12 +118,12 @@ ProcRotateProperties(ClientPtr client)
|
|||
return(BadAlloc);
|
||||
for (i = 0; i < stuff->nAtoms; i++)
|
||||
{
|
||||
#ifdef XCSECURITY
|
||||
char action = SecurityCheckPropertyAccess(client, pWin, atoms[i],
|
||||
#ifdef XACE
|
||||
char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i],
|
||||
SecurityReadAccess|SecurityWriteAccess);
|
||||
#endif
|
||||
if (!ValidAtom(atoms[i])
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
|| (SecurityErrorOperation == action)
|
||||
#endif
|
||||
)
|
||||
|
@ -132,7 +132,7 @@ ProcRotateProperties(ClientPtr client)
|
|||
client->errorValue = atoms[i];
|
||||
return BadAtom;
|
||||
}
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
if (SecurityIgnoreOperation == action)
|
||||
{
|
||||
DEALLOCATE_LOCAL(props);
|
||||
|
@ -233,8 +233,8 @@ ProcChangeProperty(ClientPtr client)
|
|||
return(BadAtom);
|
||||
}
|
||||
|
||||
#ifdef XCSECURITY
|
||||
switch (SecurityCheckPropertyAccess(client, pWin, stuff->property,
|
||||
#ifdef XACE
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
|
||||
SecurityWriteAccess))
|
||||
{
|
||||
case SecurityErrorOperation:
|
||||
|
@ -501,13 +501,13 @@ ProcGetProperty(ClientPtr client)
|
|||
if (!pProp)
|
||||
return NullPropertyReply(client, None, 0, &reply);
|
||||
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
{
|
||||
Mask access_mode = SecurityReadAccess;
|
||||
|
||||
if (stuff->delete)
|
||||
access_mode |= SecurityDestroyAccess;
|
||||
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
|
||||
switch(XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
|
||||
access_mode))
|
||||
{
|
||||
case SecurityErrorOperation:
|
||||
|
@ -663,8 +663,8 @@ ProcDeleteProperty(register ClientPtr client)
|
|||
return (BadAtom);
|
||||
}
|
||||
|
||||
#ifdef XCSECURITY
|
||||
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
|
||||
#ifdef XACE
|
||||
switch(XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
|
||||
SecurityDestroyAccess))
|
||||
{
|
||||
case SecurityErrorOperation:
|
||||
|
|
|
@ -120,6 +120,9 @@ Equipment Corporation.
|
|||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#endif
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
static void RebuildTable(
|
||||
|
@ -818,8 +821,6 @@ LegalNewID(XID id, register ClientPtr client)
|
|||
!LookupIDByClass(id, RC_ANY)));
|
||||
}
|
||||
|
||||
#ifdef XCSECURITY
|
||||
|
||||
/* SecurityLookupIDByType and SecurityLookupIDByClass:
|
||||
* These are the heart of the resource ID security system. They take
|
||||
* two additional arguments compared to the old LookupID functions:
|
||||
|
@ -835,10 +836,6 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
|||
register ResourcePtr res;
|
||||
pointer retval = NULL;
|
||||
|
||||
assert(client == NullClient ||
|
||||
(client->index <= currentMaxClients && clients[client->index] == client));
|
||||
assert( (rtype & TypeMask) <= lastResourceType);
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
clientTable[cid].buckets)
|
||||
{
|
||||
|
@ -851,8 +848,11 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (retval && client && client->CheckAccess)
|
||||
retval = (* client->CheckAccess)(client, id, rtype, mode, retval);
|
||||
#ifdef XACE
|
||||
if (retval && client &&
|
||||
!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, mode, retval))
|
||||
retval = NULL;
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -864,10 +864,6 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
|||
register ResourcePtr res = NULL;
|
||||
pointer retval = NULL;
|
||||
|
||||
assert(client == NullClient ||
|
||||
(client->index <= currentMaxClients && clients[client->index] == client));
|
||||
assert (classes >= lastResourceClass);
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
clientTable[cid].buckets)
|
||||
{
|
||||
|
@ -880,8 +876,11 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (retval && client && client->CheckAccess)
|
||||
retval = (* client->CheckAccess)(client, id, res->type, mode, retval);
|
||||
#ifdef XACE
|
||||
if (retval && client &&
|
||||
!XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, mode, retval))
|
||||
retval = NULL;
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -902,50 +901,3 @@ LookupIDByClass(XID id, RESTYPE classes)
|
|||
return SecurityLookupIDByClass(NullClient, id, classes,
|
||||
SecurityUnknownAccess);
|
||||
}
|
||||
|
||||
#else /* not XCSECURITY */
|
||||
|
||||
/*
|
||||
* LookupIDByType returns the object with the given id and type, else NULL.
|
||||
*/
|
||||
pointer
|
||||
LookupIDByType(XID id, RESTYPE rtype)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
clientTable[cid].buckets)
|
||||
{
|
||||
res = clientTable[cid].resources[Hash(cid, id)];
|
||||
|
||||
for (; res; res = res->next)
|
||||
if ((res->id == id) && (res->type == rtype))
|
||||
return res->value;
|
||||
}
|
||||
return (pointer)NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* LookupIDByClass returns the object with the given id and any one of the
|
||||
* given classes, else NULL.
|
||||
*/
|
||||
pointer
|
||||
LookupIDByClass(XID id, RESTYPE classes)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
clientTable[cid].buckets)
|
||||
{
|
||||
res = clientTable[cid].resources[Hash(cid, id)];
|
||||
|
||||
for (; res; res = res->next)
|
||||
if ((res->id == id) && (res->type & classes))
|
||||
return res->value;
|
||||
}
|
||||
return (pointer)NULL;
|
||||
}
|
||||
|
||||
#endif /* XCSECURITY */
|
||||
|
|
32
dix/window.c
32
dix/window.c
|
@ -126,8 +126,8 @@ Equipment Corporation.
|
|||
#ifdef XAPPGROUP
|
||||
#include "appgroup.h"
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
#include "securitysrv.h"
|
||||
#ifdef XACE
|
||||
#include "xace.h"
|
||||
#endif
|
||||
|
||||
/******
|
||||
|
@ -530,6 +530,10 @@ InitRootWindow(WindowPtr pWin)
|
|||
/* We SHOULD check for an error value here XXX */
|
||||
(*pScreen->ChangeWindowAttributes)(pWin, backFlag);
|
||||
|
||||
#ifdef XACE
|
||||
XaceHook(XACE_WINDOW_INIT, serverClient, pWin);
|
||||
#endif
|
||||
|
||||
MapWindow(pWin, serverClient);
|
||||
}
|
||||
|
||||
|
@ -731,11 +735,11 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
|||
}
|
||||
|
||||
pWin->borderWidth = bw;
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
/* can't let untrusted clients have background None windows;
|
||||
* they make it too easy to steal window contents
|
||||
*/
|
||||
if (client->trustLevel != XSecurityClientTrusted)
|
||||
if (!XaceHook(XACE_BACKGRND_ACCESS, client, pWin))
|
||||
{
|
||||
pWin->backgroundState = BackgroundPixel;
|
||||
pWin->background.pixel = 0;
|
||||
|
@ -762,6 +766,10 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
|||
REGION_NULL(pScreen, &pWin->winSize);
|
||||
REGION_NULL(pScreen, &pWin->borderSize);
|
||||
|
||||
#ifdef XACE
|
||||
XaceHook(XACE_WINDOW_INIT, client, pWin);
|
||||
#endif
|
||||
|
||||
pHead = RealChildHead(pParent);
|
||||
if (pHead)
|
||||
{
|
||||
|
@ -1025,9 +1033,9 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
|
|||
borderRelative = TRUE;
|
||||
if (pixID == None)
|
||||
{
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
/* can't let untrusted clients have background None windows */
|
||||
if (client->trustLevel == XSecurityClientTrusted)
|
||||
if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin))
|
||||
{
|
||||
#endif
|
||||
if (pWin->backgroundState == BackgroundPixmap)
|
||||
|
@ -1036,7 +1044,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
|
|||
MakeRootTile(pWin);
|
||||
else
|
||||
pWin->backgroundState = None;
|
||||
#ifdef XCSECURITY
|
||||
#ifdef XACE
|
||||
}
|
||||
else
|
||||
{ /* didn't change the background to None, so don't tell ddx */
|
||||
|
@ -2724,13 +2732,9 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
|
|||
if (pWin->mapped)
|
||||
return(Success);
|
||||
|
||||
#ifdef XCSECURITY
|
||||
/* don't let an untrusted client map a child-of-trusted-window, InputOnly
|
||||
* window; too easy to steal device input
|
||||
*/
|
||||
if ( (client->trustLevel != XSecurityClientTrusted) &&
|
||||
(pWin->drawable.class == InputOnly) &&
|
||||
(wClient(pWin->parent)->trustLevel == XSecurityClientTrusted) )
|
||||
#ifdef XACE
|
||||
/* general check for permission to map window */
|
||||
if (!XaceHook(XACE_MAP_ACCESS, client, pWin))
|
||||
return Success;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ prints a usage message.
|
|||
causes all remaining command line arguments to be ignored.
|
||||
.TP 8
|
||||
.B \-maxbigreqsize \fIsize\fP
|
||||
sets the maxmium big request to
|
||||
sets the maximum big request to
|
||||
.I size
|
||||
MB.
|
||||
.TP 8
|
||||
|
@ -449,7 +449,7 @@ the text after the /; it is used to distinguish between instances of
|
|||
|
||||
<action> ::= a | i | e
|
||||
|
||||
<string> ::= <dbl quoted string> | <single quoted string> | <unqouted string>
|
||||
<string> ::= <dbl quoted string> | <single quoted string> | <unquoted string>
|
||||
|
||||
<dbl quoted string> ::= <space> " <not dqoute>* " <space>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
noinst_LTLIBRARIES = libfb.la libfbmmx.la
|
||||
noinst_LTLIBRARIES = libfb.la libwfb.la libfbmmx.la
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support \
|
||||
|
@ -7,11 +7,13 @@ INCLUDES = \
|
|||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
||||
if XORG
|
||||
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h
|
||||
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h
|
||||
endif
|
||||
|
||||
libfb_la_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
if MMX_CAPABLE
|
||||
AM_CFLAGS += -DUSE_MMX
|
||||
libfb_la_CFLAGS += -DUSE_MMX
|
||||
|
||||
libfbmmx_la_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
|
@ -23,6 +25,8 @@ libfbmmx_la_CFLAGS = \
|
|||
--param large-function-growth=10000
|
||||
endif
|
||||
|
||||
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
||||
|
||||
libfbmmx_la_SOURCES = \
|
||||
fbmmx.c \
|
||||
fbmmx.h
|
||||
|
@ -70,6 +74,8 @@ libfb_la_SOURCES = \
|
|||
fbedge.c \
|
||||
fbedgeimp.h
|
||||
|
||||
libwfb_la_SOURCES = $(libfb_la_SOURCES)
|
||||
|
||||
libfb_la_LIBADD = libfbmmx.la
|
||||
|
||||
EXTRA_DIST = fbcmap.c
|
||||
|
|
118
fb/fb.h
118
fb/fb.h
|
@ -44,6 +44,39 @@
|
|||
#include "picture.h"
|
||||
#endif
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
|
||||
#include "wfbrename.h"
|
||||
#define FBPREFIX(x) wfb##x
|
||||
#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
|
||||
#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
|
||||
|
||||
#define MEMCPY_WRAPPED(dst, src, size) do { \
|
||||
size_t _i; \
|
||||
CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \
|
||||
for(_i = 0; _i < size; _i++) { \
|
||||
WRITE(_dst +_i, READ(_src + _i)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define MEMSET_WRAPPED(dst, val, size) do { \
|
||||
size_t _i; \
|
||||
CARD8 *_dst = (CARD8*)(dst); \
|
||||
for(_i = 0; _i < size; _i++) { \
|
||||
WRITE(_dst +_i, (val)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
|
||||
#define FBPREFIX(x) fb##x
|
||||
#define WRITE(ptr, val) (*(ptr) = (val))
|
||||
#define READ(ptr) (*(ptr))
|
||||
#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
|
||||
#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This single define controls the basic size of data manipulated
|
||||
* by this software; it must be log2(sizeof (FbBits) * 8)
|
||||
|
@ -222,8 +255,8 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
|
||||
#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
|
||||
#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
|
||||
#define FbStorePart(dst,off,t,xor) (*FbPtrOffset(dst,off,t) = \
|
||||
FbSelectPart(xor,off,t))
|
||||
#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \
|
||||
FbSelectPart(xor,off,t)))
|
||||
#ifndef FbSelectPart
|
||||
#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
|
||||
#endif
|
||||
|
@ -403,7 +436,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
|
||||
break; \
|
||||
default: \
|
||||
*dst = FbDoMaskRRop(*dst, and, xor, l); \
|
||||
WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
|
||||
break; \
|
||||
} \
|
||||
}
|
||||
|
@ -423,7 +456,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
break; \
|
||||
FbDoRightMaskByteRRop6Cases(dst,xor) \
|
||||
default: \
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, r); \
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
@ -455,20 +488,20 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
* The term "lane" comes from the hardware term "byte-lane" which
|
||||
*/
|
||||
|
||||
#define FbLaneCase1(n,a,o) ((n) == 0x01 ? \
|
||||
(*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \
|
||||
fgxor) : 0)
|
||||
#define FbLaneCase2(n,a,o) ((n) == 0x03 ? \
|
||||
(*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \
|
||||
#define FbLaneCase1(n,a,o) ((n) == 0x01 ? (void) \
|
||||
WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), \
|
||||
fgxor) : (void) 0)
|
||||
#define FbLaneCase2(n,a,o) ((n) == 0x03 ? (void) \
|
||||
WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), \
|
||||
fgxor) : \
|
||||
((void)FbLaneCase1((n)&1,a,o), \
|
||||
FbLaneCase1((n)>>1,a,(o)+1)))
|
||||
#define FbLaneCase4(n,a,o) ((n) == 0x0f ? \
|
||||
(*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \
|
||||
#define FbLaneCase4(n,a,o) ((n) == 0x0f ? (void) \
|
||||
WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), \
|
||||
fgxor) : \
|
||||
((void)FbLaneCase2((n)&3,a,o), \
|
||||
FbLaneCase2((n)>>2,a,(o)+2)))
|
||||
#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \
|
||||
#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (void) (*(FbBits *) ((a)+(o)) = fgxor) : \
|
||||
((void)FbLaneCase4((n)&15,a,o), \
|
||||
FbLaneCase4((n)>>4,a,(o)+4)))
|
||||
|
||||
|
@ -588,6 +621,32 @@ extern WindowPtr *WindowTable;
|
|||
#define FB_SCREEN_PRIVATE
|
||||
#endif
|
||||
|
||||
/* Framebuffer access wrapper */
|
||||
typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
|
||||
typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
|
||||
typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead,
|
||||
WriteMemoryProcPtr *pWrite,
|
||||
DrawablePtr pDraw);
|
||||
typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
|
||||
#define fbPrepareAccess(pDraw) \
|
||||
fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
|
||||
&wfbReadMemory, \
|
||||
&wfbWriteMemory, \
|
||||
(pDraw))
|
||||
#define fbFinishAccess(pDraw) \
|
||||
fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
|
||||
|
||||
#else
|
||||
|
||||
#define fbPrepareAccess(pPix)
|
||||
#define fbFinishAccess(pDraw)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FB_SCREEN_PRIVATE
|
||||
extern int fbScreenPrivateIndex;
|
||||
extern int fbGetScreenPrivateIndex(void);
|
||||
|
@ -596,6 +655,10 @@ extern int fbGetScreenPrivateIndex(void);
|
|||
typedef struct {
|
||||
unsigned char win32bpp; /* window bpp for 32-bpp images */
|
||||
unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
|
||||
FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
|
||||
#endif
|
||||
} FbScreenPrivRec, *FbScreenPrivPtr;
|
||||
|
||||
#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
|
||||
|
@ -674,6 +737,7 @@ typedef struct {
|
|||
(xoff) = __fbPixOffXPix(_pPix); \
|
||||
(yoff) = __fbPixOffYPix(_pPix); \
|
||||
} \
|
||||
fbPrepareAccess(pDrawable); \
|
||||
(pointer) = (FbBits *) _pPix->devPrivate.ptr; \
|
||||
(stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
|
||||
(bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
|
||||
|
@ -690,6 +754,7 @@ typedef struct {
|
|||
(xoff) = __fbPixOffXPix(_pPix); \
|
||||
(yoff) = __fbPixOffYPix(_pPix); \
|
||||
} \
|
||||
fbPrepareAccess(pDrawable); \
|
||||
(pointer) = (FbStip *) _pPix->devPrivate.ptr; \
|
||||
(stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
|
||||
(bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
|
||||
|
@ -1738,6 +1803,30 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
int width, /* pixel width of frame buffer */
|
||||
int bpp); /* bits per pixel of frame buffer */
|
||||
|
||||
Bool
|
||||
wfbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap);
|
||||
|
||||
Bool
|
||||
wfbScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap);
|
||||
|
||||
Bool
|
||||
fbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
|
@ -1994,6 +2083,11 @@ fbReplicatePixel (Pixel p, int bpp);
|
|||
void
|
||||
fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp);
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
extern ReadMemoryProcPtr wfbReadMemory;
|
||||
extern WriteMemoryProcPtr wfbWriteMemory;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* fbwindow.c
|
||||
*/
|
||||
|
|
74
fb/fb24_32.c
74
fb/fb24_32.c
|
@ -38,18 +38,18 @@
|
|||
* by reading/writing aligned CARD32s where it's easy
|
||||
*/
|
||||
|
||||
#define Get8(a) ((CARD32) *(a))
|
||||
#define Get8(a) ((CARD32) READ(a))
|
||||
|
||||
#if BITMAP_BIT_ORDER == MSBFirst
|
||||
#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
|
||||
#define Put24(a,p) (((a)[0] = (CARD8) ((p) >> 16)), \
|
||||
((a)[1] = (CARD8) ((p) >> 8)), \
|
||||
((a)[2] = (CARD8) (p)))
|
||||
#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \
|
||||
(WRITE((a+1), (CARD8) ((p) >> 8))), \
|
||||
(WRITE((a+2), (CARD8) (p))))
|
||||
#else
|
||||
#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
|
||||
#define Put24(a,p) (((a)[0] = (CARD8) (p)), \
|
||||
((a)[1] = (CARD8) ((p) >> 8)), \
|
||||
((a)[2] = (CARD8) ((p) >> 16)))
|
||||
#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \
|
||||
(WRITE((a+1), (CARD8) ((p) >> 8))), \
|
||||
(WRITE((a+2), (CARD8) ((p) >> 16))))
|
||||
#endif
|
||||
|
||||
typedef void (*fb24_32BltFunc) (CARD8 *srcLine,
|
||||
|
@ -106,7 +106,7 @@ fb24_32BltDown (CARD8 *srcLine,
|
|||
while (((long) dst & 3) && w)
|
||||
{
|
||||
w--;
|
||||
pixel = *src++;
|
||||
pixel = READ(src++);
|
||||
pixel = FbDoDestInvarientMergeRop(pixel);
|
||||
Put24 (dst, pixel);
|
||||
dst += 3;
|
||||
|
@ -115,35 +115,35 @@ fb24_32BltDown (CARD8 *srcLine,
|
|||
while (w >= 4)
|
||||
{
|
||||
CARD32 s0, s1;
|
||||
s0 = *src++;
|
||||
s0 = READ(src++);
|
||||
s0 = FbDoDestInvarientMergeRop(s0);
|
||||
s1 = *src++;
|
||||
s1 = READ(src++);
|
||||
s1 = FbDoDestInvarientMergeRop(s1);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
*(CARD32 *)(dst) = (s0 & 0xffffff) | (s1 << 24);
|
||||
WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24));
|
||||
#else
|
||||
*(CARD32 *)(dst) = (s0 << 8) | ((s1 & 0xffffff) >> 16);
|
||||
WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
|
||||
#endif
|
||||
s0 = *src++;
|
||||
s0 = READ(src++);
|
||||
s0 = FbDoDestInvarientMergeRop(s0);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
*(CARD32 *)(dst+4) = ((s1 & 0xffffff) >> 8) | (s0 << 16);
|
||||
WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16));
|
||||
#else
|
||||
*(CARD32 *)(dst+4) = (s1 << 16) | ((s0 & 0xffffff) >> 8);
|
||||
WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8));
|
||||
#endif
|
||||
s1 = *src++;
|
||||
s1 = READ(src++);
|
||||
s1 = FbDoDestInvarientMergeRop(s1);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
*(CARD32 *)(dst+8) = ((s0 & 0xffffff) >> 16) | (s1 << 8);
|
||||
WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8));
|
||||
#else
|
||||
*(CARD32 *)(dst+8) = (s0 << 24) | (s1 & 0xffffff);
|
||||
WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff));
|
||||
#endif
|
||||
dst += 12;
|
||||
w -= 4;
|
||||
}
|
||||
while (w--)
|
||||
{
|
||||
pixel = *src++;
|
||||
pixel = READ(src++);
|
||||
pixel = FbDoDestInvarientMergeRop(pixel);
|
||||
Put24 (dst, pixel);
|
||||
dst += 3;
|
||||
|
@ -153,7 +153,7 @@ fb24_32BltDown (CARD8 *srcLine,
|
|||
{
|
||||
while (w--)
|
||||
{
|
||||
pixel = *src++;
|
||||
pixel = READ(src++);
|
||||
dpixel = Get24 (dst);
|
||||
pixel = FbDoMergeRop(pixel, dpixel);
|
||||
Put24 (dst, pixel);
|
||||
|
@ -205,40 +205,40 @@ fb24_32BltUp (CARD8 *srcLine,
|
|||
w--;
|
||||
pixel = Get24(src);
|
||||
src += 3;
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
}
|
||||
/* Do four aligned pixels at a time */
|
||||
while (w >= 4)
|
||||
{
|
||||
CARD32 s0, s1;
|
||||
|
||||
s0 = *(CARD32 *)(src);
|
||||
s0 = READ((CARD32 *)src);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = s0 & 0xffffff;
|
||||
#else
|
||||
pixel = s0 >> 8;
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
s1 = *(CARD32 *)(src+4);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
s1 = READ((CARD32 *)(src+4));
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff);
|
||||
#else
|
||||
pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16);
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
s0 = *(CARD32 *)(src+8);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
s0 = READ((CARD32 *)(src+8));
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff);
|
||||
#else
|
||||
pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24);
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = s0 >> 8;
|
||||
#else
|
||||
pixel = s0 & 0xffffff;
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
src += 12;
|
||||
w -= 4;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ fb24_32BltUp (CARD8 *srcLine,
|
|||
w--;
|
||||
pixel = Get24(src);
|
||||
src += 3;
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -256,7 +256,7 @@ fb24_32BltUp (CARD8 *srcLine,
|
|||
{
|
||||
pixel = Get24(src);
|
||||
src += 3;
|
||||
*dst = FbDoMergeRop(pixel, *dst);
|
||||
WRITE(dst, FbDoMergeRop(pixel, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -305,6 +305,8 @@ fb24_32GetSpans(DrawablePtr pDrawable,
|
|||
ppt++;
|
||||
pwidth++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -366,6 +368,8 @@ fb24_32SetSpans (DrawablePtr pDrawable,
|
|||
ppt++;
|
||||
pwidth++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -429,6 +433,8 @@ fb24_32PutZImage (DrawablePtr pDrawable,
|
|||
alu,
|
||||
pm);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -463,6 +469,8 @@ fb24_32GetImage (DrawablePtr pDrawable,
|
|||
fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff,
|
||||
(CARD8 *) d, dstStride, 0,
|
||||
w, h, GXcopy, pm);
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -519,6 +527,9 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
|
|||
pPriv->pm);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
fbFinishAccess (pDstDrawable);
|
||||
}
|
||||
|
||||
PixmapPtr
|
||||
|
@ -563,6 +574,9 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
|
|||
GXcopy,
|
||||
FB_ALLONES);
|
||||
|
||||
fbFinishAccess (&pOldTile->drawable);
|
||||
fbFinishAccess (&pNewTile->drawable);
|
||||
|
||||
return pNewTile;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,3 +90,8 @@ fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex)
|
|||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
ReadMemoryProcPtr wfbReadMemory;
|
||||
WriteMemoryProcPtr wfbWriteMemory;
|
||||
#endif
|
||||
|
|
|
@ -109,6 +109,7 @@ fbPolyArc (DrawablePtr pDrawable,
|
|||
miPolyArc(pDrawable, pGC, 1, parcs);
|
||||
parcs++;
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
16
fb/fbbits.c
16
fb/fbbits.c
|
@ -103,14 +103,14 @@
|
|||
#define BITSUNIT BYTE
|
||||
#define BITSMUL 3
|
||||
|
||||
#define FbDoTypeStore(b,t,x,s) (*((t *) (b)) = (x) >> (s))
|
||||
#define FbDoTypeRRop(b,t,a,x,s) (*((t *) (b)) = FbDoRRop(*((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s)))
|
||||
#define FbDoTypeMaskRRop(b,t,a,x,m,s) (*((t *) (b)) = FbDoMaskRRop(*((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s), \
|
||||
(m) >> (s))
|
||||
#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s))
|
||||
#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s)))
|
||||
#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s), \
|
||||
(m) >> (s)))
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
#define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \
|
||||
(FbDoTypeStore (b, CARD8, x, 0), \
|
||||
|
|
35
fb/fbbits.h
35
fb/fbbits.h
|
@ -42,13 +42,13 @@
|
|||
#ifdef BITSSTORE
|
||||
#define STORE(b,x) BITSSTORE(b,x)
|
||||
#else
|
||||
#define STORE(b,x) (*(b) = (x))
|
||||
#define STORE(b,x) WRITE((b), (x))
|
||||
#endif
|
||||
|
||||
#ifdef BITSRROP
|
||||
#define RROP(b,a,x) BITSRROP(b,a,x)
|
||||
#else
|
||||
#define RROP(b,a,x) (*(b) = FbDoRRop (*(b), (a), (x)))
|
||||
#define RROP(b,a,x) WRITE((b), FbDoRRop (READ(b), (a), (x)))
|
||||
#endif
|
||||
|
||||
#ifdef BITSUNIT
|
||||
|
@ -119,6 +119,8 @@ BRESSOLID (DrawablePtr pDrawable,
|
|||
e += e3;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -263,6 +265,8 @@ onOffOdd:
|
|||
dashlen = len;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -541,18 +545,18 @@ ARC (FbBits *dst,
|
|||
# define WRITE_ADDR4(n) ((n))
|
||||
#endif
|
||||
|
||||
#define WRITE1(d,n,fg) ((d)[WRITE_ADDR1(n)] = (BITS) (fg))
|
||||
#define WRITE1(d,n,fg) WRITE(d + WRITE_ADDR1(n), (BITS) (fg))
|
||||
|
||||
#ifdef BITS2
|
||||
# define WRITE2(d,n,fg) (*((BITS2 *) &((d)[WRITE_ADDR2(n)])) = (BITS2) (fg))
|
||||
# define WRITE2(d,n,fg) WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg))
|
||||
#else
|
||||
# define WRITE2(d,n,fg) WRITE1(d,(n)+1,WRITE1(d,n,fg))
|
||||
# define WRITE2(d,n,fg) (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg))
|
||||
#endif
|
||||
|
||||
#ifdef BITS4
|
||||
# define WRITE4(d,n,fg) (*((BITS4 *) &((d)[WRITE_ADDR4(n)])) = (BITS4) (fg))
|
||||
# define WRITE4(d,n,fg) WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg))
|
||||
#else
|
||||
# define WRITE4(d,n,fg) WRITE2(d,(n)+2,WRITE2(d,n,fg))
|
||||
# define WRITE4(d,n,fg) (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg))
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -710,8 +714,10 @@ POLYLINE (DrawablePtr pDrawable,
|
|||
intToX(pt2) + xoff, intToY(pt2) + yoff,
|
||||
npt == 0 && pGC->capStyle != CapNotLast,
|
||||
&dashoffset);
|
||||
if (!npt)
|
||||
if (!npt) {
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
pt1 = pt2;
|
||||
pt2 = *pts++;
|
||||
npt--;
|
||||
|
@ -776,6 +782,7 @@ POLYLINE (DrawablePtr pDrawable,
|
|||
{
|
||||
RROP(bits,and,xor);
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
pt1 = pt2;
|
||||
|
@ -786,6 +793,8 @@ POLYLINE (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -883,20 +892,20 @@ POLYSEGMENT (DrawablePtr pDrawable,
|
|||
FbMaskBits (dstX, width, startmask, nmiddle, endmask);
|
||||
if (startmask)
|
||||
{
|
||||
*dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, startmask);
|
||||
WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, startmask));
|
||||
dstLine++;
|
||||
}
|
||||
if (!andBits)
|
||||
while (nmiddle--)
|
||||
*dstLine++ = xorBits;
|
||||
WRITE(dstLine++, xorBits);
|
||||
else
|
||||
while (nmiddle--)
|
||||
{
|
||||
*dstLine = FbDoRRop (*dstLine, andBits, xorBits);
|
||||
WRITE(dstLine, FbDoRRop (READ(dstLine), andBits, xorBits));
|
||||
dstLine++;
|
||||
}
|
||||
if (endmask)
|
||||
*dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, endmask);
|
||||
WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, endmask));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -950,6 +959,8 @@ POLYSEGMENT (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
138
fb/fbblt.c
138
fb/fbblt.c
|
@ -92,10 +92,10 @@ fbBlt (FbBits *srcLine,
|
|||
|
||||
if (!upsidedown)
|
||||
for (i = 0; i < height; i++)
|
||||
memcpy(dst + i * dstStride, src + i * srcStride, width);
|
||||
MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
|
||||
else
|
||||
for (i = height - 1; i >= 0; i--)
|
||||
memcpy(dst + i * dstStride, src + i * srcStride, width);
|
||||
MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ fbBlt (FbBits *srcLine,
|
|||
{
|
||||
if (endmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
|
||||
}
|
||||
|
@ -145,20 +145,20 @@ fbBlt (FbBits *srcLine,
|
|||
if (destInvarient)
|
||||
{
|
||||
while (n--)
|
||||
*--dst = FbDoDestInvarientMergeRop(*--src);
|
||||
WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src)));
|
||||
}
|
||||
else
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMergeRop (bits, *dst);
|
||||
WRITE(dst, FbDoMergeRop (bits, READ(dst)));
|
||||
}
|
||||
}
|
||||
if (startmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ fbBlt (FbBits *srcLine,
|
|||
{
|
||||
if (startmask)
|
||||
{
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
|
||||
dst++;
|
||||
}
|
||||
|
@ -198,20 +198,20 @@ fbBlt (FbBits *srcLine,
|
|||
}
|
||||
#endif
|
||||
while (n--)
|
||||
*dst++ = FbDoDestInvarientMergeRop(*src++);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++)));
|
||||
}
|
||||
else
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMergeRop (bits, *dst);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMergeRop (bits, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
if (endmask)
|
||||
{
|
||||
bits = *src;
|
||||
bits = READ(src);
|
||||
FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
|
||||
}
|
||||
}
|
||||
|
@ -240,13 +240,13 @@ fbBlt (FbBits *srcLine,
|
|||
if (reverse)
|
||||
{
|
||||
if (srcX < dstX)
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
if (endmask)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(endmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
|
@ -258,10 +258,10 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
--dst;
|
||||
*dst = FbDoDestInvarientMergeRop(bits);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -269,10 +269,10 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
--dst;
|
||||
*dst = FbDoMergeRop(bits, *dst);
|
||||
WRITE(dst, FbDoMergeRop(bits, READ(dst)));
|
||||
}
|
||||
}
|
||||
if (startmask)
|
||||
|
@ -280,7 +280,7 @@ fbBlt (FbBits *srcLine,
|
|||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(startmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
|
@ -290,13 +290,13 @@ fbBlt (FbBits *srcLine,
|
|||
else
|
||||
{
|
||||
if (srcX > dstX)
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
if (startmask)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
if (FbScrLeft(startmask, rightShift))
|
||||
{
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
}
|
||||
FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
|
||||
|
@ -308,9 +308,9 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoDestInvarientMergeRop(bits);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -319,9 +319,9 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoMergeRop(bits, *dst);
|
||||
WRITE(dst, FbDoMergeRop(bits, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ fbBlt (FbBits *srcLine,
|
|||
bits = FbScrLeft(bits1, leftShift);
|
||||
if (FbScrLeft(endmask, rightShift))
|
||||
{
|
||||
bits1 = *src;
|
||||
bits1 = READ(src);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
}
|
||||
FbDoRightMaskByteMergeRop (dst, bits, endbyte, endmask);
|
||||
|
@ -425,45 +425,45 @@ fbBlt24Line (FbBits *src,
|
|||
{
|
||||
if (endmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
|
||||
mask = FbPrev24Pix (mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
|
||||
mask = FbPrev24Pix (mask);
|
||||
}
|
||||
if (startmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask & startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (startmask)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
if (endmask)
|
||||
{
|
||||
bits = *src;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask & endmask);
|
||||
bits = READ(src);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -484,26 +484,26 @@ fbBlt24Line (FbBits *src,
|
|||
if (reverse)
|
||||
{
|
||||
if (srcX < dstX)
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
if (endmask)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(endmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
|
||||
mask = FbPrev24Pix(mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
|
||||
mask = FbPrev24Pix(mask);
|
||||
}
|
||||
if (startmask)
|
||||
|
@ -511,32 +511,32 @@ fbBlt24Line (FbBits *src,
|
|||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(startmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (srcX > dstX)
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
if (startmask)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
|
@ -545,10 +545,10 @@ fbBlt24Line (FbBits *src,
|
|||
bits = FbScrLeft(bits1, leftShift);
|
||||
if (FbScrLeft(endmask, rightShift))
|
||||
{
|
||||
bits1 = *src;
|
||||
bits1 = READ(src);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
}
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -707,8 +707,8 @@ fbBltOdd (FbBits *srcLine,
|
|||
{
|
||||
if (startmask)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, startmask);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), startmask));
|
||||
dst++;
|
||||
}
|
||||
n = nmiddle;
|
||||
|
@ -716,8 +716,8 @@ fbBltOdd (FbBits *srcLine,
|
|||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoDestInvarientMergeRop(bits);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -725,28 +725,28 @@ fbBltOdd (FbBits *srcLine,
|
|||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMergeRop (bits, *dst);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMergeRop (bits, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
if (endmask)
|
||||
{
|
||||
bits = *src;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, endmask);
|
||||
bits = READ(src);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bits = 0;
|
||||
if (srcX > dstX)
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
if (startmask)
|
||||
{
|
||||
bits1 = FbScrLeft(bits, leftShift);
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
*dst = FbDoMaskMergeRop (bits1, *dst, startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), startmask));
|
||||
dst++;
|
||||
}
|
||||
n = nmiddle;
|
||||
|
@ -755,9 +755,9 @@ fbBltOdd (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits1 = FbScrLeft(bits, leftShift);
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
*dst = FbDoDestInvarientMergeRop(bits1);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits1));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -766,9 +766,9 @@ fbBltOdd (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits1 = FbScrLeft(bits, leftShift);
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
*dst = FbDoMergeRop(bits1, *dst);
|
||||
WRITE(dst, FbDoMergeRop(bits1, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -777,10 +777,10 @@ fbBltOdd (FbBits *srcLine,
|
|||
bits1 = FbScrLeft(bits, leftShift);
|
||||
if (FbScrLeft(endmask, rightShift))
|
||||
{
|
||||
bits = *src;
|
||||
bits = READ(src);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
}
|
||||
*dst = FbDoMaskMergeRop (bits1, *dst, endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), endmask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,12 +51,12 @@
|
|||
|
||||
#define LoadBits {\
|
||||
if (leftShift) { \
|
||||
bitsRight = (src < srcEnd ? *src++ : 0); \
|
||||
bitsRight = (src < srcEnd ? READ(src++) : 0); \
|
||||
bits = (FbStipLeft (bitsLeft, leftShift) | \
|
||||
FbStipRight(bitsRight, rightShift)); \
|
||||
bitsLeft = bitsRight; \
|
||||
} else \
|
||||
bits = (src < srcEnd ? *src++ : 0); \
|
||||
bits = (src < srcEnd ? READ(src++) : 0); \
|
||||
}
|
||||
|
||||
#ifndef FBNOPIXADDR
|
||||
|
@ -285,7 +285,7 @@ fbBltOne (FbStip *src,
|
|||
|
||||
bitsLeft = 0;
|
||||
if (srcX > dstS)
|
||||
bitsLeft = *src++;
|
||||
bitsLeft = READ(src++);
|
||||
if (n)
|
||||
{
|
||||
/*
|
||||
|
@ -338,7 +338,7 @@ fbBltOne (FbStip *src,
|
|||
else
|
||||
#endif
|
||||
mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
|
||||
*dst = FbOpaqueStipple (mask, fgxor, bgxor);
|
||||
WRITE(dst, FbOpaqueStipple (mask, fgxor, bgxor));
|
||||
dst++;
|
||||
bits = FbStipLeft(bits, pixelsPerDst);
|
||||
}
|
||||
|
@ -368,8 +368,8 @@ fbBltOne (FbStip *src,
|
|||
if (left || !transparent)
|
||||
{
|
||||
mask = fbBits[left];
|
||||
*dst = FbStippleRRop (*dst, mask,
|
||||
fgand, fgxor, bgand, bgxor);
|
||||
WRITE(dst, FbStippleRRop (READ(dst), mask,
|
||||
fgand, fgxor, bgand, bgxor));
|
||||
}
|
||||
dst++;
|
||||
bits = FbStipLeft(bits, pixelsPerDst);
|
||||
|
@ -537,7 +537,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
|
|||
stip = FbLeftStipBits(bits, len); \
|
||||
} else { \
|
||||
stip = FbLeftStipBits(bits, remain); \
|
||||
bits = (src < srcEnd ? *src++ : 0); \
|
||||
bits = (src < srcEnd ? READ(src++) : 0); \
|
||||
__len = (len) - remain; \
|
||||
stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \
|
||||
remain, __len); \
|
||||
|
@ -548,7 +548,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
|
|||
}
|
||||
|
||||
#define fbInitStipBits(offset,len,stip) {\
|
||||
bits = FbStipLeft (*src++,offset); \
|
||||
bits = FbStipLeft (READ(src++),offset); \
|
||||
remain = FB_STIP_UNIT - offset; \
|
||||
fbFirstStipBits(len,stip); \
|
||||
stip = FbMergeStip24Bits (0, stip, len); \
|
||||
|
@ -631,10 +631,11 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (leftMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = (*dst & ~leftMask) | (FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& leftMask);
|
||||
WRITE(dst, (READ(dst) & ~leftMask) |
|
||||
(FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& leftMask));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
|
@ -642,19 +643,20 @@ fbBltOne24 (FbStip *srcLine,
|
|||
while (nl--)
|
||||
{
|
||||
mask = fbStipple24Bits[rot>>3][stip];
|
||||
*dst = FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot));
|
||||
WRITE(dst, FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot)));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
if (rightMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = (*dst & ~rightMask) | (FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& rightMask);
|
||||
WRITE(dst, (READ(dst) & ~rightMask) |
|
||||
(FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& rightMask));
|
||||
}
|
||||
dst += dstStride;
|
||||
src += srcStride;
|
||||
|
@ -674,7 +676,7 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (stip)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
|
||||
*dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
|
||||
WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
|
||||
}
|
||||
dst++;
|
||||
fbNextStipBits (rot, stip);
|
||||
|
@ -685,7 +687,7 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (stip)
|
||||
{
|
||||
mask = fbStipple24Bits[rot>>3][stip];
|
||||
*dst = (*dst & ~mask) | (FbRot24(fgxor,rot) & mask);
|
||||
WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor,rot) & mask));
|
||||
}
|
||||
dst++;
|
||||
fbNextStipBits (rot, stip);
|
||||
|
@ -695,7 +697,7 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (stip)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
|
||||
*dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
|
||||
WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
|
||||
}
|
||||
}
|
||||
dst += dstStride;
|
||||
|
@ -712,12 +714,12 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (leftMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = FbStippleRRopMask (*dst, mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
leftMask);
|
||||
WRITE(dst, FbStippleRRopMask (READ(dst), mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
leftMask));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
|
@ -725,23 +727,23 @@ fbBltOne24 (FbStip *srcLine,
|
|||
while (nl--)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = FbStippleRRop (*dst, mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot));
|
||||
WRITE(dst, FbStippleRRop (READ(dst), mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot)));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
if (rightMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = FbStippleRRopMask (*dst, mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
rightMask);
|
||||
WRITE(dst, FbStippleRRopMask (READ(dst), mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
rightMask));
|
||||
}
|
||||
dst += dstStride;
|
||||
}
|
||||
|
@ -832,7 +834,7 @@ fbBltPlane (FbBits *src,
|
|||
if (srcBpp == 24)
|
||||
srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp);
|
||||
#endif
|
||||
srcBits = *s++;
|
||||
srcBits = READ(s++);
|
||||
|
||||
dstMask = dstMaskFirst;
|
||||
dstUnion = 0;
|
||||
|
@ -844,7 +846,7 @@ fbBltPlane (FbBits *src,
|
|||
{
|
||||
if (!srcMask)
|
||||
{
|
||||
srcBits = *s++;
|
||||
srcBits = READ(s++);
|
||||
#ifdef FB_24BIT
|
||||
if (srcBpp == 24)
|
||||
srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24);
|
||||
|
@ -853,9 +855,9 @@ fbBltPlane (FbBits *src,
|
|||
}
|
||||
if (!dstMask)
|
||||
{
|
||||
*d = FbStippleRRopMask(*d, dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion);
|
||||
WRITE(d, FbStippleRRopMask(READ(d), dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion));
|
||||
d++;
|
||||
dstMask = FbStipMask(0,1);
|
||||
dstUnion = 0;
|
||||
|
@ -871,9 +873,9 @@ fbBltPlane (FbBits *src,
|
|||
dstMask = FbStipRight(dstMask,1);
|
||||
}
|
||||
if (dstUnion)
|
||||
*d = FbStippleRRopMask(*d,dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion);
|
||||
WRITE(d, FbStippleRRopMask(READ(d),dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
663
fb/fbcompose.c
663
fb/fbcompose.c
File diff suppressed because it is too large
Load Diff
10
fb/fbcopy.c
10
fb/fbcopy.c
|
@ -103,6 +103,8 @@ fbCopyNtoN (DrawablePtr pSrcDrawable,
|
|||
#endif
|
||||
pbox++;
|
||||
}
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -173,6 +175,9 @@ fbCopy1toN (DrawablePtr pSrcDrawable,
|
|||
}
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -221,6 +226,8 @@ fbCopyNto1 (DrawablePtr pSrcDrawable,
|
|||
(FbStip) pPriv->and, (FbStip) pPriv->xor,
|
||||
(FbStip) pPriv->bgand, (FbStip) pPriv->bgxor,
|
||||
bitplane);
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -281,6 +288,9 @@ fbCopyNto1 (DrawablePtr pSrcDrawable,
|
|||
pPriv->and, pPriv->xor,
|
||||
pPriv->bgand, pPriv->bgxor);
|
||||
xfree (tmp);
|
||||
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
pbox++;
|
||||
}
|
||||
|
|
16
fb/fbedge.c
16
fb/fbedge.c
|
@ -60,9 +60,9 @@
|
|||
#define StepAlpha ((__ap += __ao), (__ao ^= 1))
|
||||
|
||||
#define AddAlpha(a) { \
|
||||
CARD8 __o = *__ap; \
|
||||
CARD8 __o = READ(__ap); \
|
||||
CARD8 __a = (a) + Get4(__o, __ao); \
|
||||
*__ap = Put4 (__o, __ao, __a | (0 - ((__a) >> 4))); \
|
||||
WRITE(__ap, Put4 (__o, __ao, __a | (0 - ((__a) >> 4)))); \
|
||||
}
|
||||
|
||||
#include "fbedgeimp.h"
|
||||
|
@ -102,7 +102,7 @@ add_saturate_8 (CARD8 *buf, int value, int length)
|
|||
{
|
||||
while (length--)
|
||||
{
|
||||
*buf = clip255 (*buf + value);
|
||||
WRITE(buf, clip255 (READ(buf) + value));
|
||||
buf++;
|
||||
}
|
||||
}
|
||||
|
@ -164,11 +164,11 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
/* Add coverage across row */
|
||||
if (lxi == rxi)
|
||||
{
|
||||
ap[lxi] = clip255 (ap[lxi] + rxs - lxs);
|
||||
WRITE(ap +lxi, clip255 (READ(ap + lxi) + rxs - lxs));
|
||||
}
|
||||
else
|
||||
{
|
||||
ap[lxi] = clip255 (ap[lxi] + N_X_FRAC(8) - lxs);
|
||||
WRITE(ap + lxi, clip255 (READ(ap + lxi) + N_X_FRAC(8) - lxs));
|
||||
|
||||
/* Move forward so that lxi/rxi is the pixel span */
|
||||
lxi++;
|
||||
|
@ -238,7 +238,7 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
* necessary to avoid a buffer overrun, (when rx
|
||||
* is exactly on a pixel boundary). */
|
||||
if (rxs)
|
||||
ap[rxi] = clip255 (ap[rxi] + rxs);
|
||||
WRITE(ap + rxi, clip255 (READ(ap + rxi) + rxs));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
if (fill_start != fill_end) {
|
||||
if (fill_size == N_Y_FRAC(8))
|
||||
{
|
||||
memset (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
{
|
||||
if (fill_size == N_Y_FRAC(8))
|
||||
{
|
||||
memset (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -76,12 +76,14 @@ rasterizeEdges (FbBits *buf,
|
|||
x &= FB_MASK;
|
||||
|
||||
FbMaskBits (x, width, startmask, nmiddle, endmask);
|
||||
if (startmask)
|
||||
*a++ |= startmask;
|
||||
if (startmask) {
|
||||
WRITE(a, READ(a) | startmask);
|
||||
a++;
|
||||
}
|
||||
while (nmiddle--)
|
||||
*a++ = FB_ALLONES;
|
||||
WRITE(a++, FB_ALLONES);
|
||||
if (endmask)
|
||||
*a |= endmask;
|
||||
WRITE(a, READ(a) | endmask);
|
||||
}
|
||||
#else
|
||||
{
|
||||
|
|
13
fb/fbfill.c
13
fb/fbfill.c
|
@ -49,8 +49,10 @@ fbFill (DrawablePtr pDrawable,
|
|||
case FillSolid:
|
||||
#ifdef USE_MMX
|
||||
if (!pPriv->and && fbHaveMMX())
|
||||
if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor))
|
||||
if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor)) {
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
fbSolid (dst + (y + dstYoff) * dstStride,
|
||||
dstStride,
|
||||
|
@ -92,6 +94,7 @@ fbFill (DrawablePtr pDrawable,
|
|||
|
||||
(pGC->patOrg.x + pDrawable->x + dstXoff),
|
||||
pGC->patOrg.y + pDrawable->y - y);
|
||||
fbFinishAccess (&pStip->drawable);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -129,6 +132,7 @@ fbFill (DrawablePtr pDrawable,
|
|||
bgand, bgxor,
|
||||
pGC->patOrg.x + pDrawable->x + dstXoff,
|
||||
pGC->patOrg.y + pDrawable->y - y);
|
||||
fbFinishAccess (&pStip->drawable);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -157,10 +161,12 @@ fbFill (DrawablePtr pDrawable,
|
|||
dstBpp,
|
||||
(pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp,
|
||||
pGC->patOrg.y + pDrawable->y - y);
|
||||
fbFinishAccess (&pTile->drawable);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fbValidateDrawable (pDrawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -215,8 +221,10 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
|
|||
if (fbSolidFillmmx (pDrawable,
|
||||
partX1, partY1,
|
||||
(partX2 - partX1), (partY2 - partY1),
|
||||
xor))
|
||||
xor)) {
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
fbSolid (dst + (partY1 + dstYoff) * dstStride,
|
||||
|
@ -228,4 +236,5 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
|
|||
(partY2 - partY1),
|
||||
and, xor);
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
13
fb/fbgc.c
13
fb/fbgc.c
|
@ -106,16 +106,18 @@ fbPadPixmap (PixmapPtr pPixmap)
|
|||
mask = FbBitsMask (0, width);
|
||||
while (height--)
|
||||
{
|
||||
b = *bits & mask;
|
||||
b = READ(bits) & mask;
|
||||
w = width;
|
||||
while (w < FB_UNIT)
|
||||
{
|
||||
b = b | FbScrRight(b, w);
|
||||
w <<= 1;
|
||||
}
|
||||
*bits = b;
|
||||
WRITE(bits, b);
|
||||
bits += stride;
|
||||
}
|
||||
|
||||
fbFinishAccess (&pPixmap->drawable);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -153,7 +155,7 @@ fbLineRepeat (FbBits *bits, int len, int width)
|
|||
width = (width + FB_UNIT-1) >> FB_SHIFT;
|
||||
bits++;
|
||||
while (--width)
|
||||
if (*bits != first)
|
||||
if (READ(bits) != first)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -183,10 +185,13 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp)
|
|||
/* check to see that the stipple repeats horizontally */
|
||||
while (h--)
|
||||
{
|
||||
if (!fbLineRepeat (bits, len, pStipple->drawable.width))
|
||||
if (!fbLineRepeat (bits, len, pStipple->drawable.width)) {
|
||||
fbFinishAccess (&pStipple->drawable);
|
||||
return FALSE;
|
||||
}
|
||||
bits += stride;
|
||||
}
|
||||
fbFinishAccess (&pStipple->drawable);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,4 +84,6 @@ fbGetSpans(DrawablePtr pDrawable,
|
|||
ppt++;
|
||||
pwidth++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
18
fb/fbglyph.c
18
fb/fbglyph.c
|
@ -62,11 +62,11 @@ fbGlyphIn (RegionPtr pRegion,
|
|||
#ifdef FB_24BIT
|
||||
#ifndef FBNOPIXADDR
|
||||
|
||||
#define WRITE1(d,n,fg) ((d)[n] = (CARD8) fg)
|
||||
#define WRITE2(d,n,fg) (*(CARD16 *) &(d[n]) = (CARD16) fg)
|
||||
#define WRITE4(d,n,fg) (*(CARD32 *) &(d[n]) = (CARD32) fg)
|
||||
#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg)
|
||||
#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg)
|
||||
#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg)
|
||||
#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst
|
||||
#define WRITE8(d) (*(FbBits *) &(d[0]) = fg)
|
||||
#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg)
|
||||
#else
|
||||
#define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
|
||||
#endif
|
||||
|
@ -157,7 +157,7 @@ fbGlyph24 (FbBits *dstBits,
|
|||
lshift = 4 - shift;
|
||||
while (height--)
|
||||
{
|
||||
bits = *stipple++;
|
||||
bits = READ(stipple++);
|
||||
n = lshift;
|
||||
dst = dstLine;
|
||||
while (bits)
|
||||
|
@ -284,7 +284,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
|
|||
glyph = 0;
|
||||
if (pGC->fillStyle == FillSolid && pPriv->and == 0)
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
dstBpp = pDrawable->bitsPerPixel;
|
||||
switch (dstBpp) {
|
||||
case 8: glyph = fbGlyph8; break;
|
||||
case 16: glyph = fbGlyph16; break;
|
||||
|
@ -312,6 +312,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
|
|||
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
|
||||
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
(*glyph) (dst + (gy + dstYoff) * dstStride,
|
||||
dstStride,
|
||||
dstBpp,
|
||||
|
@ -319,6 +320,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
|
|||
pPriv->xor,
|
||||
gx + dstXoff,
|
||||
gHeight);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -375,7 +377,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
|
|||
glyph = 0;
|
||||
if (pPriv->and == 0)
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
dstBpp = pDrawable->bitsPerPixel;
|
||||
switch (dstBpp) {
|
||||
case 8: glyph = fbGlyph8; break;
|
||||
case 16: glyph = fbGlyph16; break;
|
||||
|
@ -443,6 +445,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
|
|||
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
|
||||
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
(*glyph) (dst + (gy + dstYoff) * dstStride,
|
||||
dstStride,
|
||||
dstBpp,
|
||||
|
@ -450,6 +453,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
|
|||
pPriv->fg,
|
||||
gx + dstXoff,
|
||||
gHeight);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -68,7 +68,7 @@ fbPutImage (DrawablePtr pDrawable,
|
|||
break;
|
||||
case XYPixmap:
|
||||
srcStride = BitmapBytePad(w + leftPad) / sizeof (FbStip);
|
||||
for (i = 1 << (pDrawable->depth - 1); i; i >>= 1)
|
||||
for (i = (unsigned long)1 << (pDrawable->depth - 1); i; i >>= 1)
|
||||
{
|
||||
if (i & pGC->planemask)
|
||||
{
|
||||
|
@ -170,6 +170,8 @@ fbPutZImage (DrawablePtr pDrawable,
|
|||
pm,
|
||||
dstBpp);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -277,6 +279,8 @@ fbPutXYImage (DrawablePtr pDrawable,
|
|||
fgand, fgxor, bgand, bgxor);
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -361,4 +365,6 @@ fbGetImage (DrawablePtr pDrawable,
|
|||
fbXorStip(GXcopy,0,FB_STIP_ALLONES),
|
||||
planeMask);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
134
fb/fbpict.c
134
fb/fbpict.c
|
@ -137,22 +137,25 @@ fbCompositeSolidMask_nx8x8888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
m = *mask++;
|
||||
m = READ(mask++);
|
||||
if (m == 0xff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
*dst = src & dstMask;
|
||||
WRITE(dst, src & dstMask);
|
||||
else
|
||||
*dst = fbOver (src, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (src, READ(dst)) & dstMask);
|
||||
}
|
||||
else if (m)
|
||||
{
|
||||
d = fbIn (src, m);
|
||||
*dst = fbOver (d, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (d, READ(dst)) & dstMask);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -196,17 +199,17 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
ma = *mask++;
|
||||
ma = READ(mask++);
|
||||
if (ma == 0xffffffff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
*dst = src & dstMask;
|
||||
WRITE(dst, src & dstMask);
|
||||
else
|
||||
*dst = fbOver (src, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (src, READ(dst)) & dstMask);
|
||||
}
|
||||
else if (ma)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
#define FbInOverC(src,srca,msk,dst,i,result) { \
|
||||
CARD16 __a = FbGet8(msk,i); \
|
||||
CARD32 __t, __ta; \
|
||||
|
@ -221,11 +224,14 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op,
|
|||
FbInOverC (src, srca, ma, d, 8, n);
|
||||
FbInOverC (src, srca, ma, d, 16, o);
|
||||
FbInOverC (src, srca, ma, d, 24, p);
|
||||
*dst = m|n|o|p;
|
||||
WRITE(dst, m|n|o|p);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -268,7 +274,7 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
m = *mask++;
|
||||
m = READ(mask++);
|
||||
if (m == 0xff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
|
@ -288,6 +294,9 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op,
|
|||
dst += 3;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -330,27 +339,30 @@ fbCompositeSolidMask_nx8x0565 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
m = *mask++;
|
||||
m = READ(mask++);
|
||||
if (m == 0xff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
d = src;
|
||||
else
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (src, cvt0565to8888(d));
|
||||
}
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
else if (m)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (fbIn(src,m), cvt0565to8888(d));
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -397,33 +409,36 @@ fbCompositeSolidMask_nx8888x0565C (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
ma = *mask++;
|
||||
ma = READ(mask++);
|
||||
if (ma == 0xffffffff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
{
|
||||
*dst = src16;
|
||||
WRITE(dst, src16);
|
||||
}
|
||||
else
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (src, cvt0565to8888(d));
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
}
|
||||
else if (ma)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = cvt0565to8888(d);
|
||||
FbInOverC (src, srca, ma, d, 0, m);
|
||||
FbInOverC (src, srca, ma, d, 8, n);
|
||||
FbInOverC (src, srca, ma, d, 16, o);
|
||||
d = m|n|o;
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -461,15 +476,18 @@ fbCompositeSrc_8888x8888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
a = s >> 24;
|
||||
if (a == 0xff)
|
||||
*dst = s & dstMask;
|
||||
WRITE(dst, s & dstMask);
|
||||
else if (a)
|
||||
*dst = fbOver (s, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (s, READ(dst)) & dstMask);
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -506,7 +524,7 @@ fbCompositeSrc_8888x0888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
a = s >> 24;
|
||||
if (a)
|
||||
{
|
||||
|
@ -519,6 +537,9 @@ fbCompositeSrc_8888x0888 (CARD8 op,
|
|||
dst += 3;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -555,7 +576,7 @@ fbCompositeSrc_8888x0565 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
a = s >> 24;
|
||||
if (a)
|
||||
{
|
||||
|
@ -563,14 +584,17 @@ fbCompositeSrc_8888x0565 (CARD8 op,
|
|||
d = s;
|
||||
else
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (s, cvt0565to8888(d));
|
||||
}
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -605,8 +629,11 @@ fbCompositeSrc_0565x0565 (CARD8 op,
|
|||
w = width;
|
||||
|
||||
while (w--)
|
||||
*dst++ = *src++;
|
||||
WRITE(dst, READ(src++));
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -643,20 +670,23 @@ fbCompositeSrcAdd_8000x8000 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
if (s)
|
||||
{
|
||||
if (s != 0xff)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
t = d + s;
|
||||
s = t | (0 - (t >> 8));
|
||||
}
|
||||
*dst = s;
|
||||
WRITE(dst, s);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -694,12 +724,12 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
if (s)
|
||||
{
|
||||
if (s != 0xffffffff)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
if (d)
|
||||
{
|
||||
m = FbAdd(s,d,0,t);
|
||||
|
@ -709,11 +739,14 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op,
|
|||
s = m|n|o|p;
|
||||
}
|
||||
}
|
||||
*dst = s;
|
||||
WRITE(dst, s);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -757,6 +790,9 @@ fbCompositeSrcAdd_1000x1000 (CARD8 op,
|
|||
|
||||
FALSE,
|
||||
FALSE);
|
||||
|
||||
fbFinishAccess(pDst->pDrawable);
|
||||
fbFinishAccess(pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -821,6 +857,9 @@ fbCompositeSolidMask_nx1xn (CARD8 op,
|
|||
src,
|
||||
FB_ALLONES,
|
||||
0x0);
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
}
|
||||
|
||||
# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
|
||||
|
@ -1396,6 +1435,10 @@ fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
|
|||
*/
|
||||
#if !defined(__amd64__) && !defined(__x86_64__)
|
||||
|
||||
#ifdef HAVE_GETISAX
|
||||
#include <sys/auxv.h>
|
||||
#endif
|
||||
|
||||
enum CPUFeatures {
|
||||
NoFeatures = 0,
|
||||
MMX = 0x1,
|
||||
|
@ -1406,7 +1449,23 @@ enum CPUFeatures {
|
|||
};
|
||||
|
||||
static unsigned int detectCPUFeatures(void) {
|
||||
unsigned int features = 0;
|
||||
unsigned int result;
|
||||
|
||||
#ifdef HAVE_GETISAX
|
||||
if (getisax(&result, 1)) {
|
||||
if (result & AV_386_CMOV)
|
||||
features |= CMOV;
|
||||
if (result & AV_386_MMX)
|
||||
features |= MMX;
|
||||
if (result & AV_386_AMD_MMX)
|
||||
features |= MMX_Extensions;
|
||||
if (result & AV_386_SSE)
|
||||
features |= SSE;
|
||||
if (result & AV_386_SSE2)
|
||||
features |= SSE2;
|
||||
}
|
||||
#else
|
||||
char vendor[13];
|
||||
vendor[0] = 0;
|
||||
vendor[12] = 0;
|
||||
|
@ -1415,7 +1474,8 @@ static unsigned int detectCPUFeatures(void) {
|
|||
* %esp here. We can't declare either one as clobbered
|
||||
* since they are special registers (%ebx is the "PIC
|
||||
* register" holding an offset to global data, %esp the
|
||||
* stack pointer), so we need to make sure they have their+ * original values when we access the output operands.
|
||||
* stack pointer), so we need to make sure they have their
|
||||
* original values when we access the output operands.
|
||||
*/
|
||||
__asm__ ("pushf\n"
|
||||
"pop %%eax\n"
|
||||
|
@ -1451,7 +1511,6 @@ static unsigned int detectCPUFeatures(void) {
|
|||
: "%eax", "%ecx", "%edx"
|
||||
);
|
||||
|
||||
unsigned int features = 0;
|
||||
if (result) {
|
||||
/* result now contains the standard feature bits */
|
||||
if (result & (1 << 15))
|
||||
|
@ -1485,6 +1544,7 @@ static unsigned int detectCPUFeatures(void) {
|
|||
features |= MMX_Extensions;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_GETISAX */
|
||||
return features;
|
||||
}
|
||||
|
||||
|
|
29
fb/fbpict.h
29
fb/fbpict.h
|
@ -76,13 +76,13 @@
|
|||
fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
|
||||
switch (__bpp__) { \
|
||||
case 32: \
|
||||
(bits) = *(CARD32 *) __bits__; \
|
||||
(bits) = READ((CARD32 *) __bits__); \
|
||||
break; \
|
||||
case 24: \
|
||||
(bits) = Fetch24 ((CARD8 *) __bits__); \
|
||||
break; \
|
||||
case 16: \
|
||||
(bits) = *(CARD16 *) __bits__; \
|
||||
(bits) = READ((CARD16 *) __bits__); \
|
||||
(bits) = cvt0565to8888(bits); \
|
||||
break; \
|
||||
default: \
|
||||
|
@ -99,6 +99,7 @@
|
|||
/* manage missing src alpha */ \
|
||||
if ((pict)->pFormat->direct.alphaMask == 0) \
|
||||
(bits) |= 0xff000000; \
|
||||
fbFinishAccess ((pict)->pDrawable); \
|
||||
}
|
||||
|
||||
#define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\
|
||||
|
@ -120,22 +121,22 @@
|
|||
|
||||
#if IMAGE_BYTE_ORDER == MSBFirst
|
||||
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
|
||||
((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
|
||||
((*((CARD16 *) (a)) << 8) | *((a)+2)))
|
||||
((READ(a) << 16) | READ((CARD16 *) ((a)+1))) : \
|
||||
((READ((CARD16 *) (a)) << 8) | READ((a)+2)))
|
||||
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
|
||||
((*(a) = (CARD8) ((v) >> 16)), \
|
||||
(*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \
|
||||
((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \
|
||||
(*((a)+2) = (CARD8) (v))))
|
||||
(WRITE(a, (CARD8) ((v) >> 16)), \
|
||||
WRITE((CARD16 *) ((a)+1), (CARD16) (v))) : \
|
||||
(WRITE((CARD16 *) (a), (CARD16) ((v) >> 8)), \
|
||||
WRITE((a)+2, (CARD8) (v))))
|
||||
#else
|
||||
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
|
||||
((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
|
||||
((*((CARD16 *) (a))) | (*((a)+2) << 16)))
|
||||
(READ(a) | (READ((CARD16 *) ((a)+1)) << 8)) : \
|
||||
(READ((CARD16 *) (a)) | (READ((a)+2) << 16)))
|
||||
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
|
||||
((*(a) = (CARD8) (v)), \
|
||||
(*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
|
||||
((*((CARD16 *) (a)) = (CARD16) (v)),\
|
||||
(*((a)+2) = (CARD8) ((v) >> 16))))
|
||||
(WRITE(a, (CARD8) (v)), \
|
||||
WRITE((CARD16 *) ((a)+1), (CARD16) ((v) >> 8))) : \
|
||||
(WRITE((CARD16 *) (a), (CARD16) (v)),\
|
||||
WRITE((a)+2, (CARD8) ((v) >> 16))))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -160,6 +160,8 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
FirstRect = REGION_BOXPTR(pReg);
|
||||
rects = FirstRect;
|
||||
|
||||
fbPrepareAccess(&pPix->drawable);
|
||||
|
||||
pwLine = (FbBits *) pPix->devPrivate.ptr;
|
||||
nWidth = pPix->devKind >> (FB_SHIFT-3);
|
||||
|
||||
|
@ -174,7 +176,7 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
irectLineStart = rects - FirstRect;
|
||||
/* If the Screen left most bit of the word is set, we're starting in
|
||||
* a box */
|
||||
if(*pw & mask0)
|
||||
if(READ(pw) & mask0)
|
||||
{
|
||||
fInBox = TRUE;
|
||||
rx1 = 0;
|
||||
|
@ -185,7 +187,7 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
pwLineEnd = pw + (width >> FB_SHIFT);
|
||||
for (base = 0; pw < pwLineEnd; base += FB_UNIT)
|
||||
{
|
||||
w = *pw++;
|
||||
w = READ(pw++);
|
||||
if (fInBox)
|
||||
{
|
||||
if (!~w)
|
||||
|
@ -226,7 +228,7 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
if(width & FB_MASK)
|
||||
{
|
||||
/* Process final partial word on line */
|
||||
w = *pw++;
|
||||
w = READ(pw++);
|
||||
for(ib = 0; ib < (width & FB_MASK); ib++)
|
||||
{
|
||||
/* If the Screen left most bit of the word is set, we're
|
||||
|
@ -311,6 +313,8 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
pReg->data = (RegDataPtr)NULL;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess(&pPix->drawable);
|
||||
#ifdef DEBUG
|
||||
if (!miValidRegion(pReg))
|
||||
FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__);
|
||||
|
@ -362,6 +366,7 @@ fbValidateDrawable (DrawablePtr pDrawable)
|
|||
if (!fbValidateBits (first, stride, FB_HEAD_BITS) ||
|
||||
!fbValidateBits (last, stride, FB_TAIL_BITS))
|
||||
fbInitializeDrawable(pDrawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -383,5 +388,6 @@ fbInitializeDrawable (DrawablePtr pDrawable)
|
|||
last = bits + stride * pDrawable->height;
|
||||
fbSetBits (first, stride, FB_HEAD_BITS);
|
||||
fbSetBits (last, stride, FB_TAIL_BITS);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif /* FB_DEBUG */
|
||||
|
|
|
@ -90,20 +90,20 @@ fbDots (FbBits *dstOrig,
|
|||
FbMaskStip (x, 24, leftMask, n, rightMask);
|
||||
if (leftMask)
|
||||
{
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, leftMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
|
||||
andT = FbNext24Stip(andT);
|
||||
xorT = FbNext24Stip(xorT);
|
||||
d++;
|
||||
}
|
||||
if (rightMask)
|
||||
*d = FbDoMaskRRop(*d, andT, xorT, rightMask);
|
||||
WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
FbStip mask;
|
||||
mask = FbStipMask(x, dstBpp);
|
||||
*d = FbDoMaskRRop (*d, and, xor, mask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), and, xor, mask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,4 +160,5 @@ fbPolyPoint (DrawablePtr pDrawable,
|
|||
nBox--; pBox++)
|
||||
(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit,
|
||||
pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
|
@ -875,6 +875,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
|
|||
register CARD16 *d;
|
||||
int w;
|
||||
|
||||
fbPrepareAccess((DrawablePtr)pScreen->devPrivate);
|
||||
|
||||
dst_base = (CARD16*) ((PixmapPtr)pScreen->devPrivate)->devPrivate.ptr;
|
||||
dst_stride = (int)((PixmapPtr)pScreen->devPrivate)->devKind
|
||||
/ sizeof (CARD16);
|
||||
|
@ -899,6 +901,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
|
|||
}
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess(&((PixmapPtr)pScreen->devPrivate)->drawable);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1200,7 +1204,7 @@ GCFuncs xxGCFuncs = {
|
|||
xxChangeClip, xxDestroyClip, xxCopyClip
|
||||
};
|
||||
|
||||
GCOps xxGCOps = {
|
||||
static GCOps xxGCOps = {
|
||||
xxFillSpans, xxSetSpans,
|
||||
xxPutImage, xxCopyArea,
|
||||
xxCopyPlane, xxPolyPoint,
|
||||
|
|
|
@ -58,7 +58,7 @@ fbPushPattern (DrawablePtr pDrawable,
|
|||
w = width;
|
||||
s = src;
|
||||
src += srcStride;
|
||||
bits = *s++;
|
||||
bits = READ(s++);
|
||||
xspan = x;
|
||||
while (w)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ fbPushPattern (DrawablePtr pDrawable,
|
|||
bitsMask = FbStipRight (bitsMask, 1);
|
||||
if (!bitsMask)
|
||||
{
|
||||
bits = *s++;
|
||||
bits = READ(s++);
|
||||
bitsMask = FbBitsMask(0,1);
|
||||
}
|
||||
} while (bits & bitsMask);
|
||||
|
@ -92,7 +92,7 @@ fbPushPattern (DrawablePtr pDrawable,
|
|||
bitsMask = FbStipRight (bitsMask, 1);
|
||||
if (!bitsMask)
|
||||
{
|
||||
bits = *s++;
|
||||
bits = READ(s++);
|
||||
bitsMask = FbBitsMask(0,1);
|
||||
}
|
||||
} while (!(bits & bitsMask));
|
||||
|
@ -165,6 +165,7 @@ fbPushFill (DrawablePtr pDrawable,
|
|||
fbAnd(GXnoop,(FbBits) 0,FB_ALLONES),
|
||||
fbXor(GXnoop,(FbBits) 0,FB_ALLONES));
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -155,6 +155,19 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
Bool
|
||||
wfbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap)
|
||||
#else
|
||||
Bool
|
||||
fbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
|
@ -164,6 +177,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
|||
int dpiy,
|
||||
int width,
|
||||
int bpp)
|
||||
#endif
|
||||
{
|
||||
VisualPtr visuals;
|
||||
DepthPtr depths;
|
||||
|
@ -222,6 +236,10 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
|||
fbGetScreenPrivate(pScreen)->win32bpp = 32;
|
||||
fbGetScreenPrivate(pScreen)->pix32bpp = 32;
|
||||
}
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
fbGetScreenPrivate(pScreen)->setupWrap = setupWrap;
|
||||
fbGetScreenPrivate(pScreen)->finishWrap = finishWrap;
|
||||
#endif
|
||||
#endif
|
||||
rootdepth = 0;
|
||||
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
|
||||
|
@ -256,6 +274,27 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
|||
}
|
||||
|
||||
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
Bool
|
||||
wfbScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap)
|
||||
{
|
||||
if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp))
|
||||
return FALSE;
|
||||
if (!wfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy,
|
||||
width, bpp, setupWrap, finishWrap))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#else
|
||||
Bool
|
||||
fbScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
|
@ -273,6 +312,7 @@ fbScreenInit(ScreenPtr pScreen,
|
|||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FB_OLD_SCREEN
|
||||
|
|
28
fb/fbseg.c
28
fb/fbseg.c
|
@ -79,7 +79,7 @@ fbBresSolid (DrawablePtr pDrawable,
|
|||
mask = fbBresShiftMask(mask,signdx,dstBpp);
|
||||
if (!mask)
|
||||
{
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, bits);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
|
||||
bits = 0;
|
||||
dst += signdx;
|
||||
mask = mask0;
|
||||
|
@ -87,20 +87,20 @@ fbBresSolid (DrawablePtr pDrawable,
|
|||
e += e1;
|
||||
if (e >= 0)
|
||||
{
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, bits);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
|
||||
bits = 0;
|
||||
dst += dstStride;
|
||||
e += e3;
|
||||
}
|
||||
}
|
||||
if (bits)
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, bits);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
|
||||
}
|
||||
else
|
||||
{
|
||||
while (len--)
|
||||
{
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, mask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask));
|
||||
dst += dstStride;
|
||||
e += e1;
|
||||
if (e >= 0)
|
||||
|
@ -115,6 +115,8 @@ fbBresSolid (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -164,9 +166,9 @@ fbBresDash (DrawablePtr pDrawable,
|
|||
while (len--)
|
||||
{
|
||||
if (even)
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, mask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask));
|
||||
else if (doOdd)
|
||||
*dst = FbDoMaskRRop (*dst, bgand, bgxor, mask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), bgand, bgxor, mask));
|
||||
if (axis == X_AXIS)
|
||||
{
|
||||
mask = fbBresShiftMask(mask,signdx,dstBpp);
|
||||
|
@ -199,6 +201,8 @@ fbBresDash (DrawablePtr pDrawable,
|
|||
}
|
||||
FbDashStep (dashlen, even);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -371,13 +375,13 @@ fbBresSolid24RRop (DrawablePtr pDrawable,
|
|||
FbMaskStip (x, 24, leftMask, nl, rightMask);
|
||||
if (leftMask)
|
||||
{
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, leftMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
|
||||
d++;
|
||||
andT = FbNext24Stip (andT);
|
||||
xorT = FbNext24Stip (xorT);
|
||||
}
|
||||
if (rightMask)
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, rightMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
|
||||
if (axis == X_AXIS)
|
||||
{
|
||||
x1 += signdx;
|
||||
|
@ -399,6 +403,8 @@ fbBresSolid24RRop (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -468,13 +474,13 @@ fbBresDash24RRop (DrawablePtr pDrawable,
|
|||
FbMaskStip (x, 24, leftMask, nl, rightMask);
|
||||
if (leftMask)
|
||||
{
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, leftMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
|
||||
d++;
|
||||
andT = FbNext24Stip (andT);
|
||||
xorT = FbNext24Stip (xorT);
|
||||
}
|
||||
if (rightMask)
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, rightMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
|
||||
}
|
||||
if (axis == X_AXIS)
|
||||
{
|
||||
|
@ -498,6 +504,8 @@ fbBresDash24RRop (DrawablePtr pDrawable,
|
|||
}
|
||||
FbDashStep (dashlen, even);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -99,5 +99,6 @@ fbSetSpans (DrawablePtr pDrawable,
|
|||
pwidth++;
|
||||
}
|
||||
fbValidateDrawable (pDrawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
|
|
42
fb/fbsolid.c
42
fb/fbsolid.c
|
@ -70,12 +70,12 @@ fbSolid (FbBits *dst,
|
|||
n = nmiddle;
|
||||
if (!and)
|
||||
while (n--)
|
||||
*dst++ = xor;
|
||||
WRITE(dst++, xor);
|
||||
else
|
||||
while (n--)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and, xor);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and, xor));
|
||||
dst++;
|
||||
}
|
||||
if (endmask)
|
||||
FbDoRightMaskByteRRop(dst,endbyte,endmask,and,xor);
|
||||
|
@ -160,26 +160,26 @@ fbSolid24 (FbBits *dst,
|
|||
{
|
||||
if (startmask)
|
||||
{
|
||||
*dst = FbDoMaskRRop(*dst, andS, xorS, startmask);
|
||||
dst++;
|
||||
WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask));
|
||||
dst++;
|
||||
}
|
||||
n = nmiddle;
|
||||
if (!and0)
|
||||
{
|
||||
while (n >= 3)
|
||||
{
|
||||
*dst++ = xor0;
|
||||
*dst++ = xor1;
|
||||
*dst++ = xor2;
|
||||
WRITE(dst++, xor0);
|
||||
WRITE(dst++, xor1);
|
||||
WRITE(dst++, xor2);
|
||||
n -= 3;
|
||||
}
|
||||
if (n)
|
||||
{
|
||||
*dst++ = xor0;
|
||||
WRITE(dst++, xor0);
|
||||
n--;
|
||||
if (n)
|
||||
{
|
||||
*dst++ = xor1;
|
||||
WRITE(dst++, xor1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -187,28 +187,28 @@ fbSolid24 (FbBits *dst,
|
|||
{
|
||||
while (n >= 3)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and0, xor0);
|
||||
dst++;
|
||||
*dst = FbDoRRop (*dst, and1, xor1);
|
||||
dst++;
|
||||
*dst = FbDoRRop (*dst, and2, xor2);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and2, xor2));
|
||||
dst++;
|
||||
n -= 3;
|
||||
}
|
||||
if (n)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and0, xor0);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
|
||||
dst++;
|
||||
n--;
|
||||
if (n)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and1, xor1);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (endmask)
|
||||
*dst = FbDoMaskRRop (*dst, andE, xorE, endmask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), andE, xorE, endmask));
|
||||
dst += dstStride;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ fbEvenStipple (FbBits *dst,
|
|||
/*
|
||||
* Extract stipple bits for this scanline;
|
||||
*/
|
||||
bits = *s;
|
||||
bits = READ(s);
|
||||
s += stipStride;
|
||||
if (s == stipEnd)
|
||||
s = stip;
|
||||
|
@ -199,12 +199,12 @@ fbEvenStipple (FbBits *dst,
|
|||
n = nmiddle;
|
||||
if (!and)
|
||||
while (n--)
|
||||
*dst++ = xor;
|
||||
WRITE(dst++, xor);
|
||||
else
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and, xor);
|
||||
WRITE(dst, FbDoRRop (READ(dst), and, xor));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ fbEvenTile (FbBits *dst,
|
|||
/*
|
||||
* Pick up bits for this scanline
|
||||
*/
|
||||
bits = *t++;
|
||||
bits = READ(t++);
|
||||
if (t == tileEnd) t = tile;
|
||||
bits = FbRotLeft(bits,rot);
|
||||
and = fbAnd(alu,bits,pm);
|
||||
|
@ -94,11 +94,11 @@ fbEvenTile (FbBits *dst,
|
|||
n = nmiddle;
|
||||
if (!and)
|
||||
while (n--)
|
||||
*dst++ = xor;
|
||||
WRITE(dst++, xor);
|
||||
else
|
||||
while (n--)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and, xor);
|
||||
WRITE(dst, FbDoRRop (READ(dst), and, xor));
|
||||
dst++;
|
||||
}
|
||||
if (endmask)
|
||||
|
|
|
@ -95,6 +95,8 @@ fbAddTraps (PicturePtr pPicture,
|
|||
}
|
||||
traps++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pPicture->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -142,6 +144,8 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
|
|||
|
||||
fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
|
||||
}
|
||||
|
||||
fbFinishAccess (pPicture->pDrawable);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -118,6 +118,9 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable,
|
|||
upsidedown);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -249,6 +252,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
|
|||
fbValidateDrawable (pDrawable);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
|
@ -311,6 +316,9 @@ fbFillRegionTiled (DrawablePtr pDrawable,
|
|||
yRot - (pbox->y1 + dstYoff));
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (&pTile->drawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
198
fb/wfbrename.h
Normal file
198
fb/wfbrename.h
Normal file
|
@ -0,0 +1,198 @@
|
|||
#define fb16Lane wfb16Lane
|
||||
#define fb24_32CopyMtoN wfb24_32CopyMtoN
|
||||
#define fb24_32CreateScreenResources wfb24_32CreateScreenResources
|
||||
#define fb24_32GetImage wfb24_32GetImage
|
||||
#define fb24_32GetSpans wfb24_32GetSpans
|
||||
#define fb24_32ModifyPixmapHeader wfb24_32ModifyPixmapHeader
|
||||
#define fb24_32PutZImage wfb24_32PutZImage
|
||||
#define fb24_32ReformatTile wfb24_32ReformatTile
|
||||
#define fb24_32SetSpans wfb24_32SetSpans
|
||||
#define fb32Lane wfb32Lane
|
||||
#define fb8Lane wfb8Lane
|
||||
#define fbAddTraps wfbAddTraps
|
||||
#define fbAddTriangles wfbAddTriangles
|
||||
#define fbAllocatePrivates wfbAllocatePrivates
|
||||
#define fbArc16 wfbArc16
|
||||
#define fbArc24 wfbArc24
|
||||
#define fbArc32 wfbArc32
|
||||
#define fbArc8 wfbArc8
|
||||
#define fbBlt wfbBlt
|
||||
#define fbBlt24 wfbBlt24
|
||||
#define fbBltOne wfbBltOne
|
||||
#define fbBltOne24 wfbBltOne24
|
||||
#define fbBltPlane wfbBltPlane
|
||||
#define fbBltStip wfbBltStip
|
||||
#define fbBres wfbBres
|
||||
#define fbBresDash wfbBresDash
|
||||
#define fbBresDash16 wfbBresDash16
|
||||
#define fbBresDash24 wfbBresDash24
|
||||
#define fbBresDash32 wfbBresDash32
|
||||
#define fbBresDash8 wfbBresDash8
|
||||
#define fbBresFill wfbBresFill
|
||||
#define fbBresFillDash wfbBresFillDash
|
||||
#define fbBresSolid wfbBresSolid
|
||||
#define fbBresSolid16 wfbBresSolid16
|
||||
#define fbBresSolid24 wfbBresSolid24
|
||||
#define fbBresSolid32 wfbBresSolid32
|
||||
#define fbBresSolid8 wfbBresSolid8
|
||||
#define fbChangeWindowAttributes wfbChangeWindowAttributes
|
||||
#define fbClearVisualTypes wfbClearVisualTypes
|
||||
#define fbCloseScreen wfbCloseScreen
|
||||
#define fbComposite wfbComposite
|
||||
#define fbCompositeGeneral wfbCompositeGeneral
|
||||
#define fbCompositeSolidMask_nx1xn wfbCompositeSolidMask_nx1xn
|
||||
#define fbCompositeSolidMask_nx8888x0565C wfbCompositeSolidMask_nx8888x0565C
|
||||
#define fbCompositeSolidMask_nx8888x8888C wfbCompositeSolidMask_nx8888x8888C
|
||||
#define fbCompositeSolidMask_nx8x0565 wfbCompositeSolidMask_nx8x0565
|
||||
#define fbCompositeSolidMask_nx8x0888 wfbCompositeSolidMask_nx8x0888
|
||||
#define fbCompositeSolidMask_nx8x8888 wfbCompositeSolidMask_nx8x8888
|
||||
#define fbCompositeSrc_0565x0565 wfbCompositeSrc_0565x0565
|
||||
#define fbCompositeSrc_8888x0565 wfbCompositeSrc_8888x0565
|
||||
#define fbCompositeSrc_8888x0888 wfbCompositeSrc_8888x0888
|
||||
#define fbCompositeSrc_8888x8888 wfbCompositeSrc_8888x8888
|
||||
#define fbCompositeSrcAdd_1000x1000 wfbCompositeSrcAdd_1000x1000
|
||||
#define fbCompositeSrcAdd_8000x8000 wfbCompositeSrcAdd_8000x8000
|
||||
#define fbCompositeSrcAdd_8888x8888 wfbCompositeSrcAdd_8888x8888
|
||||
#define fbCopy1toN wfbCopy1toN
|
||||
#define fbCopyArea wfbCopyArea
|
||||
#define fbCopyNto1 wfbCopyNto1
|
||||
#define fbCopyNtoN wfbCopyNtoN
|
||||
#define fbCopyPlane wfbCopyPlane
|
||||
#define fbCopyRegion wfbCopyRegion
|
||||
#define fbCopyWindow wfbCopyWindow
|
||||
#define fbCopyWindowProc wfbCopyWindowProc
|
||||
#define fbCreateDefColormap wfbCreateDefColormap
|
||||
#define fbCreateGC wfbCreateGC
|
||||
#define fbCreatePixmap wfbCreatePixmap
|
||||
#define fbCreatePixmapBpp wfbCreatePixmapBpp
|
||||
#define fbCreateWindow wfbCreateWindow
|
||||
#define fbDestroyPixmap wfbDestroyPixmap
|
||||
#define fbDestroyWindow wfbDestroyWindow
|
||||
#define fbDoCopy wfbDoCopy
|
||||
#define fbDots wfbDots
|
||||
#define fbDots16 wfbDots16
|
||||
#define fbDots24 wfbDots24
|
||||
#define fbDots32 wfbDots32
|
||||
#define fbDots8 wfbDots8
|
||||
#define fbEvenStipple wfbEvenStipple
|
||||
#define fbEvenTile wfbEvenTile
|
||||
#define fbExpandDirectColors wfbExpandDirectColors
|
||||
#define fbFill wfbFill
|
||||
#define fbFillRegionSolid wfbFillRegionSolid
|
||||
#define fbFillRegionTiled wfbFillRegionTiled
|
||||
#define fbFillSpans wfbFillSpans
|
||||
#define fbFixCoordModePrevious wfbFixCoordModePrevious
|
||||
#define fbGCFuncs wfbGCFuncs
|
||||
#define fbGCOps wfbGCOps
|
||||
#define fbGCPrivateIndex wfbGCPrivateIndex
|
||||
#define fbGeneration wfbGeneration
|
||||
#define fbGetGCPrivateIndex wfbGetGCPrivateIndex
|
||||
#define fbGetImage wfbGetImage
|
||||
#define fbGetScreenPrivateIndex wfbGetScreenPrivateIndex
|
||||
#define fbGetSpans wfbGetSpans
|
||||
#define _fbGetWindowPixmap _wfbGetWindowPixmap
|
||||
#define fbGetWinPrivateIndex wfbGetWinPrivateIndex
|
||||
#define fbGlyph16 wfbGlyph16
|
||||
#define fbGlyph24 wfbGlyph24
|
||||
#define fbGlyph32 wfbGlyph32
|
||||
#define fbGlyph8 wfbGlyph8
|
||||
#define fbGlyphIn wfbGlyphIn
|
||||
#define fbHasVisualTypes wfbHasVisualTypes
|
||||
#define fbImageGlyphBlt wfbImageGlyphBlt
|
||||
#define fbIn wfbIn
|
||||
#define fbInitializeColormap wfbInitializeColormap
|
||||
#define fbInitVisuals wfbInitVisuals
|
||||
#define fbInstallColormap wfbInstallColormap
|
||||
#define fbLaneTable wfbLaneTable
|
||||
#define fbListInstalledColormaps wfbListInstalledColormaps
|
||||
#define fbMapWindow wfbMapWindow
|
||||
#define FbMergeRopBits wFbMergeRopBits
|
||||
#define fbOddStipple wfbOddStipple
|
||||
#define fbOddTile wfbOddTile
|
||||
#define fbOver wfbOver
|
||||
#define fbOver24 wfbOver24
|
||||
#define fbOverlayCloseScreen wfbOverlayCloseScreen
|
||||
#define fbOverlayCopyWindow wfbOverlayCopyWindow
|
||||
#define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources
|
||||
#define fbOverlayCreateWindow wfbOverlayCreateWindow
|
||||
#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit
|
||||
#define fbOverlayGeneration wfbOverlayGeneration
|
||||
#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex
|
||||
#define fbOverlayPaintKey wfbOverlayPaintKey
|
||||
#define fbOverlayPaintWindow wfbOverlayPaintWindow
|
||||
#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex
|
||||
#define fbOverlaySetupScreen wfbOverlaySetupScreen
|
||||
#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion
|
||||
#define fbOverlayWindowExposures wfbOverlayWindowExposures
|
||||
#define fbOverlayWindowLayer wfbOverlayWindowLayer
|
||||
#define fbPadPixmap wfbPadPixmap
|
||||
#define fbPaintWindow wfbPaintWindow
|
||||
#define fbPictureInit wfbPictureInit
|
||||
#define fbPixmapToRegion wfbPixmapToRegion
|
||||
#define fbPolyArc wfbPolyArc
|
||||
#define fbPolyFillRect wfbPolyFillRect
|
||||
#define fbPolyGlyphBlt wfbPolyGlyphBlt
|
||||
#define fbPolyLine wfbPolyLine
|
||||
#define fbPolyline16 wfbPolyline16
|
||||
#define fbPolyline24 wfbPolyline24
|
||||
#define fbPolyline32 wfbPolyline32
|
||||
#define fbPolyline8 wfbPolyline8
|
||||
#define fbPolyPoint wfbPolyPoint
|
||||
#define fbPolySegment wfbPolySegment
|
||||
#define fbPolySegment16 wfbPolySegment16
|
||||
#define fbPolySegment24 wfbPolySegment24
|
||||
#define fbPolySegment32 wfbPolySegment32
|
||||
#define fbPolySegment8 wfbPolySegment8
|
||||
#define fbPositionWindow wfbPositionWindow
|
||||
#define fbPushFill wfbPushFill
|
||||
#define fbPushImage wfbPushImage
|
||||
#define fbPushPattern wfbPushPattern
|
||||
#define fbPushPixels wfbPushPixels
|
||||
#define fbPutImage wfbPutImage
|
||||
#define fbPutXYImage wfbPutXYImage
|
||||
#define fbPutZImage wfbPutZImage
|
||||
#define fbQueryBestSize wfbQueryBestSize
|
||||
#define fbRasterizeEdges wfbRasterizeEdges
|
||||
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
|
||||
#define fbRealizeFont wfbRealizeFont
|
||||
#define fbReduceRasterOp wfbReduceRasterOp
|
||||
#define fbReplicatePixel wfbReplicatePixel
|
||||
#define fbResolveColor wfbResolveColor
|
||||
#define fbRestoreAreas wfbRestoreAreas
|
||||
#define fbSaveAreas wfbSaveAreas
|
||||
#define fbScreenPrivateIndex wfbScreenPrivateIndex
|
||||
#define fbSegment wfbSegment
|
||||
#define fbSelectBres wfbSelectBres
|
||||
#define fbSetSpans wfbSetSpans
|
||||
#define fbSetupScreen wfbSetupScreen
|
||||
#define fbSetVisualTypes wfbSetVisualTypes
|
||||
#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks
|
||||
#define _fbSetWindowPixmap _wfbSetWindowPixmap
|
||||
#define fbSolid wfbSolid
|
||||
#define fbSolid24 wfbSolid24
|
||||
#define fbSolidBoxClipped wfbSolidBoxClipped
|
||||
#define fbStipple wfbStipple
|
||||
#define fbStipple1Bits wfbStipple1Bits
|
||||
#define fbStipple24Bits wfbStipple24Bits
|
||||
#define fbStipple2Bits wfbStipple2Bits
|
||||
#define fbStipple4Bits wfbStipple4Bits
|
||||
#define fbStipple8Bits wfbStipple8Bits
|
||||
#define fbStippleTable wfbStippleTable
|
||||
#define fbTile wfbTile
|
||||
#define fbTransparentSpan wfbTransparentSpan
|
||||
#define fbUninstallColormap wfbUninstallColormap
|
||||
#define fbUnmapWindow wfbUnmapWindow
|
||||
#define fbUnrealizeFont wfbUnrealizeFont
|
||||
#define fbValidateGC wfbValidateGC
|
||||
#define fbWinPrivateIndex wfbWinPrivateIndex
|
||||
#define fbZeroLine wfbZeroLine
|
||||
#define fbZeroSegment wfbZeroSegment
|
||||
#define xxScrPrivateIndex wfbxxScrPrivateIndex
|
||||
#define xxGCPrivateIndex wfbxxGCPrivateIndex
|
||||
#define xxColormapPrivateIndex wfbxxColormapPrivateIndex
|
||||
#define xxGeneration wfbxxGeneration
|
||||
#define xxPrintVisuals wfbxxPrintVisuals
|
||||
#define xxGCFuncs wfbxxGCFuncs
|
||||
#define xxGCOps wfbxxGCOps
|
||||
#define xxSetup wfbxxSetup
|
||||
#define composeFunctions wfbComposeFunctions
|
|
@ -16,6 +16,9 @@ GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \
|
|||
GLX_DEFS = @GL_CFLAGS@
|
||||
endif
|
||||
|
||||
# It's essential that fbcmap.c be compiled with this flag for DMX to work!!
|
||||
DMX_CFLAGS = -DXFree86Server=1
|
||||
|
||||
if BUILDDOCS
|
||||
SUBDIRS += doc
|
||||
endif
|
||||
|
@ -83,8 +86,10 @@ Xdmx_LDADD = $(XORG_CORE_LIBS) \
|
|||
|
||||
Xdmx_CFLAGS = \
|
||||
-DHAVE_DMX_CONFIG_H \
|
||||
$(DIX_CFLAGS) \
|
||||
$(GLX_INCS) \
|
||||
$(GLX_DEFS) \
|
||||
$(DMX_CFLAGS) \
|
||||
@DMXMODULES_CFLAGS@
|
||||
|
||||
# Man page
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
#ifndef DMX_H
|
||||
#define DMX_H
|
||||
|
||||
#if HAVE_DMX_CONFIG_H
|
||||
#include <dmx-config.h>
|
||||
#endif
|
||||
|
||||
#include "gcstruct.h"
|
||||
|
||||
/* Handle client-side include files in one place. */
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#endif
|
||||
|
||||
#include "dmx.h"
|
||||
#include "dmxlog.h"
|
||||
#include "dmxsync.h"
|
||||
#include "dmxcmap.h"
|
||||
#include "dmxvisual.h"
|
||||
|
@ -83,12 +84,18 @@ Bool dmxBECreateColormap(ColormapPtr pColormap)
|
|||
VisualPtr pVisual = pColormap->pVisual;
|
||||
Visual *visual = dmxLookupVisual(pScreen, pVisual);
|
||||
|
||||
pCmapPriv->cmap = XCreateColormap(dmxScreen->beDisplay,
|
||||
dmxScreen->scrnWin,
|
||||
visual,
|
||||
(pVisual->class & DynamicClass ?
|
||||
AllocAll : AllocNone));
|
||||
return (pCmapPriv->cmap != 0);
|
||||
if (visual) {
|
||||
pCmapPriv->cmap = XCreateColormap(dmxScreen->beDisplay,
|
||||
dmxScreen->scrnWin,
|
||||
visual,
|
||||
(pVisual->class & DynamicClass ?
|
||||
AllocAll : AllocNone));
|
||||
return (pCmapPriv->cmap != 0);
|
||||
}
|
||||
else {
|
||||
dmxLog(dmxWarning, "dmxBECreateColormap: No visual found\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/** Create colormap on back-end server associated with \a pColormap's
|
||||
|
|
|
@ -664,8 +664,8 @@ static Bool _dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
{
|
||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
||||
|
||||
DMXDBG3("_dmxUnrealizeCursor(%d,%p) %p\n",
|
||||
pScreen->myNum, pCursor, pCursorPriv);
|
||||
DMXDBG2("_dmxUnrealizeCursor(%d,%p)\n",
|
||||
pScreen->myNum, pCursor);
|
||||
|
||||
if (dmxScreen->beDisplay) {
|
||||
if (dmxBEFreeCursor(pScreen, pCursor))
|
||||
|
|
|
@ -31,10 +31,6 @@ INCLUDES = \
|
|||
|
||||
bin_PROGRAMS = Xati
|
||||
|
||||
if TSLIB
|
||||
TSLIB_FLAG = -lts
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libati.a
|
||||
|
||||
libati_a_SOURCES = \
|
||||
|
@ -65,8 +61,12 @@ ATI_LIBS = \
|
|||
Xati_LDADD = \
|
||||
$(ATI_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@XSERVER_LIBS@
|
||||
|
||||
|
||||
Xati_DEPENDENCIES = $(ATI_LIBS)
|
||||
Xati_DEPENDENCIES = \
|
||||
libati.a \
|
||||
$(FBDEV_LIBS) \
|
||||
$(VESA_LIBS) \
|
||||
$(DRI_LIBS)
|
||||
|
||||
|
|
|
@ -5,10 +5,6 @@ INCLUDES = \
|
|||
|
||||
bin_PROGRAMS = Xchips
|
||||
|
||||
if TSLIB
|
||||
TSLIB_FLAG = -lts
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libchips.a
|
||||
|
||||
libchips_a_SOURCES = \
|
||||
|
@ -19,15 +15,16 @@ libchips_a_SOURCES = \
|
|||
Xchips_SOURCES = \
|
||||
chipsstub.c
|
||||
|
||||
CHIPS_LIBS = \
|
||||
libchips.a \
|
||||
CHIPS_LIBS = \
|
||||
libchips.a \
|
||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
Xchips_LDADD = \
|
||||
$(CHIPS_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@
|
||||
|
||||
Xchips_DEPENDENCIES = $(CHIPS_LIBS) @KDRIVE_LIBS@
|
||||
Xchips_DEPENDENCIES = \
|
||||
libchips.a \
|
||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a
|
||||
|
|
|
@ -5,11 +5,6 @@ INCLUDES = \
|
|||
|
||||
noinst_LIBRARIES = libxephyr.a libxephyr-hostx.a
|
||||
|
||||
if TSLIB
|
||||
TSLIB_LIBS = -lts
|
||||
endif
|
||||
|
||||
|
||||
bin_PROGRAMS = Xephyr
|
||||
|
||||
libxephyr_a_SOURCES = \
|
||||
|
@ -34,11 +29,8 @@ Xephyr_LDADD = \
|
|||
../../../exa/libexa.la \
|
||||
@KDRIVE_LIBS@ \
|
||||
@KDRIVE_LIBS@ \
|
||||
$(TSLIB_LIBS) \
|
||||
@XEPHYR_LIBS@
|
||||
|
||||
Xephyr_DEPENDENCIES = \
|
||||
libxephyr.a \
|
||||
libxephyr-hostx.a \
|
||||
@KDRIVE_LIBS@ \
|
||||
../../../exa/libexa.la
|
||||
libxephyr-hostx.a
|
||||
|
|
|
@ -4,10 +4,6 @@ INCLUDES = \
|
|||
|
||||
bin_PROGRAMS = Xepson
|
||||
|
||||
if TSLIB
|
||||
TSLIB_FLAG = -lts
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libepson.a
|
||||
|
||||
libepson_a_SOURCES = \
|
||||
|
@ -25,9 +21,8 @@ EPSON_LIBS = \
|
|||
@KDRIVE_LIBS@
|
||||
|
||||
Xepson_LDADD = \
|
||||
$(EPSON_LIBS) \
|
||||
$(EPSON_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@XSERVER_LIBS@
|
||||
|
||||
Xepson_DEPENDENCIES = $(EPSON_LIBS) @KDRIVE_LIBS@
|
||||
Xepson_DEPENDENCIES = libepson.a
|
||||
|
|
|
@ -28,6 +28,4 @@ Xfake_LDADD = \
|
|||
@XSERVER_LIBS@
|
||||
|
||||
Xfake_DEPENDENCIES = \
|
||||
libfake.a \
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
libfake.a
|
||||
|
|
|
@ -6,10 +6,6 @@ noinst_LIBRARIES = libfbdev.a
|
|||
|
||||
bin_PROGRAMS = Xfbdev
|
||||
|
||||
if TSLIB
|
||||
TSLIB_FLAG = -lts
|
||||
endif
|
||||
|
||||
libfbdev_a_SOURCES = \
|
||||
fbdev.c \
|
||||
fbdev.h
|
||||
|
@ -20,10 +16,7 @@ Xfbdev_SOURCES = \
|
|||
Xfbdev_LDADD = \
|
||||
libfbdev.a \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@XSERVER_LIBS@
|
||||
|
||||
Xfbdev_DEPENDENCIES = \
|
||||
libfbdev.a \
|
||||
@KDRIVE_LIBS@
|
||||
|
||||
libfbdev.a
|
||||
|
|
|
@ -33,16 +33,24 @@
|
|||
|
||||
extern int KdTsPhyScreen;
|
||||
|
||||
char *fbdevDevicePath = NULL;
|
||||
|
||||
Bool
|
||||
fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
|
||||
{
|
||||
int k;
|
||||
unsigned long off;
|
||||
if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \
|
||||
(priv->fd = open("/dev/fb/0", O_RDWR)) < 0) {
|
||||
perror("Error opening /dev/fb0");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (fbdevDevicePath == NULL)
|
||||
fbdevDevicePath = "/dev/fb0";
|
||||
|
||||
if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0)
|
||||
{
|
||||
ErrorF("Error opening framebuffer %s: %s\n",
|
||||
fbdevDevicePath, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* quiet valgrind */
|
||||
memset (&priv->fix, '\0', sizeof (priv->fix));
|
||||
if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) {
|
||||
|
|
|
@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv {
|
|||
} FbdevScrPriv;
|
||||
|
||||
extern KdCardFuncs fbdevFuncs;
|
||||
extern char* fbdevDevicePath;
|
||||
|
||||
Bool
|
||||
fbdevInitialize (KdCardInfo *card, FbdevPriv *priv);
|
||||
|
|
|
@ -54,15 +54,28 @@ InitInput (int argc, char **argv)
|
|||
void
|
||||
ddxUseMsg (void)
|
||||
{
|
||||
KdUseMsg();
|
||||
KdUseMsg();
|
||||
ErrorF("\nXfbdev Device Usage:\n");
|
||||
ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n");
|
||||
ErrorF("\n");
|
||||
}
|
||||
|
||||
int
|
||||
ddxProcessArgument (int argc, char **argv, int i)
|
||||
{
|
||||
return KdProcessArgument (argc, argv, i);
|
||||
}
|
||||
if (!strcmp (argv[i], "-fb"))
|
||||
{
|
||||
if (i+1 < argc)
|
||||
{
|
||||
fbdevDevicePath = argv[i+1];
|
||||
return 2;
|
||||
}
|
||||
UseMsg();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return KdProcessArgument (argc, argv, i);
|
||||
}
|
||||
|
||||
|
||||
KdCardFuncs fbdevFuncs = {
|
||||
|
|
|
@ -6,9 +6,6 @@ bin_PROGRAMS = Xi810
|
|||
|
||||
noinst_LIBRARIES = libi810.a
|
||||
|
||||
if TSLIB
|
||||
TSLIB_FLAG = -lts
|
||||
endif
|
||||
|
||||
libi810_a_SOURCES = \
|
||||
i810_cursor.c \
|
||||
|
@ -29,7 +26,6 @@ I810_LIBS = \
|
|||
Xi810_LDADD = \
|
||||
$(I810_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@XSERVER_LIBS@
|
||||
|
||||
Xi810_DEPENDENCIES = $(I810_LIBS) @KDRIVE_LIBS@
|
||||
Xi810_DEPENDENCIES = libi810.a
|
||||
|
|
|
@ -34,4 +34,4 @@ Xmach64_LDADD = \
|
|||
$(TSLIB_FLAG)
|
||||
|
||||
|
||||
Xmach64_DEPENDENCIES = $(MACH64_LIBS) @KDRIVE_LIBS@
|
||||
Xmach64_DEPENDENCIES = $(MACH64_LIBS)
|
||||
|
|
|
@ -32,4 +32,6 @@ Xmga_LDADD = \
|
|||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
|
||||
Xmga_DEPENDENCIES = $(MGA_LIBS) @KDRIVE_LIBS@
|
||||
Xmga_DEPENDENCIES = \
|
||||
libmga.a \
|
||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a
|
||||
|
|
|
@ -16,10 +16,6 @@ INCLUDES = \
|
|||
|
||||
bin_PROGRAMS = Xneomagic
|
||||
|
||||
if TSLIB
|
||||
TSLIB_FLAG = -lts
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libneomagic.a
|
||||
|
||||
libneomagic_a_SOURCES = \
|
||||
|
@ -41,7 +37,10 @@ NEOMAGIC_LIBS = \
|
|||
Xneomagic_LDADD = \
|
||||
$(NEOMAGIC_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@XSERVER_LIBS@
|
||||
|
||||
Xneomagic_DEPENDENCIES = $(NEOMAGIC_LIBS) @KDRIVE_LIBS@
|
||||
|
||||
Xneomagic_DEPENDENCIES = \
|
||||
libneomagic.a \
|
||||
${FBDEV_LIBS} \
|
||||
${VESA_LIBS}
|
||||
|
|
|
@ -30,7 +30,8 @@ NVIDIA_LIBS = \
|
|||
Xnvidia_LDADD = \
|
||||
$(NVIDIA_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@XSERVER_LIBS@
|
||||
|
||||
Xnvidia_DEPENDENCIES = $(NVIDIA_LIBS) @KDRIVE_LIBS@
|
||||
Xnvidia_DEPENDENCIES = \
|
||||
libnvidia.a \
|
||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a
|
||||
|
|
|
@ -5,10 +5,6 @@ INCLUDES = \
|
|||
|
||||
bin_PROGRAMS = Xpm2
|
||||
|
||||
if TSLIB
|
||||
TSLIB_FLAG = -lts
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libpm2.a
|
||||
|
||||
libpm2_a_SOURCES = \
|
||||
|
@ -28,7 +24,9 @@ PM2_LIBS = \
|
|||
Xpm2_LDADD = \
|
||||
$(PM2_LIBS) \
|
||||
@KDRIVE_LIBS@ \
|
||||
@XSERVER_LIBS@ \
|
||||
$(TSLIB_FLAG)
|
||||
@XSERVER_LIBS@
|
||||
|
||||
Xpm2_DEPENDENCIES = $(PM2_LIBS) @KDRIVE_LIBS@
|
||||
|
||||
Xpm2_DEPENDENCIES = \
|
||||
libpm2.a \
|
||||
$(top_builddir)/hw/kdrive/vesa/libvesa.a
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user