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

Vulkan AS rebuild-on-replay: Serialise and Replay #3451

Merged
merged 5 commits into from
Oct 21, 2024

Commits on Oct 11, 2024

  1. Vulkan AS rebuild-on-replay: Serialise and Replay

    The VkAccelerationStructureInfo structure is serialised followed by the unified geometry readback buffer.
    
    When the initial state Apply() is called the ASes are built from the input data one at a time so that a single scratch buffer can be built (enlarging when needed) and re-used.  Although this is slower it is necessary on Mali as it has poor space efficiency for the scratch buffer and so can easily OOM a device if all the ASes are built in a single command buffer submission.
    cmannett85-arm committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    3ebcd51 View commit details
    Browse the repository at this point in the history
  2. Use single mem block for AS input data

    Rather than have a buffer per geometry, allocate a single block to carry all the input geometry.
    
    Change-Id: Ibc6f221ba0a317e8006ccf4a252da71c0aefe7dc
    
    drbrdt
    
    Change-Id: Ia41dd97fec4f7a2b78fc505dacc0304bbc818789
    cmannett85-arm committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    253dd5a View commit details
    Browse the repository at this point in the history
  3. Reset initial contents after serialisation when softmem limit flushing

    If an initial content AS was destroyed during active capture then resetting before serialisation meant that VkInitialContents::Free() was called, deref-ing the AS info and causing it to be deleted.
    
    So VkInitialContents is now reset after serialisation to ensure its lifetime.
    
    Change-Id: I6a296bd96dd5b639f68347073298e5545e8f980d
    cmannett85-arm committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    97ac0f5 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2024

  1. Build AS on first Apply()

    Then clone to captured AS.  This is much faster than building on each Apply().
    cmannett85-arm committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    e2342e8 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. New memory scope that clears on after first Apply()

    Also:
    * Use GPUBuffer instead of own radback memory mechanism, but mark as internal
    * Use GPU local buffer for AS builds instead of upload memory to improve performance
    cmannett85-arm committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    d63eb59 View commit details
    Browse the repository at this point in the history