| commit | f48e51efdbe3a87ee6b2b727436b3c25dfbc9d08 | [log] [tgz] |
|---|---|---|
| author | shaoboyan <shaoboyan@microsoft.com> | Wed Nov 19 00:11:32 2025 -0800 |
| committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Nov 19 00:11:32 2025 -0800 |
| tree | 0d5ef077ba587f455ba2a2d9815af4632019cfb9 | |
| parent | dac92db6ead5eeedcfe976b8338f0f487483b332 [diff] |
tint/hlsl: Implement ArrayLengthFromImmediates support This change enables HLSL backend to use immediate data blocks (root constants) for storing buffer size information, eliminating the need for a separate uniform buffer when computing array lengths. Why: - Reduces descriptor table usage in D3D12 by storing buffer sizes in root constants instead of requiring a dedicated uniform buffer - Provides performance benefit by avoiding an extra buffer binding - Brings HLSL backend to parity with MSL backend which already supports this optimization Components affected: - ArrayLengthFromUniformOptions: Added buffer_sizes_offset field to support immediate block storage at a specified offset - PopulateBindingRelatedOptions: Fixed to properly copy the new buffer_sizes_offset field from input options - HLSL raise pipeline: Added buffer_sizes array creation in immediate data config, packed as array<vec4<u32>> for 16-byte alignment - Transform selection: Conditionally uses ArrayLengthFromImmediates when buffer_sizes_offset is set, otherwise falls back to ArrayLengthFromUniform Bug: 366291600 Change-Id: I42d6dc3e172513d853fe502e60d337c22142be95 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/273955 Commit-Queue: Shaobo Yan <shaoboyan@microsoft.com> Reviewed-by: James Price <jrprice@google.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.