Skip to content

Metal CPU-accessible placement heaps are attempted on Intel macOS without a supported strategy #331

Backlog

Description

@simzy39

Source/native-contract finding on main fc22df0; no Intel Mac runtime was available to validate a replacement.

The allocator constructs CPU-accessible Shared placement-heap descriptors for CpuToGpu/GpuToCpu on every device. Apple's MTLHeapDescriptor.storageMode documentation permits only Private heaps on macOS devices without Apple silicon. Thus CPU-visible buffer allocation on those devices requests an unsupported heap rather than selecting a supported committed/managed resource strategy or explicitly rejecting the unsupported configuration. The resulting nil can be reported as OutOfMemory even though the descriptor/platform combination is unsupported.

Suggested runtime reproduction on an Intel Mac: allocate a small CpuToGpu buffer using AllocationCreateDesc::buffer, enable Metal API validation, and inspect newHeapWithDescriptor and the returned error. Expected behavior needs an explicit backend support decision: supported non-heap CPU-visible allocations, or a clear platform/feature error. Retrying smaller Shared heaps cannot resolve an unsupported storage mode.

Apple heap storage-mode contract. This is distinct from the Shared-texture wildcard routing issue #330. #323 preserves the existing resource model and has only Apple cross-compilation, not Apple runtime validation.

Agent-assisted investigation and report. Evidence: https://github.com/simzy39/winit-wgpu-repro-benchmarks/tree/main/allocator-reconciliation-20261128

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