• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LOFLY
终其一生,编织快乐
博客园    首页    新随笔    联系   管理    订阅  订阅

DXIL 着色器属性和功能

着色器属性和功能

着色器属性和功能(Shader Properties and Capabilities)

  通过标签-值(tag-value)对列表来指定附加的着色器属性,这是入口函数描述记录中的最后一个元素。

着色器标记

  着色器具有附加的标志,通过标签-值对来传达它们的功能,其中标签为kDxilShaderFlagsTag (0),后面跟着一个i64位掩码整数。这些位具有以下含义:
Bit 描述
0 禁用着色器优化
1 禁用数学refactoring
2 Shader uses doubles
3 Force early depth stencil
4 Enable raw and structured buffers
5 Shader uses min-precision, expressed as half and i16
6 Shader uses double extension intrinsics
7 Shader uses MSAD
8 All resources must be bound for the duration of shader execution
9 Enable view port and RT array index from any stage feeding rasterizer
10 Shader uses inner coverage
11 Shader uses stencil
12 Shader uses intrinsics that access tiled resources
13 Shader uses relaxed typed UAV load formats
14 Shader uses Level9 comparison filtering
15 Shader uses up to 64 UAVs
16 Shader uses UAVs
17 Shader uses CS4 raw and structured buffers
18 Shader uses Rasterizer Ordered Views
19 Shader uses wave intrinsics
20 Shader uses int64 instructions

几何着色器

  几何着色器的属性通过标签-值对来指定,标签为kDxilGSStateTag (1),后面跟着一系列几何着色器属性。该列表的格式如下所示:
Idx Type 描述
0 i32 Input primitive (InputPrimitive enum value).
1 i32 Max vertex count.
2 i32 Primitive topology for stream 0 (PrimitiveTopology enum value).
3 i32 Primitive topology for stream 1 (PrimitiveTopology enum value).
4 i32 Primitive topology for stream 1 (PrimitiveTopology enum value).
5 i32 Primitive topology for stream 3 (PrimitiveTopology enum value).

域着色器

  域着色器的属性通过标签-值对来指定,标签为kDxilDSStateTag (2),后面跟着一系列域着色器属性。该列表的格式如下所示:
Idx Type 描述
0 i32 Tessellator domain (TessellatorDomain enum value).
1 i32 Input control point count.

细分着色器

   细分着色器的属性通过标签-值对来指定,标签为kDxilHSStateTag (3),然后是一系列 细分着色器属性。该列表的格式如下所示:

Idx Type 描述
0 元数据值(MDValue) Patch constant function (global symbol)
1 i32 Input control point count.
2 i32 Output control point count.
3 i32 Tessellator domain (TessellatorDomain enum value).
4 i32 Tessellator partitioning (TessellatorPartitioning enum value)
5 i32 Tessellator output primitive (TessellatorOutputPrimitive enum value).
6 float Max tessellation factor.

计算着色器

  计算着色器有以下 tag-value属性。
Tag Value 描述
kDxilNumThreadsTag(4) MD list: (i32, i32, i32) Number of threads (X,Y,Z) for compute shader.
kDxilWaveSizeTag MD list: (i32) Wave size the shader is compatible with (optional).

上一页 下一页

posted @ 2023-06-25 15:59  编织快乐  阅读(118)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3