ProgramD3D: only broadcast when the GL_EXT_draw_buffers is enabled
The behavior is undefined in GL ES when multiple attachments are used
with gl_FragColor but WebGL clarifies that:
- If the extension is enabled, broadcast happens
- If the extension isn't enabled, only the first attachment is written
BUG=angleproject:2048
Change-Id: I6d85ba91df77d42fb8863a03f1faa006cd7817bf
Reviewed-on: https://chromium-review.googlesource.com/523809
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/tests/gl_tests/WebGLCompatibilityTest.cpp b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
index 1036bfe..874eb38 100644
--- a/src/tests/gl_tests/WebGLCompatibilityTest.cpp
+++ b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
@@ -2610,9 +2610,11 @@
// Tests the WebGL removal of undefined behavior when attachments aren't written to.
TEST_P(WebGLCompatibilityTest, DrawBuffers)
{
- if (IsD3D9() || IsD3D11())
+ // TODO(cwallez) AMD incorrectly write black to the first render target when the HLSL pixel
+ // shader doesn't write anything to the ouput.
+ if (IsD3D11() && IsAMD())
{
- std::cout << "Test skipped on " << GetParam() << std::endl;
+ std::cout << "Test skipped on AMD " << GetParam() << std::endl;
return;
}