Large sampled textures without their top mip, for 16 GB Macs (a piece of #8) #349

Open
opened 2026-11-27 13:38:59 +00:00 by github-bot · 3 comments
Owner

@⁠Hayyan612 on GitHub · 2026-11-27 13:29 UTC · original

On 16 GB Macs the world load runs out of GPU memory (#8). #301 bounds how many host texture copies are kept; its notes name "fewer top mips" (#79) as another lever. This takes that lever: make each large copy smaller.

Plan. An opt-in VICTORY_TEXTURE_DROP_TOP_MIP=1 (off by default): a sampled-only 2D or array texture whose larger side is at least 1024 texels, with a level below its top, is made on the host without its top level (half the width and height, one level fewer: about 75% of that texture's memory). detile skips the top level and the views' mip ranges are mapped onto the host texture. Render targets, UAV and 3D textures are left as they are.

Trade-off. Not console behaviour: up close those textures sample one level blurrier; integer loads and GetDimensions see the smaller texture. Hence opt-in.

Status. Implemented with unit tests and a Metal test; not yet measured in a game run. Footprint numbers from a 16 GB tester, with and without the variable, would tell whether it is worth making a default there.

**@⁠Hayyan612** on GitHub · 2026-11-27 13:29 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/347) On 16 GB Macs the world load runs out of GPU memory (#8). #301 bounds how many host texture copies are kept; its notes name "fewer top mips" (#79) as another lever. This takes that lever: make each large copy smaller. **Plan.** An opt-in `VICTORY_TEXTURE_DROP_TOP_MIP=1` (off by default): a sampled-only 2D or array texture whose larger side is at least 1024 texels, with a level below its top, is made on the host without its top level (half the width and height, one level fewer: about 75% of that texture's memory). `detile` skips the top level and the views' mip ranges are mapped onto the host texture. Render targets, UAV and 3D textures are left as they are. **Trade-off.** Not console behaviour: up close those textures sample one level blurrier; integer loads and `GetDimensions` see the smaller texture. Hence opt-in. **Status.** Implemented with unit tests and a Metal test; not yet measured in a game run. Footprint numbers from a 16 GB tester, with and without the variable, would tell whether it is worth making a default there.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 13:38:59 +00:00
Author
Owner

@⁠Hayyan612 on GitHub · 2026-11-27 13:29 UTC · original

/claim

**@⁠Hayyan612** on GitHub · 2026-11-27 13:29 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/347#issuecomment-7219542136) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 13:29 UTC · original

Claimed by @⁠Hayyan612. Open a draft pull request with Refs #347 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 13:29 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/347#issuecomment-7219547220) Claimed by @⁠Hayyan612. Open a draft pull request with `Refs #347` in its description within 24 hours, or the claim expires.
github-bot referenced this issue from a commit 2026-11-27 15:59:39 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-28 18:59 UTC · original

The claim by @⁠Hayyan612 has expired: no pull request referenced it within 24 hours. This issue is free to claim.

**@⁠github-actions[bot]** on GitHub · 2026-11-28 18:59 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/347#issuecomment-7244204219) The claim by @⁠Hayyan612 has expired: no pull request referenced it within 24 hours. This issue is free to claim.
This discussion has been locked. Commenting is limited to contributors.
No description provided.