Skip to content

[Feature Request] Separate compiler flags to disable/enable associative expression rewriting and other FP optimizations #8530

@scuff3drook

Description

@scuff3drook

Is your feature request related to a problem? Please describe.
Currently, users have the following options to disable fast-math optimizations:

  • The precise qualifier can decorate any expression/variable to inhibit all fast-math operations
  • The -Gis flag can be used to implicitly declare that all expressions are precise

Unfortunately, there is no "in between," meaning that you either have all of fast-math or none of it. In particular, being able to decouple the compiler setting for math associativity from math contraction optimizations would be a useful lever to pull in many shader programs.

Describe the solution you'd like
I would like the various fast-math optimizations to be enabled or disabled independently of each other.

Describe alternatives you've considered
Here, I describe the possibility of an intrinsic that suggests a contracted operation, even if precise or -Gis is requested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions