Texture RAM copies only while a feature holds a lease; GPU + disk tiers otherwise #707

Closed
opened 2026-10-12 10:15:13 +00:00 by sky_line · 2 comments
Owner

What's in RAM: the decoded, uncompressed image (RGBA8 / LA8 / L8) the GPU encoder was fed -- 4-8x larger than the GPU's block-compressed copy, and not the same bytes. The GPU-ready disk cache holds exactly the GPU's bytes. For a texture the disk tiers can re-source, the RAM copy only saves a decode.

Proposal: no decoded copy by default. A copy exists only while a consumer holds an explicit lease:

  • media / writable textures (updated from the CPU);
  • sculpt maps while their geometry is built;
  • alpha analysis at first decode;
  • Save As / upload / previews for the duration of the action;
  • own-avatar local compositing while editing appearance;
  • UI images until the UI has its own GPU copy (then reload from disk on eviction).
    Everything else: GPU resident, re-sourced from the GPU-ready cache, else J2C.

Also

  • Renderer-pinned passes (projectors, particles, water, sky) sample the GPU's compressed image instead of rebuilding an uncompressed full-size copy from RAM.
  • Other avatars' bakes need no CPU copy once uploaded (likely the largest boosted share).
  • Every texture is captured to the GPU-ready cache before its copy is dropped, or falls back to J2C.

Depends on #705 (texture disk tiers). Sizing from #706. Expected: RAM texture copies ~1 GB -> roughly the UI + media working set (likely < 100 MB), more in crowds.
Drawbacks: an evicted texture reloads by disk read (a few frames of blur on slow disks); more disk writes; every lease holder needs care.

**What's in RAM:** the decoded, uncompressed image (RGBA8 / LA8 / L8) the GPU encoder was fed -- 4-8x larger than the GPU's block-compressed copy, and not the same bytes. The GPU-ready disk cache holds exactly the GPU's bytes. For a texture the disk tiers can re-source, the RAM copy only saves a decode. **Proposal:** no decoded copy by default. A copy exists only while a consumer holds an explicit lease: - media / writable textures (updated from the CPU); - sculpt maps while their geometry is built; - alpha analysis at first decode; - Save As / upload / previews for the duration of the action; - own-avatar local compositing while editing appearance; - UI images until the UI has its own GPU copy (then reload from disk on eviction). Everything else: GPU resident, re-sourced from the GPU-ready cache, else J2C. **Also** - Renderer-pinned passes (projectors, particles, water, sky) sample the GPU's compressed image instead of rebuilding an uncompressed full-size copy from RAM. - Other avatars' bakes need no CPU copy once uploaded (likely the largest boosted share). - Every texture is captured to the GPU-ready cache before its copy is dropped, or falls back to J2C. **Depends on** #705 (texture disk tiers). Sizing from #706. **Expected:** RAM texture copies ~1 GB -> roughly the UI + media working set (likely < 100 MB), more in crowds. **Drawbacks:** an evicted texture reloads by disk read (a few frames of blur on slow disks); more disk writes; every lease holder needs care.
sky_line added this to the Slipstream project 2026-10-12 10:15:13 +00:00
Author
Owner

Agent assigned (Opus). Starts with an audit of every reader of the decoded CPU copy; the existing GPU-ready cache (#274) and J2C are the re-source tiers until #705 lands.

Agent assigned (Opus). Starts with an audit of every reader of the decoded CPU copy; the existing GPU-ready cache (#274) and J2C are the re-source tiers until #705 lands.
Author
Owner

Shipped in 1.3.0 Beta 7: texture copies are kept in RAM only while a feature holds a lease, and own-avatar composites no longer keep blank placeholders. Texture RAM went from about 1.2 GB to about 0.2 GB in testing.

Shipped in 1.3.0 Beta 7: texture copies are kept in RAM only while a feature holds a lease, and own-avatar composites no longer keep blank placeholders. Texture RAM went from about 1.2 GB to about 0.2 GB in testing.
sky_line 2026-10-12 15:12:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#707
No description provided.