[webkit-changes] [WebKit/WebKit] f13437: [WebGPU] RenderBundleEncoder with very large comma...

mwyrzykowski noreply at github.com
Wed Oct 9 14:18:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f134376a48ae3a757d6353034170fd34ee4a5506
      https://github.com/WebKit/WebKit/commit/f134376a48ae3a757d6353034170fd34ee4a5506
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2024-10-09 (Wed, 09 Oct 2024)

  Changed paths:
    A LayoutTests/fast/webgpu/nocrash/RenderBundle_WRITE-expected.txt
    A LayoutTests/fast/webgpu/nocrash/RenderBundle_WRITE.html
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm

  Log Message:
  -----------
  [WebGPU] RenderBundleEncoder with very large command count can result in ICB allocation to fail
https://bugs.webkit.org/show_bug.cgi?id=281067
rdar://137416848

Reviewed by Tadeu Zagallo.

Metal doesn't specify the maximum number of commands which can be used in a
single ICB, but large numbers around 2 million seem to cause allocation failures.

Split the ICB and compute a number based on the maximum buffer size so it adapts to iOS and devices
where we can allocate less memory.

* LayoutTests/fast/webgpu/nocrash/RenderBundle_WRITE-expected.txt: Added.
* LayoutTests/fast/webgpu/nocrash/RenderBundle_WRITE.html: Added.
Add regression test.

* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::finalizeRenderCommand):
(WebGPU::RenderBundleEncoder::endCurrentICB):

Canonical link: https://commits.webkit.org/284924@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list