From 476a14a7cc52eb573ff435c60ba5dd3dd2aba2ef Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Tue, 3 Dec 2019 21:18:05 +0000 Subject: [PATCH] Use GetBindGroupLayout in MultisampledRenderingTests Bug: dawn:276 Change-Id: I31e879a9e4ed7cc7ccbb882502942302dfd19bb4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14028 Commit-Queue: Austin Eng Reviewed-by: Corentin Wallez Reviewed-by: Kai Ninomiya --- src/tests/end2end/MultisampledRenderingTests.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/tests/end2end/MultisampledRenderingTests.cpp b/src/tests/end2end/MultisampledRenderingTests.cpp index 1097391059..6c9d644da3 100644 --- a/src/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/tests/end2end/MultisampledRenderingTests.cpp @@ -106,7 +106,7 @@ class MultisampledRenderingTest : public DawnTest { uint32_t uniformDataSize) { wgpu::Buffer uniformBuffer = utils::CreateBufferFromData( device, uniformData, uniformDataSize, wgpu::BufferUsage::Uniform); - wgpu::BindGroup bindGroup = utils::MakeBindGroup(device, mBindGroupLayout, + wgpu::BindGroup bindGroup = utils::MakeBindGroup(device, pipeline.GetBindGroupLayout(0), {{0, uniformBuffer, 0, uniformDataSize}}); wgpu::RenderPassEncoder renderPassEncoder = commandEncoder.BeginRenderPass(&renderPass); @@ -179,7 +179,6 @@ class MultisampledRenderingTest : public DawnTest { wgpu::TextureView mResolveView; wgpu::Texture mDepthStencilTexture; wgpu::TextureView mDepthStencilView; - wgpu::BindGroupLayout mBindGroupLayout; private: wgpu::RenderPipeline CreateRenderPipelineForTest(const char* fs, @@ -201,14 +200,6 @@ class MultisampledRenderingTest : public DawnTest { pipelineDescriptor.cFragmentStage.module = utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, fs); - mBindGroupLayout = utils::MakeBindGroupLayout( - device, { - {0, wgpu::ShaderStage::Fragment, wgpu::BindingType::UniformBuffer}, - }); - wgpu::PipelineLayout pipelineLayout = - utils::MakeBasicPipelineLayout(device, &mBindGroupLayout); - pipelineDescriptor.layout = pipelineLayout; - if (hasDepthStencilAttachment) { pipelineDescriptor.cDepthStencilState.format = kDepthStencilFormat; pipelineDescriptor.cDepthStencilState.depthWriteEnabled = true; @@ -223,7 +214,8 @@ class MultisampledRenderingTest : public DawnTest { pipelineDescriptor.cColorStates[i].format = kColorFormat; } - return device.CreateRenderPipeline(&pipelineDescriptor); + wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&pipelineDescriptor); + return pipeline; } };