-
Notifications
You must be signed in to change notification settings - Fork 35
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
[0010] Allow casting to uint64_t #134
Conversation
@greg-lunarg FYI |
I am ok with adding this to the current design. Do we want to eliminate the cast to bool to test for null pointer as this new capability lets us do this with a comparison to zero? This feels a little cleaner to me and removes the ambiguity around what might constitute a null pointer. |
I was considering removing the cast to bool too. I can do that. |
We have decided to allow casting to uint64_t. It will make create more opportunities for developers to make mistakes, but they do not have to use it. The implementation cost does not seem too high. Fixes microsoft#93
As Greg suggested, the cast to bool is no longer needed if we can cast to an int, so we removed it. This commit also adds the uint64_t cast to the pseudo class definition for BufferPointers.
I rebased, and updated the linked list example now that #108 has been merged. |
@llvm-beanz Do you have any concerns? |
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. This is also probably more consistent with HLSL's somewhat magic "flat conversion" casting rules.
We have decided to allow casting to uint64_t. It will make create
more opportunities for developers to make mistakes, but they do not
have to use it. The implementation cost does not seem too high.
Fixes #93