WebGL Compat: Add DEPTH_STENCIL attachments.
This is a special WebGL 1 binding point, that does not correspond to
any native functionality. Due to particularities in validation we
need to represent this with additional state in the Framebuffer.
WebGL 2 fixes this oddity by resolving to the GLES 3 native spec.
In order to pass the WebGL framebuffer objects test, we will also
need a chromium-side CL to work with the additional state tracking
it does in the blink layer, and an additional patch to ANGLE to
clear the depth buffer before the first use (robust resource init).
BUG=angleproject:1708
Change-Id: I111f8f5a451cce7de6cf281a6bc335b92dd2daf2
Reviewed-on: https://chromium-review.googlesource.com/444095
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/queryutils.cpp b/src/libANGLE/queryutils.cpp
index 3bd6e0a..6e87b53 100644
--- a/src/libANGLE/queryutils.cpp
+++ b/src/libANGLE/queryutils.cpp
@@ -628,8 +628,7 @@
break;
case GL_RENDERBUFFER_INTERNAL_FORMAT:
// Special case the WebGL 1 DEPTH_STENCIL format.
- if (context->getExtensions().webglCompatibility &&
- context->getClientMajorVersion() == 2 &&
+ if (context->isWebGL1() &&
renderbuffer->getFormat().info->internalFormat == GL_DEPTH24_STENCIL8)
{
*params = GL_DEPTH_STENCIL;