Use a Caps structure to store extension and texture format support.
Removes support for fallbacks in D3D9 texture formats. The fallback
formats did not work properly anyways.
BUG=angle:658
Change-Id: Idfa5183bf71fd8ebf4608f940f9d93177b9eff08
Reviewed-on: https://chromium-review.googlesource.com/200813
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/validationES3.cpp b/src/libGLESv2/validationES3.cpp
index a45a5a3..9e71731 100644
--- a/src/libGLESv2/validationES3.cpp
+++ b/src/libGLESv2/validationES3.cpp
@@ -1,6 +1,6 @@
#include "precompiled.h"
//
-// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2013-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -191,9 +191,9 @@
{
// Note: dEQP 2013.4 expects an INVALID_VALUE error for TexImage3D with an invalid
// internal format. (dEQP-GLES3.functional.negative_api.texture.teximage3d)
- if (!gl::IsValidInternalFormat(actualInternalFormat, context) ||
- !gl::IsValidFormat(format, clientVersion) ||
- !gl::IsValidType(type, clientVersion))
+ if (!gl::IsValidInternalFormat(actualInternalFormat, context->getCaps().extensions, context->getClientVersion()) ||
+ !gl::IsValidFormat(format, context->getClientVersion()) ||
+ !gl::IsValidType(type, context->getClientVersion()))
{
return gl::error(GL_INVALID_ENUM, false);
}
@@ -437,7 +437,7 @@
return gl::error(GL_INVALID_OPERATION, false);
}
- if (!gl::IsValidInternalFormat(internalformat, context))
+ if (!gl::IsValidInternalFormat(internalformat, context->getCaps().extensions, context->getClientVersion()))
{
return gl::error(GL_INVALID_ENUM, false);
}
@@ -678,7 +678,7 @@
break;
case GL_RG_EXT:
case GL_RED_EXT:
- if (!context->supportsRGTextures())
+ if (!context->getCaps().extensions.textureRG)
{
return false;
}