forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C-like emitter: Pass switch condition type to case emitter
In WGSL, the switch condition and case types must match. https://www.w3.org/TR/WGSL/#switch-statement The Slang WGSL emitter solves this by doing an explicit conversion. For this reason, pass the switch condition type to the function that emits the cases. Note that this type mismatch should eventually be fixed in the front-end, as discussed in issue shader-slang#4921. However, that is not yet done, so for now this helps to address issue shader-slang#4807.
- Loading branch information
Showing
2 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters