[ir] Change semantics of var initializers `var` is currently required to always have an initializer, where using `undef` (nullptr) for the initializer signals implicit zero-initialization of the variable. This gives no way to declare a variable and leave it uninitialized, which is needed for a GLSL driver bug workaround and can also be useful to avoid unnecessary initialization of variables generated internally by Tint. This commit changes `var` to allow it to have zero or one operands. The absence of an initializer operand now indicates implicit zero-initialization (which matches WGSL), whereas an explicit `undef` initializer indicates that the variable can be left uninitialized. Change-Id: Id8039c01712583d89332ec6ecd7ebd2d075326a9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/351135 Commit-Queue: James Price <jrprice@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
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.