Commit d9b92cc
authored
Validate -render-features in render-test (#8940)
# Main Changes
Add validation for `-render-feature` and `-render-features` flags
against `SLANG_RHI_FEATURES`. Invalid feature names now fail immediately
during option parsing with clear error messages.
**Implementation:**
* Add `isValidFeatureName()` helper function using `SLANG_RHI_FEATURES`
macro
* Add workaround (WAR) to accept `cooperative-matrix-*` patterns until
RHI backend supports them
* Emit warning when WAR is triggered
* Add diagnostic error 1006 for invalid render features
Fixes #8274
# Test Fixes
**Fixed capability misuse:**
* Changed `cuda_sm_7_0` from `-render-feature` to `-capability` in wave
operation tests (5 files)
# Cooperative-Matrix WAR
Tests use cooperative-matrix-2 sub-features (e.g.,
`cooperative-matrix-reductions`, `cooperative-matrix-tensor-addressing`)
not yet in `SLANG_RHI_FEATURES`.
**Solution:** WAR accepts `cooperative-matrix-*` patterns, allowing:
* Tests remain enabled and skip gracefully on unsupported hardware
* No CI failures (Tesla T4 lacks cooperative-matrix-2)
* Auto-enable when RHI backend implements `VK_NV_cooperative_matrix2`
# Code Cleanup
* Fixed include order and removed unused includes from `options.cpp`
# Testing
* Invalid features caught with clear errors
* Cooperative-matrix tests skip gracefully on unsupported hardware1 parent 0f4d0f6 commit d9b92cc
File tree
7 files changed
+58
-14
lines changed- tests/hlsl-intrinsic
- active-mask
- tools/render-test
7 files changed
+58
-14
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
23 | 57 | | |
24 | 58 | | |
25 | 59 | | |
| |||
111 | 145 | | |
112 | 146 | | |
113 | 147 | | |
114 | | - | |
115 | | - | |
| 148 | + | |
| 149 | + | |
116 | 150 | | |
117 | 151 | | |
118 | | - | |
| 152 | + | |
119 | 153 | | |
120 | 154 | | |
121 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
122 | 165 | | |
123 | 166 | | |
124 | 167 | | |
| |||
0 commit comments