Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute shader enhancements #6234

Open
2 of 6 tasks
mvaligursky opened this issue Apr 10, 2024 · 0 comments
Open
2 of 6 tasks

Compute shader enhancements #6234

mvaligursky opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
area: graphics Graphics related issue feature

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Apr 10, 2024

The foundational features of WebGPU compute shader are already in place, and while this list isn't exhaustive, here are some considerations for future development:

  • document compute functionality for public release - all modules used by the compute examples, including Compute, BindGroup, BindGroupFormat, StorageBuffer, SHADERSTAGE_XXX enums and similar.
  • indirect drawing support, where drawing parameters come from GPU buffers: drawIndirect and drawIndexedIndirect
  • read-back of storage textures, related to Implement async read back of textures #2974
  • when vertex / fragment shaders need to access compute data (StorageBuffers, StorageTextures), they need to be written in WGSL, as GLSL does not support those primitives (and adding those is probably not something we'd want invest into). For those the user needs to provide BindGroups, as WGLS shaders do not have reflection, and we do not parse them at the moment. We'd ideally have some automatic solution here, similarly to GLSL. Perhaps we can parse lines containing @group(0) @binding(0) but also relevant structs for UBs? Related to Support WGSL shaders #5925
  • Currently compute passes are submitted in order with render passes, as typically results of one feed to the other. There are cases, such as using compute to run some data and get results back to the CPU, without using them in render passes at all. We should considering improving the API to allow compute passes to be executed immediately, and not in order.
  • add support for read-only and read-write usage of storage textures, in addition to existing write-only. New in Chrome 124 using an extension: https://developer.chrome.com/blog/new-in-webgpu-124. Done in Suport for reading from StorageTexture by a shader (WebGPU) #6268
@mvaligursky mvaligursky added feature area: graphics Graphics related issue labels Apr 10, 2024
@mvaligursky mvaligursky self-assigned this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature
Projects
None yet
Development

No branches or pull requests

1 participant