Bug 198683
| Summary: | Work around the performance cost of creating bind groups | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> |
| Component: | WebGPU | Assignee: | Justin Fan <justin_fan> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Myles C. Maxfield
We model bind groups as argument buffers, which turn out to be regular MTLBuffers in Metal. On some drivers, creating a MTLBuffer can take a huge amount of time (https://github.com/gpuweb/gpuweb/issues/116#issuecomment-449245367).
Instead, we should try to make one big buffer, and use segments of the same buffer for many bind groups (using the "offset" parameter of -[MTLArgumentEncoder setArgumentBuffer:offset] https://developer.apple.com/documentation/metal/mtlargumentencoder/2915777-setargumentbuffer?language=objc
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Justin Fan
This was implemented in https://trac.webkit.org/changeset/248606/webkit.
*** This bug has been marked as a duplicate of bug 200606 ***