Hi Developers
I can get WebGPU to work fine with the release candidate 9.4.0. I am little puzzled, why you require “-sASYNCIFY” to be used. I would prefer the calls to be blocking, e.g. GetRenderWindow()
.
I am working on establishing a better debug, but currently I ran into some memory if build with threading (32-bit).
My build setup (external project using VTK).
list(APPEND emscripten_link_options
"-lembind"
"-sWEBGL2_BACKWARDS_COMPATIBILITY_EMULATION"
"-sMODULARIZE=1"
"-sASYNCIFY=1"
"-sASYNCIFY_STACK_SIZE=81920"
"-sEXPORT_ES6=1"
"-sALLOW_MEMORY_GROWTH=1"
"-sEXPORT_NAME=VtkwebAssemblyModule"
"-sEXPORTED_RUNTIME_METHODS=['ENV', 'FS', 'ccall', 'stringToNewUTF8', 'addFunction']"
"-sEXPORTED_FUNCTIONS=['_free', '_malloc']"
# "-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['$addFunction']" # CMake adds another $ sign!
"-sINCLUDE_FULL_LIBRARY" # for addFunction
"-sALLOW_TABLE_GROWTH=1"
"-sERROR_ON_UNDEFINED_SYMBOLS=0"
)
if (ENABLE_THREADING)
list(APPEND emscripten_link_options
"SHELL:-s USE_PTHREADS=1"
"-pthread"
"SHELL:-s PTHREAD_POOL_SIZE=4"
"SHELL:-s OFFSCREENCANVAS_SUPPORT=1" # Proxy rendering to main browser thread
"SHELL:-s ENVIRONMENT=web,worker"
)
else()
list(APPEND emscripten_link_options
"SHELL:-s ENVIRONMENT=web"
)
endif()
I am using your most recent docker images. Your 32-bit works fine, the 32-bit with threading gives me the memory out of bounds at startup. I can see that WebGPU is found and the adapter information.
Any hints are welcome. If not, I will work on establishing a better debugging setup.
Thanks
Jens