Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f13e4f262188b0658506a5bbe0913dc571fd53fe
      
https://github.com/WebKit/WebKit/commit/f13e4f262188b0658506a5bbe0913dc571fd53fe
  Author: Kristian Monsen <[email protected]>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    A 
LayoutTests/fast/webgpu/regression/instance-step-buffer-smaller-than-stride-expected.txt
    A 
LayoutTests/fast/webgpu/regression/instance-step-buffer-smaller-than-stride.html
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
    M Source/WebGPU/WebGPU/RenderPassEncoder.h
    M Source/WebGPU/WebGPU/RenderPassEncoder.mm

  Log Message:
  -----------
  [WebGPU] draw() with an instance-stepped vertex buffer smaller than 
arrayStride triggers a validation error
https://bugs.webkit.org/show_bug.cgi?id=326020
rdar://188846674

Reviewed by Mike Wyrzykowski.

computeMininumVertexInstanceCount() already computes this condition correctly 
for
both vertex- and instance-stepped buffers, and drawIndexed(), drawIndirect() and
drawIndexedIndirect() all use it. Call it from draw() as well instead of 
guessing
from vertexCount, so the lastStride-as-stride pipeline gets substituted whenever
Metal would demand a full stride the bound buffer cannot provide.

Test: fast/webgpu/regression/instance-step-buffer-smaller-than-stride.html

* 
LayoutTests/fast/webgpu/regression/instance-step-buffer-smaller-than-stride-expected.txt:
 Added.
* 
LayoutTests/fast/webgpu/regression/instance-step-buffer-smaller-than-stride.html:
 Added.
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::Metal::RenderBundleEncoder::draw):
* Source/WebGPU/WebGPU/RenderPassEncoder.h:
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::Metal::RenderPassEncoder::draw):

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



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

Reply via email to