Use GetBindGroupLayout in SamplerTests

Bug: dawn:276
Change-Id: I294a3e94e1134212cc8f9bccd743435a6cd67538
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14030
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng 2019-12-03 21:32:55 +00:00 committed by Commit Bot service account
parent da82324098
commit 1fe9979ad8
1 changed files with 1 additions and 9 deletions

View File

@ -54,14 +54,6 @@ protected:
DawnTest::TestSetUp(); DawnTest::TestSetUp();
mRenderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); mRenderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
mBindGroupLayout = utils::MakeBindGroupLayout(
device, {
{0, wgpu::ShaderStage::Fragment, wgpu::BindingType::Sampler},
{1, wgpu::ShaderStage::Fragment, wgpu::BindingType::SampledTexture},
});
auto pipelineLayout = utils::MakeBasicPipelineLayout(device, &mBindGroupLayout);
auto vsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"( auto vsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"(
#version 450 #version 450
void main() { void main() {
@ -86,12 +78,12 @@ protected:
)"); )");
utils::ComboRenderPipelineDescriptor pipelineDescriptor(device); utils::ComboRenderPipelineDescriptor pipelineDescriptor(device);
pipelineDescriptor.layout = pipelineLayout;
pipelineDescriptor.vertexStage.module = vsModule; pipelineDescriptor.vertexStage.module = vsModule;
pipelineDescriptor.cFragmentStage.module = fsModule; pipelineDescriptor.cFragmentStage.module = fsModule;
pipelineDescriptor.cColorStates[0].format = mRenderPass.colorFormat; pipelineDescriptor.cColorStates[0].format = mRenderPass.colorFormat;
mPipeline = device.CreateRenderPipeline(&pipelineDescriptor); mPipeline = device.CreateRenderPipeline(&pipelineDescriptor);
mBindGroupLayout = mPipeline.GetBindGroupLayout(0);
wgpu::TextureDescriptor descriptor; wgpu::TextureDescriptor descriptor;
descriptor.dimension = wgpu::TextureDimension::e2D; descriptor.dimension = wgpu::TextureDimension::e2D;