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

Handle guardband clip/cull better for hardware backends #14833

Merged
merged 17 commits into from
Oct 19, 2021

Commits on Oct 13, 2021

  1. GPU: Cull rectangles outside valid Z.

    Both TL and BR must be outside in the same direction to be culled when
    depth clamp is enabled.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    5315c40 View commit details
    Browse the repository at this point in the history
  2. GPU: Cull rectangles more when depth clamp off.

    If any vert is outside Z, it's culled when not clamping/clipping.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    4ac36cb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6252241 View commit details
    Browse the repository at this point in the history
  4. GPU: Correct depth handling for guardband.

    This culls based on pre-viewport Z and avoids culling based on the clip
    range at negative Z.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    24011c3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    273b9a3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2271b41 View commit details
    Browse the repository at this point in the history
  7. GLES: Check clip/cull distance support.

    Pretty limited on GLES3+.  Also D3D11.
    Seems like doing it on D3D9 might be a bit tricky.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    046a5c5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7d00b6c View commit details
    Browse the repository at this point in the history
  9. UI: Clear textures on Begin.

    On GLES, saw a texture bound to slot 1 when UI started to draw after an
    emu frame, which caused a crash because there was no sampler.  Let's just
    explicitly flush.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    d2ff66a View commit details
    Browse the repository at this point in the history
  10. Vulkan: Cull verts fully outside depth.

    Following PSP rules of -1 to 1 pre-viewport Z.  This also enables it for
    GLES/OpenGL.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    1a603fe View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1e66a66 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c6a5290 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1c7cd67 View commit details
    Browse the repository at this point in the history
  14. GPU: Split clip and cull caps.

    GL_ARB_cull_distance is needed, sometimes available on older GL.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    5e6f540 View commit details
    Browse the repository at this point in the history
  15. GPU: Move Z/W equal hack to bugs from supports.

    It's really a bug (might even ideally cap the version?), and we already
    have other bugs handled the same way.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    7b00c4a View commit details
    Browse the repository at this point in the history
  16. GPU: Support clip and cull distances separately.

    Older GL devices, and it seems Apple devices, may not support cull.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    33598f2 View commit details
    Browse the repository at this point in the history
  17. GLES: Support GL_APPLE_clip_distance too.

    Seems modern Apple mobile chips only support clip.
    unknownbrackets committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    275bacc View commit details
    Browse the repository at this point in the history