Vulkanator icon indicating copy to clipboard operation
Vulkanator copied to clipboard

Utilize `PF_State`-based caching for uploads

Open Wunkolo opened this issue 2 years ago • 2 comments

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.

Wunkolo avatar Mar 13 '23 21:03 Wunkolo