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

Zero-copy importer plugin APIs #240

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Zero-copy importer plugin APIs #240

wants to merge 4 commits into from

Commits on Oct 24, 2021

  1. Trade: add ImporterFlag::ZeroCopy.

    It's great to see how the design nicely fermented over the three and
    half (!!) years. This is a completely opt-in feature for all plugins
    involved, so if the plugin decides to not do anything about it, it
    doesn't have to. The actual enforcements will come later.
    mosra committed Oct 24, 2021
    Configuration menu
    Copy the full SHA
    7c3c063 View commit details
    Browse the repository at this point in the history
  2. Trade: add flags for forcing zero-copy import of certain data.

    Because there's no format ever that would support zero-copy everything
    (except the upcoming Magnum blobs, hah!), it makes no sense to force
    zero-copy globally. Instead, zero-copy can be forced just for particular
    data of interest. For example a glTF can zero-copy-import mesh and
    animation data, but not always image data (except if it embeds an
    uncompressed KTX), and never scene or material data, which are stored in
    the textual JSON.
    mosra committed Oct 24, 2021
    Configuration menu
    Copy the full SHA
    5e7443a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dfea5bd View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2021

  1. [wip] Trade: add a protected openData() overload taking a rvalue Array.

    Meant to be used from within plugin implementations to avoid copies in
    the delegated importers.
    
    TODO: the heck, why can't I call a protected function from a subclass
       but another instance?
    TODO: figure out a way to test this
    TODO: update docs and behavior for the ZeroCopy flag
    TODO: adapt AnySceneImporter also
    mosra committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    4446300 View commit details
    Browse the repository at this point in the history