Centralize renderer limitations for non-conformant renderers
Some renderer configurations (e.g. D3D11 Feature Level 9_3) have
some limitations and aren't quite conformant. This change
generates errors when applications hit these limitations, and
informs developers that they must work around them.
BUG=angleproject:1055
Change-Id: I6a4a9e5cc71288ca366a54c769ca0eb82e79a7f7
Reviewed-on: https://chromium-review.googlesource.com/282814
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/gl_tests/GLSLTest.cpp b/src/tests/gl_tests/GLSLTest.cpp
index 0d579e5..470f20d 100644
--- a/src/tests/gl_tests/GLSLTest.cpp
+++ b/src/tests/gl_tests/GLSLTest.cpp
@@ -553,15 +553,6 @@
{
EGLPlatformParameters platform = GetParam().eglParameters;
- // Disable this test on D3D11 feature level 9_3, since gl_FrontFacing isn't supported.
- if (platform.renderer == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
- {
- if (platform.majorVersion == 9 && platform.minorVersion == 3)
- {
- return;
- }
- }
-
const std::string vertexShaderSource = SHADER_SOURCE
(
attribute vec4 a_position;
@@ -594,6 +585,18 @@
);
GLuint program = CompileProgram(vertexShaderSource, fragmentShaderSource);
+
+ // Compilation should fail on D3D11 feature level 9_3, since gl_FrontFacing isn't supported.
+ if (platform.renderer == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
+ {
+ if (platform.majorVersion == 9 && platform.minorVersion == 3)
+ {
+ EXPECT_EQ(0u, program);
+ return;
+ }
+ }
+
+ // Otherwise, compilation should succeed
EXPECT_NE(0u, program);
}