Use GetBindGroupLayout in ComputeSharedMemoryTests

Bug: dawn:276
Change-Id: I024ec718b3f8423f6c271404d4beb125987290dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14024
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:08:45 +00:00 committed by Commit Bot service account
parent f9033b89e5
commit e40c87c986

View File

@ -26,17 +26,10 @@ class ComputeSharedMemoryTests : public DawnTest {
}; };
void ComputeSharedMemoryTests::BasicTest(const char* shader) { void ComputeSharedMemoryTests::BasicTest(const char* shader) {
auto bgl = utils::MakeBindGroupLayout(
device, {
{0, wgpu::ShaderStage::Compute, wgpu::BindingType::StorageBuffer},
});
// Set up shader and pipeline // Set up shader and pipeline
auto module = utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, shader); auto module = utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, shader);
auto pl = utils::MakeBasicPipelineLayout(device, &bgl);
wgpu::ComputePipelineDescriptor csDesc; wgpu::ComputePipelineDescriptor csDesc;
csDesc.layout = pl;
csDesc.computeStage.module = module; csDesc.computeStage.module = module;
csDesc.computeStage.entryPoint = "main"; csDesc.computeStage.entryPoint = "main";
wgpu::ComputePipeline pipeline = device.CreateComputePipeline(&csDesc); wgpu::ComputePipeline pipeline = device.CreateComputePipeline(&csDesc);
@ -52,7 +45,7 @@ void ComputeSharedMemoryTests::BasicTest(const char* shader) {
dst.SetSubData(0, sizeof(zero), &zero); dst.SetSubData(0, sizeof(zero), &zero);
// Set up bind group and issue dispatch // Set up bind group and issue dispatch
wgpu::BindGroup bindGroup = utils::MakeBindGroup(device, bgl, wgpu::BindGroup bindGroup = utils::MakeBindGroup(device, pipeline.GetBindGroupLayout(0),
{ {
{0, dst, 0, sizeof(uint32_t)}, {0, dst, 0, sizeof(uint32_t)},
}); });