{
xGLXVendorPrivateReq *req;
struct glx_context *gc = __glXGetCurrentContext();
+#ifdef GLX_DIRECT_RENDERING
struct glx_screen *psc;
+#endif
Display *dpy;
CARD32 *interval_ptr;
CARD8 opcode;
return GLX_BAD_VALUE;
}
+#ifdef GLX_DIRECT_RENDERING
psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen);
-#ifdef GLX_DIRECT_RENDERING
if (gc->isDirect && psc && psc->driScreen &&
psc->driScreen->setSwapInterval) {
__GLXDRIdrawable *pdraw =
static int
__glXGetVideoSyncSGI(unsigned int *count)
{
+#ifdef GLX_DIRECT_RENDERING
int64_t ust, msc, sbc;
int ret;
struct glx_context *gc = __glXGetCurrentContext();
struct glx_screen *psc;
-#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
-#endif
if (gc == &dummyContext)
return GLX_BAD_CONTEXT;
-#ifdef GLX_DIRECT_RENDERING
if (!gc->isDirect)
return GLX_BAD_CONTEXT;
-#endif
psc = GetGLXScreenConfigs(gc->currentDpy, gc->screen);
-#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
-#endif
/* FIXME: Looking at the GLX_SGI_video_sync spec in the extension registry,
* FIXME: there should be a GLX encoding for this call. I can find no
* FIXME: documentation for the GLX encoding.
*/
-#ifdef GLX_DIRECT_RENDERING
if (psc && psc->driScreen && psc->driScreen->getDrawableMSC) {
ret = psc->driScreen->getDrawableMSC(psc, pdraw, &ust, &msc, &sbc);
*count = (unsigned) msc;
__glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
{
struct glx_context *gc = __glXGetCurrentContext();
- struct glx_screen *psc;
#ifdef GLX_DIRECT_RENDERING
+ struct glx_screen *psc;
__GLXDRIdrawable *pdraw;
-#endif
int64_t ust, msc, sbc;
int ret;
+#endif
if (divisor <= 0 || remainder < 0)
return GLX_BAD_VALUE;
#ifdef GLX_DIRECT_RENDERING
if (!gc->isDirect)
return GLX_BAD_CONTEXT;
-#endif
psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen);
-#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
-#endif
-#ifdef GLX_DIRECT_RENDERING
if (psc && psc->driScreen && psc->driScreen->waitForMSC) {
ret = psc->driScreen->waitForMSC(pdraw, 0, divisor, remainder, &ust, &msc,
&sbc);
int64_t * ust, int64_t * msc, int64_t * sbc)
{
struct glx_display * const priv = __glXInitialize(dpy);
- int ret;
#ifdef GLX_DIRECT_RENDERING
+ int ret;
__GLXDRIdrawable *pdraw;
-#endif
struct glx_screen *psc;
+#endif
if (!priv)
return False;
print('#define %s %d' % (func.opcode_vendor_name(name), func.glx_vendorpriv))
print('%s gl%s(%s)' % (func.return_type, func_name, func.get_parameter_string()))
print('{')
- print(' struct glx_context * const gc = __glXGetCurrentContext();')
- print('')
print('#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)')
- print(' if (gc->isDirect) {')
+ print(' if (((struct glx_context *)__glXGetCurrentContext())->isDirect) {')
print(' const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();')
print(' PFNGL%sPROC p =' % (name.upper()))
print(' (PFNGL%sPROC) disp_table[%d];' % (name.upper(), func.offset))