Bug 200872
Summary: | [WHLSL] Consider moving as much work from prepare() into createShaderModule as possible | ||
---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> |
Component: | WebGPU | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | Other | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Myles C. Maxfield
Presumably, we could put almost all the processing of prepareShared() inside createShaderModule(). This could be an optimization on some content which reuses shader modules among multiple pipelines.
When we try to merge two modules (when creating a render pipeline), we'll have to have a story about duplicate standard library functions. We can do one of the following:
1) Defer standard library processing until this step, and do it once regardless of the number of shader modules are being joined. This means less work is being done up front inside createShaderModule(), which makes the optimization less powerful.
2) Perform standard library processing in createShaderModule(), and make pipeline creation smart enough to de-duplicate standard library functions.
3) Simply allow duplicate standard library functions. This would likely increase Metal's compile times.
4) Keep it the way it is, and have shader modules be a thin wrapper around strings.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Myles C. Maxfield
WHLSL is no longer relevant.