Widen color state support on ES.

Indexed draw buffer (color state) support on ES is not core until 3.2.
Previously, we were failing (asserting) if color state was changed for
a non-zero attachment. This CL compares the state, and only asserts if the
color state actually differs per-attachment.

It also implements a disable_indexed_draw_buffers toggle, which allows a
test to check for the functionality in a platform-independent manner.

BUG=dawn:580, dawn:582

Change-Id: I11c67b0dd72f73e7302c06cad24e8a268fb37a76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34981
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Stephen White
2020-12-07 19:31:03 +00:00
committed by Commit Bot service account
parent 1ae024ce56
commit 042184128e
5 changed files with 69 additions and 38 deletions

View File

@@ -747,6 +747,8 @@ TEST_P(ColorStateTest, ColorWriteMaskBlendingDisabled) {
TEST_P(ColorStateTest, IndependentColorState) {
DAWN_SKIP_TEST_IF(IsWindows() && IsVulkan() && IsIntel());
DAWN_SKIP_TEST_IF(HasToggleEnabled("disable_indexed_draw_buffers"));
std::array<wgpu::Texture, 4> renderTargets;
std::array<wgpu::TextureView, 4> renderTargetViews;