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

Don't encode invalid programs as valid unrelated programs #2231

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

Commits on Sep 30, 2020

  1. Don't encode invalid programs as valid unrelated programs

    When an invalid program is submitted with bgfx::touch(), it gets encoded
    as program index 0 by the command encoder. Since program 0 can be a
    valid program (typically it's the debug text blitter program), this can
    result in garbage being drawn if no other rendering is submitted for the
    same view.
    
    This patch changes invalid programs to be encoded as invalid programs,
    so the renderer can properly ignore them.
    Sami Kyöstilä committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    fdd4699 View commit details
    Browse the repository at this point in the history
  2. Correctly decode invalid program handles

    When an invalid program handle is encoded (e.g., with handle 0xffff), it
    will overflow the space reserved for program handles in the sorting key.
    This patch fixes the issue by turning any out-of-range program handles
    back to invalid handles when decoding sorting keys.
    Sami Kyöstilä committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    9543f51 View commit details
    Browse the repository at this point in the history