-
Notifications
You must be signed in to change notification settings - Fork 488
render-test: resolve cooperative-matrix-2 sub-feature names to a real RHI feature #12735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,4 +114,15 @@ struct Options | |
| Options& outOptions); | ||
| }; | ||
|
|
||
| /// Return the `rhi::Feature` a `-render-feature` name refers to, or `rhi::Feature::_Count` if the | ||
| /// name is not recognized. | ||
| /// | ||
| /// This is the single place that maps a test's feature name onto an RHI feature, so that option | ||
| /// parsing (which rejects unknown names) and the runtime requirement check (which decides whether | ||
| /// to skip a test) can never disagree. Besides the names generated from `SLANG_RHI_FEATURES`, it | ||
| /// resolves the individual `VK_NV_cooperative_matrix2` sub-feature names used by tests -- slang-rhi | ||
| /// exposes that extension only as the single `cooperative-matrix-2` feature, so each sub-feature | ||
| /// name maps onto it. | ||
| rhi::Feature getRenderFeatureFromName(const Slang::UnownedStringSlice& featureName); | ||
|
Comment on lines
+117
to
+126
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value Add a concrete mapping example. Document one alias mapping, such as As per coding guidelines, “Include a concrete example for non-trivial behavior.” Source: Coding guidelines |
||
|
|
||
| } // namespace renderer_test | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Clarity: alias-table precedence over the generated table hides a removal condition
The sub-feature alias loop runs before the
SLANG_RHI_FEATURES-generated table below it. If slang-rhi ever adds any of these five names to the X-macro (i.e. exposes the granular sub-features), the alias here would shadow the generated entry and keep resolving the name toCooperativeMatrix2— the granular feature would be unreachable through this resolver.The PR description already states the intended remediation ("if slang-rhi later exposes the granular features, the alias entries are deleted and the generated table picks the names up"), but that dependency lives only in the PR body. A future maintainer reading the code sees why the aliases exist but not when they must be removed.
Suggestion: add a one-line comment on this block noting the aliases should be deleted once slang-rhi exposes these names directly, so the resolver returns the granular feature rather than being silently shadowed. Optional/non-blocking.