commit | a6300bfdf53dc1bfb461ffc94595881fefa13ea2 | [log] [tgz] |
---|---|---|
author | dan sinclair <dsinclair@chromium.org> | Fri Sep 27 23:48:30 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Sep 27 23:48:30 2024 +0000 |
tree | 03edd04ace18fb142c732f3ac62f53f615db7942 | |
parent | f3f67f73e31128319ed623a4d5d834ecaeb99bf4 [diff] |
[glsl] Convert `select` to `mix` instead of ternary. The current GLSL IR and AST backends translate the `select` builtin to a ternary condition. This isn't correct as in WGSL both branches need to be evaluated all of the time while in GLSL only the selected branch of a ternary is evaluated. This Cl converts the `select` calls to a `mix` call. In the case of a WGSL select with vector values and a scalar boolean condition the scalar boolean is splatted into a vector of correct size. Bug: 367066331 Change-Id: Ibe2bd5a3aabd29a108831e3ed4469eb40c490278 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/208194 Commit-Queue: dan sinclair <dsinclair@chromium.org> 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.