Skip to content

vkd3d-shader/ir: Lower ABS modifiers to instructions.

If this is approved, I plan to submit other MRs for all other source and destination modifiers (at least, those that are currently in use).

Similarly to operators with two destinations, the goal is to make the language more uniform and therefore require backends and passes to jump fewer hoops. See for example !1772 (bcfd3b3d). It is also valuable having arithmetic optimizations such as -(-x) -> x and abs(-x) -> abs(x) (when allowed by the data type and possible "fast math" modes), but they're probably better handled in a different place.

Merge request reports

Loading