Descriptorize ComputePipeline

Change-Id: Ic9d7014ba44d927d7f9ddf81a8870432c68941e8
This commit is contained in:
Corentin Wallez
2018-08-27 23:12:56 +02:00
committed by Corentin Wallez
parent eb7d64a17f
commit 8e335a5585
35 changed files with 239 additions and 166 deletions

View File

@@ -37,10 +37,12 @@ void ComputeCopyStorageBufferTests::BasicTest(const char* shader) {
// Set up shader and pipeline
auto module = utils::CreateShaderModule(device, dawn::ShaderStage::Compute, shader);
auto pl = utils::MakeBasicPipelineLayout(device, &bgl);
auto pipeline = device.CreateComputePipelineBuilder()
.SetLayout(pl)
.SetStage(dawn::ShaderStage::Compute, module, "main")
.GetResult();
dawn::ComputePipelineDescriptor csDesc;
csDesc.module = module.Clone();
csDesc.entryPoint = "main";
csDesc.layout = pl.Clone();
dawn::ComputePipeline pipeline = device.CreateComputePipeline(&csDesc);
// Set up src storage buffer
dawn::BufferDescriptor srcDesc;

View File

@@ -145,10 +145,11 @@ class PushConstantTest: public DawnTest {
})").c_str()
);
return device.CreateComputePipelineBuilder()
.SetLayout(pl)
.SetStage(dawn::ShaderStage::Compute, module, "main")
.GetResult();
dawn::ComputePipelineDescriptor descriptor;
descriptor.module = module.Clone();
descriptor.entryPoint = "main";
descriptor.layout = pl.Clone();
return device.CreateComputePipeline(&descriptor);
}
dawn::PipelineLayout MakeEmptyLayout() {