Creating streaming resources

Streaming resources are created by specifying a flag when you create a resource, indicating that the resource is a streaming resource.

Restrictions on when you can create a resource as a streaming resource are described in Streaming resource creation parameters.

A non-streaming resource's storage is allocated in the graphics system when the resource is created, such as allocation for an array of 2D textures.

When a streaming resource is created, the graphics system doesn't allocate the storage for the resource contents. Instead, when an application creates a streaming resource, the graphics system makes an address space reservation for the tiled surface's area only, and then allows the mapping of the tiles to be controlled by the application. The "mapping" of a tile is simply the physical location in memory that a logical tile in a resource points to (or NULL for an unmapped tile).

Don't confuse this concept with the notion of mapping a Direct3D resource for CPU access, which despite using the same name is completely independent. You will be able to define and change the mapping of each tile individually as needed, knowing that all tiles for a surface don't need to be mapped at a time, thereby making effective use of the amount of memory available.

In this section

Topic Description

Mappings are into a tile pool

When a resource is created as a streaming resource, the tiles that make up the resource come from pointing at locations in a tile pool. A tile pool is a pool of memory (backed by one or more allocations behind the scenes - unseen by the application).

Streaming resource creation parameters

There are some constraints on the type of Direct3D resources that you can create as a streaming resource.

Tile pool creation parameters

Use the parameters in this section to define tile pools when creating a buffer.

Streaming resource cross-process and device sharing

Tile pools can be shared with other processes just like traditional resources. Streaming resources that reference tile pools can't be shared across devices and processes.

Operations available on streaming resources

This section lists operations that you can perform on streaming resources.

Operations available on tile pools

Operations on tile pools include resizing a tile pool, offering resources (yielding memory temporarily to the system for the entire tile pool), and reclaiming resources.

How a streaming resource's area is tiled

When you create a streaming resource, the dimensions, format element size, and number of mipmaps and/or array slices (if applicable) determine the number of tiles that are required to back the entire surface area.

 

Streaming resources