Commit 3eb6d448 authored by idr's avatar idr
Browse files

Replace all occurances of XF86DRIClipRect (and related typedefs) with

drm_clip_rect_t.  All of the Imakefile changes are so that drm.h can
be found.  DRM SOURCES (i.e., shared/drm.h) MUST ALSO BE UPDATED FOR
THIS TO COMPILE!
parent a029972e
......@@ -23,7 +23,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
-I$(XF86OSSRC)/$(OS_SUBDIR)/drm \
-I$(DRMSRCDIR)/$(OS_SUBDIR) \
-I$(DRMSRCDIR)/$(OS_SUBDIR2) \
-I$(XF86OSSRC)
-I$(XF86OSSRC) -I$(DRMSRCDIR)/shared
SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c
OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o
......
......@@ -448,27 +448,12 @@ Bool XF86DRIDestroyDrawable(dpy, screen, drawable)
return True;
}
Bool XF86DRIGetDrawableInfo(dpy, screen, drawable,
index, stamp, X, Y, W, H,
numClipRects, pClipRects,
backX, backY,
numBackClipRects, pBackClipRects
)
Display* dpy;
int screen;
Drawable drawable;
unsigned int* index;
unsigned int* stamp;
int* X;
int* Y;
int* W;
int* H;
int* numClipRects;
XF86DRIClipRectPtr* pClipRects;
int* backX;
int* backY;
int* numBackClipRects;
XF86DRIClipRectPtr* pBackClipRects;
Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
unsigned int* index, unsigned int* stamp,
int* X, int* Y, int* W, int* H,
int* numClipRects, drm_clip_rect_t ** pClipRects,
int* backX, int* backY,
int* numBackClipRects, drm_clip_rect_t ** pBackClipRects )
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIGetDrawableInfoReply rep;
......@@ -513,7 +498,7 @@ Bool XF86DRIGetDrawableInfo(dpy, screen, drawable,
*/
if (rep.length != ((((SIZEOF(xXF86DRIGetDrawableInfoReply) -
SIZEOF(xGenericReply) +
total_rects * sizeof(XF86DRIClipRectRec)) + 3) & ~3) >> 2)) {
total_rects * sizeof(drm_clip_rect_t)) + 3) & ~3) >> 2)) {
_XEatData(dpy, rep.length);
UnlockDisplay(dpy);
SyncHandle();
......@@ -523,9 +508,9 @@ Bool XF86DRIGetDrawableInfo(dpy, screen, drawable,
#endif
if (*numClipRects) {
int len = sizeof(XF86DRIClipRectRec) * (*numClipRects);
int len = sizeof(drm_clip_rect_t) * (*numClipRects);
*pClipRects = (XF86DRIClipRectPtr)Xcalloc(len, 1);
*pClipRects = (drm_clip_rect_t *)Xcalloc(len, 1);
if (*pClipRects)
_XRead(dpy, (char*)*pClipRects, len);
} else {
......@@ -533,9 +518,9 @@ Bool XF86DRIGetDrawableInfo(dpy, screen, drawable,
}
if (*numBackClipRects) {
int len = sizeof(XF86DRIClipRectRec) * (*numBackClipRects);
int len = sizeof(drm_clip_rect_t) * (*numBackClipRects);
*pBackClipRects = (XF86DRIClipRectPtr)Xcalloc(len, 1);
*pBackClipRects = (drm_clip_rect_t *)Xcalloc(len, 1);
if (*pBackClipRects)
_XRead(dpy, (char*)*pBackClipRects, len);
} else {
......
......@@ -27,12 +27,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/*
* Authors:
* Kevin E. Martin <martin@valinux.com>
* Jens Owen <jens@tungstengraphics.com>
* Rickard E. (Rik) Faith <faith@valinux.com>
/**
* \file xf86dri.h
* Protocol numbers and function prototypes for DRI X protocol.
*
* \author Kevin E. Martin <martin@valinux.com>
* \author Jens Owen <jens@tungstengraphics.com>
* \author Rickard E. (Rik) Faith <faith@valinux.com>
*/
#ifndef _XF86DRI_H_
......@@ -62,15 +63,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define XF86DRIOperationNotSupported 1
#define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1)
/* Warning : Do not change XF86DRIClipRect without changing the kernel
* structure! */
typedef struct _XF86DRIClipRect {
unsigned short x1; /* Upper left: inclusive */
unsigned short y1;
unsigned short x2; /* Lower right: exclusive */
unsigned short y2;
} XF86DRIClipRectRec, *XF86DRIClipRectPtr;
#ifndef _XF86DRI_SERVER_
_XFUNCPROTOBEGIN
......@@ -192,11 +184,11 @@ Bool XF86DRIGetDrawableInfo(
int* /* W */,
int* /* H */,
int* /* numClipRects */,
XF86DRIClipRectPtr*,/* pClipRects */
drm_clip_rect_t **,/* pClipRects */
int* /* backX */,
int* /* backY */,
int* /* numBackClipRects */,
XF86DRIClipRectPtr* /* pBackClipRects */
drm_clip_rect_t ** /* pBackClipRects */
#endif
);
......
......@@ -15,6 +15,7 @@ MOBJ = drimodule.o
-I$(EXTINCSRC) -I$(MESASRCDIR)/include \
-I$(XF86OSSRC) -I$(XF86COMSRC) \
-I../include -I../glx -I$(LIBSRC)/GL/include \
-I$(DRMSRCDIR)/shared \
-I$(SERVERSRC)/mi -I$(FONTINCSRC)
DEFINES = $(GLX_DEFINES)
......
......@@ -1124,11 +1124,11 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
int* W,
int* H,
int* numClipRects,
XF86DRIClipRectPtr* pClipRects,
drm_clip_rect_t ** pClipRects,
int* backX,
int* backY,
int* numBackClipRects,
XF86DRIClipRectPtr* pBackClipRects)
drm_clip_rect_t ** pBackClipRects)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIDrawablePrivPtr pDRIDrawablePriv, pOldDrawPriv;
......@@ -1224,7 +1224,7 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
*W = (int)(pWin->drawable.width);
*H = (int)(pWin->drawable.height);
*numClipRects = REGION_NUM_RECTS(&pWin->clipList);
*pClipRects = (XF86DRIClipRectPtr)REGION_RECTS(&pWin->clipList);
*pClipRects = (drm_clip_rect_t *)REGION_RECTS(&pWin->clipList);
if (!*numClipRects && pDRIPriv->fullscreen) {
/* use fake full-screen clip rect */
......@@ -2026,7 +2026,7 @@ DRIOpenFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable)
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
WindowPtr pWin = (WindowPtr)pDrawable;
XF86DRIClipRectPtr pClipRects = (void *)REGION_RECTS(&pWin->clipList);
drm_clip_rect_t * pClipRects = (void *)REGION_RECTS(&pWin->clipList);
_DRIAdjustFrame(pScrn, pDRIPriv, pScrn->frameX0, pScrn->frameY0);
......
......@@ -218,11 +218,11 @@ extern Bool DRIGetDrawableInfo(ScreenPtr pScreen,
int* W,
int* H,
int* numClipRects,
XF86DRIClipRectPtr* pClipRects,
drm_clip_rect_t ** pClipRects,
int* backX,
int* backY,
int* numBackClipRects,
XF86DRIClipRectPtr* pBackClipRects);
drm_clip_rect_t ** pBackClipRects);
extern Bool DRIGetDeviceInfo(ScreenPtr pScreen,
drmHandlePtr hFrameBuffer,
......
......@@ -88,9 +88,9 @@ typedef struct _DRIScreenPrivRec
void** partial3DContextStore; /* parital 3D context */
DRIInfoPtr pDriverInfo;
int nrWindows;
XF86DRIClipRectRec private_buffer_rect; /* management of private buffers */
drm_clip_rect_t private_buffer_rect; /* management of private buffers */
DrawablePtr fullscreen; /* pointer to fullscreen drawable */
XF86DRIClipRectRec fullscreen_rect; /* fake rect for fullscreen mode */
drm_clip_rect_t fullscreen_rect; /* fake rect for fullscreen mode */
DRIWrappedFuncsRec wrap;
DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES];
DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */
......
......@@ -442,8 +442,8 @@ ProcXF86DRIGetDrawableInfo(
xXF86DRIGetDrawableInfoReply rep;
DrawablePtr pDrawable;
int X, Y, W, H;
XF86DRIClipRectPtr pClipRects;
XF86DRIClipRectPtr pBackClipRects;
drm_clip_rect_t * pClipRects;
drm_clip_rect_t * pBackClipRects;
int backX, backY;
REQUEST(xXF86DRIGetDrawableInfoReq);
......@@ -492,10 +492,10 @@ ProcXF86DRIGetDrawableInfo(
rep.backY = backY;
if (rep.numBackClipRects)
rep.length += sizeof(XF86DRIClipRectRec) * rep.numBackClipRects;
rep.length += sizeof(drm_clip_rect_t) * rep.numBackClipRects;
if (rep.numClipRects)
rep.length += sizeof(XF86DRIClipRectRec) * rep.numClipRects;
rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects;
rep.length = ((rep.length + 3) & ~3) >> 2;
......@@ -503,13 +503,13 @@ ProcXF86DRIGetDrawableInfo(
if (rep.numClipRects) {
WriteToClient(client,
sizeof(XF86DRIClipRectRec) * rep.numClipRects,
sizeof(drm_clip_rect_t) * rep.numClipRects,
(char *)pClipRects);
}
if (rep.numBackClipRects) {
WriteToClient(client,
sizeof(XF86DRIClipRectRec) * rep.numBackClipRects,
sizeof(drm_clip_rect_t) * rep.numBackClipRects,
(char *)pBackClipRects);
}
......
......@@ -52,7 +52,8 @@ DRIOBJS2 = atidri.o
DRIOBJS3 = r128_dri.o
DRIOBJS4 = radeon_dri.o
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(TOP)/include
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(TOP)/include \
-I$(DRMSRCDIR)/shared
DRIDEFINES = $(GLX_DEFINES)
#endif
......
......@@ -133,7 +133,7 @@ typedef struct {
#ifdef XF86DRI
/* The current cliprects, or a subset thereof.
*/
XF86DRIClipRectRec boxes[MACH64_NR_SAREA_CLIPRECTS];
drm_clip_rect_t boxes[MACH64_NR_SAREA_CLIPRECTS];
unsigned int nbox;
#endif
/* Counter for throttling of rendering clients.
......
......@@ -161,7 +161,7 @@ typedef struct {
#ifdef XF86DRI
/* The current cliprects, or a subset thereof.
*/
XF86DRIClipRectRec boxes[R128_NR_SAREA_CLIPRECTS];
drm_clip_rect_t boxes[R128_NR_SAREA_CLIPRECTS];
unsigned int nbox;
#endif
......
......@@ -195,7 +195,7 @@ typedef struct {
unsigned int vc_format;
/* The current cliprects, or a subset thereof */
XF86DRIClipRectRec boxes[RADEON_NR_SAREA_CLIPRECTS];
drm_clip_rect_t boxes[RADEON_NR_SAREA_CLIPRECTS];
unsigned int nbox;
/* Counters for throttling of rendering clients */
......
......@@ -15,7 +15,7 @@ XCOMM
#if BuildXF86DRI /* || BuildXF86DRIDriverSupport -- does not currently work */
DRISRC=glint_dri.c
DRIOBJ=glint_dri.o
DRIINCLUDES=-I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri
DRIINCLUDES=-I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(DRMSRCDIR)/shared
DRIDEFINES=$(GLX_DEFINES)
#endif
......
......@@ -26,7 +26,7 @@ I830DRIOBJS = i830_dri.o
DRISRCS = $(I810DRISRCS) $(I830DRISRCS)
DRIOBJS = $(I810DRIOBJS) $(I830DRIOBJS)
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri \
-I$(XF86OSSRC)/linux/drm/kernel -I$(TOP)/include
-I$(XF86OSSRC)/linux/drm/kernel -I$(TOP)/include -I$(DRMSRCDIR)/shared
DRIDEFINES = $(GLX_DEFINES)
#endif
......
......@@ -79,7 +79,7 @@ typedef struct {
unsigned int dirty;
unsigned int nbox;
XF86DRIClipRectRec boxes[I810_NR_SAREA_CLIPRECTS];
drm_clip_rect_t boxes[I810_NR_SAREA_CLIPRECTS];
/* Maintain an LRU of contiguous regions of texture space. If
* you think you own a region of texture memory, and it has an
......
......@@ -83,7 +83,7 @@ typedef struct _I830SAREA {
unsigned int dirty;
unsigned int nbox;
XF86DRIClipRectRec boxes[I830_NR_SAREA_CLIPRECTS];
drm_clip_rect_t boxes[I830_NR_SAREA_CLIPRECTS];
/* Maintain an LRU of contiguous regions of texture space. If
* you think you own a region of texture memory, and it has an
......
......@@ -15,7 +15,7 @@ SUBDIRS=hallib
DRISRCS = mga_dri.c
DRIOBJS = mga_dri.o
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri \
-I$(TOP)/include
-I$(TOP)/include -I$(DRMSRCDIR)/shared
DRIDEFINES = $(GLX_DEFINES)
#endif
......
......@@ -176,7 +176,7 @@ typedef struct {
/* The current cliprects, or a subset thereof.
*/
XF86DRIClipRectRec boxes[MGA_NR_SAREA_CLIPRECTS];
drm_clip_rect_t boxes[MGA_NR_SAREA_CLIPRECTS];
unsigned int nbox;
/* Information about the most recently used 3d drawable. The
......@@ -197,7 +197,7 @@ typedef struct {
unsigned int exported_nback;
int exported_back_x, exported_front_x, exported_w;
int exported_back_y, exported_front_y, exported_h;
XF86DRIClipRectRec exported_boxes[MGA_NR_SAREA_CLIPRECTS];
drm_clip_rect_t exported_boxes[MGA_NR_SAREA_CLIPRECTS];
/* Counters for aging textures and for client-side throttling.
*/
......
......@@ -29,7 +29,7 @@
DRISRCS = savage_dri.c
DRIOBJS = savage_dri.o
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(LIBSRC)/GL/dri/drm \
-I$(XF86OSSRC)/linux/drm/kernel -I$(TOP)/include
-I$(XF86OSSRC)/linux/drm/kernel -I$(TOP)/include -I$(DRMSRCDIR)/shared
DRIDEFINES = $(GLX_DEFINES)
#endif
......
......@@ -16,7 +16,7 @@ XCOMM
DRISRCS = sis_dri.c
DRIOBJS = sis_dri.o
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri \
-I$(XTOP)/include
-I$(XTOP)/include -I$(DRMSRCDIR)/shared
DRIDEFINES = $(GLX_DEFINES)
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment