DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

[SPIR-V] does not take -Gis (IEEE strict) argument into account

Open aras-p opened this issue 4 years ago • 3 comments

The -Gis command line argument should effectively mark all variables behave as if they had precise HLSL modifier in them (that's what #2861 seems to be doing in DXIL output).

But SPIR-V output seems to generate completely identical result no matter if -Gis is present or not. Only actually spelling out precise on variables makes it generate the NoContraction SPIR-V decorations.

aras-p avatar Dec 26 '20 19:12 aras-p

Thanks for reporting @aras-p. I think we have missed to implement this command line option for the SPIR-V backend.

ehsannas avatar Dec 29 '20 16:12 ehsannas

Now with #4529 merged in, I was wondering if this issue went up in priority? To have have sane floating point behavior we rely on this for our DXIL codepath, but would also love to rely on this for our SPIRV codepath. Having this makes a world of difference to us in terms of having to debug odd floating point issues. On the CPU side we got rid of relying of fastmath style behavior since we started using Rust and it's been a breath of fresh air.

Jasper-Bekkers avatar Jun 28 '22 09:06 Jasper-Bekkers

#4529 was just part of some general error messaging improvements and cleanup following issue triage, so implementing -Gis is still not currently on our roadmap of priorities for the near future. It should be supported by the SPIR-V backend though so we would be happy to review any PRs that address this, and provide any help with implementation questions if someone in the community is interested in contributing it sooner.

sudonatalie avatar Jun 28 '22 15:06 sudonatalie