forked from linebender/vello
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extracted from linebender#606
- Loading branch information
Showing
4 changed files
with
24 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
// Copyright 2023 the Vello Authors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense | ||
|
||
use vello_encoding::{BumpAllocators, IndirectCount}; | ||
use vello_encoding::{BumpAllocators, ConfigUniform, IndirectCount}; | ||
|
||
use super::CpuBinding; | ||
|
||
const WG_SIZE: usize = 256; | ||
|
||
fn path_tiling_setup_main(bump: &BumpAllocators, indirect: &mut IndirectCount) { | ||
fn path_tiling_setup_main(_: &ConfigUniform, bump: &BumpAllocators, indirect: &mut IndirectCount) { | ||
let segments = bump.seg_counts; | ||
indirect.count_x = (segments + (WG_SIZE as u32 - 1)) / WG_SIZE as u32; | ||
indirect.count_y = 1; | ||
indirect.count_z = 1; | ||
} | ||
|
||
pub fn path_tiling_setup(_n_wg: u32, resources: &[CpuBinding]) { | ||
let bump = resources[0].as_typed(); | ||
let mut indirect = resources[1].as_typed_mut(); | ||
let config = resources[0].as_typed(); | ||
let bump = resources[1].as_typed(); | ||
let mut indirect = resources[2].as_typed_mut(); | ||
// binding 2 is ptcl, which we would need if we propagate failure | ||
path_tiling_setup_main(&bump, &mut indirect); | ||
path_tiling_setup_main(&config, &bump, &mut indirect); | ||
} |