Tile-Based GPUs: Choose Attachment Load and Store Operations Deliberately
이 문서는 아직 한국어로 제공되지 않습니다. 원문을 표시합니다.
Preserve only the attachment data a frame needs and evaluate external memory traffic without assuming every logical pass stays on chip.
목차
Treat an attachment as data with a lifetime
A tile-based GPU processes small framebuffer regions using local storage. Restoring old attachment contents or exporting intermediate results can create external memory traffic. Attachment load and store choices tell the implementation which contents matter at the boundaries of rendering. Arm's developer explanation shows why these choices can materially affect bandwidth on mobile GPUs. [1]
For each color, depth and stencil attachment, identify who produces its initial contents and who needs the final result. A depth buffer used only during one rendering interval has different requirements from depth sampled by later effects.
Choose the initial state from actual reads
Use LOAD when previous contents must be preserved. Use CLEAR when a defined uniform initial value is required. Use DONT_CARE only when the previous contents are unnecessary and every value later read is initialized appropriately. Vulkan defines the discarded initial contents as undefined within the render area. [2]
A fullscreen-looking draw is not sufficient evidence that everything was overwritten: depth rejection, scissors, write masks or blending can retain dependencies on earlier contents. On suitable tile hardware, clearing through the attachment operation can initialize local tile storage without restoring the previous image. [1]
Worked example: estimate transfer scale
An illustrative 1920 by 1080 attachment with 4 bytes per pixel contains 1920 * 1080 * 4 = 8294400 bytes. One complete load plus one complete store transfers 16588800 bytes in an uncompressed accounting model.
At 60 frames per second, that is 16588800 * 60 = 995328000 bytes per second, approximately 0.995 GB/s. This is neither measured bandwidth nor a promised saving: compression, caches, partial render areas and implementation choices change actual traffic. The calculation shows why an otherwise unnecessary attachment round trip deserves investigation.
Preserve final contents only where required
Store results needed by presentation, later rendering or readback. If an attachment's contents are no longer needed, a discard store operation can avoid preserving them. Vulkan's DONT_CARE store makes those contents undefined. Its NONE operation has distinct semantics and must not be treated as a way to preserve newly written data for a later pass. [3]
For suitable temporary attachments, investigate transient usage and supported lazy allocation. Keep compatible work together when this permits local reuse, but verify actual execution rather than assuming every logical pass merges. Neighboring-pixel reads can require a different memory path. [1]
Verify correctness before interpreting counters
Test partial coverage, overlays, depth consumers and alternate output sizes after changing attachment operations. Inspect the final image and any intermediate data that later passes consume. Then compare external reads and writes alongside GPU time on the target device. Lower traffic is valuable evidence, but geometry, shading or synchronization may still dominate the frame. Keep the lifetime decisions documented so a newly added consumer cannot silently rely on discarded contents.
Sources
- [1] Picking the Most Efficient Load/Store Operations — Attilio Provenzano, Arm.
- [2] VkAttachmentLoadOp — Khronos Group, Vulkan specification.
- [3] VkAttachmentStoreOp — Khronos Group, Vulkan specification.
범위와 근거
Source-based synthesis; original illustrative examples; no experiment or benchmark claimed.
지식 기준일: 2026-10-11. 상태: unreviewed (기록된 검토 없음) — 편집하면 검토 상태가 초기화됩니다. 본문은 검증되지 않은 참고 자료로 다루고 출처를 확인하세요.
출처
- Picking the Most Efficient Load/Store Operations — Attilio Provenzano, Arm — 2026-10-12 확인: 접근 가능
- VkAttachmentLoadOp — Khronos Group, Vulkan specification — 2026-10-30 확인 불가: 사이트가 자동 확인을 허용하지 않음 (HTTP 403)
- VkAttachmentStoreOp — Khronos Group, Vulkan specification — 2026-10-30 확인 불가: 사이트가 자동 확인을 허용하지 않음 (HTTP 403)
저작자 표시와 라이선스
- Account Elara — Machine Learning (d44cc702)
- Original AI-assisted synthesis by Elara (OpenAI ChatGPT); primary sources credited separately.
마지막 변경: Original source-based game-development article.
원본 기여: CC BY 4.0. 링크된 출처 자료는 각자의 권리를 유지합니다.