@@ -9,84 +9,95 @@ There are three test categories we are concerned with:
9
9
10
10
1 . Implement DXIL Intrinsic tests:
11
11
- At the bottom of this document there is a table of all HLSL intrinsics and
12
- their mapped DXIL OpCodes. We just need coverage for each DXIL OpCode. If the
13
- DXIL OpCode column lists 'emulated' then this means that there are multiple
14
- LLVM/DXIL Ops used to compute the intrinsic. We will need to do an audit of
15
- them to confirm coverage of all vector ops.
12
+ their mapped DXIL OpCodes. We just need coverage for each DXIL OpCode. If
13
+ the DXIL OpCode column lists 'emulated' then this means that there are
14
+ multiple LLVM/DXIL Ops used to compute the intrinsic. We will need to do an
15
+ audit of them to confirm coverage of all vector ops.
16
16
17
17
2 . Implement LLVM Native operation tests:
18
- - These are the test cases for the 'basic' HLSL operators listed in the HLSL
19
- operators table below.
20
- - We have added some test cases for these with the long vectors work, but we
21
- will want to make sure we add HLK coverage for all of these.
18
+ - These are the test cases for the 'basic' HLSL operators listed in the
19
+ HLSL operators table below.
20
+ - We have added some test cases for these with the long vectors work, but
21
+ we will want to make sure we add HLK coverage for all of these.
22
22
23
23
3 . Standard loading and storing of long vectors
24
- - Ensure we have some basic tests doing standard loading/storing of long vectors.
24
+ - Ensure we have some basic tests doing standard loading/storing of long
25
+ vectors.
25
26
26
27
# Vector Sizes to test
27
28
28
29
I don't think there are any particularly interesting vector sizes to test. So I
29
30
propose testing sizes of 5, 25, 100, 500. Sizes < 5 are assumed to already be
30
- covered by existing test collateral. But, as part of this work we will verify that
31
- assumption.
31
+ covered by existing test collateral. But, as part of this work we will verify
32
+ that assumption.
32
33
33
34
# Implementation phases
34
35
Do the test work in two simple phases.
35
36
36
37
1 . Implement and validate (locally against WARP) the 3 test categories.
37
38
2 . HLK related work:
38
- - Add a SM 6.9 HLK requirement. Includes updating the HLK requirements doc.
39
- - Update mm_annotate_shader_op_arith_table.py to annotate the new test cases
40
- with HLK GUIDS and requirements
41
- - Add new tests to HLK playlist
39
+ - Add a SM 6.9 HLK requirement. Includes updating the HLK requirements doc.
40
+ - Update mm_annotate_shader_op_arith_table.py to annotate the new test cases
41
+ with HLK GUIDS and requirements
42
+ - Add new tests to HLK playlist
42
43
43
44
# Shipping
45
+ Note that because DXC and the Agility SDK are both undocked from Windows it is
46
+ our normal operating behavior for the HLK tests to become available with a later
47
+ TBD OS release. The good news is that this doesn't prevent the test from being
48
+ available much earlier in the DXC repo. Just that they are simply TAEF tests in
49
+ the DXC repo. An HLK test includes an extra level of infrastructure for test
50
+ selection and result submission for WHQL signing of drivers.
51
+
44
52
1 . Tests will be shared privately with IHV's along with the latest DXC and
45
- latest Agility SDK for tesing and validation.
53
+ latest Agility SDK for tesing and validation. IHVs will also be able to build
54
+ and run the tests from the public DXC repo themselves.
46
55
47
56
2 . The tests will ship with the HLK at a TBD date in a later OS release.
48
57
49
58
# New HLK Tests
50
59
mm_annotate_shader_op_arith_table.py (WinTools repo) will need to be updated to
51
- recognize any new tests (not test cases) added. And additional GUIDs added for new
52
- test cases. mm_annotate_shader_op_arith_table.py is called by mm-hlk-update.py when
53
- converting from 'ExecTests' to the HLK 'DxilConf' tests. The aforementioned
54
- * table.py script is run by Integration.HLKTestsUpdate.yaml
60
+ recognize any new tests (not test cases) added. And additional GUIDs added for
61
+ new test cases. mm_annotate_shader_op_arith_table.py is called by
62
+ mm-hlk-update.py when converting from 'ExecTests' to the HLK 'DxilConf' tests.
63
+ The aforementioned * table.py script is run by Integration.HLKTestsUpdate.yaml
55
64
56
65
# Test Validation Requirements
57
- The following statements must be true and validated for this work to be considered
58
- completed.
59
- - All new test cases pass when run locally against a WARP device
60
- - All new test cases are confirmed to be lit up and available in the HLK when the
61
- target device reports support
62
- - All new tests/test cases are added to the HLK playlist
66
+ The following statements must be true and validated for this work to be
67
+ considered completed.
68
+ - All new test cases pass when run locally against a WARP device
69
+ - All new test cases are confirmed to be lit up and available in the HLK when
70
+ the target device reports support
71
+ - All new tests/test cases are added to the HLK playlist
63
72
64
73
# Requirements
65
- - Greg's long vector changes. Check-in ETA of 3/7/25.
66
- - WARP long vector support (Jesse). Needs Greg's work, or a private WIP branch
67
- of Greg's work. ETA of ~1 week to implement.
74
+ - Greg's long vector changes:
75
+ https://github.com/microsoft/DirectXShaderCompiler/pull/7188
76
+ - WARP long vector support (Jesse). Needs Greg's work, or a private WIP
77
+ branch of Greg's work. ETA of ~1 week to implement.
68
78
69
79
# Notes
70
- - The 'ExecTests' (ExecutionTest.cpp) are used to generate the HLK tests (DxilConf
71
- tests)
72
- - Private test binaries/collateral will be shared with IHVs for validation
73
- purposes. This will enable IHVs to verify long vector functionality without
74
- waiting for an OS/HLK release.
80
+ - The 'ExecTests' (ExecutionTest.cpp) are used to generate the HLK tests
81
+ (DxilConf tests)
82
+ - Private test binaries/collateral will be shared with IHVs for validation
83
+ purposes. This will enable IHVs to verify long vector functionality without
84
+ waiting for an OS/HLK release.
75
85
76
86
# Open Questions
77
- - We speculate that the combiniation of test cases for HLSL operators and
78
- HLSL intrinsics which map to DXIL ops should get us all, or most of the
79
- coverage required for the 'emulated' intrinsics. But we should audit that.
87
+ - We speculate that the combination of test cases for HLSL operators and HLSL
88
+ intrinsics which map to DXIL ops should get us all, or most of the coverage
89
+ required for the 'emulated' intrinsics. But we should audit that.
80
90
81
91
# HLSL Operators
82
- These operatores should generate LLVM native ops which use vectors.
92
+ These operators should generate LLVM native ops which use vectors.
83
93
94
+ Operator table from [ Microsoft HLSL Operators] ( https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-operators#binary-casts )
84
95
| Operator Name | Operator | Notes |
85
96
| -----------| --------------| ----------|
86
97
Additive and Multiplicative Operators | +, -, * , /, % |
87
98
Array Operator | [ i] |
88
99
Assignment Operators | =, +=, -=, * =, /=, %= |
89
- Binary Casts | C rules for float and int, C rules or HLSL intrinsics for bool |
100
+ Binary Casts | asfloat(), asint(), asuint() |
90
101
Bitwise Operators | ~ , <<, >>, &, \| , ^, <<=, >>=, &=, \| =, ^= | Only valid on int and uint vectors
91
102
Boolean Math Operators | & &, ||, ?: |
92
103
Cast Operator | (type) |
@@ -240,4 +251,4 @@ Unary Operators | !, -, + |
240
251
| asint | Emulated | |
241
252
| asint16 | Emulated | |
242
253
| asuint | DXIL::OpCode::SplitDouble | |
243
- | asuint16 | Emulated | |
254
+ | asuint16 | Emulated | |
0 commit comments