Closed Try closed 2 years ago
synchronization: Metal model look quite promising:
CommandBuffer cmd;
...
cmd.addCompletionHandler([]() {
});
cmd.wait();
Can be done naively in Metal; By Timeline Semaphore + extra thread on Vulka/Dx12
Wanna rethink framebuffer/renderpass api.
Goal:
Current syntax:
fboGBuf = device.frameBuffer(lightingBuf,gbufDiffuse,gbufNormal,gbufDepth,zbuffer);
gbufPass = device.pass(FboMode(FboMode::PreserveOut,Color(0.0)),
FboMode(FboMode::PreserveOut),
FboMode(FboMode::PreserveOut),
FboMode(FboMode::PreserveOut,Color(1.0)),
FboMode(FboMode::PreserveOut,1.f));
'Good' metal example
desc.colorAttachments[0].texture = tex;
desc.colorAttachments[0].loadAction = MTLLoadActionClear;
desc.colorAttachments[0].clearColor = MTLClearColorMake(1, 1, 1, 1);
desc.colorAttachments[0].storeAction = MTLStoreActionStore;
new syntax idea:
{
auto enc = cmdBuf.startEncoding(device);
enc.setFramebuffer({{color,Color(0,0,0,0),Tempest::Preserve}, {normal,Tempest::Discard,Tempest::Preserve}});
enc.setUniforms(op,ubo,&uboCpu,sizeof(uboCpu));
enc.draw(Resources::fsq());
}
Add readable depth texture
Moved: #27
Reconsider design cross-queue/cpu synchronization
De-scoped, single queue case is problematic enough.
VK_EXT_inline_uniform_block
Moved: #32
Things to do:
VectorImage
intoVectorImage
, as CPU data +VectorImage::Mesh
, as GPU data.Uniforms
to something else, probablyDescriptorSet
Things to think about:
VK_EXT_inline_uniform_block