googlecodelabs / feedback

Provide feedback to our codelabs by filing an issue here
18 stars 22 forks source link

[your-first-webgpu-app] #1349

Closed AlgumCorrupto closed 9 months ago

AlgumCorrupto commented 9 months ago

On https://codelabs.developers.google.com/your-first-webgpu-app?hl=pt-br#7 There was a snippet // Create the bind group layout and pipeline layout. const bindGroupLayout = device.createBindGroupLayout({ label: "Cell Bind Group Layout", entries: [{ binding: 0, visibility: GPUShaderStage.VERTEX | GPUShaderStage.COMPUTE, buffer: {} // Grid uniform buffer }, { binding: 1, visibility: GPUShaderStage.VERTEX | GPUShaderStage.COMPUTE, buffer: { type: "read-only-storage"} // Cell state input buffer }, { binding: 2, visibility: GPUShaderStage.COMPUTE, buffer: { type: "storage"} // Cell state output buffer }] });

I had to change the visibility on binding 0 and 1 from GPUShaderStage.VERTEX | GPUShaderStage.COMPUTE to GPUShaderStage.FRAGMENT | GPUShaderStage.VERTEX | GPUShaderStage.COMPUTE.

beaufortfrancois commented 9 months ago

There's a note for this in https://codelabs.developers.google.com/your-first-webgpu-app?hl=en#7:

image