mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Enabling alphaToCoverage
Added the alphaToCoverage functionality with some end2end tests. There is no validation for disabling alphaToCoverage mode if SV_Coverage is statically used by the shader yet. Bug: dawn:494 Change-Id: I9df15b35697ea05a064b092edae9d5d20f73c4d8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25761 Commit-Queue: Tomek Ponitka <tommek@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
9ecb99344f
commit
ab04da48f4
@@ -367,6 +367,30 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
|
||||
}
|
||||
}
|
||||
|
||||
// Tests that the sample count of the render pipeline must be valid
|
||||
// when the alphaToCoverage mode is enabled.
|
||||
TEST_F(RenderPipelineValidationTest, AlphaToCoverageAndSampleCount) {
|
||||
{
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.sampleCount = 4;
|
||||
descriptor.alphaToCoverageEnabled = true;
|
||||
|
||||
device.CreateRenderPipeline(&descriptor);
|
||||
}
|
||||
|
||||
{
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.sampleCount = 1;
|
||||
descriptor.alphaToCoverageEnabled = true;
|
||||
|
||||
ASSERT_DEVICE_ERROR(device.CreateRenderPipeline(&descriptor));
|
||||
}
|
||||
}
|
||||
|
||||
// Tests that the texture component type in shader must match the bind group layout.
|
||||
TEST_F(RenderPipelineValidationTest, TextureComponentTypeCompatibility) {
|
||||
constexpr uint32_t kNumTextureComponentType = 3u;
|
||||
|
||||
Reference in New Issue
Block a user