Skip to content

Bug on supporting bit_cast<uint64_t>(double) #5470

Closed
@kaizhangNV

Description

@kaizhangNV

Following code will cause internal error:

RWStructuredBuffer<uint64_t> out;

uint64_t cast(double x)
{
    return bit_cast<uint64_t>(x);
}

[shader("compute")]
[numthreads(1,1,1)]
void computeMain()
{
    double x = 1.0;

    out[0] = cast(x);
}

note, there is no problem just doing

  out[0] = bit_cast<uint64_t>(1.0lf);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions