Skip to content

Give Asdouble some love#3666

Merged
pow2clk merged 3 commits intomicrosoft:masterfrom
pow2clk:asdouble
May 27, 2021
Merged

Give Asdouble some love#3666
pow2clk merged 3 commits intomicrosoft:masterfrom
pow2clk:asdouble

Conversation

@pow2clk
Copy link
Copy Markdown
Collaborator

@pow2clk pow2clk commented Apr 6, 2021

asdouble crashed hard when provided with a 64-bit integer parameter.

This restricts those params to 32-bit and adds constant folding for good measure.

Greg Roth added 2 commits April 6, 2021 16:31
The type of the overload allowed i64 and refused casts. As a result, if
an i64 value was used, invalid code is produced leading to asserts or
validation errors.
Added support for folding when the params of asdouble are constants
@AppVeyorBot
Copy link
Copy Markdown

{
double d = asdouble(0, 0xBFF00000);
uint4 ret;
asuint(d, ret.xy, ret.zw);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Strange that output dim for low/high here is vec2 when input is scalar? This produces splat of low into ret.xy and splat of high into ret.zw. Is that what the code intended?

@AppVeyorBot
Copy link
Copy Markdown

@pow2clk pow2clk merged commit 0db66a3 into microsoft:master May 27, 2021
@pow2clk pow2clk deleted the asdouble branch May 27, 2021 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants