Skip to content

Special fp value get wrong result for fmod #6567

@python3kgae

Description

@python3kgae

Description

fmod with special input get wrong result.

Steps to Reproduce

dxc -Tvs_6_0

RWBuffer<float4> results;

[shader("vertex")]
void main() {
      // Explicit float
      // 0.0, -0.0, NaN, -NaN
      results[0] = float4(fmod(0.0f, 1.0f),
                                        fmod(-0.0f, 1.0f),
                         fmod(5.5f, 0.0f),
                         fmod(-5.5f, 0.0f));
}

Actual Behavior

0.0, 0.0, 0.0, 0.0 is stored into result[0].

Environment

  • DXC version : 1.8
  • Host Operating System : Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crash

    Type

    No type

    Projects

    Status

    Triaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions