Skip to content

all: remove NSInvocation usage#3441

Merged
hajimehoshi merged 4 commits into
hajimehoshi:mainfrom
TotallyGamerJet:nsinvocation
Apr 30, 2026
Merged

all: remove NSInvocation usage#3441
hajimehoshi merged 4 commits into
hajimehoshi:mainfrom
TotallyGamerJet:nsinvocation

Conversation

@TotallyGamerJet
Copy link
Copy Markdown
Contributor

What issue is this addressing?

Updates #3135

What type of issue is this addressing?

feature

What this PR does | solves

This is a reissue of #3432 to remove NSInvocation after the inclusion of ebitengine/purego#431 which adds enough arguments to support calling CopyFromTexture on amd64 directly.

Ran both amd64 and arm64 to check it works:

GOOS=darwin GOARCH=arm64 go run ./examples/2048
GOOS=darwin GOARCH=amd64 go run ./examples/2048

Resolves ebitengine/purego#290

@hajimehoshi
Copy link
Copy Markdown
Owner

Awesome, but what's the difference from the last attempt?

@hajimehoshi
Copy link
Copy Markdown
Owner

which adds enough arguments to support calling CopyFromTexture on amd64 directly.

Is this it?

@TotallyGamerJet
Copy link
Copy Markdown
Contributor Author

which adds enough arguments to support calling CopyFromTexture on amd64 directly.

Is this it?

Correct. The reason amd64 was crashing before was because it didn't pass all the parameters because there wasn't enough slots. Arm64 packs its arguments more efficiently which is why it worked there.

Copy link
Copy Markdown
Owner

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hajimehoshi hajimehoshi merged commit 0236df9 into hajimehoshi:main Apr 30, 2026
12 checks passed
@TotallyGamerJet TotallyGamerJet deleted the nsinvocation branch April 30, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlitCommandEncoder.CopyFromTexture doesn't work

2 participants