Skip to content

Commit ef1472a

Browse files
author
Greg Roth
authored
Fix and/or intrinsics with non-int parameters (cp to 1.8.2502) (microsoft#7091)
Cherry-pick of microsoft#7060 to release-1.8.2502 And/or intrinsics were set to allow any parameters, which is consistent with the behavior of the && and || operators they were meant to replace, however this meant that if they were passed floating point values, those values would be applied to the binary and/or operands, which isn't allowed. Instead, they should be converted to booleans to be consistent with the behavior of && and ||. This can be done simply by restricting the parameters to booleans which forces the appropriate conversions. Adds tests for for using bools, ints, and floats in scalars, different sized vectors, and matrices as parameters to or and and. Fixes: microsoft#7057 Fixes: microsoft#6995 (cherry picked from commit 25faa88)
1 parent 1fdebc4 commit ef1472a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/ReleaseNotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Place release notes for the upcoming release below this line and remove this lin
2626
- The incomplete WaveMatrix implementation has been removed.
2727
- DXIL Validator Hash is open sourced.
2828
- DXIL container validation for PSV0 part allows any content ordering inside string and semantic index tables.
29+
- The and() and or() intrinsics will now accept non-integer parameters by casting them to bools.
2930

3031
### Version 1.8.2407
3132

0 commit comments

Comments
 (0)