You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is only one invoker: class sequential_invoker which invokes invokee::initialize(), invokee::update(), invokee::render(), etc. sequentially. Vulkan, however, allows to build command buffers in parallel to decrease the CPU-time of a frame by utilizing multiple CPU cores.
Implement class parallel_invoker : public invoker_interface and invoke all of the invokee's callback methods from multiple threads in parallel. Attention: Only the invokees that have the same execution order may be invoked in parallel (=> evaluate invokee::execution_order()!). invokees with different execution orders must be invoked sequentially in order to maintain correctness.
A parallel_invoker can be used by providing it to the call of gvk::start as a parameter:
gvk::start( gvk::parallel_invoker(), ... );
Furthermore, create a new example application which can potentially benefit from a parallel_invoker. That can be, for example, an application which animates or transforms a lot of objects on the GPU and/or needs to create a lot of command buffers. Maybe also look into the creation of secondary command buffers for this example application!
It would be a nice-to-have if the same invokees would always be invoked from the same thread::id (i.e. across subsequent frames). In the general case, this is probably infeasible => care must be taken about the way how class descriptor_cache assigns descriptor_pools to specific thread::ids. It is unclear what happens if a descriptor_pool was created from thread 1, but in a subsequent frame, is used from thread 2, for example. Think about possible problematic cases!
Definition of done:
gvk::parallel_invoker has been implemented and can be used as a replacement to gvk::sequential_invoker wherever the latter has been in use.
All the example applications still work when a gvk::parallel_invoker is used with them instead of a gvk::sequential_invoker.
An additional example application has been implemented which benefits from a gvk::parallel_invoker performance-wise.
The new class gvk::parallel_invoker and all its methods are well documented and the Contribution Guidelines have been followed.
The text was updated successfully, but these errors were encountered:
Currently, there is only one invoker:
class sequential_invoker
which invokesinvokee::initialize()
,invokee::update()
,invokee::render()
, etc. sequentially. Vulkan, however, allows to build command buffers in parallel to decrease the CPU-time of a frame by utilizing multiple CPU cores.Implement
class parallel_invoker : public invoker_interface
and invoke all of theinvokee
's callback methods from multiple threads in parallel.Attention: Only the
invokee
s that have the same execution order may be invoked in parallel (=> evaluateinvokee::execution_order()
!).invokee
s with different execution orders must be invoked sequentially in order to maintain correctness.A
parallel_invoker
can be used by providing it to the call ofgvk::start
as a parameter:Furthermore, create a new example application which can potentially benefit from a
parallel_invoker
. That can be, for example, an application which animates or transforms a lot of objects on the GPU and/or needs to create a lot of command buffers. Maybe also look into the creation of secondary command buffers for this example application!It would be a nice-to-have if the same
invokee
s would always be invoked from the samethread::id
(i.e. across subsequent frames). In the general case, this is probably infeasible => care must be taken about the way howclass descriptor_cache
assignsdescriptor_pool
s to specificthread::id
s. It is unclear what happens if adescriptor_pool
was created from thread 1, but in a subsequent frame, is used from thread 2, for example. Think about possible problematic cases!Definition of done:
gvk::parallel_invoker
has been implemented and can be used as a replacement togvk::sequential_invoker
wherever the latter has been in use.gvk::parallel_invoker
is used with them instead of agvk::sequential_invoker
.gvk::parallel_invoker
performance-wise.gvk::parallel_invoker
and all its methods are well documented and the Contribution Guidelines have been followed.The text was updated successfully, but these errors were encountered: