Enabling sampleMask usage in RenderPipelineMTL

Added the sampleMask functionality in Metal.

Bug: dawn:491
Change-Id: Id4a14d0cc715dc701c6f29e4588ce327c5b26cba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25481
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Tomek Ponitka <tommek@google.com>
This commit is contained in:
Tomek Ponitka
2020-07-29 08:19:59 +00:00
committed by Commit Bot service account
parent bce1cbd0e2
commit 225a2b46b0
4 changed files with 16 additions and 23 deletions

View File

@@ -534,9 +534,6 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DArrayTexture) {
// Test using one multisampled color attachment with resolve target can render correctly
// with a non-default sample mask.
TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithSampleMask) {
// TODO(dawn:491): Remove this condition after enabling sampleMask usage in Metal.
DAWN_SKIP_TEST_IF(IsMetal());
constexpr bool kTestDepth = false;
// The second and third samples are included,
// only the second one is covered by the triangle.
@@ -567,9 +564,6 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithSampleMask) {
// Test using one multisampled color attachment with resolve target can render correctly
// with the final sample mask empty.
TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithEmptyFinalSampleMask) {
// TODO(dawn:491): Remove this condition after enabling sampleMask usage in Metal.
DAWN_SKIP_TEST_IF(IsMetal());
constexpr bool kTestDepth = false;
// The third and fourth samples are included,
// none of which is covered by the triangle.
@@ -600,9 +594,6 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithEmptyFinalSampleMask)
// Test doing MSAA resolve into multiple resolve targets works correctly with a non-default sample
// mask.
TEST_P(MultisampledRenderingTest, ResolveIntoMultipleResolveTargetsWithSampleMask) {
// TODO(dawn:491): Remove this condition after enabling sampleMask usage in Metal.
DAWN_SKIP_TEST_IF(IsMetal());
wgpu::TextureView multisampledColorView2 =
CreateTextureForOutputAttachment(kColorFormat, kSampleCount).CreateView();
wgpu::Texture resolveTexture2 = CreateTextureForOutputAttachment(kColorFormat, 1);
@@ -641,9 +632,6 @@ TEST_P(MultisampledRenderingTest, ResolveIntoMultipleResolveTargetsWithSampleMas
// Test multisampled rendering with depth test works correctly with a non-default sample mask.
TEST_P(MultisampledRenderingTest, MultisampledRenderingWithDepthTestAndSampleMask) {
// TODO(dawn:491): Remove this condition after enabling sampleMask usage in Metal.
DAWN_SKIP_TEST_IF(IsMetal());
// TODO(dawn:491): Find out why this test doesn't work on Windows Intel Vulkan.
DAWN_SKIP_TEST_IF(IsWindows() && IsIntel() && IsVulkan());
@@ -707,9 +695,6 @@ TEST_P(MultisampledRenderingTest, MultisampledRenderingWithDepthTestAndSampleMas
// Test using one multisampled color attachment with resolve target can render correctly
// with non-default sample mask and shader-output mask.
TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithSampleMaskAndShaderOutputMask) {
// TODO(dawn:491): Remove this condition after enabling sampleMask usage in Metal.
DAWN_SKIP_TEST_IF(IsMetal());
// TODO(dawn:491): Remove this when SPIRV-cross adds support for SV_Coverage in HLSL.
DAWN_SKIP_TEST_IF(IsD3D12());