-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[HLSL] Add a warning for implicit bindings #135909
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 1 commit
cabe20b
005e4b7
eacde9a
ac9950f
65a7eee
1876e21
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 |
---|---|---|
|
@@ -14,6 +14,12 @@ RWBuffer<int> c; | |
// No warning - explicit binding. | ||
RWBuffer<float> d : register(u0); | ||
|
||
// No warning - explicit binding. | ||
RWBuffer<float> dd : register(space1); | ||
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. Shouldn't there be a warning here? 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. Yes, you're correct. I've updated the latest, though this is commented out now because we can't actually write this test until #135287 goes in |
||
|
||
// No warning - explicit binding. | ||
RWBuffer<float> ddd : register(u3, space4); | ||
|
||
struct S { int x; }; | ||
// expected-warning@+1 {{resource has implicit register binding}} | ||
StructuredBuffer<S> e; | ||
|
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.
How about:
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.
This can't be tested util #135287 goes in, but it should warn. I added a commented out test and a
TODO
comment.