From e1c2f5d7afbd29dfb6f1e24589e13729ac71a2a7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 15 Jan 2009 09:31:55 -0800 Subject: Fix invarient state emits for DRI2 (do it per batch, since there's no lock). (cherry picked from commit cab5b7a7b0e17414f98b2363b0961c87f32f9c05) --- configure.ac | 2 +- src/i830_batchbuffer.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bb69f726..249e9a93 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,7 @@ if test "x$GCC" = "xyes"; then -Wnested-externs -fno-strict-aliasing" fi -PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.3]) +PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.0]) AM_CONDITIONAL(DRI, test x$DRI = xyes) if test "$DRI" = yes; then PKG_CHECK_MODULES(DRI, [xf86driproto glproto]) diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c index b1c8a8de..671e8c87 100644 --- a/src/i830_batchbuffer.c +++ b/src/i830_batchbuffer.c @@ -117,6 +117,12 @@ intel_next_batch(ScrnInfoPtr pScrn) pI830->batch_used = 0; pI830->batch_ptr = pI830->batch_bo->virtual; + + /* If we are using DRI2, we don't know when another client has executed, + * so we have to reinitialize our 3D state per batch. + */ + if (pI830->directRenderingType == DRI_DRI2) + *pI830->last_3d = LAST_3D_OTHER; } void -- cgit v1.2.3