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

Fix puck rendering behavior Android #2957

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alasram
Copy link
Collaborator

@alasram alasram commented Oct 22, 2024

The puck is typically rendered last and while its VAO is bound command that change the VAO are executed causing glitches. I didn't debug what commands are affecting the VAO but as a workaround the VAO is unbound after drawing which ensures the state of a Drawable object remains clean without adding overhead. This works around #2879

@alasram alasram requested review from mwilsnd, TimSylvester and louwers and removed request for mwilsnd October 22, 2024 23:22
Copy link

github-actions bot commented Oct 23, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2957-compared-to-main.txt

Copy link

github-actions bot commented Oct 23, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%    +144  +0.0%     +96    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2957-compared-to-main.txt

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +28% +32.4Mi  +426% +25.4Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2957-compared-to-legacy.txt

Copy link

github-actions bot commented Oct 23, 2024

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            -0.0064         -0.0060             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-2957-compared-to-main.txt

@TimSylvester
Copy link
Collaborator

Curious, I don't think that should be necessary. Doesn't it mean that either those commands shouldn't be happening at all, or that they are happening with the wrong bindings?

@louwers
Copy link
Collaborator

louwers commented Oct 23, 2024

Android render test timing out is just because we were running benchmarks, should restart...

@louwers louwers closed this Oct 23, 2024
@louwers louwers reopened this Oct 23, 2024
@louwers louwers requested review from adrian-cojocaru and alexcristici and removed request for mwilsnd October 25, 2024 15:41
@louwers louwers added OpenGL Issues related to the OpenGL renderer backend bug Something isn't working labels Oct 25, 2024
@louwers louwers changed the title Alasram/fix puck Fix puck rendering behavior Android Oct 27, 2024
@alasram
Copy link
Collaborator Author

alasram commented Oct 28, 2024

@TimSylvester I haven't really debug this. I only noticed in renderdoc that the buffers bound to the VAO change when the glitch happens. This means that while the puck VAO is bound (It's the last drawable in the frame), and before the next frame's drawable, there are calls that bind buffers such as glBindBuffer(GL_ELEMENT_ARRAY_BUFFER)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OpenGL Issues related to the OpenGL renderer backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants