mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-03 11:46:09 +00:00
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:
parent
f9033b89e5
commit
e40c87c986
@ -26,17 +26,10 @@ class ComputeSharedMemoryTests : public DawnTest {
|
||||
};
|
||||
|
||||
void ComputeSharedMemoryTests::BasicTest(const char* shader) {
|
||||
auto bgl = utils::MakeBindGroupLayout(
|
||||
device, {
|
||||
{0, wgpu::ShaderStage::Compute, wgpu::BindingType::StorageBuffer},
|
||||
});
|
||||
|
||||
// Set up shader and pipeline
|
||||
auto module = utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, shader);
|
||||
auto pl = utils::MakeBasicPipelineLayout(device, &bgl);
|
||||
|
||||
wgpu::ComputePipelineDescriptor csDesc;
|
||||
csDesc.layout = pl;
|
||||
csDesc.computeStage.module = module;
|
||||
csDesc.computeStage.entryPoint = "main";
|
||||
wgpu::ComputePipeline pipeline = device.CreateComputePipeline(&csDesc);
|
||||
@ -52,7 +45,7 @@ void ComputeSharedMemoryTests::BasicTest(const char* shader) {
|
||||
dst.SetSubData(0, sizeof(zero), &zero);
|
||||
|
||||
// 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)},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user