Skip to content

Commit b913992

Browse files
committed
add testing of optionally specified parameters
1 parent 915abb1 commit b913992

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
2+
3+
## This test checks that we correctly compute the RootParametersOffset and
4+
## StaticSamplersOffset when they are not explicitly provided
5+
6+
## StaticSamplerOffset
7+
## = 24 (root signature header)
8+
## + 12 (header) + 12 (root constants)
9+
## + 12 (header) + 12 (v1.1 root descriptor)
10+
## + 12 (header) + 8 (root descriptor table)
11+
## + 24 (v1.1 descriptor range)
12+
## = 116
13+
14+
# CHECK: RootParametersOffset: 24
15+
# CHECK: StaticSamplersOffset: 116
16+
17+
--- !dxcontainer
18+
Header:
19+
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
20+
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
21+
Version:
22+
Major: 1
23+
Minor: 0
24+
PartCount: 1
25+
PartOffsets: [ 60 ]
26+
Parts:
27+
- Name: RTS0
28+
Size: 116
29+
RootSignature:
30+
Version: 2
31+
NumRootParameters: 3
32+
NumStaticSamplers: 0
33+
Parameters:
34+
- ParameterType: 1 # RootConstants
35+
ShaderVisibility: 0
36+
Constants:
37+
Num32BitValues: 16
38+
ShaderRegister: 15
39+
RegisterSpace: 14
40+
- ParameterType: 2 # SRV
41+
ShaderVisibility: 0
42+
Descriptor:
43+
ShaderRegister: 31
44+
RegisterSpace: 32
45+
DATA_STATIC_WHILE_SET_AT_EXECUTE: true
46+
- ParameterType: 0 # Descriptor Table
47+
ShaderVisibility: 0
48+
Table:
49+
NumRanges: 1
50+
Ranges:
51+
- RangeType: 0 # CBV
52+
NumDescriptors: -1
53+
BaseShaderRegister: 42
54+
RegisterSpace: 43
55+
OffsetInDescriptorsFromTableStart: 41
56+
DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS: true

0 commit comments

Comments
 (0)