Bug 1250710 - ANGLE ES2 still requires HALF_FLOAT for ReadPixels, not HALF_FLOAT_OES. - r=jrmuizel
MozReview-Commit-ID: JwrigS3yNTJ
--- a/dom/canvas/WebGLContextGL.cpp
+++ b/dom/canvas/WebGLContextGL.cpp
@@ -1237,17 +1237,18 @@ WebGLContext::DoReadPixelsAndConvert(con
if (gl->WorkAroundDriverBugs() &&
gl->IsANGLE() &&
gl->Version() < 300 && // ANGLE ES2 doesn't support HALF_FLOAT reads properly.
IsNeedsANGLEWorkAround(srcFormat))
{
MOZ_RELEASE_ASSERT(!IsWebGL2()); // No SKIP_PIXELS, etc.
MOZ_ASSERT(!mBoundPixelPackBuffer); // Let's be real clear.
- const GLenum readType = LOCAL_GL_HALF_FLOAT_OES;
+ // You'd think ANGLE would want HALF_FLOAT_OES, but it rejects that.
+ const GLenum readType = LOCAL_GL_HALF_FLOAT;
const char funcName[] = "readPixels";
const auto readBytesPerPixel = webgl::BytesPerPixel({format, readType});
const auto destBytesPerPixel = webgl::BytesPerPixel({format, destType});
uint32_t readStride;
uint32_t readByteCount;
uint32_t destStride;