-
-
Notifications
You must be signed in to change notification settings - Fork 685
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
Debug breakpoint make High GPU #3160
Comments
This doesn't sound like a real world issue, so I perhaps don't fix this. |
Oh, does this happen when you added a breakpoint? |
Yes, I added this breakpoint before launching, and when I start the game in Debug mode, the breakpoint is effective. At this point, if I remove the breakpoint, Ebiten runs normally, but it uses a very high amount of GPU. |
What about using OpenGL? op := &ebiten.RunGameOptions{
GraphicsLibrary: ebiten.GraphicsLibraryOpenGL,
}
ebiten.RunGame(&game{}, op) |
Using OpenGL seems to be running normally, with an 8% GPU usage. I noticed that with the default settings, when I hit a breakpoint and then resume for the first time, the window displays but is not active. When I pause the program a second time and disable the breakpoint, it no longer runs in the foreground and consumes a high amount of GPU resources. Once I bring it back to the foreground, the GPU usage gradually returns to a normal 0.5% after a short wait. |
Ebitengine Version
2.8.1
Operating System
Go Version (
go version
)go version go1.22.5 windows/amd64
What steps will reproduce the problem?
My GPU: RTX 3060
Test code:
Add beakpoint here.
![1731249805210](https://private-user-images.githubusercontent.com/10717965/384698003-8529c0a0-c60c-4d59-a946-063854a8f5fd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMjgyMzQsIm5iZiI6MTczOTAyNzkzNCwicGF0aCI6Ii8xMDcxNzk2NS8zODQ2OTgwMDMtODUyOWMwYTAtYzYwYy00ZDU5LWE5NDYtMDYzODU0YThmNWZkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE1MTg1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTczYjdjYjQ3YmNhN2NmNGVjZGM2ZmM4ZmQxZTE1ZWY3ZGRhMjEwNWY3OWYxNTRhNGJhYzY2ZmMxYzMwOTVjZmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.90lB8_idugWoSrDQFAiap3LvOJfebD9xXN2Gfyp9RZY)
When the program first breaks, remove this breakpoint, let Ebiten continue running, and you will observe the high GPU usage.
What is the expected result?
GPU less 1%
What happens instead?
Very very high GPU usage
![1731249291230](https://private-user-images.githubusercontent.com/10717965/384697805-4c33d9cc-69de-44a6-a81c-086d7cac7cf6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMjgyMzQsIm5iZiI6MTczOTAyNzkzNCwicGF0aCI6Ii8xMDcxNzk2NS8zODQ2OTc4MDUtNGMzM2Q5Y2MtNjlkZS00NGE2LWE4MWMtMDg2ZDdjYWM3Y2Y2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE1MTg1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFkYmJhOGFkZTc1ZTFjNjUzZmU1Nzg5ZjEyYTljNjRhZmUzZjNhNGI0YWJhOTc1YjllMDg0ZWRlNzU0NjhhNTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-ixVnNW23_bjmjHQhTYaurxw4cC_lUuVr8vxFAn6RpE)
Anything else you feel useful to add?
No response
The text was updated successfully, but these errors were encountered: