对流式资源的管道访问Pipeline access to streaming resources

流式资源可用于着色器资源视图 (SRV)、呈现目标视图 (RTV)、深度模板视图 (DSV) 和无序访问视图 (UAV),以及未使用视图的某些盲点(如顶点缓冲区绑定)。Streaming resources can be used in shader resource views (SRV), render target views (RTV), depth stencil views (DSV) and unordered access views (UAV), as well as some bind points where views aren't used, such as vertex buffer bindings. 有关受支持的绑定的列表,请参阅流式资源创建参数For the list of supported bindings, see Streaming resource creation parameters. 各种 D3D Copy 运算也适用于流式资源。The various D3D Copy operations also work on streaming resources.

如果一个或多个视图中的多个磁贴坐标绑定到同一内存位置,来自同一内存的不同路径的读取和写入将按内存访问的非确定性和不可重复顺序执行。If multiple tile coordinates in one or more views is bound to the same memory location, reads and writes from different paths to the same memory will occur in a non-deterministic and non-repeatable order of memory accesses.

如果来自着色器内存访问足迹的所有磁贴都映射到唯一的磁贴,则行为在所有实现上都与具有相同非平铺形式内存内容的图面相同。If all tiles behind a memory access footprint from a shader are mapped to unique tiles, behavior is identical on all implementations to the surface having the same memory contents in a non-tiled fashion.

本部分中的内容In this section

主题Topic 描述Description

使用非映射磁贴的 SRV 行为SRV behavior with non-mapped tiles

涉及非映射磁贴的着色器资源视图 (SRV) 读取的行为取决于硬件支持的程度。Behavior of shader resource view (SRV) reads that involve non-mapped tiles depends on the level of hardware support.

使用非映射磁贴的 UAV 行为UAV behavior with non-mapped tiles

无序访问视图 (UAV) 读取和写入的行为依赖于硬件支持的级别。Behavior of unordered access view (UAV) reads and writes depends on the level of hardware support.

使用非映射磁贴的光栅器行为Rasterizer behavior with non-mapped tiles

本节介绍使用非映射磁贴的光栅器行为。This section describes rasterizer behavior with non-mapped tiles.

使用重复映射的磁贴访问限制Tile access limitations with duplicate mappings

使用重复映射的磁贴访问存在一些限制,例如在复制具有重叠的源和目标的流式资源时,或在呈现给在呈现区域中共享的磁贴时。There are limitations on tile access with duplicate mappings, such as when copying streaming resources with overlapping source and destination, or when rendering to tiles shared within the render area.

流式资源纹理采样功能Streaming resources texture sampling features

流式资源纹理采样功能包括获取有关映射区域的着色器状态反馈,检查正在访问的所有数据是否已在资源中映射,进行固定以帮助着色器避开 Mip 映射流式资源中已知的非映射区域,以及发现为整个纹理筛选器足迹完全映射的最小 LOD。Streaming resources texture sampling features include getting shader status feedback about mapped areas, checking whether all data being accessed was mapped in the resource, clamping to help shaders avoid areas in mipmapped streaming resources that are known to be non-mapped, and discovering what the minimum LOD that is fully mapped for an entire texture filter footprint will be.

HLSL 流式资源暴露HLSL streaming resources exposure

需要使用特定的 Microsoft 高级着色器语言 (HLSL) 语法来支持 着色器模型 5中的流式处理资源。A specific Microsoft High Level Shader Language (HLSL) syntax is required to support streaming resources in Shader Model 5.

 

相关主题Related topics

流式资源Streaming resources