Mesa (master): dri: Fix i965 build

Chad Versace chadversary at kemper.freedesktop.org
Sun Dec 2 01:09:58 UTC 2012


Module: Mesa
Branch: master
Commit: e5f1f8d52e6bfdf087f930425eb5092f52a29940
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e5f1f8d52e6bfdf087f930425eb5092f52a29940

Author: Chad Versace <chad.versace at linux.intel.com>
Date:   Sat Dec  1 17:03:59 2012 -0800

dri: Fix i965 build

The following commit broke the i965 build:

    commit 4a486f8bf2ca3d88228f8313282289abe78bc2f8
    Author: Marek Olšák <maraeo at gmail.com>
    Date:   Fri Nov 23 18:31:42 2012 +0100

    glx/dri2: add and use new driver hook flush_with_flags

That commit added a forward declaration of enum __DRI2throttleReason to
dri_interface.h. C++ 98 does not allow forward declarations of enums.

The fix: Move the enum's definition to earlier in the file.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>

---

 include/GL/internal/dri_interface.h |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 718b53b..568581d 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -272,7 +272,11 @@ struct __DRItexBufferExtensionRec {
 #define __DRI2_FLUSH_DRAWABLE (1 << 0) /* the drawable should be flushed. */
 #define __DRI2_FLUSH_CONTEXT  (1 << 1) /* glFlush should be called */
 
-enum __DRI2throttleReason;
+enum __DRI2throttleReason {
+   __DRI2_THROTTLE_SWAPBUFFER,
+   __DRI2_THROTTLE_COPYSUBBUFFER,
+   __DRI2_THROTTLE_FLUSHFRONT
+};
 
 struct __DRI2flushExtensionRec {
     __DRIextension base;
@@ -319,12 +323,6 @@ struct __DRI2flushExtensionRec {
 #define __DRI2_THROTTLE "DRI2_Throttle"
 #define __DRI2_THROTTLE_VERSION 1
 
-enum __DRI2throttleReason {
-   __DRI2_THROTTLE_SWAPBUFFER,
-   __DRI2_THROTTLE_COPYSUBBUFFER,
-   __DRI2_THROTTLE_FLUSHFRONT
-};
-
 struct __DRI2throttleExtensionRec {
    __DRIextension base;
    void (*throttle)(__DRIcontext *ctx,




More information about the mesa-commit mailing list