gfx/angle/angle-instrinsic-msvc2005.patch
author Benoit Jacob <bjacob@mozilla.com>
Sat, 01 Oct 2011 00:03:10 -0400
changeset 79298 bf32d490e3bbb302cb250e47c29f982f84fc8f13
parent 71376 3a16f8065534117162ad45c50d01092e406b4f6e
child 111524 cad26d2fb5af799dfe030fd2a8948d617eac2f52
permissions -rw-r--r--
Bug 690735 - upgrade ANGLE to r774 - no review, just syncing with upstream This doesn't involve any Makefile change so should be relatively safe. This is needed for: * BUILTIN_FUNCTION_EMULATION (r773,774), blocker for 665578 * extensions validation in shaders (r745), blocker for 684853 * major performance improvements and bug fixes

# HG changeset patch
# Parent cf38970fcf3b4bee12f09b3747b7b7711bc77ad8
diff --git a/gfx/angle/angle-renaming-debug.patch b/gfx/angle/angle-renaming-debug.patch
--- a/gfx/angle/angle-renaming-debug.patch
+++ b/gfx/angle/angle-renaming-debug.patch
@@ -1,11 +1,10 @@
 # HG changeset patch
-# Parent 96359f46b01fdb37e791f564495e8b2755a05233
-
+# Parent 70640278da97b0ca49e21c4bb52766b8af7db4db
 diff --git a/gfx/angle/Makefile.in b/gfx/angle/Makefile.in
 --- a/gfx/angle/Makefile.in
 +++ b/gfx/angle/Makefile.in
 @@ -73,17 +73,17 @@ CPPSRCS = \
          parseConst.cpp \
          ParseHelper.cpp \
          PoolAlloc.cpp \
          QualifierAlive.cpp \
@@ -129,17 +128,17 @@ diff --git a/gfx/angle/src/compiler/comp
  
  #include <assert.h>
  
  #ifdef _DEBUG
  #define TRACE_ENABLED  // define to enable debug message tracing
 diff --git a/gfx/angle/src/compiler/osinclude.h b/gfx/angle/src/compiler/osinclude.h
 --- a/gfx/angle/src/compiler/osinclude.h
 +++ b/gfx/angle/src/compiler/osinclude.h
-@@ -32,17 +32,17 @@
+@@ -30,17 +30,17 @@
  #include <windows.h>
  #elif defined(ANGLE_OS_POSIX)
  #include <pthread.h>
  #include <semaphore.h>
  #include <errno.h>
  #endif  // ANGLE_USE_NSPR
  
  
diff --git a/gfx/angle/src/libGLESv2/Texture.cpp b/gfx/angle/src/libGLESv2/Texture.cpp
--- a/gfx/angle/src/libGLESv2/Texture.cpp
+++ b/gfx/angle/src/libGLESv2/Texture.cpp
@@ -8,16 +8,22 @@
 // Texture2D and TextureCubeMap. Implements GL texture objects and related
 // functionality. [OpenGL ES 2.0.24] section 3.7 page 63.
 
 #include "libGLESv2/Texture.h"
 
 #include <d3dx9tex.h>
 
 #include <algorithm>
+
+#if _MSC_VER <= 1400
+#define _interlockedbittestandreset _interlockedbittestandreset_NAME_CHANGED_TO_AVOID_MSVS2005_ERROR
+#define _interlockedbittestandset _interlockedbittestandset_NAME_CHANGED_TO_AVOID_MSVS2005_ERROR
+#endif
+
 #include <intrin.h>
 
 #include "common/debug.h"
 
 #include "libEGL/Display.h"
 
 #include "libGLESv2/main.h"
 #include "libGLESv2/mathutil.h"
diff --git a/gfx/angle/src/libGLESv2/mathutil.h b/gfx/angle/src/libGLESv2/mathutil.h
--- a/gfx/angle/src/libGLESv2/mathutil.h
+++ b/gfx/angle/src/libGLESv2/mathutil.h
@@ -3,16 +3,21 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 // mathutil.h: Math and bit manipulation functions.
 
 #ifndef LIBGLESV2_MATHUTIL_H_
 #define LIBGLESV2_MATHUTIL_H_
+
+#if _MSC_VER <= 1400
+#define _interlockedbittestandreset _interlockedbittestandreset_NAME_CHANGED_TO_AVOID_MSVS2005_ERROR
+#define _interlockedbittestandset _interlockedbittestandset_NAME_CHANGED_TO_AVOID_MSVS2005_ERROR
+#endif
 
 #include <intrin.h>
 #include <math.h>
 #include <windows.h>
 
 namespace gl
 {
 inline bool isPow2(int x)