slang
slang copied to clipboard
Bug on supporting bit_cast<uint64_t>(double)
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);