Commit 2a20562f by Jamie Madill

Fix depth texture validation in ES2 contexts.

We were checking for extra conditions that apply to ES3 within all ES2 contexts, causing the webgl depth texture conformance test to fail. BUG=angle:550 Change-Id: Iae9a4880b9efc6be8c6857bce27a47d42fecc23a Reviewed-on: https://chromium-review.googlesource.com/186122Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 7ea42a55
...@@ -781,7 +781,8 @@ bool Texture2D::isSamplerComplete(const SamplerState &samplerState) const ...@@ -781,7 +781,8 @@ bool Texture2D::isSamplerComplete(const SamplerState &samplerState) const
// depth and stencil format (see table 3.13), the value of TEXTURE_COMPARE_- // depth and stencil format (see table 3.13), the value of TEXTURE_COMPARE_-
// MODE is NONE, and either the magnification filter is not NEAREST or the mini- // MODE is NONE, and either the magnification filter is not NEAREST or the mini-
// fication filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST. // fication filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST.
if (gl::GetDepthBits(getInternalFormat(0), mRenderer->getCurrentClientVersion()) > 0) if (gl::GetDepthBits(getInternalFormat(0), mRenderer->getCurrentClientVersion()) > 0 &&
mRenderer->getCurrentClientVersion() > 2)
{ {
if (mSamplerState.compareMode == GL_NONE) if (mSamplerState.compareMode == GL_NONE)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment