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

Fixes to winding number accumulation #391

Merged
merged 9 commits into from
Oct 30, 2023
Merged

Fixes to winding number accumulation #391

merged 9 commits into from
Oct 30, 2023

Commits on Oct 17, 2023

  1. Prototype 8 bit winding number accumulation

    Changes the winding number accumulation in msaa8 mode to 8 bits per sample. This is prototype code and currently breaks the msaa16 mode; it is intended to diagnose whether the artifacts are strictly due to overflow, and to point the way to a real implementation.
    
    Prefix sums in both x and y direction are a little cleaner, avoiding a race (not UB because it's atomics).
    raphlinus committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    260e7af View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2023

  1. Make msaa16 mode use 8 bit accumulation

    This patch makes the msaa16 mode work again, using 8 bit accumulation of winding numbers. It could be merged to fix the artifacts in the cardioid example. Also, it's worth doing some evaluation to see how much performance slowdown there is.
    
    As future work, we probably want to be adaptive and use 8 bit accumulation when needed. If the performance hit from reduced occupancy due to the increased shared memory usage is significant, then we could consider other mitigations, including downgrading to msaa8 when overflow is possible.
    raphlinus committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    37fb5c8 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. Add even-odd fill rule

    Create a specialized version of the fill function for the even-odd fill rule. The logic is simpler (and faster) because winding number accumulation can happen in one bit.
    
    There's a bunch of code duplication which can be cleaned up.
    
    It's expected this will have a merge conflict with #382. If that's merged first, I'll happily fix this one.
    raphlinus committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    6aec62c View commit details
    Browse the repository at this point in the history
  2. Prepare for merge

    raphlinus committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    39fbbb2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b67759e View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2023

  1. Configuration menu
    Copy the full SHA
    f4119ea View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. Configuration menu
    Copy the full SHA
    303764a View commit details
    Browse the repository at this point in the history
  2. Add a bunch of comments

    I did my best to document some of the strange bit magic used in the algorithm. I also did just a bit of renaming to make things simpler, and for the mask expansion replaced `|` with `^` because it's easier to understand in terms of carry-less multiplication (and I expect performance to be identical).
    raphlinus committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    75054b0 View commit details
    Browse the repository at this point in the history
  3. Typo

    raphlinus committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    7a80c89 View commit details
    Browse the repository at this point in the history