summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-04-04 16:54:00 -0700
committerIan Romanick <[email protected]>2010-04-04 16:54:00 -0700
commit4fb2daf42c8171579cdc18605c5ceeb1963f8b31 (patch)
treeda534f83de94161df440986ad5e36df245291552 /src
parentad3575e2dd81252e9ea341d1a7355e0bfd1cccee (diff)
parentf66733e0773b4ec794438dd2422aeb28a791adda (diff)
Merge branch '7.8'
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_atomic.h2
-rw-r--r--src/gallium/state_trackers/vega/Makefile5
-rw-r--r--src/glx/dri2_glx.c4
-rw-r--r--src/glx/glxcmds.c62
4 files changed, 65 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_atomic.h b/src/gallium/auxiliary/util/u_atomic.h
index 3c42477ad4f..a1568233906 100644
--- a/src/gallium/auxiliary/util/u_atomic.h
+++ b/src/gallium/auxiliary/util/u_atomic.h
@@ -29,7 +29,7 @@
#define PIPE_ATOMIC_ASM_MSVC_X86
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
#define PIPE_ATOMIC_ASM_GCC_X86
-#elif defined(PIPE_CC_GCC)
+#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
#define PIPE_ATOMIC_GCC_INTRINSIC
#else
#error "Unsupported platform"
diff --git a/src/gallium/state_trackers/vega/Makefile b/src/gallium/state_trackers/vega/Makefile
index 7c315de8271..8b5a31cf315 100644
--- a/src/gallium/state_trackers/vega/Makefile
+++ b/src/gallium/state_trackers/vega/Makefile
@@ -43,7 +43,8 @@ VG_SOURCES = \
VG_OBJECTS = $(VG_SOURCES:.c=.o)
-VG_LIBS = $(GALLIUM_AUXILIARIES) -lm
+VG_LIBS = $(GALLIUM_AUXILIARIES)
+VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lm
### Include directories
@@ -65,7 +66,7 @@ $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VG_OBJECTS) $(VG_LIBS)
-minor $(VG_MINOR) \
-patch $(VG_TINY) \
-install $(TOP)/$(LIB_DIR) \
- $(VG_OBJECTS) $(VG_LIBS)
+ $(VG_OBJECTS) $(VG_LIBS) $(VG_LIB_DEPS)
######################################################################
# Generic stuff
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 14788b89bea..c4b5cb9c2c4 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -329,7 +329,7 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
/* Old servers don't send invalidate events */
if (!pdp->invalidateAvailable)
- dri2InvalidateBuffers(priv->dpy, pdraw->base.xDrawable);
+ dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable);
dri2WaitGL(loaderPrivate);
}
@@ -393,7 +393,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
/* Old servers don't send invalidate events */
if (!pdp->invalidateAvailable)
- dri2InvalidateBuffers(dpyPriv->dpy, pdraw->xDrawable);
+ dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable);
/* Old servers can't handle swapbuffers */
if (!pdp->swapAvailable) {
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index ea267f3dd8a..7cdd42caf02 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -1917,6 +1917,7 @@ __glXSwapIntervalSGI(int interval)
#endif
psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen);
+#ifdef GLX_DIRECT_RENDERING
if (gc->driContext && psc->driScreen && psc->driScreen->setSwapInterval) {
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(gc->currentDpy,
gc->currentDrawable,
@@ -1924,6 +1925,7 @@ __glXSwapIntervalSGI(int interval)
psc->driScreen->setSwapInterval(pdraw, interval);
return 0;
}
+#endif
dpy = gc->currentDpy;
opcode = __glXSetupForCommand(dpy);
@@ -1974,6 +1976,7 @@ __glXSwapIntervalMESA(unsigned int interval)
}
#endif
+#ifdef GLX_DIRECT_RENDERING
if (gc != NULL && gc->driContext) {
__GLXscreenConfigs *psc;
@@ -1985,6 +1988,7 @@ __glXSwapIntervalMESA(unsigned int interval)
return 0;
}
}
+#endif
return GLX_BAD_CONTEXT;
}
@@ -2009,6 +2013,8 @@ __glXGetSwapIntervalMESA(void)
}
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (gc != NULL && gc->driContext) {
__GLXscreenConfigs *psc;
@@ -2019,6 +2025,7 @@ __glXGetSwapIntervalMESA(void)
return psc->driScreen->getSwapInterval(pdraw);
}
}
+#endif
return 0;
}
@@ -2135,13 +2142,22 @@ __glXGetVideoSyncSGI(unsigned int *count)
int ret;
GLXContext gc = __glXGetCurrentContext();
__GLXscreenConfigs *psc;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
+#endif
- if (!gc || !gc->driContext)
+ if (!gc)
return GLX_BAD_CONTEXT;
+#ifdef GLX_DIRECT_RENDERING
+ if (!gc->driContext)
+ return GLX_BAD_CONTEXT;
+#endif
+
psc = GetGLXScreenConfigs(gc->currentDpy, gc->screen);
+#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL);
+#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
@@ -2156,11 +2172,14 @@ __glXGetVideoSyncSGI(unsigned int *count)
return (ret == 0) ? 0 : GLX_BAD_CONTEXT;
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (psc->driScreen && psc->driScreen->getDrawableMSC) {
ret = psc->driScreen->getDrawableMSC(psc, pdraw, &ust, &msc, &sbc);
*count = (unsigned) msc;
return (ret == True) ? 0 : GLX_BAD_CONTEXT;
}
+#endif
return GLX_BAD_CONTEXT;
}
@@ -2170,18 +2189,27 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
{
GLXContext gc = __glXGetCurrentContext();
__GLXscreenConfigs *psc;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
+#endif
int64_t ust, msc, sbc;
int ret;
if (divisor <= 0 || remainder < 0)
return GLX_BAD_VALUE;
- if (!gc || !gc->driContext)
+ if (!gc)
return GLX_BAD_CONTEXT;
+#ifdef GLX_DIRECT_RENDERING
+ if (!gc->driContext)
+ return GLX_BAD_CONTEXT;
+#endif
+
psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen);
+#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL);
+#endif
#ifdef __DRI_MEDIA_STREAM_COUNTER
if (psc->msc != NULL && psc->driScreen ) {
@@ -2191,12 +2219,15 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
return (ret == 0) ? 0 : GLX_BAD_CONTEXT;
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (psc->driScreen && psc->driScreen->waitForMSC) {
ret = psc->driScreen->waitForMSC(pdraw, 0, divisor, remainder, &ust, &msc,
&sbc);
*count = (unsigned) msc;
return (ret == True) ? 0 : GLX_BAD_CONTEXT;
}
+#endif
return GLX_BAD_CONTEXT;
}
@@ -2354,13 +2385,17 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
{
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
int i, ret;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
+#endif
__GLXscreenConfigs *psc;
if (!priv)
return False;
+#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(dpy, drawable, &i);
+#endif
psc = &priv->screenConfigs[i];
#if defined(__DRI_SWAP_BUFFER_COUNTER) && defined(__DRI_MEDIA_STREAM_COUNTER)
@@ -2370,10 +2405,13 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
&& ((*psc->sbc->getSBC)(pdraw->driDrawable, sbc) == 0)
&& (__glXGetUST(ust) == 0) );
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc && psc->driScreen && psc->driScreen->getDrawableMSC) {
ret = psc->driScreen->getDrawableMSC(psc, pdraw, ust, msc, sbc);
return ret;
}
+#endif
return False;
}
@@ -2491,12 +2529,19 @@ __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
{
GLXContext gc = __glXGetCurrentContext();
int screen;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
+#endif
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
- if (!pdraw || !gc || !gc->driContext) /* no GLX for this */
+ if (!gc) /* no GLX for this */
return -1;
+#ifdef GLX_DIRECT_RENDERING
+ if (!pdraw || !gc->driContext)
+ return -1;
+#endif
+
/* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE
* error", but it also says "It [glXSwapBuffersMscOML] will return a value
* of -1 if the function failed because of errors detected in the input
@@ -2533,7 +2578,9 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
int64_t * msc, int64_t * sbc)
{
int screen;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
+#endif
__GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen );
int ret;
@@ -2557,11 +2604,14 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
return ((ret == 0) && (__glXGetUST(ust) == 0));
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc->driScreen && psc->driScreen->waitForMSC) {
ret = psc->driScreen->waitForMSC(pdraw, target_msc, divisor, remainder,
ust, msc, sbc);
return ret;
}
+#endif
return False;
}
@@ -2573,7 +2623,9 @@ __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
int64_t * msc, int64_t * sbc)
{
int screen;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
+#endif
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
int ret;
@@ -2593,10 +2645,14 @@ __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
return ((ret == 0) && (__glXGetUST(ust) == 0));
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc->driScreen && psc->driScreen->waitForSBC) {
ret = psc->driScreen->waitForSBC(pdraw, target_sbc, ust, msc, sbc);
return ret;
}
+#endif
+
return False;
}