Bug 200461 - [WHLSL] We should generate identical metal code for the same WHLSL program
Summary: [WHLSL] We should generate identical metal code for the same WHLSL program
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-05 18:08 PDT by Saam Barati
Modified: 2020-05-05 00:42 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2019-08-05 18:08:25 PDT
Metal process caches shaders (with what appears to be text equality). Therefore, we should always generate the same Metal program for the same WHLSL shader.

Currently, we don't do this for a few reasons, often because we rely on pointer hash tables and their iteration order. E.g, I know of at least:
- We emit struct fields in different order
- I think we do the same for enum
- I think we might do the same for functions
Comment 1 Sam Weinig 2019-08-07 13:22:11 PDT
It would be good to be able to dump the metal shaders in layout tests (much like we dump the render tree) for testing.
Comment 2 Myles C. Maxfield 2020-05-05 00:42:37 PDT
WHLSL is no longer relevant.