Open soufianekhiat opened 3 months ago
Description On HLSL 5.1. we can have:
float nan_f32() { return 1.#IND; }
Without HLSL 6.x. alternative: error: invalid suffix '#IND' on floating constant
error: invalid suffix '#IND' on floating constant
Do we have plan for: https://microsoft.github.io/hlsl-specs/proposals/0003-numeric-constants.html hlsl::numeric_limits<float>::quiet_NaN() An unelegant alternative would be: float nan_f32() { return 1.0f/0.0f; } Which produce: 0x7FF0000000000000 cf. https://shader-playground.timjones.io/293af62284312601053e69ca30eeda87
hlsl::numeric_limits<float>::quiet_NaN()
float nan_f32() { return 1.0f/0.0f; }
0x7FF0000000000000
Steps to Reproduce // Not working: error: invalid suffix '#IND' on floating constant HLSL 6.0. https://shader-playground.timjones.io/4d91695886406f7a2c0cd8e21027f104 HLSL 6.6. https://shader-playground.timjones.io/3c52ea5b0687d9a72cabd99ff8cc20dd // Working: HLSL 5.1. https://shader-playground.timjones.io/606ded7e9933d6f62dd16e4f1d1464ea
Actual Behavior error: invalid suffix '#IND' on floating constant
Environment DXC 6.6. Windows
We should verify that proposal 0003 covers this scenario.
Description On HLSL 5.1. we can have:
Without HLSL 6.x. alternative:
error: invalid suffix '#IND' on floating constant
Do we have plan for: https://microsoft.github.io/hlsl-specs/proposals/0003-numeric-constants.html
hlsl::numeric_limits<float>::quiet_NaN()
An unelegant alternative would be:float nan_f32() { return 1.0f/0.0f; }
Which produce:0x7FF0000000000000
cf. https://shader-playground.timjones.io/293af62284312601053e69ca30eeda87Steps to Reproduce // Not working: error: invalid suffix '#IND' on floating constant HLSL 6.0. https://shader-playground.timjones.io/4d91695886406f7a2c0cd8e21027f104 HLSL 6.6. https://shader-playground.timjones.io/3c52ea5b0687d9a72cabd99ff8cc20dd // Working: HLSL 5.1. https://shader-playground.timjones.io/606ded7e9933d6f62dd16e4f1d1464ea
Actual Behavior
error: invalid suffix '#IND' on floating constant
Environment DXC 6.6. Windows