[glsl] Emit invariant gl_Position for invariant vertex position outputs Tint's GLSL printer previously dropped the @invariant attribute when handling @builtin(position) outputs in Printer::EmitIOVar, causing invariant vertex outputs to lose invariance in generated GLSL (failing invariance tests on strict GLES GLSL compilers such as NVIDIA). Emit `invariant gl_Position;` at global scope in Printer::EmitIOVar when attrs.invariant is set on the kPosition output builtin. Omit it for fragment kPosition inputs (gl_FragCoord), since GLSL ES 3.00+ and Desktop GLSL 4.20+ only allow the invariant qualifier on shader outputs. Update the two affected Tint GLSL golden files and add GlslWriterTest coverage for GLSL ES 3.10, Desktop GLSL 4.60, and fragment position inputs. Fixed: 591930048 Change-Id: Ia40ab5bbbb85df739cca879b202141b5943020a8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/366715 Auto-Submit: Victor Miura <vmiura@google.com> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: 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.