[Webkit-unassigned] [Bug 270079] PlayCanvas WebGPU examples failed to run

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 8 22:46:09 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=270079

--- Comment #4 from Mike Wyrzykowski <mwyrzykowski at apple.com> ---
There is an issue in playcanvas.

playcanvas is using 288 for the dynamic offset, but WebGPU's default alignment is 256. It appears playcanvas is assuming an alignment of 32, which is not supported currently in WebKit as some platforms require 256 byte alignments.


Relevant sections of the WebGPU specification:

https://www.w3.org/TR/webgpu/#programmable-passes-bind-groups
...
If bufferLayout.type is "uniform":

dynamicOffset must be a multiple of minUniformBufferOffsetAlignment.
If bufferLayout.type is "storage" or "read-only-storage":

dynamicOffset must be a multiple of minStorageBufferOffsetAlignment.
...

and

https://www.w3.org/TR/webgpu/#limits
...

minUniformBufferOffsetAlignment GPUSize32       alignment       256 bytes
The required alignment for GPUBufferBinding.offset and the dynamic offsets provided in setBindGroup(), for bindings with a GPUBindGroupLayoutEntry entry for which entry.buffer?.type is "uniform".

minStorageBufferOffsetAlignment GPUSize32       alignment       256 bytes
The required alignment for GPUBufferBinding.offset and the dynamic offsets provided in setBindGroup(), for bindings with a GPUBindGroupLayoutEntry entry for which entry.buffer?.type is "storage" or "read-only-storage".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240409/d2860a1f/attachment.htm>


More information about the webkit-unassigned mailing list