Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
2.98k
stars
823
forks
source link
HLSL: shader with fmod where y is integer not producing OpFMod, changing y to float works #1960
Closed
danginsburg closed 4 years ago
Compiling the following shader with glslang using glslangValidator -e MainPs -D -V -S frag test.hlsl -o test.spv:
Produces spir-v that never executes fmod:
This appears to be because the y value in fmod is an integer. If I change the shader so that it is a floating point value:
Then it produces the correct spir-v. Fxc accepts it either way: