Skip to content

[SPIR-V] FP classification functions generate spir-v with the incorrect return type. #6783

Closed

Description

Description

FP classification functions generate spir-v with the incorrect return type.

Steps to Reproduce

When an externally visible value is passed to the fp classification functions, the spir-v generated is incorrect. This is following up on issues found when fixing #6712, which only reported an issue with isnan. They generate an error of the form:

fatal error: generated SPIR-V is invalid: Expected bool scalar or vector type as Result Type: IsInf
  %35 = OpIsInf %uint %34

isfinite: https://godbolt.org/z/96Yr44rbj
isinf: https://godbolt.org/z/fKfzaxE6E

I cannot find a HLSL function that corresponds to OpIsNormal, so I think those are the only two we should be worried about.

Actual Behavior

Spir-V validation failure because OpIsInf should have a boolean return type.

Environment

  • DXC version latest
  • Host Operating System Linux

Activity

  1. added
    bug
    spirv
    needs-triage
    on Jul 15, 2024
  2. added a commit that references this issue on Sep 9, 2024
    74ef4d2
  3. moved this from New to In review in HLSL Roadmapon Sep 9, 2024
  4. moved this from In review to Done in HLSL Roadmapon Sep 10, 2024
  5. added a commit that references this issue on Sep 11, 2024
    b400c72
  6. added a commit that references this issue on Jul 24, 2025
    fe261eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugspirv

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions