xserver: Branch 'master' - 5 commits
Michel Daenzer
daenzer at kemper.freedesktop.org
Sat Jun 24 16:24:46 EEST 2006
GL/glx/indirect_util.c | 4 ++--
exa/exa.c | 2 +-
exa/exa_render.c | 8 ++++++--
hw/xfree86/common/xf86Events.c | 6 +-----
hw/xfree86/dri/xf86dri.c | 37 ++++++++++++++++++++++++++++++-------
5 files changed, 40 insertions(+), 17 deletions(-)
New commits:
diff-tree afb84c2fca56887b3bfe7aa93f337c49b087acdc (from 930b9a069a425818d4e9965f53be7df1f4d7d422)
Author: George Fufutos <fufutos610 at hotmail.com>
Date: Sat Jun 24 15:23:14 2006 +0200
Bug #6911: Check return value of exaGetPixelFromRGBA().
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 26b29ab..b21c5d7 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -282,8 +282,12 @@ exaTryDriverSolidFill(PicturePtr pSrc,
return -1;
}
- exaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
- pDst->format);
+ if (!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
+ pDst->format))
+ {
+ REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
+ return -1;
+ }
if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel))
{
diff-tree 930b9a069a425818d4e9965f53be7df1f4d7d422 (from 36756fdb2ddc154b406f664a6af0f38d26e6973d)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Sat Jun 24 15:21:17 2006 +0200
Bug #6818: Avoid infinite loop in exaLog2() with negative arguments.
diff --git a/exa/exa.c b/exa/exa.c
index 4b96af8..aa5532a 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -158,7 +158,7 @@ exaLog2(int val)
{
int bits;
- if (!val)
+ if (val <= 0)
return 0;
for (bits = 0; val != 0; bits++)
val >>= 1;
diff-tree 36756fdb2ddc154b406f664a6af0f38d26e6973d (from 4426215a6e99f84550aaac23ac9c2018668bfbc1)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Sat Jun 24 15:09:24 2006 +0200
Make sure <execinfo.h> is actually included when needed.
configure only defines HAVE_BACKTRACE, not HAVE_EXECINFO_H.
This could cause problems on platforms where the size of a pointer is greater
than that of an integer, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363218 .
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 397f75d..831c68a 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -1255,12 +1255,8 @@ xf86InterceptSigIll(void (*sigillhandler
xf86SigIllHandler = sigillhandler;
}
-#ifdef HAVE_EXECINFO_H
-#define HAVE_BACKTRACE
-#include <execinfo.h>
-#endif
-
#ifdef HAVE_BACKTRACE
+#include <execinfo.h>
static __inline__ void xorg_backtrace(void)
{
diff-tree 4426215a6e99f84550aaac23ac9c2018668bfbc1 (from a195a3debca02572d9f7d7a9976b5bf67acc5d08)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Sat Jun 24 15:02:56 2006 +0200
Bug #7213: Fix the XFree86-DRI extension for byte-swapped clients.
These clients are by definition non-local and thus not direct rendering
capable, but they still need the QueryVersion and QueryDirectRenderingCapable
requests to find out cleanly.
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 4b0e354..5e46036 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -81,6 +81,7 @@ static DISPATCH_PROC(ProcXF86DRIDispatch
static DISPATCH_PROC(ProcXF86DRIAuthConnection);
static DISPATCH_PROC(SProcXF86DRIQueryVersion);
+static DISPATCH_PROC(SProcXF86DRIQueryDirectRenderingCapable);
static DISPATCH_PROC(SProcXF86DRIDispatch);
static void XF86DRIResetProc(ExtensionEntry* extEntry);
@@ -142,6 +143,9 @@ ProcXF86DRIQueryVersion(
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
+ swaps(&rep.majorVersion, n);
+ swaps(&rep.minorVersion, n);
+ swapl(&rep.patchVersion, n);
}
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
return (client->noClientException);
@@ -154,6 +158,7 @@ ProcXF86DRIQueryDirectRenderingCapable(
{
xXF86DRIQueryDirectRenderingCapableReply rep;
Bool isCapable;
+ register int n;
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
@@ -172,9 +177,14 @@ ProcXF86DRIQueryDirectRenderingCapable(
}
rep.isCapable = isCapable;
- if (!LocalClient(client))
+ if (!LocalClient(client) || client->swapped)
rep.isCapable = 0;
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ }
+
WriteToClient(client,
sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
return (client->noClientException);
@@ -627,22 +637,35 @@ SProcXF86DRIQueryVersion(
}
static int
+SProcXF86DRIQueryDirectRenderingCapable(
+ register ClientPtr client
+)
+{
+ register int n;
+ REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
+ swaps(&stuff->length, n);
+ swapl(&stuff->screen, n);
+ return ProcXF86DRIQueryDirectRenderingCapable(client);
+}
+
+static int
SProcXF86DRIDispatch (
register ClientPtr client
)
{
REQUEST(xReq);
- /* It is bound to be non-local when there is byte swapping */
- if (!LocalClient(client))
- return DRIErrorBase + XF86DRIClientNotLocal;
-
- /* only local clients are allowed DRI access */
+ /*
+ * Only local clients are allowed DRI access, but remote clients still need
+ * these requests to find out cleanly.
+ */
switch (stuff->data)
{
case X_XF86DRIQueryVersion:
return SProcXF86DRIQueryVersion(client);
+ case X_XF86DRIQueryDirectRenderingCapable:
+ return SProcXF86DRIQueryDirectRenderingCapable(client);
default:
- return BadRequest;
+ return DRIErrorBase + XF86DRIClientNotLocal;
}
}
diff-tree a195a3debca02572d9f7d7a9976b5bf67acc5d08 (from bc6cfde19887eff7a07dc739ffa29609fb55b83d)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Sat Jun 24 14:54:52 2006 +0200
Fix byte swapping in some GLX requests.
diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c
index c9d8600..bab0226 100644
--- a/GL/glx/indirect_util.c
+++ b/GL/glx/indirect_util.c
@@ -185,8 +185,8 @@ __glXSendReplySwap( ClientPtr client, co
}
__glXReply.length = bswap_32( reply_ints );
- __glXReply.type = bswap_32( X_Reply );
- __glXReply.sequenceNumber = bswap_32( client->sequence );
+ __glXReply.type = X_Reply;
+ __glXReply.sequenceNumber = bswap_16( client->sequence );
__glXReply.size = bswap_32( elements );
__glXReply.retval = bswap_32( retval );
More information about the xorg-commit
mailing list