sparse_strips: Make tile size configurable, Variant 1#1655
Draft
LaurenzV wants to merge 1 commit into
Draft
Conversation
9bec80a to
954fbbe
Compare
Collaborator
Author
|
Do you guys think it makes sense to turn those into a generic instead with a sealed trait with variants for 4x4, 8x8 and 16x16 provided such that 1) Clients cannot accidentally create other tile sizes and 2) Later on when we will have to wire the generic through |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've on various occasions discussed that we want to experiment with different tile sizes. This is especially relevant for vello_hybrid, but also at least worth trying for vello_cpu.
Before we can do that, the first step is to make tile sizes more configurable. Right now, the width and height of 4 is hardcoded as an associated constant in vello_common. This PR changes it so that they become const generics instead, such that different crates can choose their own sizes. In order to keep the diff small for now, we simply define type aliases in vello_hybrid and vello_cpu that link to the existing 4x4 tile. The main algorithms (tiling, strip rendering) for now also still assume 4x4, changing this will be a follow-up PR.