weBIGeo / webigeo

Rendering system for weBIGeo.
GNU General Public License v3.0
4 stars 0 forks source link

Cannot set maxColorAttachmentBytesPerSample when requesting device #15

Closed pkomon-tgm closed 3 months ago

pkomon-tgm commented 6 months ago

Setting maxColorAttachmentBytesPerSample as required limit when requesting device has no effect. Devices always have the default limit of 32.

This is caused by a bug in emscripten. When requesting the webGPU device, the fields of the C struct requiredLimits are copied into a javascript object, but the field maxColorAttachmentBytesPerSample is missing.

See https://github.com/emscripten-core/emscripten/issues/21798.

pkomon-tgm commented 5 months ago

This has been fixed with PR https://github.com/emscripten-core/emscripten/pull/21799 and is already merged to main 🥳

We should keep this issue around until it makes it into the next release. Then we can remove applying the patch manually from our setup instructions in the README.

Additionally, we get rid of the two code paths here, as that PR also implemented wgpuAdapterGetLimits for emscripten. https://github.com/weBIGeo/webigeo/blob/145f3716a1022f51b4329eee43d6bfc6b63e6ac7/webgpu_engine/Window.cpp#L798-L806

pkomon-tgm commented 3 months ago

emscripten 3.1.60 (released May 16th) contains the PR.

This issue can be considered fixed.