Skip to content
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

syscall: request: syscall.Syscall18 on Windows #28434

Closed
hajimehoshi opened this issue Oct 27, 2018 · 8 comments

Comments

@hajimehoshi
Copy link
Contributor

commented Oct 27, 2018

I am not sure there is Win32API function that accepts more than 15 arguments, but there are some OpenGL fuctions that accept more than 15 arguments:

func LGPUCopyImageSubDataNVX(sourceGpu uint32, destinationGpuMask uint32, srcName uint32, srcTarget uint32, srcLevel int32, srcX int32, srxY int32, srcZ int32, dstName uint32, dstTarget uint32, dstLevel int32, dstX int32, dstY int32, dstZ int32, width int32, height int32, depth int32)

func MulticastCopyImageSubDataNV(srcGpu uint32, dstGpuMask uint32, srcName uint32, srcTarget uint32, srcLevel int32, srcX int32, srcY int32, srcZ int32, dstName uint32, dstTarget uint32, dstLevel int32, dstX int32, dstY int32, dstZ int32, srcWidth int32, srcHeight int32, srcDepth int32)

Now we are trying to eliminate Cgo usages from go-gl (OpenGL binding) on Windows (go-gl/gl#109), and I thought it possible to use syscall.SyscallN. However, I found the above functions that cannot be passed to syscall.SyscallN

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Oct 27, 2018

Adding syscall.Syscall18 SGTM. I am not sure what others will say.

Alex

@katiehockman

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2018

/cc @bradfitz

@bradfitz

This comment has been minimized.

Copy link
Member

commented Oct 29, 2018

"If you have a procedure with ten parameters, you probably missed some." -- Alan Perlis

I guess the answer is 18.

Sure?

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Oct 30, 2018

I take it @bradfitz is OK with syscall.Syscall18.

@hajimehoshi would you like to do the honors and change the code? This https://golang.org/doc/contribute.html is how to contribute to Go project.

Alex

@hajimehoshi

This comment has been minimized.

Copy link
Contributor Author

commented Oct 30, 2018

Sure, I'll try this later!

@gopherbot

This comment has been minimized.

Copy link

commented Nov 2, 2018

Change https://golang.org/cl/147117 mentions this issue: syscall: add Syscall18 on Windows

2 similar comments
@gopherbot

This comment has been minimized.

Copy link

commented Nov 2, 2018

Change https://golang.org/cl/147117 mentions this issue: syscall: add Syscall18 on Windows

@gopherbot

This comment has been minimized.

Copy link

commented Nov 2, 2018

Change https://golang.org/cl/147117 mentions this issue: syscall: add Syscall18 on Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.