3 Commits

  • feat(plugin): log client GPU memory with log-gpu=1, ask the sandbox before the shared cache probe
    With log-gpu=1 a client process logs where its GPU memory is every 20 s
    (the runtime's pooled, empty, spare and dedicated blocks, what was
    declared discardable, how passes were rendered); a row that did not
    change is not logged again. A sandboxed process asks the sandbox whether
    it may write the shared shader cache directory before it probes it: the
    refused probe file made a violation report at every launch.
    
    Run on hardware: the rows appear for client processes.
  • feat(cache): system shader cache the render server fills and every process reads
    On macOS the render server (WindowServer, user _windowserver) and the apps
    are different users, so what it primed served it alone, and a sandboxed
    process that cannot write the user's shared directory compiled every
    pipeline at first use.
    
    The render server now opens its device in /private/var/tmp/NativeAdrenoMetal.cache
    when the kernel made that directory for it, writes its entries readable by
    everyone, and primes every library of the list except other GPUs' driver
    bundles. Every other process names /Library/GPUBundles/NativeAdrenoMetal.cache
    (the same directory, shown read-only by the kernel) as a read-only layer
    its device asks for what its own cache lacks: translated functions,
    pipelines, the driver's pipeline data and compiler replies.
    
    Bridge patch 0036 adds the layer to the runtime. A level (the directory,
    each directory on the way to an entry, the entry) is opened without
    following a link and read only when owned by root or _windowserver and not
    writable by group or others; entries are then checked as the process's own
    are. Nothing is written, touched or removed there.
    
    gpu-prime-system=0 restores the per-user behaviour. Telemetry: PRb and SY
    rows, system counts in the work line, the layer's state in the cache line.
    iPadOS is unchanged.
    
    Host: bridge/system_cache_host.mm over MoltenVK (second process hits the
    published entries; wrong owner, writable levels, links and corrupt entries
    are refused or ignored). Syntax-checked for macOS 27, iPadOS 27 and
    iPadOS 17. Has not run on hardware; needs the kernel step that makes and
    binds the directory.
  • feat(metal): share shader caches across same-user clients
    Use a writable per-user cache with container fallback, keep Turnip disk caching enabled, and isolate concurrent cache-pack imports. Verify cache round trips, concurrent imports, and the iPadOS 27 plugin compile.