[WebGPU][Kotlin] Use GetIntArrayRegion for IntArray Replaces JNIContext::GetIntArrayElements with env->GetIntArrayRegion into JNIContext's inline bump buffer (c->AllocArray) for int, int32_t, uint32_t, and enum IntArray arguments when length > 0, checks AllocArray and direct ByteBuffer capacity before reading array/buffer contents, and assigns nullptr when length == 0 across all array conversions. Also uses GetIntArrayRegion with an inline stack buffer in GPUImportedAHB nativeBeginAccess. The direct ByteBuffer check throws the IllegalArgumentException class cached in JNIClasses, and nested structure conversions return early when an exception is pending. Bug: b/576318708 Test: ./gradlew :webgpu:connectedDebugAndroidTest Change-Id: Ica33a70489eb7eca3807c6f987415d22cd6d3ec6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/354836 Commit-Queue: Mridul Goyal <mridulgoyal@google.com> Reviewed-by: Nikita Gupta <nikigupta@google.com> Reviewed-by: Tarun Saini <sainitarun@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.