Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethinking a engine structure #23

Closed
3 of 6 tasks
Try opened this issue Apr 21, 2021 · 4 comments
Closed
3 of 6 tasks

Rethinking a engine structure #23

Try opened this issue Apr 21, 2021 · 4 comments

Comments

@Try
Copy link
Owner

Try commented Apr 21, 2021

Things to do:

  • Split VectorImage into VectorImage, as CPU data + VectorImage::Mesh, as GPU data.
  • Rename Uniforms to something else, probably DescriptorSet
  • Add readable depth texture

Things to think about:

  • Implement Metal-api
  • Reconsider design cross-queue/cpu synchronization
  • Investigate usefulness of VK_EXT_inline_uniform_block
@Try
Copy link
Owner Author

Try commented May 5, 2021

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

Try added a commit that referenced this issue May 17, 2021
Try added a commit that referenced this issue May 17, 2021
Try added a commit that referenced this issue May 17, 2021
Try added a commit that referenced this issue May 17, 2021
@Try
Copy link
Owner Author

Try commented May 21, 2021

Wanna rethink framebuffer/renderpass api.

Goal:

  1. Simplify usage
  2. Add support for resolve attachment(msaa)
  3. Add support for density-map and vrs-attachment

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;

@Try
Copy link
Owner Author

Try commented Sep 27, 2021

new syntax idea:

  1. discard FrameBuffer & RenderPass classes
  {
    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());
  }

@Try
Copy link
Owner Author

Try commented Apr 27, 2022

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

@Try Try closed this as completed Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant