projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
radv: Implement pipeline statistics queries.
[mesa.git]
/
src
/
glx
/
XF86dri.c
diff --git
a/src/glx/XF86dri.c
b/src/glx/XF86dri.c
index 248d96ac5dedea8fe3a53b5e83dcc7d7d2db73bd..885ec93db5520486b323f0d0b892492b2ffa1582 100644
(file)
--- a/
src/glx/XF86dri.c
+++ b/
src/glx/XF86dri.c
@@
-29,31
+29,21
@@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
* Authors:
* Kevin E. Martin <martin@valinux.com>
/*
* Authors:
* Kevin E. Martin <martin@valinux.com>
- * Jens Owen <j
ens@tungstengraphics
.com>
+ * Jens Owen <j
owen@vmware
.com>
* Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
/* THIS IS NOT AN X CONSORTIUM STANDARD */
* Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
/* THIS IS NOT AN X CONSORTIUM STANDARD */
-#if
def GLX_DIRECT_RENDERING
+#if
defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
-#define NEED_REPLIES
#include <X11/Xlibint.h>
#include <X11/Xlibint.h>
+#include <X11/Xfuncproto.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include "xf86dristr.h"
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include "xf86dristr.h"
-
-
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
-# define PUBLIC __attribute__((visibility("default")))
-# define USED __attribute__((used))
-#else
-# define PUBLIC
-# define USED
-#endif
-
-
+#include <limits.h>
static XExtensionInfo _xf86dri_info_data;
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
static XExtensionInfo _xf86dri_info_data;
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
@@
-212,7
+202,11
@@
XF86DRIOpenConnection(Display * dpy, int screen, drm_handle_t * hSAREA,
}
if (rep.length) {
}
if (rep.length) {
- if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) {
+ if (rep.busIdStringLength < INT_MAX)
+ *busIdString = calloc(rep.busIdStringLength + 1, 1);
+ else
+ *busIdString = NULL;
+ if (*busIdString == NULL) {
_XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
UnlockDisplay(dpy);
SyncHandle();
_XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
UnlockDisplay(dpy);
SyncHandle();
@@
-311,9
+305,11
@@
XF86DRIGetClientDriverName(Display * dpy, int screen,
*ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
if (rep.length) {
*ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
if (rep.length) {
- if (!
- (*clientDriverName =
- (char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) {
+ if (rep.clientDriverNameLength < INT_MAX)
+ *clientDriverName = calloc(rep.clientDriverNameLength + 1, 1);
+ else
+ *clientDriverName = NULL;
+ if (*clientDriverName == NULL) {
_XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
UnlockDisplay(dpy);
SyncHandle();
_XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
UnlockDisplay(dpy);
SyncHandle();
@@
-444,7
+440,7
@@
XF86DRIDestroyDrawable(Display * dpy, int screen, XID drawable)
* destroyDrawable(drawable);
*
* which is a textbook race condition - the window may disappear
* destroyDrawable(drawable);
*
* which is a textbook race condition - the window may disappear
- * from the server between checking for its exist
a
nce and
+ * from the server between checking for its exist
e
nce and
* destroying it. Instead we change the semantics of
* __DRIinterfaceMethodsRec::destroyDrawable() to succeed even if
* the windows is gone, by wrapping the destroy call in an error
* destroying it. Instead we change the semantics of
* __DRIinterfaceMethodsRec::destroyDrawable() to succeed even if
* the windows is gone, by wrapping the destroy call in an error
@@
-532,7
+528,7
@@
XF86DRIGetDrawableInfo(Display * dpy, int screen, Drawable drawable,
if (*numClipRects) {
int len = sizeof(drm_clip_rect_t) * (*numClipRects);
if (*numClipRects) {
int len = sizeof(drm_clip_rect_t) * (*numClipRects);
- *pClipRects =
(drm_clip_rect_t *) X
calloc(len, 1);
+ *pClipRects = calloc(len, 1);
if (*pClipRects)
_XRead(dpy, (char *) *pClipRects, len);
}
if (*pClipRects)
_XRead(dpy, (char *) *pClipRects, len);
}
@@
-543,7
+539,7
@@
XF86DRIGetDrawableInfo(Display * dpy, int screen, Drawable drawable,
if (*numBackClipRects) {
int len = sizeof(drm_clip_rect_t) * (*numBackClipRects);
if (*numBackClipRects) {
int len = sizeof(drm_clip_rect_t) * (*numBackClipRects);
- *pBackClipRects =
(drm_clip_rect_t *) X
calloc(len, 1);
+ *pBackClipRects = calloc(len, 1);
if (*pBackClipRects)
_XRead(dpy, (char *) *pBackClipRects, len);
}
if (*pBackClipRects)
_XRead(dpy, (char *) *pBackClipRects, len);
}
@@
-593,7
+589,7
@@
XF86DRIGetDeviceInfo(Display * dpy, int screen, drm_handle_t * hFrameBuffer,
*devPrivateSize = rep.devPrivateSize;
if (rep.length) {
*devPrivateSize = rep.devPrivateSize;
if (rep.length) {
- if (!(*pDevPrivate =
(void *) X
calloc(rep.devPrivateSize, 1))) {
+ if (!(*pDevPrivate = calloc(rep.devPrivateSize, 1))) {
_XEatData(dpy, ((rep.devPrivateSize + 3) & ~3));
UnlockDisplay(dpy);
SyncHandle();
_XEatData(dpy, ((rep.devPrivateSize + 3) & ~3));
UnlockDisplay(dpy);
SyncHandle();