Skip to content

spec_v2: migrate bloom #19966

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

spec_v2: migrate bloom #19966

wants to merge 10 commits into from

Conversation

ecoskey
Copy link
Contributor

@ecoskey ecoskey commented Jul 5, 2025

Objective

  • minimally migrate bloom to spec_v2, without as many opinionated changes as the previous closed pr

Testing

  • bloom_3d example works

For reviewers:

Please bikeshed! This is where we start to make patterns for using spec_v2. Some initial thoughts:

  • In an earlier version of this PR I implemented Specializer<RenderPipeline> for each BloomXPipeline, but this ended up making fields like bind_group_layout inaccessible to resource prep systems. Instead, I've made separate specializer structs and put the caches as fields on their respective Pipelines. Does that seem like a good pattern?
    • should we remove GetBaseDescriptor entirely and the Resource derive for SpecializedCache? It seems like it might be an anti-pattern.

@ecoskey ecoskey mentioned this pull request Jul 5, 2025
43 tasks
ecoskey added 2 commits July 5, 2025 14:17
similar utils for layout etc should be added later as needed
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change X-Contentious There are nontrivial implications that should be thought through S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 6, 2025
@@ -153,3 +159,9 @@ pub struct ComputePipelineDescriptor {
/// If this is false, reading from workgroup variables before writing to them will result in garbage values.
pub zero_initialize_workgroup_memory: bool,
}

fn filling_insert_at<T: Clone>(vec: &mut Vec<T>, index: usize, filler: T, value: T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand why this is necessary. Why not just push the target directly in the specializer?

Copy link
Contributor Author

@ecoskey ecoskey Jul 9, 2025

Choose a reason for hiding this comment

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

I think in general we shouldn't have specializers rely on the base descriptor having a certain shape, mostly for composition's sake (doesn't matter so much for this pr). If the statement from the specializer is "I want the 0th color target state to be X", push will fail at that if a previous specializer messed with things.

Copy link
Contributor

Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke!
You can review it at https://pixel-eagle.com/project/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D?filter=PR-19966

If it's expected, please add the M-Deliberate-Rendering-Change label.

If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change S-Needs-Review Needs reviewer attention (from anyone!) to move forward X-Contentious There are nontrivial implications that should be thought through
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants