Bug 199602 - [WHLSL] Implement uint/int div safety and add tests
Summary: [WHLSL] Implement uint/int div safety and add tests
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks: 195681
  Show dependency treegraph
 
Reported: 2019-07-08 17:22 PDT by Saam Barati
Modified: 2020-05-05 00:42 PDT (History)
6 users (show)

See Also:


Attachments
WIP (2.57 KB, patch)
2019-07-20 06:57 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2019-07-08 17:22:30 PDT
e.g
```
    program = "uint foo(uint x, uint y) { return x / y; }";
    assert_equals(await callUintFunction(program, "foo", [makeUint(7), makeUint(2)]), 3);
```
Comment 1 Saam Barati 2019-07-09 16:30:52 PDT
and

```
    program = "int foo(int x, int y) { return x / y; }";
    assert_equals(await callIntFunction(program, "foo", [makeInt(7), makeInt(2)]), 3);
```
Comment 2 Saam Barati 2019-07-20 06:35:42 PDT
I shall do this
Comment 3 Saam Barati 2019-07-20 06:41:21 PDT
This seems to work now. I'll land tests.
Comment 4 Saam Barati 2019-07-20 06:42:06 PDT
(In reply to Saam Barati from comment #3)
> This seems to work now. I'll land tests.

Though maybe we need to do things to make the div safe
Comment 5 Saam Barati 2019-07-20 06:57:40 PDT
Created attachment 374551 [details]
WIP
Comment 6 Myles C. Maxfield 2020-05-05 00:42:35 PDT
WHLSL is no longer relevant.