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

Severe performance regression in GLES3/GLES2 renderer related to octahedral compression #51256

Closed
RevoluPowered opened this issue Aug 4, 2021 · 4 comments

Comments

@RevoluPowered
Copy link
Contributor

RevoluPowered commented Aug 4, 2021

Godot version

3.x (6304709)

System information

MacOS Big Sur 11.4 (AMD Radeon Pro 5500M 4GB)

Issue description

I have bisected, the bug was introduced by #46800

Screen.Recording.2021-08-03.at.12.55.42.mov

Without that PR I am getting solid FPS figures.

Steps to reproduce

  1. Run MacOS with Godot 3.X branch
  2. Open ferris wheel mesh
  3. Move camera (huge fps drop down to 3-4 FPS)
  4. Revert PR [3.x] Implement Octahedral Map Normal/Tangent Attribute Compression #46800
  5. Repeat steps

Minimal reproduction project

FerrisWheel.zip

@RevoluPowered RevoluPowered modified the milestone: 3.4 Aug 4, 2021
@akien-mga akien-mga modified the milestones: 4.0, 3.4 Aug 4, 2021
@akien-mga akien-mga added the bug label Aug 4, 2021
@Calinou Calinou changed the title Severe performance regression in GLES3/GLES2 renderer Severe performance regression in GLES3/GLES2 renderer related to octahedral compression Aug 4, 2021
@akien-mga
Copy link
Member

CC @The-O-King

@RevoluPowered
Copy link
Contributor Author

RevoluPowered commented Aug 4, 2021

I spent like 2 days looking into the cause and trying to find a solution, so am here to debug the issues too and can provide access to the macbook if you need it.

Some more info:

  • using clang may make this reproducible on other platforms.
  • functions added for compression don't handle Vector3(0,0,0), data (causes nan's to reach renderer, but fixing it won't solve the perf drop)
  1. ASAN/UBSAN errors which might be a related symptom:
    image
  2. GL Draw Elements execution time with this PR seriously spikes (Shader compilation happening, or is OpenGL dropping to CPU rendering? unknown)

Screenshot 2021-08-03 at 15 09 13

Screenshot 2021-08-03 at 15 09 27

3. OpenGL profiling commands

Screenshot 2021-08-04 at 23 36 59

Full debug file
profileone.txt

@The-O-King
Copy link
Contributor

Should be fixed fully with #51376

@clayjohn
Copy link
Member

Closed by #51376

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

5 participants