Use GetBindGroupLayout in ColorStateTests
Bug: dawn:276
Change-Id: If5824bc4870f8842481f7b4012c47ad709395e57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14020
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/tests/end2end/ColorStateTests.cpp
index 4f5124f..ff1c851 100644
--- a/src/tests/end2end/ColorStateTests.cpp
+++ b/src/tests/end2end/ColorStateTests.cpp
@@ -37,13 +37,6 @@
}
)");
- bindGroupLayout = utils::MakeBindGroupLayout(
- device, {
- {0, wgpu::ShaderStage::Fragment, wgpu::BindingType::UniformBuffer},
- });
-
- pipelineLayout = utils::MakeBasicPipelineLayout(device, &bindGroupLayout);
-
renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
}
@@ -70,7 +63,6 @@
)");
utils::ComboRenderPipelineDescriptor baseDescriptor(device);
- baseDescriptor.layout = pipelineLayout;
baseDescriptor.vertexStage.module = vsModule;
baseDescriptor.cFragmentStage.module = fsModule;
baseDescriptor.cColorStates[0].format = renderPass.colorFormat;
@@ -78,7 +70,6 @@
basePipeline = device.CreateRenderPipeline(&baseDescriptor);
utils::ComboRenderPipelineDescriptor testDescriptor(device);
- testDescriptor.layout = pipelineLayout;
testDescriptor.vertexStage.module = vsModule;
testDescriptor.cFragmentStage.module = fsModule;
testDescriptor.cColorStates[0] = colorStateDescriptor;
@@ -102,7 +93,8 @@
wgpu::Buffer buffer =
utils::CreateBufferFromData(device, &data, bufferSize, wgpu::BufferUsage::Uniform);
- return utils::MakeBindGroup(device, bindGroupLayout, {{0, buffer, 0, bufferSize}});
+ return utils::MakeBindGroup(device, testPipeline.GetBindGroupLayout(0),
+ {{0, buffer, 0, bufferSize}});
}
// Test that after drawing a triangle with the base color, and then the given triangle spec, the
@@ -205,8 +197,6 @@
wgpu::RenderPipeline basePipeline;
wgpu::RenderPipeline testPipeline;
wgpu::ShaderModule vsModule;
- wgpu::BindGroupLayout bindGroupLayout;
- wgpu::PipelineLayout pipelineLayout;
};
namespace {
@@ -796,7 +786,6 @@
)");
utils::ComboRenderPipelineDescriptor baseDescriptor(device);
- baseDescriptor.layout = pipelineLayout;
baseDescriptor.vertexStage.module = vsModule;
baseDescriptor.cFragmentStage.module = fsModule;
baseDescriptor.colorStateCount = 4;
@@ -804,7 +793,6 @@
basePipeline = device.CreateRenderPipeline(&baseDescriptor);
utils::ComboRenderPipelineDescriptor testDescriptor(device);
- testDescriptor.layout = pipelineLayout;
testDescriptor.vertexStage.module = vsModule;
testDescriptor.cFragmentStage.module = fsModule;
testDescriptor.colorStateCount = 4;
@@ -898,7 +886,6 @@
)");
utils::ComboRenderPipelineDescriptor baseDescriptor(device);
- baseDescriptor.layout = pipelineLayout;
baseDescriptor.vertexStage.module = vsModule;
baseDescriptor.cFragmentStage.module = fsModule;
baseDescriptor.cColorStates[0].format = renderPass.colorFormat;
@@ -906,7 +893,6 @@
basePipeline = device.CreateRenderPipeline(&baseDescriptor);
utils::ComboRenderPipelineDescriptor testDescriptor(device);
- testDescriptor.layout = pipelineLayout;
testDescriptor.vertexStage.module = vsModule;
testDescriptor.cFragmentStage.module = fsModule;
testDescriptor.cColorStates[0].format = renderPass.colorFormat;
@@ -1022,7 +1008,6 @@
)");
utils::ComboRenderPipelineDescriptor baseDescriptor(device);
- baseDescriptor.layout = pipelineLayout;
baseDescriptor.vertexStage.module = vsModule;
baseDescriptor.cFragmentStage.module = fsModule;
baseDescriptor.cColorStates[0].format = renderPass.colorFormat;
@@ -1030,7 +1015,6 @@
basePipeline = device.CreateRenderPipeline(&baseDescriptor);
utils::ComboRenderPipelineDescriptor testDescriptor(device);
- testDescriptor.layout = pipelineLayout;
testDescriptor.vertexStage.module = vsModule;
testDescriptor.cFragmentStage.module = fsModule;
testDescriptor.cColorStates[0].format = renderPass.colorFormat;
diff --git a/src/utils/ComboRenderPipelineDescriptor.cpp b/src/utils/ComboRenderPipelineDescriptor.cpp
index 58c0e2d..5fa40c4 100644
--- a/src/utils/ComboRenderPipelineDescriptor.cpp
+++ b/src/utils/ComboRenderPipelineDescriptor.cpp
@@ -112,8 +112,6 @@
cDepthStencilState.stencilWriteMask = 0xff;
descriptor->depthStencilState = nullptr;
}
-
- descriptor->layout = utils::MakeBasicPipelineLayout(device, nullptr);
}
} // namespace utils