ebitengine / purego

Apache License 2.0
2.19k stars 69 forks source link

BlitCommandEncoder.CopyFromTexture doesn't work #290

Open TotallyGamerJet opened 4 hours ago

TotallyGamerJet commented 4 hours ago

PureGo Version

main

Operating System

Go Version (go version)

go version go1.22.1 darwin/arm64

What steps will reproduce the problem?

See https://github.com/hajimehoshi/ebiten/issues/3135

In github.com/hajimehoshi/ebitengine: CGO_ENABLED=1 GOARCH=amd64 go run examples/2048/main.go

What is the expected result?

Either purego should properly panic that there are too many arguments or it should work as expected

What happens instead?

It crashes with an OS error:

2024-10-19 23:20:43.969 2048[80611:175264348] [CAMetalLayer nextDrawable] returning nil because allocation failed.
-[IOGPUMetalCommandBuffer validate]:216: failed assertion `commit command buffer with uncommitted encoder'
SIGABRT: abort
PC=0x7ff8058c714a m=4 sigcode=0
signal arrived during cgo execution

Anything else you feel useful to add?

I think it's better to error then to add support for more arguments

hajimehoshi commented 4 hours ago

I think it's better to error then to add support for more arguments

I agree. Let's have a better error message, and revisit this whenever we want :)