[tint] Fix Objective-C files in Bazel In https://dawn-review.googlesource.com/c/dawn/+/324475, it was discovered objc files were not handled correctly and were temporarily disabled. This updates the generator to copy the .mm file to a .cc extension and then stand-alone cc_library that compiles the objc file as objc. By default, Bazel doesn't let .mm files go into cc_library targets. It's a bit clunky but I couldn't get the official objc_library to work on Tint's infrastructure (Something about the XCode setup was not being found by Bazel's default apple rules). While doing that, I noticed there were empty or effectively empty select statements, so I cleaned those up by moving the external dependency resolutions to go instead of being in the template itself and adding helpers to see if a list of files is non-empty before emitting the template section. Finally, I noticed a missing header after https://dawn-review.googlesource.com/c/dawn/+/324835 (at least on GCC) and fixed it. Suggested Review order: - src/tint/lang/msl/validate/BUILD.bazel to see the new objc-> cc_library target and an omitted empty file list. - Other BUILD.bazel files to see more empty sections go away. - The go code (start with the tests) - Everything else. Change-Id: I66360ebbf7fecdab1a95db00d3e20d4e6457e40e Bug: b/256859233 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/325135 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Auto-Submit: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Brandon Jones <bajones@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.