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

ebiten: add RunGameOptions.StrictContextRestoration to use internal/restorable as an optional feature #3083

Closed
1 of 11 tasks
hajimehoshi opened this issue Sep 6, 2024 · 4 comments

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Sep 6, 2024

Ebitengine Version

v2.8.0-alpha.3

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

go version go1.22.6 darwin/arm64

What steps will reproduce the problem?

Submit an Android application and see prelaunch reports

What is the expected result?

No error

What happens instead?

There are some errors.

This error sometimes happens in the prelaunch report (google Pixel 5 64-bit only), and also in the real world (Android vitals)

  #00  pc 0x0000000000052a64  /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+36)
  #01  pc 0x000000000017871c  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!77df12deb6a622478efa8fb9929034!4783c89!+1212)
  #02  pc 0x000000000077f9c8  /data/app/~~QGOUdPYjXO_FBwGrhte-pA==/com.rpgsnack.tsugunai-zPiYGBu1D1mPh_UdnnjB1A==/split_config.arm64_v8a.apk

This error happens when resizing a window in an Android desktop emulator (Generic Small Desktop (x86) (virtual))

  #00  pc 0x0000000000057d51  /vendor/lib64/libGLESv2_enc.so (GL2Encoder::calcIndexRange(void const*, unsigned int, int, int*, int*)+609)
  #01  pc 0x000000000003dd30  /vendor/lib64/libGLESv2_enc.so (GL2Encoder::s_glDrawElements(void*, unsigned int, int, unsigned int, void const*)+832)
  #02  pc 0x000000000077b720  /data/app/~~EK_pBBRAksFg2bglyGOCaA==/com.rpgsnack.tsugunai-IznR2H8Wmy2OizfErqfZvA==/split_config.x86_64.apk

In order to fix them, I think we should revive internal/restorable unfortunately.

Anything else you feel useful to add?

internal/restorable was removed at #805

@hajimehoshi hajimehoshi added the bug label Sep 6, 2024
@hajimehoshi hajimehoshi added this to the v2.8.0 milestone Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Sep 6, 2024

Note to myself: I'm not sure I should revert 5a36b4b. IIUC, this is not needed for Android where you can detect context loss easily. See also a30f075

hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 6, 2024
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Sep 6, 2024

Note to myself: I found appendRegionRemovingDuplicates is pretty heavy.

This was introduced at 367606f and optimized at cc24796, and this is still heavy. I think I'll remove them.

Related

@hajimehoshi
Copy link
Owner Author

In order to mitigate risk of performance regression, I have to add a feature to switch restoring or not.

@hajimehoshi hajimehoshi changed the title revive internal/restorable revive internal/restorable as an optional feature Sep 6, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
This reverts commit a30f075.

This change adds a new option StrictContextRestration to make the
restoration optional.

Closes #3083
@hajimehoshi hajimehoshi changed the title revive internal/restorable as an optional feature ebiten: add RunGameOptions.StrictContextRestoration to use internal/restorable as an optional feature Sep 7, 2024
hajimehoshi added a commit that referenced this issue Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant