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

Incorporate remaining stroke rework and MSAA changes into the encoding and shaders crates #421

Merged
merged 6 commits into from
Jan 16, 2024

Conversation

armansito
Copy link
Collaborator

This PR makes a number of changes to make the stroke rework and MSAA pipeline features available via the vello_encoding and vello_shaders crates:

  • Fixed all new and removed resource bindings and update the WorkgroupSizes and BufferSizes structures.
  • Moved the sample mask LUT generation functions to vello_encoding.
  • The exported shader data structures now include separate fine_area, fine_msaa8, and fine_msaa16 instances.
  • A couple other fixes to make the new pipelines compile successfully in both the generated WGSL and MSL.

Add missing fields and remove stale ones following stroke rework.
The `fine` stage is now bundled as 3 different instances: fine_area,
fine_msaa8, and fine_msaa16.
The force_rw_storage feature is a hack that enables a renderer to bind
suballocations from the same buffer object to both readonly and
read-write bindings inside a pipeline layout.

The AA variants of the fine stage don't compile with this feature
enabled, since the read-write PTCL buffer results in a uniformity
analysis failure.

Address this by excluding the `fine` stage from the force_rw_storage
feature to preserve the shader's correctness. Since all storage bindings
in `fine` are readonly, there is no restriction against binding
suballocations to any of the fine pipeline variants in the first place.
Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for cleaning this up. I'm looking forward to when we have one source of truth for the shaders so we won't see divergence like this.

@armansito armansito merged commit e04b602 into main Jan 16, 2024
4 checks passed
@armansito armansito deleted the stroke-rework-crates-update branch January 16, 2024 22:36
raphlinus added a commit that referenced this pull request Feb 12, 2024
This cleans up a loose end in #421, which renumbered the resources in the path_count GPU shader but not the CPU shader.

It fixes an immediate panic when running with --use-cpu.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants