Skip to content
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] sizeof(bool) should always be 4 #122932

Closed
spall opened this issue Jan 14, 2025 · 0 comments · Fixed by #122977
Closed

[HLSL] sizeof(bool) should always be 4 #122932

spall opened this issue Jan 14, 2025 · 0 comments · Fixed by #122977
Assignees
Labels
HLSL HLSL Language Support

Comments

@spall
Copy link
Contributor

spall commented Jan 14, 2025

Currently HLSL functions which return or take a bool, do so with bool as an i1, but bool should always be an i32.
Related the i1 is extended to an i8 in the function body, which is an error.
https://hlsl.godbolt.org/z/Ksqsva9q3

@spall spall self-assigned this Jan 14, 2025
@EugeneZelenko EugeneZelenko added HLSL HLSL Language Support and removed new issue labels Jan 14, 2025
@spall spall moved this to Planning in HLSL Support Jan 14, 2025
@davidcook-msft davidcook-msft moved this from Planning to Active in HLSL Support Jan 14, 2025
@spall spall moved this from Active to Needs Review in HLSL Support Jan 14, 2025
spall added a commit that referenced this issue Jan 15, 2025
make a bool's memory representation i32 in hlsl
add new test
fix broken test
Closes #122932
@github-project-automation github-project-automation bot moved this from Needs Review to Closed in HLSL Support Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HLSL HLSL Language Support
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

3 participants