[dawn][native] Validate immediateSize alignment in PipelineLayout Add validation that `immediateSize` in PipelineLayoutDescriptor must be a multiple of kImmediateConstantElementByteSize (4 bytes). Previously, unaligned values like 1 or 3 could pass validation, which is incorrect. Also update existing tests: - ImmediateSizeNotAllowed: Use immediateSize=4 instead of 1, so the test exercises the feature-disabled path rather than the new alignment check. - ValidateImmediateSize exceed test: Use kMaxImmediateDataBytes+4 instead of +1 to keep the value aligned. Add ValidateImmediateSizeAlignment test covering success cases (4, 8, kMaxImmediateDataBytes) and failure cases (1, 2, 3, 5). Bug: 366291600 Change-Id: I4563ace13f06bdf65966018a9ed63bdfe3a37300 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/290035 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Shaobo Yan <shaoboyan@microsoft.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.