commit | 63d7bee5e35fcc67c4598be5e863f5f38ec06a43 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Wed Jul 24 11:07:00 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 24 11:07:00 2024 +0000 |
tree | c7755b80a52bbe06a8f3ce2db6d4fbc3c51b5402 | |
parent | 96770dda92f7ae778dff7e06c071c18231edd71a [diff] |
[Kotlin]: Add a KotlinRecord concept, factor struct conversion with it In the Dawn code generators, both structures and methods are considered "records" that have a bunch of named parameter/members with types. The conversion of structures and method records from Kotlin to C++ are very similar. To merge them both, a KotlinRecord concept is added that is a C++ structure for a the JNI objects representing the values of the Kotlin records. A macro is added that creates the KotlinRecord structure for a record (either a structure, or a method). A macro is added that creates a conversion function from a KotlinRecord to a structure. These two macros are used to factor out all of the common logic out of structures.cpp. The logic in methods.cpp will be factored out in a follow-up CL. A few new primitive types are added to dawn_kotlin.json. Helper CallGetter functions are added in structures.cpp to call the correct JNIEnv::Call*Method depending on what return type we expect. A couple hacks for handling the jlong ANativeWindow are added. We should remove them with a manually written method. Bug: 352711433 Change-Id: Iaa89c9e7e85f724aa3fd98136acbad176f68e522 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/198236 Reviewed-by: Sonakshi Saxena <nexa@google.com> Reviewed-by: Jim Blackler <jimblackler@google.com> Commit-Queue: Corentin Wallez <cwallez@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.