mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 16:16:08 +00:00
Use C++17 structure bindings instead of some std::tie
Not all std::tie can be replaced because structured binding introduces references names and cannot bind member variables. Bug: dawn:824 Change-Id: Ie2b45834aac72fb063d4aaea5949a53457bc73c9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75068 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
a4357a7619
commit
1c49d1b43b
@@ -1916,9 +1916,7 @@ class SetBindGroupPersistenceValidationTest : public ValidationTest {
|
||||
|
||||
// Test it is valid to set bind groups before setting the pipeline.
|
||||
TEST_F(SetBindGroupPersistenceValidationTest, BindGroupBeforePipeline) {
|
||||
std::vector<wgpu::BindGroupLayout> bindGroupLayouts;
|
||||
wgpu::RenderPipeline pipeline;
|
||||
std::tie(bindGroupLayouts, pipeline) = SetUpLayoutsAndPipeline({{
|
||||
auto [bindGroupLayouts, pipeline] = SetUpLayoutsAndPipeline({{
|
||||
{{
|
||||
wgpu::BufferBindingType::Uniform,
|
||||
wgpu::BufferBindingType::Uniform,
|
||||
@@ -1957,9 +1955,7 @@ TEST_F(SetBindGroupPersistenceValidationTest, BindGroupBeforePipeline) {
|
||||
// Test that it is valid to draw with bind groups that are not "inherited". They persist
|
||||
// after a pipeline change.
|
||||
TEST_F(SetBindGroupPersistenceValidationTest, NotVulkanInheritance) {
|
||||
std::vector<wgpu::BindGroupLayout> bindGroupLayoutsA;
|
||||
wgpu::RenderPipeline pipelineA;
|
||||
std::tie(bindGroupLayoutsA, pipelineA) = SetUpLayoutsAndPipeline({{
|
||||
auto [bindGroupLayoutsA, pipelineA] = SetUpLayoutsAndPipeline({{
|
||||
{{
|
||||
wgpu::BufferBindingType::Uniform,
|
||||
wgpu::BufferBindingType::Storage,
|
||||
@@ -1970,9 +1966,7 @@ TEST_F(SetBindGroupPersistenceValidationTest, NotVulkanInheritance) {
|
||||
}},
|
||||
}});
|
||||
|
||||
std::vector<wgpu::BindGroupLayout> bindGroupLayoutsB;
|
||||
wgpu::RenderPipeline pipelineB;
|
||||
std::tie(bindGroupLayoutsB, pipelineB) = SetUpLayoutsAndPipeline({{
|
||||
auto [bindGroupLayoutsB, pipelineB] = SetUpLayoutsAndPipeline({{
|
||||
{{
|
||||
wgpu::BufferBindingType::Storage,
|
||||
wgpu::BufferBindingType::Uniform,
|
||||
|
||||
Reference in New Issue
Block a user