mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Descriptorize ComputePipeline
Change-Id: Ic9d7014ba44d927d7f9ddf81a8870432c68941e8
This commit is contained in:
committed by
Corentin Wallez
parent
eb7d64a17f
commit
8e335a5585
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user