Skip to content

Conversation

anupamachandra
Copy link
Contributor

@anupamachandra anupamachandra commented Jul 16, 2025

Implements #449 #448 and #437.

Updated the spec with:
Rounding: Round to Nearest Even #448
Denorm: Implementation defined #449
Upconversion: Not intended behavior but allowed to support older hardware #437

These rules apply to all coopvec functions.

> conversion rules
> [here](https://microsoft.github.io/hlsl-specs/specs/hlsl.html#Conv).
Float to integer conversion is RTNE (round to nearest even) and saturating.
Integer to float conversion is RTNE. Given the diverse hardware used in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For integer to float, what is the overflow behavior when the integer value is out-of-range of the selected float value? Is it saturating, or does it generate +/-INF? Or is it implementation defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is implementation defined. Ideally that would be INF, but since we aren't specing out INF/NAN behavior due to varying hardware, this would be partial specifying INF generation which I think will make it more confusing.

guaranteed to be supported on all implementations can be found in
[Minimum Support Set].

See [Conversion Rules] for rounding and denorm behavior.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing [Conversion Rules] link elsewhere (see how [Minimum Support Set] above is linked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants