Bug 1273752 - Replace GL_VERTEX_PROGRAM_POINT_SIZE with GL_PROGRAM_POINT_SIZE. r=jgilbert
MozReview-Commit-ID: 7GO5SwgnI8j
--- a/dom/canvas/WebGLContextValidate.cpp
+++ b/dom/canvas/WebGLContextValidate.cpp
@@ -863,29 +863,21 @@ WebGLContext::InitAndValidateGL(FailureR
mGLMaxVaryingVectors = 16;
// 16 = 64/4, and 64 is the min value for
// maxVertexOutputComponents in the OpenGL 3.2 spec.
}
}
}
if (gl->IsCompatibilityProfile()) {
- // gl_PointSize is always available in ES2 GLSL, but has to be
- // specifically enabled on desktop GLSL.
- gl->fEnable(LOCAL_GL_VERTEX_PROGRAM_POINT_SIZE);
+ gl->fEnable(LOCAL_GL_POINT_SPRITE);
+ }
- /* gl_PointCoord is always available in ES2 GLSL and in newer desktop
- * GLSL versions, but apparently not in OpenGL 2 and apparently not (due
- * to a driver bug) on certain NVIDIA setups. See:
- * http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=261472
- *
- * Note that this used to cause crashes on old ATI drivers... Hopefully
- * not a significant anymore. See bug 602183.
- */
- gl->fEnable(LOCAL_GL_POINT_SPRITE);
+ if (!gl->IsGLES()) {
+ gl->fEnable(LOCAL_GL_PROGRAM_POINT_SIZE);
}
#ifdef XP_MACOSX
if (gl->WorkAroundDriverBugs() &&
gl->Vendor() == gl::GLVendor::ATI &&
!nsCocoaFeatures::IsAtLeastVersion(10,9))
{
// The Mac ATI driver, in all known OSX version up to and including