webgpu / webgpu-debugger

MIT License
69 stars 8 forks source link

Handle when some size dimensions are not specified #10

Closed greggman closed 2 years ago

greggman commented 2 years ago

Not sure if this is correct but was trying another sample and it failed here because depthOrArrayLayers was not set so the size calculation was NaN

Kangz commented 2 years ago

The correct fix would be to implement this TODO https://github.com/Kangz/spector2/pull/10/files#diff-44a49484d74ecf1335162f26a60fd9421a214db4b77e44c5bd98fc5f89fa7d08R1249 with https://gpuweb.github.io/gpuweb/#typedefdef-gpuextent3d which can be either an array or a dictionary and has default values.

greggman commented 2 years ago

I put the fix here: https://github.com/Kangz/spector2/pull/12

But it's needed in 2 places. Rather than repeat the code in both places it seemed best to put it in one place which is part of what prompted the typescript PR