Skip to content

Update code for emscripten SDK 3.1.45

The Emscripten SDK made some subtle changes in 3.1.43, 3.1.44, and 3.1.45 - Changelog.

General changes:

  • Disables IOExportGL2PS in WebAssembly, because gl2ps uses OpenGL features unavailable in GLES.
  • Clean up documentation for emscripten C++ examples. A lot of it was redundant.
  • Fix the fourth vertex color in the TestTheQuad* webgpu unit tests. (will enable CI once dawn is stabilized)
  • Update docker image for webassembly:build job from dockcross/web-wasm:20230116-670f7f7 -> dockcross/web-wasm:20230831-0ac0f7a. This has emscripten 3.1.45. Related upstream PR dockcross/#793

libc:

  • In 3.1.44, the most breaking change was libc, from musl 1.2.3 to 1.2.4, changing the availability of stat64 struct and function.
  • With Emscripten hosts, IO/Ensight, IO/LSDyna readers use stat or stat64 depending on whether _LARGEFILE64_SOURCE was defined.

WebGPU/Dawn

  • In 3.1.43, the webgpu header was synchronized with dawn@acd91e in emscripten-core/emscripten@e281066
  • Renamed WGPUShaderModuleWGSLDescriptor::source -> WGPUShaderModuleWGSLDescriptor::code.
  • Removed SetDeviceLostCallback in favor of WGPUDeviceDescriptor::deviceLostCallback member.
  • Renamed dawn::native::GetAdapter(deprecated by dawn) to dawn::native::EnumerateAdapters.
  • Renamed wgpu::RenderBundleEncoder::colorFormatsCount(deprecated by dawn) to colorFormatCount.
  • Clean up dawn native CMake code path.
  • Adds X11 WebGPU render window. Cherry-picked !10239. This lets us easily step through shader programs on the Linux desktop without needing SDL2. Other platform windows can be added when we do proper dawn integration.
  • Disables SDL2 WebGPU render window on the desktop. Cherry-picked !10239
  • Cleans up WebGPU object factory and CMake code. Cherry-picked !10127
  • Closes #19060 (closed)
Edited by Jaswant Panchumarti (Kitware)

Merge request reports