rajveermalviya / go-webgpu Goto Github PK
View Code? Open in Web Editor NEWGo bindings for WebGPU, a safe & cross-platform GPU abstraction
License: Apache License 2.0
Go bindings for WebGPU, a safe & cross-platform GPU abstraction
License: Apache License 2.0
currently build-wgpu.yml
generates multiple PRs for separate GOOS/GOARCH combinations. It would be better to replace it with single build creating single commit/PR containing all GOOS/GOARCH combinations.
this would be possible to do with upload-artifact and download-artifact.
I always hit "undefined: getSurfaceDescriptor" issue. See below.
``´
➜ gio-windowing git:(main) ✗ go build .
go: downloading github.com/rajveermalviya/gio v0.0.0-20220407081512-669757591f4c
go: downloading golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d
go: downloading gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2
go: downloading gioui.org/shader v1.0.6
go: downloading golang.org/x/exp/shiny v0.0.0-20220328175248-053ad81199eb
go: downloading github.com/benoitkugler/textlayout v0.0.10
go: downloading golang.org/x/exp v0.0.0-20220328175248-053ad81199eb
go: downloading github.com/go-text/typesetting v0.0.0-20220112121102-58fe93c84506
go: downloading github.com/gioui/uax v0.2.1-0.20220325163150-e3d987515a12
./main.go:70:34: undefined: getSurfaceDescriptor
➜ gio-windowing git:(main) ✗ cd ..
➜ examples git:(main) ✗ cd triangle
➜ triangle git:(main) ✗ go build .
go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220320163800-277f93cfa958
./main.go:52:32: undefined: getSurfaceDescriptor
➜ triangle git:(main) ✗ cd ..
➜ examples git:(main) ✗ cd gio-windowing
➜ gio-windowing git:(main) ✗ gogio -arch arm64,arm,amd64 -target android .
Hi,
I came across this library and would like to plug it into some existing code of mine and get started with WebGPU coding.
My framework is already based on GLFW and I was wondering if there is a trivial way to get go-webgpu
to work with GLFW?
I see that the examples use gamen
, however, it does not support some of the features I need (e.g. gamepad input; drag & drop) and would also mean a more substantial rewrite.
Ahoy
I am not firm with webgpu so far and am wondering if it is also possible to target Wasm and display in a canvas? Would it be possible to create such a surface? Would that be possible with gio? How would the surface work?
Thanks a lot and for any hint in advance
Hello, can you provide .so file in Artifacts, i see your Github Action have compiled a .so file, but not copy to final Artifacts. I'm a xamarin developer, it can't directly load static library, only support dynamic library, i try to convert .a to .so, but generate some error, so hope you can provide it directly.
I noticed you merged the darwin branch into main branch.
On latest main branch , darwin is broken.
Can you help advise what might be the problem ?
apple@x-MacBook-Pro-2 gio-windowing % go build .
apple@x-MacBook-Pro-2 gio-windowing % ls
gio-windowing main.go shader.wgsl surface_android.go surface_darwin.go surface_linux.go surface_windows.go
apple@x-MacBook-Pro-2 gio-windowing % ./gio-windowing
panic: TODO
goroutine 19 [running]:
main.getSurfaceDescriptor(...)
/Users/apple/workspace/go/src/github.com/rajveermalviya/go-webgpu/examples/gio-windowing/surface_darwin.go:11
main.loop.func1()
/Users/apple/workspace/go/src/github.com/rajveermalviya/go-webgpu/examples/gio-windowing/main.go:70 +0x27
sync.(*Once).doSlow(0x0?, 0xc000038480?)
/usr/local/opt/go/libexec/src/sync/once.go:68 +0xc2
sync.(*Once).Do(...)
/usr/local/opt/go/libexec/src/sync/once.go:59
main.loop(0xc000070000)
/Users/apple/workspace/go/src/github.com/rajveermalviya/go-webgpu/examples/gio-windowing/main.go:69 +0x6d2
main.main.func1()
/Users/apple/workspace/go/src/github.com/rajveermalviya/go-webgpu/examples/gio-windowing/main.go:44 +0x77
created by main.main
/Users/apple/workspace/go/src/github.com/rajveermalviya/go-webgpu/examples/gio-windowing/main.go:42 +0x25
apple@x-MacBook-Pro-2 gio-windowing %
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.