-
Notifications
You must be signed in to change notification settings - Fork 895
[SM 6.10] Disable Work Graphs in SM 6.10 #8798
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -2090,12 +2090,31 @@ static void AddHLSLIntrinsicAttr(FunctionDecl *FD, ASTContext &context, | |
| FD->addAttr(PureAttr::CreateImplicit(context)); | ||
| if (pIntrinsic->Flags & INTRIN_FLAG_IS_WAVE) | ||
| FD->addAttr(HLSLWaveSensitiveAttr::CreateImplicit(context)); | ||
| if (pIntrinsic->MinShaderModel) { | ||
| unsigned Major = pIntrinsic->MinShaderModel >> 4; | ||
| unsigned Minor = pIntrinsic->MinShaderModel & 0xF; | ||
| if (pIntrinsic->MinShaderModel || pIntrinsic->MaxShaderModel) { | ||
| clang::VersionTuple Introduced; | ||
| if (pIntrinsic->MinShaderModel) { | ||
| unsigned Major = pIntrinsic->MinShaderModel >> 4; | ||
| unsigned Minor = pIntrinsic->MinShaderModel & 0xF; | ||
| Introduced = clang::VersionTuple(Major, Minor); | ||
| } | ||
| // The maximum shader model is the last one that still supports the | ||
| // intrinsic: it is deprecated there, and obsoleted in the next minor | ||
| // shader model version. We could give longer deprecation periods in the | ||
| // future if there is a need for that. | ||
|
Comment on lines
+2100
to
+2103
Member
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. I'm not 100% sure we should worry about this idea of retrospectively deprecating the feature. I'm also not sure we should think about shader models as time frames, it seems like we're inventing some complexity here.
Collaborator
Author
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. Deprecation and removal are built into how availability attributes are implemented in Clang. We could set the deprecation to For example, I think we should figure out what features of SM 6.x we don't plan to bring to SM 7 (looking at you geometry shaders!), and start emitting warnings for those at some point soon so that users can adapt their code.
Member
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. I'm not sure that keying off SM is the right way to do this. WG's are as deprecated in SM 6.8 as they are in SM 6.9. I don't think we should think of SM's as timeframes where everybody uniformally updates all their shaders to the latest SM.
Collaborator
Author
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. I don't understand the "timeframes" statement. Shader Models are fundamentally a collection of APIs, and they (historically) build on each other as the numbers increase. I think of it like a version of a library. Version 6.9 has some features that are being removed in 6.10, so we annotate them as such. |
||
| clang::VersionTuple Deprecated; | ||
| clang::VersionTuple Obsoleted; | ||
| if (pIntrinsic->MaxShaderModel) { | ||
| unsigned Major = pIntrinsic->MaxShaderModel >> 4; | ||
| unsigned Minor = pIntrinsic->MaxShaderModel & 0xF; | ||
| Deprecated = clang::VersionTuple(Major, Minor); | ||
| DXASSERT( | ||
| Minor <= 14, | ||
| "I don't know how we should handle this, so let's assert for now."); | ||
| Obsoleted = clang::VersionTuple(Major, Minor + 1); | ||
| } | ||
|
Comment on lines
+2106
to
+2114
Collaborator
Author
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. I've added an assert to cover this because it is unclear to me exactly what we would do. Bumping the major version is possible, as is reving the file format to remove the restrictions on minor version count. |
||
| FD->addAttr(AvailabilityAttr::CreateImplicit( | ||
| context, &context.Idents.get(""), clang::VersionTuple(Major, Minor), | ||
| clang::VersionTuple(), clang::VersionTuple(), false, "")); | ||
| context, &context.Idents.get(""), Introduced, Deprecated, Obsoleted, | ||
| false, "")); | ||
| } | ||
| } | ||
|
|
||
|
|
||
This file was deleted.
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.
Unless we do another SM6.9 point release I don't think this is a true/fair statement right? Like folks using the retail SM6.9 right now aren't getting the deprecation warning
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.
We don't have point releases for shader models, just the compiler, which is an unfortunate distinction.