Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cached texture uploads utilizing PF_State #6

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Wunkolo
Copy link
Owner

@Wunkolo Wunkolo commented Mar 17, 2023

Uses PF_State to conservatively upload the InputTexture only when needed. This optimizes the case where the source input layer is a static image, a time-remapped video, or a low-framerate image.

Ex, in the case of a static image, the source texture is only uploaded once, keeping track of its PF_State, and subsequent render requests will re-use this uploaded texture.

The coherency of PF_State needs to be validated a bit.

Resolves #5

Will optimize the case where either the source-layer is either a static
image or a low-framerate gif by identifying the uploaded contents of the
image with a P_State and re-using the uploaded image rather than
uploading it each frame.
@Wunkolo
Copy link
Owner Author

Wunkolo commented Mar 17, 2023

Red frames indicate a GPU upload of the input texture. With a 12.5 gif in a 50fps composition, the input-texture is now only uploaded to the GPU when the incoming frame index is unique from the previous.
AfterFX_hXKHR4aYQo

Having the additional ImageCreateInfo does not really make sense in this case since the PF_State is enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Utilize PF_State-based caching for uploads
1 participant