Dawn Compute Example.

Skip to first unread message


Apr 9, 2019, 1:10:30 PM4/9/19
to Dawn Graphics

We were thinking about experimenting with simple image processing with Dawn/webGPU Compute API (Linux-Vulkan)
Is it possible in the current form ?

The texture impl doesnt seem to have image loading api's, is there a straight forward way to achieve it ? 
Saw some stb_image helper utilities for glTFViewer, should we think in those lines ?


Kai Ninomiya

Apr 9, 2019, 1:21:14 PM4/9/19
to soh...@chromium.org, Dawn Graphics
It is possible!

The only way to put data in a Dawn texture is by copying to it from a Dawn buffer. You can upload to a Dawn buffer by using mapWrite or setSubData. (setSubData may get removed.)

In glTFViewer (which I'm not sure still works properly), you'll find that it does that copy here.

Since you're doing compute, it's also possible to operate on the image data inside a Dawn buffer instead of a Dawn texture, depending on what's easiest.

You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To post to this group, send email to dawn-g...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/b2ef2b6c-13fd-48e7-b445-a8c60e0c23dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
0 new messages