Update majority of unittests to use RenderPipelineDescriptor2

Bug: dawn:642
Change-Id: I437967f590e03b7d85d7eda28400db9e3e5d0745
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44820
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Brandon Jones
2021-03-17 17:48:59 +00:00
committed by Commit Bot service account
parent 6f9bc3ac2c
commit 6e5d47a396
14 changed files with 247 additions and 238 deletions

View File

@@ -208,4 +208,11 @@ namespace utils {
}
}
wgpu::DepthStencilState* ComboRenderPipelineDescriptor2::EnableDepthStencil(
wgpu::TextureFormat format) {
this->depthStencil = &cDepthStencil;
cDepthStencil.format = format;
return &cDepthStencil;
}
} // namespace utils

View File

@@ -64,13 +64,18 @@ namespace utils {
ComboRenderPipelineDescriptor2(ComboRenderPipelineDescriptor2&&) = delete;
ComboRenderPipelineDescriptor2& operator=(ComboRenderPipelineDescriptor2&&) = delete;
wgpu::DepthStencilState* EnableDepthStencil(
wgpu::TextureFormat format = wgpu::TextureFormat::Depth24PlusStencil8);
std::array<wgpu::VertexBufferLayout, kMaxVertexBuffers> cBuffers;
std::array<wgpu::VertexAttribute, kMaxVertexAttributes> cAttributes;
std::array<wgpu::ColorTargetState, kMaxColorAttachments> cTargets;
std::array<wgpu::BlendState, kMaxColorAttachments> cBlends;
wgpu::DepthStencilState cDepthStencil;
wgpu::FragmentState cFragment;
private:
wgpu::DepthStencilState cDepthStencil;
};
} // namespace utils