-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpu: gpu-dawn crashes JVM on Windows 11 #1213
Comments
By default Dawn bounces all C API calls through a vtable which acts as a swappable interface implementation for e.g. testing. To initialize the interface, there must be a call to There is some more info on it here: https://machengine.org/pkg/mach-gpu-dawn/#important-building-webgpu-api-symbols However, I must warn you that the Mach project is moving away from Dawn/WebGPU in favor of our own graphics abstraction sysgpu. As a result, the My advice would be one of two options:
Hope that helps! |
First of all, thank you for your help! I just tried calling directly and it didn't crashed the JVM though the status of the response is not success while in an executable file it works. Anyway, I am considering switching to using sysgpu, which I guess that it will be much more easier to debug. My only concern is if sysgpu can achieve a relatively stable state in the coming months, at least in the parts related to compute shaders? (According to the commit records, there has been no progress for four months.) If so, I'm willing to make at least sysgpu accessible to Java&Kotlin applications, since JVM and Android community is in short of a gpu interface that is modern and easy to deploy for a long time. Thank you for taking the time out of your busy schedule to answer my question. |
sysgpu is definitely not stable, it is extremely experimental and likely to change a lot in the coming months. I expect its API and shading language to change dramatically. |
Considering the following scenario:
If you wish to use webgpu via zig in a Java program, it would be natural to use JNI to call the zig function with
callconv(.C)
. However, I've tested mach-gpu on my two PC and the following code makes JVM crashed. (Btw, the dawn binding by zig-gamedev works well).Native.java:
Native.zig:
root.zig:
Here the jni library is SuperIceCN/zig-jni.
Build and run Native.java and then the JVM crashed.
Console log:
JVM crash report:
I have been spending a long time on this issue, but I still cannot find a clue. I am grateful for any help.
The text was updated successfully, but these errors were encountered: