Issue |
135122
|
Summary |
[HLSL] Add support for floating point modulo
|
Labels |
new issue
|
Assignees |
farzonl
|
Reporter |
farzonl
|
clang-dxc is using c rules for modulo. That means modulo is not supported for floating point types.
https://hlsl.godbolt.org/z/zxxqqE7jG
## Errors
```bash
<source>:2:16: error: invalid operands to binary _expression_ ('half' and 'int')
<source>:6:16: error: invalid operands to binary _expression_ ('float' and 'int')
<source>:10:16: error: invalid operands to binary _expression_ ('half2' (aka 'vector<half, 2>') and 'int')
<source>:14:16: error: invalid operands to binary _expression_ ('float2' (aka 'vector<float, 2>') and 'int')
```
support needs to be added for float, half and the vector version of those two.
DXC does not support double or double vectors when targeting SPIRV or DirectX so that will become the default spec for now.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs