Giter Club home page Giter Club logo

cydonia's Introduction

Welcome!

cydonia's People

Contributors

gabbell avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cydonia's Issues

Ability to submit same command buffer multiple times

Requires more synchronization inside the command buffer itself. i.e. knowing when it was previously submitted so it can wait until the previous submission is done to submit again or maybe submit on a separate queue. Lots TBD.

Make sure isCompleted is accurate even if the command buffer is submitted twice. i.e. reset the fence?

UBOs

I love descriptor sets ๐Ÿ™ƒ

ECS (Entity Component System)

Implement an ECS
Pillars of ECS:

  • Components have no functionality
  • Systems have no state
  • Entities are handles

Some Questions

  • Who owns what?
  • How do I keep components in contiguous memory?
  • What does the user code look like?
  • How do you tick? How can the systems fetch the components that need to be updated?

Implementation

  • Basic working draft of framework (EntityManager, Components, Entities, Systems)
  • Pooling components/archetypes

Cool links:
https://github.com/alecthomas/entityx

https://www.youtube.com/watch?v=W3aieHjyNvw

Shared Components

Introduce shared components (singleton components) that only ever have one instance.

ECS Task Graph

This includes work on creating a task graph with read/write dependencies between systems in order to parallelize CPU work as much as possible (command buffer recording, pipeline creation)

Use a number of command buffer pools dependent on the number of threads and buffered frames. Use vkResetCommandPool everytime a pool is done being used for that frame. Will need to implement a command buffer manager that manages one command buffer pool per thread id.

Inside one level of graph dependency (where all tasks in that level can run in parallel), we should minimize pipeline changes and group draw calls together as much as possible.

This may lead to having one command buffer per system which could lead to a large amount of command buffers each with a small amount of work. We should be able to put multiple "jobs" or "tasks" inside the same command buffer while not breaking any dependency/scheduling rule.

https://developer.nvidia.com/blog/vulkan-dos-donts/

Swapchain Implementation

  • The swapchain needs access to the device manager and the surface to check for support.
  • Swapchains could be per device or at the application level. To be determined.
  • Could have a main device (most performant) used for presentation. The device manager would be aware of which device is the "main" one and so we could create the "main" swapchain based on the physical properties of that main device.

Tag Components

  • Create empty components that are used as "tags" to help systems differentiate between entities that have otherwise the same archetype

Improve Vulkan Descriptor Set Reusage

Creating many entities that could reuse the same descriptor set should not blow up the descriptor pool. Need to verify whether we can reuse descriptor sets across command buffers so we can reuse them across frames and just update them when needed. Since it's always the same resources, there should be no need to keep allocating new descriptor sets.

Allow for more dynamic pipelines in PBRRenderSystem

Some pipelines don't require the model matrix push constant or the scene UBOs. Make it so that these are optional depending on the current pipeline being drawn. This could lead to descriptors being re-updated or re-bound for no reason so minimize this.

Create Info Abstractions

In order to give more flexibility.
Create the following creation infos:

  • Swapchain
  • Pipeline
  • Rendering State

Logger

Create a log utility tool with different severity levels and formatting options.

  • Add a log when failing to create the main swapchain since it is not a fatal failure but the user should be alerted that it failed.

Render Backend Interface

Have an interface that is able to be initialized/unitialized with different APIs (VK, D3D12, GL) dynamically during runtime. Ideally, we should be able to switch APIs while running the application.

Figure out a way to abstract away staging from the client's perspective. This means we need a way to keep these buffers alive until the command list that is attached to them is done. When it is done, we need to flag those buffers as unused so that the next cleanup recycles them.

Async Transfers / Improve data read

Since we wait on the transfer command lists to finish before actually starting the application, it feels very unresponsive and it can be very long before we even see anything.

Could only draw the renderable entities whose resources have all been loaded.

Specialization Constants

Note: I implemented this to make the number of lights dynamic through a constant declared during pipeline creation but turns out:

"Arrays inside a block may be sized with a specialization constant, the block will have a static layout. Changing the specialized size will not re-layout the block. In the absence of explicit offsets, the will be based on the default size of the array."

From: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gl_spirv.txt

Refactor Resource Binding with GRIS

  • Decouple RenderPass from Pipeline
  • They should be two different things. The render system should be the one managing the render passes, not the RenderableComponent
  • BeginRenderPass should be able to be called before BindPipeline
  • Expose the concepts of render passes and subpasses to the GRIS
  • Make barriers work somehow
  • Decide whether I want systems to be per render pass and manage their own render pass (attachments, subpasses)
  • Redo the resource binding (description set) to fit in a traditional render loop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.