floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
7.12k stars 501 forks source link

Initial (readonly) storage buffer support. #1007

Closed floooh closed 6 months ago

floooh commented 8 months ago

First step will introduce storage buffers without compute shaders. This allows more flexibility for providing random-access data to the GPU (e.g. replacing float textures as 'poor man's storage buffers').

To investigate:

TODO:

jakubtomsu commented 7 months ago

Oh, are you planning to eventually support compute shaders, on selected backends? That would be absolutely amazing, it's probably the number one feature I'm missing in sokol_gfx right now. Especially now I've moved on to 3D graphics. The storage buffers seem like a good first step!

floooh commented 7 months ago

Yes, compute shaders is planned afterward for the next 'big update' after this initial storage buffer support update. I need to come up with a 'resource barrier strategy' though, I'll most likely take WebGPU as a blueprint.

fiserj commented 6 months ago

This is great milestone, thank you! (I can finally stop abusing uniforms for that 🙈)

roig commented 6 months ago

Amazing work, thank you for this update.