microsoft / microsoft/DirectXShaderCompiler
[SPIRV] Add support for -ffast-math
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Is your feature request related to a problem? Please describe.
Cant seem to find any way to get -ffast-math to work with dxc
Describe the solution you'd like
A flag like -fspv-ffast-math to enable decorations for appropriate operations
Describe alternatives you've considered
-ffinite-math-only but it doesnt imply Fast and AllowRecip afaik that are mentioned here: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#FP_Fast_Math_Mode
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at dxc's handling of compiler flags and trace how -ffinite-math-only is translated for SPIR-V. Consult the linked SPIR-V FP_Fast_Math_Mode specification to identify the required decorations; done means a new -fspv-ffast-math flag enables the appropriate Fast and AllowRecip behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100