-
Notifications
You must be signed in to change notification settings - Fork 27
Add tests for resources in structs #614
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?
Conversation
…o res-in-structs-tests
…o res-in-structs-tests
| [[vk::binding(5)]] | ||
| A a1 : register(u5); | ||
|
|
||
| A a2; |
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 is register(u0)?
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.
Yes, I wanted to test implicit binding as well. I can add a comment.
| float x = b1.Bufs[0][ID.x]; | ||
| float y = b1.Bufs[1][ID.x]; |
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.
Your buffers are all ints whats the point of doing these floating point implicit casts when you are going to store it back as an int?
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.
I'll change these to int as well. I started with floats for everything and then switched to ints since it is easier to check the results.
kmpeng
left a comment
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.
LGTM, mostly just a few nits. I think you accidentally linked the wrong issue to close though
| E e; | ||
| StructuredBuffer<int> SrvBuf2; | ||
| RWBuffer<int> UavBuf2; | ||
| uint n; |
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.
What's the point of n here?
This change adds tests for resource inside used-defined structs and classes. It includes 4 variants:
Closes #368