Bug 199093 - [WHLSL] Import bitwise bool tests
Summary: [WHLSL] Import bitwise bool tests
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Saam Barati
Keywords: InRadar
Depends on:
Blocks: 195681
  Show dependency treegraph
Reported: 2019-06-20 17:24 PDT by Justin Fan
Modified: 2019-07-03 10:16 PDT (History)
5 users (show)

See Also:

WIP (11.05 KB, patch)
2019-06-27 15:12 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (16.89 KB, patch)
2019-07-01 12:29 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 Justin Fan 2019-06-20 17:24:39 PDT
The following code fails to compile in the checker:

[numthreads(1, 1, 1)]
compute void _compute_main(device bool[] result : register(u0))
     result[0] = true;

However, it works if int/uint/uchar/float or float4 is substituted for bool (with a matching literal assignment).
Comment 1 Justin Fan 2019-06-20 17:28:13 PDT
Neither replacing the 'true' literal with '0 == 0' or the body with:

bool b = 0 == 0;
result[0] = b;

were successful past the checker.
Comment 2 Justin Fan 2019-06-25 16:31:32 PDT
The following code also fails in the checker:

[numthreads(1, 1, 1)]
compute void _compute_main(device bool[] result : register(u0)) {}

However, replacing 'bool' with 'int' successfully compiles.
Comment 3 Saam Barati 2019-06-26 16:27:41 PDT
Have a fix. We're failing in PODChecker.
Comment 4 Saam Barati 2019-06-26 16:35:47 PDT
This is on purpose for various reasons. The main one being we aren't specifying bool's bit pattern. So we are going to make the harness work around this.
Comment 5 Saam Barati 2019-06-27 15:12:35 PDT
Created attachment 373056 [details]
Comment 6 Saam Barati 2019-07-01 12:29:15 PDT
Created attachment 373248 [details]
Comment 7 WebKit Commit Bot 2019-07-02 12:06:50 PDT
Comment on attachment 373248 [details]

Clearing flags on attachment: 373248

Committed r247067: <https://trac.webkit.org/changeset/247067>
Comment 8 WebKit Commit Bot 2019-07-02 12:06:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2019-07-02 12:07:16 PDT
Comment 10 Truitt Savell 2019-07-03 10:16:31 PDT
Looks like the new test webgpu/whlsl-bitwise-bool-ops.html

added in https://trac.webkit.org/changeset/247067/webkit

is timing out on Mojave Debug WK2

History: https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=webgpu%2Fwhlsl-bitwise-bool-ops.html