| commit | db3369f11a4d88b0d7f10af8e55012d3a8a7f407 | [log] [tgz] |
|---|---|---|
| author | mridulgoyal <mridulgoyal@google.com> | Thu Oct 30 01:11:34 2025 -0700 |
| committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Oct 30 01:11:34 2025 -0700 |
| tree | bbe28758ea9f505a70706a39f34db35fe36cee33 | |
| parent | 7fdc2962e88dfcd8b56efd792b190f58542ef20c [diff] |
WebGPU Kotlin: Added fix for unused variable in Texture helper for g3 blaze test Bug: 455541592 Change-Id: I8ed9f94df69593409d7130eb1ba67271c9688902 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/269855 Reviewed-by: Tarun Saini <sainitarun@google.com> Reviewed-by: Nikita Gupta <nikigupta@google.com> Commit-Queue: Mridul Goyal <mridulgoyal@google.com>
diff --git a/tools/android/webgpu/src/main/java/androidx/webgpu/helper/Textures.kt b/tools/android/webgpu/src/main/java/androidx/webgpu/helper/Textures.kt index b4109b1..5a46bb9 100644 --- a/tools/android/webgpu/src/main/java/androidx/webgpu/helper/Textures.kt +++ b/tools/android/webgpu/src/main/java/androidx/webgpu/helper/Textures.kt
@@ -56,7 +56,11 @@ it.finish() })) - readbackBuffer.mapAsync(MapMode.Read, 0, size.toLong()) + val bufferMapReturn = readbackBuffer.mapAsync(MapMode.Read, 0, size.toLong()) + + if (bufferMapReturn.status != MapAsyncStatus.Success) { + throw DawnException("Failed to map buffer: ${bufferMapReturn.message}") + } return Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).apply { copyPixelsFromBuffer(readbackBuffer.getConstMappedRange(size = readbackBuffer.size))