Bug 189596 - [WHLSL] Implement f16tof32, isnormal, and f32tof16
Summary: [WHLSL] Implement f16tof32, isnormal, and f32tof16
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thomas Denney
URL:
Keywords:
Depends on:
Blocks: 176199
  Show dependency treegraph
 
Reported: 2018-09-13 11:39 PDT by Thomas Denney
Modified: 2018-10-13 14:54 PDT (History)
2 users (show)

See Also:


Attachments
WIP (6.62 KB, patch)
2018-09-21 15:33 PDT, Thomas Denney
no flags Details | Formatted Diff | Diff
WIP (3.66 KB, patch)
2018-09-21 15:35 PDT, Thomas Denney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Denney 2018-09-13 11:39:04 PDT
These functions are currently unimplemented in Intrinsics.
Comment 1 Thomas Denney 2018-09-21 15:33:25 PDT
Created attachment 350443 [details]
WIP
Comment 2 Thomas Denney 2018-09-21 15:35:01 PDT
Created attachment 350444 [details]
WIP
Comment 3 Myles C. Maxfield 2018-09-22 01:55:37 PDT
Comment on attachment 350444 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=350444&action=review

> Tools/WebGPUShadingLanguageRI/Intrinsics.js:757
> +                    EPtr.box(!Number.isNaN(value.loadValue()));

Nope. "normal" means both not nan and not denormalized

> Tools/WebGPUShadingLanguageRI/Intrinsics.js:808
> +                    EPtr.box(castToFloat(bitwiseCast(Float32Array, Uint32Array, value.loadValue() & 0xFF)));

We have to do more bit twiddling for this one.

> Tools/WebGPUShadingLanguageRI/Intrinsics.js:815
> +                    EPtr.box(bitwiseCast(Uint32Array, Float32Array, castToHalf(value.loadValue())) & 0xFF);

Ditto
Comment 4 Myles C. Maxfield 2018-10-13 14:30:42 PDT
Migrated to https://api.github.com/repos/gpuweb/WHLSL/issues/35
Comment 5 Myles C. Maxfield 2018-10-13 14:54:18 PDT
https://github.com/gpuweb/WHLSL/issues/35