gpuweb / gpuweb

Where the GPU for the Web work happens!
http://webgpu.io
Other
4.68k stars 304 forks source link

Algorithm steps for attachment load/store #4706

Closed toji closed 2 weeks ago

toji commented 2 weeks ago

Resolves an inline issue.

This PR adds queue timeline algorithmic steps for attachment load and store operations. The language around it is fairly tricky in that we want to abstractly cover both tile and non-tile architectures. To that end I've defined a concept of framebuffer memory that (in hand-wavy terms) serves as an abstract way to reference the memory being written to.

I also found that I needed to start tracking information about the attachments for the duration of the pass so that we could look up the store ops in renderPass.end(). The way I'm doing this (putting the attachment descriptors in the render state) is a bit clunky but works. Happy to take suggestions on making it more elegant.

github-actions[bot] commented 2 weeks ago

Previews, as seen when this build job started (9c33fb6fe34836708a9dc0857baa3e10c139d9f3): WebGPU webgpu.idl | Explainer | Correspondence Reference WGSL grammar.js | wgsl.lalr.txt

toji commented 2 weeks ago

Thanks for the feedback. Pushed an updated patch, PTAL.