Skip to content

Commit

Permalink
fix linux arm64 by setting frag.constant* to nil / 0; add linux arm64…
Browse files Browse the repository at this point in the history
… linker flags
  • Loading branch information
rcoreilly committed Dec 6, 2024
1 parent 774e8fe commit 0779a62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wgpu/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,8 @@ func (p *Device) CreateRenderPipeline(descriptor *RenderPipelineDescriptor) (*Re
frag.targetCount = 0
frag.targets = nil
}
frag.constantCount = 0 // note: crashes on linux arm64 without setting this to 0
frag.constants = nil // even though wgpu doesn't even support it.

desc.fragment = frag
}
Expand Down
1 change: 1 addition & 0 deletions wgpu/wgpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ package wgpu
// Linux
#cgo linux,!android,amd64 LDFLAGS: -L${SRCDIR}/lib/linux/amd64 -lwgpu_native
#cgo linux,!android,arm64 LDFLAGS: -L${SRCDIR}/lib/linux/arm64 -lwgpu_native
#cgo linux,!android LDFLAGS: -lm -ldl
Expand Down

0 comments on commit 0779a62

Please sign in to comment.