DirectX Reserved Resources and Sparse Virtual Texturing
This article provides an overview of reserved resources in DirectX—formerly known as tiled resources—and explains how they implement hardware-accelerated sparse virtual texturing. Readers will learn the core mechanics of memory virtualization in modern graphics APIs, how reserved resources decouple virtual texture dimensions from physical video memory, and the exact process through which game engines use these primitives to stream and render massive, detailed texture datasets with minimal memory overhead.
What Are Reserved Resources in DirectX?
Reserved resources (introduced as Tiled Resources in Direct3D 11.2 and expanded as Reserved Resources in Direct3D 12) are graphics memory allocations that separate a resource's declared virtual size from its physical backing memory. In conventional GPU rendering, declaring a high-resolution texture requires committing a contiguous block of physical Video RAM (VRAM) that matches the texture's full dimensions and format.
Reserved resources solve this memory limitation by working directly
with the GPU’s Memory Management Unit (MMU). When an application creates
a reserved resource, DirectX allocates a large contiguous virtual
address space without allocating underlying physical pages. Physical
memory is instead allocated separately in standard 64-kilobyte (KB)
pages, known as tiles. Developers can then dynamically map or unmap
these 64 KB physical pages to specific regions of the virtual resource
on demand using DirectX API calls such as
UpdateTileMappings.
Understanding Sparse Virtual Texturing
Sparse Virtual Texturing (SVT), also referred to as megatexturing, is a technique designed to simulate textures that are too large to fit in physical VRAM—such as 16K or 32K surface maps. SVT splits textures into uniform rectangular grids (pages) across all mipmap levels. The rendering engine only loads and streams the specific pages that are currently visible to the camera at the appropriate level of detail (LOD).
Historically, SVT was implemented entirely in software shaders. This required developers to maintain a physical cache texture, build an indirection texture (a software page table), and write complex pixel shader code to manually calculate coordinates, look up resident pages, and blend mip levels. This software approach introduced significant runtime shader overhead and required custom filtering logic to prevent visual seams along page borders.
How Reserved Resources Emulate Sparse Virtual Texturing
DirectX reserved resources natively implement the core mechanics of Sparse Virtual Texturing directly within the graphics hardware, replacing software-driven page translation with hardware-managed page tables.
Hardware Address Translation
Reserved resources eliminate the need for indirection textures and
manual coordinate recalculation in HLSL. Because the GPU's page tables
handle the virtual-to-physical address translation, the shader can treat
a massive, partially resident texture as a standard texture object.
Standard HLSL intrinsic functions like Sample,
SampleLevel, and SampleGrad operate directly
on the reserved resource, leaving the filtering and address translation
to the GPU’s fixed-function texture filtering units.
Residency Tracking and Tile Feedback
To emulate the paging system of SVT, the engine must know which tiles
are missing and need to be streamed from system RAM or storage. DirectX
reserved resources provide native residency feedback through HLSL
texture sampling instructions paired with the
CheckAccessFullyMapped intrinsic function.
When a shader samples a reserved resource:
- The hardware attempts to access the mapped physical tile for that sample coordinate and mip level.
- If the tile is mapped, the sample proceeds normally.
- If the tile is unmapped (non-resident), the operation returns a status code indicating incomplete access.
- The engine collects this residency feedback into a low-resolution buffer, determines which tiles are required for upcoming frames, and queues them for streaming.
Physical Tile Sharing and Null Mappings
Reserved resources allow multiple virtual tiles to map to the same physical 64 KB memory tile, a technique known as tile aliasing. In an SVT pipeline, engines can map all non-resident virtual tiles to a single dummy physical tile (such as a solid gray tile or a pre-downsampled lower-resolution tile). This prevents crashes, eliminates undefined rendering artifacts, and ensures smooth visual degradation while high-resolution pages load in the background.
Mip-Tail Packing
Higher mipmap levels of a texture naturally shrink in resolution. Eventually, the dimensions of smaller mip levels become smaller than a single 64 KB tile. DirectX manages this by packing multiple coarse mip levels together into a single 64 KB tile or a small set of tiles, known as the mip-tail. By treating the finest mip levels as sparse tiles and permanently keeping the packed mip-tail resident in memory, the engine guarantees that a fallback texture is always available if fine-detail tiles are not yet streamed in.