~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to hw/xfree86/dri/xf86dri.c

Tags: 2:1.10.1-2
* Build xserver-xorg-core-udeb on hurd-i386.  Thanks, Samuel Thibault!
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
static int DRIErrorBase;
66
66
 
67
 
static DISPATCH_PROC(ProcXF86DRIQueryVersion);
68
 
static DISPATCH_PROC(ProcXF86DRIQueryDirectRenderingCapable);
69
 
static DISPATCH_PROC(ProcXF86DRIOpenConnection);
70
 
static DISPATCH_PROC(ProcXF86DRICloseConnection);
71
 
static DISPATCH_PROC(ProcXF86DRIGetClientDriverName);
72
 
static DISPATCH_PROC(ProcXF86DRICreateContext);
73
 
static DISPATCH_PROC(ProcXF86DRIDestroyContext);
74
 
static DISPATCH_PROC(ProcXF86DRICreateDrawable);
75
 
static DISPATCH_PROC(ProcXF86DRIDestroyDrawable);
76
 
static DISPATCH_PROC(ProcXF86DRIGetDrawableInfo);
77
 
static DISPATCH_PROC(ProcXF86DRIGetDeviceInfo);
78
 
static DISPATCH_PROC(ProcXF86DRIDispatch);
79
 
static DISPATCH_PROC(ProcXF86DRIAuthConnection);
80
67
 
81
 
static DISPATCH_PROC(SProcXF86DRIQueryVersion);
82
 
static DISPATCH_PROC(SProcXF86DRIQueryDirectRenderingCapable);
83
 
static DISPATCH_PROC(SProcXF86DRIDispatch);
84
68
 
85
69
static void XF86DRIResetProc(ExtensionEntry* extEntry);
86
70
 
88
72
 
89
73
extern void XFree86DRIExtensionInit(void);
90
74
 
91
 
void
92
 
XFree86DRIExtensionInit(void)
93
 
{
94
 
    ExtensionEntry* extEntry;
95
 
 
96
 
#ifdef XF86DRI_EVENTS
97
 
    EventType = CreateNewResourceType(XF86DRIFreeEvents, "DRIEvent");
98
 
#endif
99
 
 
100
 
    if (
101
 
        DRIExtensionInit() &&
102
 
#ifdef XF86DRI_EVENTS
103
 
        EventType && ScreenPrivateIndex != -1 &&
104
 
#endif
105
 
        (extEntry = AddExtension(XF86DRINAME,
106
 
                                 XF86DRINumberEvents,
107
 
                                 XF86DRINumberErrors,
108
 
                                 ProcXF86DRIDispatch,
109
 
                                 SProcXF86DRIDispatch,
110
 
                                 XF86DRIResetProc,
111
 
                                 StandardMinorOpcode))) {
112
 
        DRIReqCode = (unsigned char)extEntry->base;
113
 
        DRIErrorBase = extEntry->errorBase;
114
 
    }
115
 
}
116
 
 
117
75
/*ARGSUSED*/
118
76
static void
119
77
XF86DRIResetProc (
677
635
        return DRIErrorBase + XF86DRIClientNotLocal;
678
636
    }
679
637
}
 
638
 
 
639
void
 
640
XFree86DRIExtensionInit(void)
 
641
{
 
642
    ExtensionEntry* extEntry;
 
643
 
 
644
#ifdef XF86DRI_EVENTS
 
645
    EventType = CreateNewResourceType(XF86DRIFreeEvents, "DRIEvent");
 
646
#endif
 
647
 
 
648
    if (
 
649
        DRIExtensionInit() &&
 
650
#ifdef XF86DRI_EVENTS
 
651
        EventType && ScreenPrivateIndex != -1 &&
 
652
#endif
 
653
        (extEntry = AddExtension(XF86DRINAME,
 
654
                                 XF86DRINumberEvents,
 
655
                                 XF86DRINumberErrors,
 
656
                                 ProcXF86DRIDispatch,
 
657
                                 SProcXF86DRIDispatch,
 
658
                                 XF86DRIResetProc,
 
659
                                 StandardMinorOpcode))) {
 
660
        DRIReqCode = (unsigned char)extEntry->base;
 
661
        DRIErrorBase = extEntry->errorBase;
 
662
    }
 
663
}