[webkit-changes] [WebKit/WebKit] 214540: [WebGPU] RenderPassEncoder::beginOcclusionQuery wi...

mwyrzykowski noreply at github.com
Tue Mar 21 13:04:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2145402eba85d243bfe2bfd6009dea8f341cc270
      https://github.com/WebKit/WebKit/commit/2145402eba85d243bfe2bfd6009dea8f341cc270
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M Source/WebGPU/WebGPU/RenderPassEncoder.mm

  Log Message:
  -----------
  [WebGPU] RenderPassEncoder::beginOcclusionQuery will crash when offset%8 != 0
https://bugs.webkit.org/show_bug.cgi?id=254177
<radar://106959317>

Reviewed by Myles C. Maxfield.

In QuerySet.mm, Device::createQuerySet already creates a buffer
with size that is a multiple of 8.

-[MTLRenderCommandEncoder setVisibilityResultMode:offset:] requires
offset to be a multiple of 8. It is the offset into the buffer.

queryIndex is the index of the visiblity query. Each index is offset
8 bytes in the buffer.

So we can simply multiply the index by 8 here.

* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::beginOcclusionQuery):

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




More information about the webkit-changes mailing list