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
Closed

syscall: request: syscall.Syscall18 on Windows #28434

hajimehoshi opened this issue Oct 27, 2018 · 8 comments

Comments

@hajimehoshi
Copy link
Member

hajimehoshi 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
Copy link
Member

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

Alex

@katiehockman
Copy link
Contributor

/cc @bradfitz

@bradfitz
Copy link
Contributor

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

I guess the answer is 18.

Sure?

@alexbrainman
Copy link
Member

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
Copy link
Member Author

Sure, I'll try this later!

@gopherbot
Copy link

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

2 similar comments
@gopherbot
Copy link

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

@gopherbot
Copy link

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

@dmitshur dmitshur added this to the Go1.12 milestone Nov 4, 2018
@golang golang locked and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants