commit | 98a7cd11aff1850f953f26fb6db6dc06632b8d63 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Tue Oct 11 09:52:25 2022 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Oct 11 09:52:25 2022 +0000 |
tree | bab437ef1e75748343cf89acc205d19945f64360 | |
parent | 5cbb32d764fb93c7586fb01b48a20fca32b6682b [diff] |
Add a ClampFragDepth transform. Add clamping of the @builtin(frag_depth) output of fragment shaders using two push constantsprovided by the outside environment. For example the following code: @fragment fn main() -> @builtin(frag_depth) f32 { return 0.0; } Is transformed to: enable chromium_experimental_push_constant; struct FragDepthClampArgs { min : f32, max : f32, } var<push_constant> frag_depth_clamp_args : FragDepthClampArgs; fn clamp_frag_depth(v : f32) -> f32 { return clamp(v, frag_depth_clamp_args.min, frag_depth_clamp_args.max); } @fragment fn main() -> @builtin(frag_depth) f32 { return clamp_frag_depth(0.0); } Fixed: tint:1620 Change-Id: Id403c4813fb2698aa87630abc30d26f02d53634a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104980 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Dawn is an open-source and cross-platform implementation of the work-in-progress 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)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.