Setup

Add the latest package of the androidx.webgpu release to the app module’s build.gradle.kts:

dependencies {
implementation("androidx.webgpu:webgpu:1.0.0-alpha01")
}

Check the project: https://github.com/shubham0204/Experiments/tree/main/androidx-webgpu-api-demo

Get GPU Device Info

To start exploring the WebGPU API, we write a method that retrieves the details of the underlying GPU device that is visible to the API:

import androidx.webgpu.helper.createWebGpu

class WebGPUComputeShader {

private val webGpu = runBlocking { createWebGpu() }

fun getGPUDeviceInfo(): AdapterInfo = runBlocking {
val ada...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help