-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[HLSL] Split [[hlsl::resource_class]] out of the HLSLResource attribute #98193
Closed
Tracked by
#98192
Labels
clang:codegen
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
HLSL
HLSL Language Support
Comments
6 tasks
bob80905
added a commit
that referenced
this issue
Jul 12, 2024
The ability to spell out and specify the resource class is necessary for testing various resource binding behaviors. Though it is not intended for users to use this in customized HLSL source code, the ability to specify the resource class via an attribute is immensely helpful for writing thorough tests. This PR introduces a new attribute, hlsl::resource_attribute, that can only be applied on structs. This attribute only has 1 required argument, and must be one of: ``` SRV UAV CBuffer Sampler ``` By applying this attribute to a struct, the struct will have the `HLSLResourceClassAttr` attribute attached to it in the AST representation, which provides information on the type of resource class the struct is meant to be. The resource class data that was originally contained within the `HLSLResourceAttr` attribute has been removed in favor of this new attribute, and so certain ast-dump tests need to be modified so that the same information can be represented via 2 attributes instead of one. Fixes #98193 --------- Co-authored-by: Damyan Pepper <damyanp@microsoft.com>
@llvm/issue-subscribers-clang-frontend Author: Justin Bogner (bogner)
Create a new `hlsl::resource_class` attribute to replace the resource class argument of the HLSLResource unspellable attribute. The attribute should be spellable so that we can use it to simplify testing.
AC:
|
@llvm/issue-subscribers-clang-codegen Author: Justin Bogner (bogner)
Create a new `hlsl::resource_class` attribute to replace the resource class argument of the HLSLResource unspellable attribute. The attribute should be spellable so that we can use it to simplify testing.
AC:
|
aaryanshukla
pushed a commit
to aaryanshukla/llvm-project
that referenced
this issue
Jul 14, 2024
) The ability to spell out and specify the resource class is necessary for testing various resource binding behaviors. Though it is not intended for users to use this in customized HLSL source code, the ability to specify the resource class via an attribute is immensely helpful for writing thorough tests. This PR introduces a new attribute, hlsl::resource_attribute, that can only be applied on structs. This attribute only has 1 required argument, and must be one of: ``` SRV UAV CBuffer Sampler ``` By applying this attribute to a struct, the struct will have the `HLSLResourceClassAttr` attribute attached to it in the AST representation, which provides information on the type of resource class the struct is meant to be. The resource class data that was originally contained within the `HLSLResourceAttr` attribute has been removed in favor of this new attribute, and so certain ast-dump tests need to be modified so that the same information can be represented via 2 attributes instead of one. Fixes llvm#98193 --------- Co-authored-by: Damyan Pepper <damyanp@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:codegen
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
HLSL
HLSL Language Support
Create a new
hlsl::resource_class
attribute to replace the resource class argument of the HLSLResource unspellable attribute. The attribute should be spellable so that we can use it to simplify testing.AC:
[[hlsl::resource_class(...)]]
can be applied to types in HLSL sourceThe text was updated successfully, but these errors were encountered: