b=628800; [webgl] VALIDATE_STATUS should always be 1 on MacOS X; r=bjacob, a=b
authorVladimir Vukicevic <vladimir@pobox.com>
Tue, 25 Jan 2011 14:23:55 -0800
changeset 61294 c0e58545ce43c858b6a82187f163473259e519e7
parent 61293 44ab59b32b35228d3ae3dcf56ec0432329bed13d
child 61295 d0a4c07f4a4082106ee9cf020f20fd227feb1743
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersbjacob, b
bugs628800
milestone2.0b11pre
b=628800; [webgl] VALIDATE_STATUS should always be 1 on MacOS X; r=bjacob, a=b
content/canvas/src/WebGLContextGL.cpp
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -2080,17 +2080,28 @@ WebGLContext::GetProgramParameter(nsIWeb
             wrval->SetAsInt32(i);
         }
             break;
         case LOCAL_GL_DELETE_STATUS:
         case LOCAL_GL_LINK_STATUS:
         case LOCAL_GL_VALIDATE_STATUS:
         {
             GLint i = 0;
+#ifdef XP_MACOSX
+            if (pname == LOCAL_GL_VALIDATE_STATUS &&
+                gl->Vendor() == gl::GLContext::VendorNVIDIA)
+            {
+                // See comment in ValidateProgram below.
+                i = 1;
+            } else {
+                gl->fGetProgramiv(progname, pname, &i);
+            }
+#else
             gl->fGetProgramiv(progname, pname, &i);
+#endif
             wrval->SetAsBool(PRBool(i));
         }
             break;
 
         default:
             return ErrorInvalidEnumInfo("GetProgramParameter: parameter", pname);
     }