Skip to content

Commit

Permalink
Merge pull request #5559 from Jacalz/windows-mobile-workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz authored Feb 26, 2025
2 parents cf075d3 + 3e8f46b commit 92a2cb7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 42 deletions.
21 changes: 0 additions & 21 deletions internal/driver/mobile/gl/work_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package gl

import (
"runtime"
"syscall"
"unsafe"
)
Expand Down Expand Up @@ -92,22 +91,6 @@ func (ctx *context) cStringPtr(str string) (uintptr, func()) {
return uintptr(ret), func() { sfree(); delete(ctx.cStrings, id) }
}

// fixFloat copies the first four arguments into the XMM registers.
// This is for the windows/amd64 calling convention, that wants
// floating point arguments to be passed in XMM.
//
// Mercifully, type information is not required to implement
// this calling convention. In particular see the mixed int/float
// examples:
//
// https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
//
// This means it could be fixed in syscall.Syscall. The relevant
// issue is
//
// https://golang.org/issue/6510
func fixFloat(x0, x1, x2, x3 uintptr)

var glfnMap = map[glfn]func(c call) (ret uintptr){
glfnActiveTexture: func(c call) (ret uintptr) {
syscall.Syscall(glActiveTexture.Addr(), 1, c.args.a0, 0, 0)
Expand Down Expand Up @@ -292,10 +275,6 @@ var glfnMap = map[glfn]func(c call) (ret uintptr){
}

func (ctx *context) doWork(c call) (ret uintptr) {
if runtime.GOARCH == "amd64" {
fixFloat(c.args.a0, c.args.a1, c.args.a2, c.args.a3)
}

if f, ok := glfnMap[c.args.fn]; ok {
return f(c)
}
Expand Down
9 changes: 0 additions & 9 deletions internal/driver/mobile/gl/work_windows_386.s

This file was deleted.

12 changes: 0 additions & 12 deletions internal/driver/mobile/gl/work_windows_amd64.s

This file was deleted.

0 comments on commit 92a2cb7

Please sign in to comment.