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

x/mobile/gl: fails to compile and run on windows #16991

Closed
egonelbre opened this issue Sep 5, 2016 · 5 comments
Closed

x/mobile/gl: fails to compile and run on windows #16991

egonelbre opened this issue Sep 5, 2016 · 5 comments

Comments

@egonelbre
Copy link
Contributor

egonelbre commented Sep 5, 2016

Using go1.7/windows/amd64.

go get golang.org/x/mobile/gl is sufficient to show the issue.

# golang.org/x/mobile/gl
.\gl.go:1683: undefined: context3
.\gl.go:1695: undefined: context3
[...snip...]
.\gl.go:1794: too many errors

Simply adding context3 into work_windows.go similar to work.go makes things compilable. Not sure whether this fix is better than not compiling.

After fixing context3 both example/basic and example/flappy compile, but fail at runtime due to a: "error creating GL program: glutil: Failed to create D3D shaders." I've tried using the latest angle dll from Chrome, but it fails similarly.

Not quite sure whether there's something obvious going wrong wrt shaders. I can make a patch or debug further, but I'm not sure what is the best way to attack the problem.

Related #9306

@egonelbre
Copy link
Contributor Author

After compiling ANGLE from source it seems to have similar problems - so not related to Go. However it's quite weird -- starting hello_triangle (example in ANGLE) from Visual Studio everything works as intended; starting from command-line crashes with the shader error. Similarly, when running example/basic via RenderDoc, everything works...

@quentinmit quentinmit added this to the Unreleased milestone Sep 6, 2016
@egonelbre
Copy link
Contributor Author

It seems the libGLESv2.dll requires d3dcompiler_47.dll. Can this be made to auto-download together with libEGL.dll and libGLESv2.dll as well?

@egonelbre
Copy link
Contributor Author

egonelbre commented Sep 8, 2016

I've created a potential fix in https://go-review.googlesource.com/#/c/28814/, but it also needs a new tgz of the ANGLE project containing d3dcompiler. Also not completely sure about the approach taken.

The fix also needs to take care of the situation where the person has already downloaded the into local GoGL that doesn't contain d3dcompiler. But, not sure what's the best approach to clean it up. If it's not present delete the folder, and let it redownload?

@egonelbre
Copy link
Contributor Author

/cc @crawshaw

@gopherbot
Copy link

CL https://golang.org/cl/28814 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 13, 2017
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Add missing context3 for Windows.
Add missing d3dcompiler_47.dll loading.
Check whether dll architecture matches.
Search ANGLE from Chrome path.

Fixes golang/go#16991

Change-Id: Ia042f75241c2398fabda03bb2d0e683eb34545c7
Reviewed-on: https://go-review.googlesource.com/28814
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Add missing context3 for Windows.
Add missing d3dcompiler_47.dll loading.
Check whether dll architecture matches.
Search ANGLE from Chrome path.

Fixes golang/go#16991

Change-Id: Ia042f75241c2398fabda03bb2d0e683eb34545c7
Reviewed-on: https://go-review.googlesource.com/28814
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
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

3 participants