Oxsomi / ignis

A framework for cross platform rendering
MIT License
0 stars 0 forks source link

Flight tracking #19

Open Nielsbishere opened 4 years ago

Nielsbishere commented 4 years ago

Each submission should have which resources are in flight with a mutex, which is waited for before modifying it on the cpu. This mutex is locked for each submit and unlocked by an event. If a resource is needed as input from which a previous command list wrote, the cpu will wait until it is available.

Nielsbishere commented 4 years ago

As an addition; Commands should get a "List getResources", where they return all used GPU resources for that command. This will then allow the impl to build up a HashMap<GPUObject*, bool> per execution and call addRef per execution and loseRef when it's done.