Giter Club home page Giter Club logo

Comments (4)

azhirnov avatar azhirnov commented on June 19, 2024

The idea of this FG-library - implement easy to use vulkan wrapper for prototyping.
This is not a thread pool library. You should create threads and add syncs manualy or use any library like tbb, task flow etc. FG allow you to use vulkan api from any thread without synchronizations, but each command buffer must be used in single thread. In debug mode FG have data race checks that notify you if you miss some syncs.

Task dependencies in FG is optional, they can be used to rearrange tasks to slightly incease performance. Without dependencies tasks will be executed in same order as you add it to command buffer.
For each command buffer FG tacks resource state and adds pipeline barriers and layout transitions. FG internally adds GPU-CPU syncs before reusing command buffers, reading from memory, etc.
If you use dependencies between command buffers, FG adds syncs between them.

Additionaly you can see multithreading tests here

from framegraph.

happydpc avatar happydpc commented on June 19, 2024

Oh, that's awesome.

I will try to do some experiments on them. I had done some experiments on pumex before (use tbb). It has some bugs and not maintained now. Hope we can make this render graph library better.

from framegraph.

happydpc avatar happydpc commented on June 19, 2024

"but each command buffer must be used in single thread", means merge them in render thread ?

from framegraph.

azhirnov avatar azhirnov commented on June 19, 2024

means merge them in render thread ?

Vulkan api require syncs if command buffer or command pool for that command buffer used in different threads.
FG doesn't protect command buffer by mutex for performance reasons, so if you need to use one command buffer in different threads you must add syncs.
The valid usage is in single thread call fg->Begin(), add tasks to cmd buffer, call fg->Execute(). Somewhere add dependencies between command buffers that recorded in different threads.

from framegraph.

Related Issues (17)

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.