Wunkolo / Vulkanator

An Adobe After Effects sample project with Vulkan GPU acceleration
MIT License
59 stars 2 forks source link

Utilize `PF_State`-based caching for uploads #5

Open Wunkolo opened 1 year ago

Wunkolo commented 1 year ago

PF_GetCurrentState from PF_ParamUtilSuite3 can be utilized to get a pretty coherent "hash" of an input layer. With this, the uploaded contents of a "texture" derived from a PF_EffectWorld can be identified to have been uploaded already to the GPU and can be re-used. A PF_State may be added to the current sequence-cache allowing cases such as a still-image input layer to only have to be uploaded to the GPU once and re-used much quicker. https://github.com/Wunkolo/Vulkanator/blob/9e38576270dafd9695b5bd6c4def9d64687e0ad0/include/Vulkanator.hpp#L91-L116

Additional testing may have to be done depending on the coherency of the PF_State such as changes in extents, quality, bit-depth, etc.