Skip to content

Expose a stable extension seam for externally owned native GPU surfaces #3168

Description

@Haoxincode

Problem

Applications embedding camera/video frames already decoded by platform APIs need to render externally owned native GPU resources (for example a D3D11 BGRA SRV or a CoreVideo/Metal surface) without copying pixels through the CPU atlas.

The current published gpui-pre snapshots and renderer APIs do not provide a stable seam for this: downstream applications must maintain a fork of the GPUI snapshot, add a scene primitive, and coordinate resource lifetime until the command buffer completes.

This becomes especially painful when upgrading GPUI Kit: the Kit release pins an exact GPUI snapshot, so a downstream fork based on an older snapshot cannot be combined with the newer gpui-component APIs.

Requested direction

Could GPUI Kit document and/or expose a supported native-surface extension point with:

  • a platform-neutral scene primitive carrying externally owned resources;
  • platform-specific import/draw hooks for D3D11 and Metal/CoreVideo;
  • an explicit completion/lifetime contract;
  • exact snapshot compatibility guidance for downstream adapters.

I can provide a minimal implementation and tests based on a real camera receiver integration if this direction is acceptable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions