mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-23 18:06:34 +11:00
Remove unused WG size declarations
This commit is contained in:
parent
ad82519444
commit
fe29125a84
4 changed files with 6 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
use super::{
|
||||
BinHeader, Clip, ClipBbox, ClipBic, ClipElement, Cubic, DrawBbox, DrawMonoid, Encoding, Layout,
|
||||
Path, PathBbox, PathMonoid, PathSegment, Tile,
|
||||
BinHeader, Clip, ClipBbox, ClipBic, ClipElement, Cubic, DrawBbox, DrawMonoid, Layout, Path,
|
||||
PathBbox, PathMonoid, PathSegment, Tile,
|
||||
};
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
use std::mem;
|
||||
|
@ -8,7 +8,8 @@ use std::mem;
|
|||
const TILE_WIDTH: u32 = 16;
|
||||
const TILE_HEIGHT: u32 = 16;
|
||||
|
||||
const PATH_REDUCE_WG: u32 = 256;
|
||||
// TODO: Obtain these from the vello_shaders crate
|
||||
pub(crate) const PATH_REDUCE_WG: u32 = 256;
|
||||
const PATH_BBOX_WG: u32 = 256;
|
||||
const PATH_COARSE_WG: u32 = 256;
|
||||
const CLIP_REDUCE_WG: u32 = 256;
|
||||
|
|
|
@ -137,7 +137,6 @@ impl Resolver {
|
|||
&'a mut self,
|
||||
encoding: &Encoding,
|
||||
packed: &mut Vec<u8>,
|
||||
workgroup_size: u32,
|
||||
) -> (Layout, Ramps<'a>, Images<'a>) {
|
||||
let sizes = self.resolve_patches(encoding);
|
||||
self.resolve_pending_images();
|
||||
|
@ -149,7 +148,7 @@ impl Resolver {
|
|||
// Compute size of data buffer
|
||||
let n_path_tags =
|
||||
encoding.path_tags.len() + sizes.path_tags + encoding.n_open_clips as usize;
|
||||
let path_tag_padded = align_up(n_path_tags, 4 * workgroup_size);
|
||||
let path_tag_padded = align_up(n_path_tags, 4 * crate::config::PATH_REDUCE_WG);
|
||||
let capacity = path_tag_padded
|
||||
+ slice_size_in_bytes(&encoding.path_data, sizes.path_data)
|
||||
+ slice_size_in_bytes(
|
||||
|
|
|
@ -75,8 +75,7 @@ impl Render {
|
|||
let mut recording = Recording::default();
|
||||
let mut resolver = Resolver::new();
|
||||
let mut packed = vec![];
|
||||
let (layout, ramps, images) =
|
||||
resolver.resolve(encoding, &mut packed, shaders::PATHTAG_REDUCE_WG);
|
||||
let (layout, ramps, images) = resolver.resolve(encoding, &mut packed);
|
||||
let gradient_image = if ramps.height == 0 {
|
||||
ResourceProxy::new_image(1, 1, ImageFormat::Rgba8)
|
||||
} else {
|
||||
|
|
|
@ -24,12 +24,6 @@ use wgpu::Device;
|
|||
|
||||
use crate::engine::{BindType, Engine, Error, ImageFormat, ShaderId};
|
||||
|
||||
pub const PATHTAG_REDUCE_WG: u32 = 256;
|
||||
pub const PATH_BBOX_WG: u32 = 256;
|
||||
pub const PATH_COARSE_WG: u32 = 256;
|
||||
pub const PATH_DRAWOBJ_WG: u32 = 256;
|
||||
pub const CLIP_REDUCE_WG: u32 = 256;
|
||||
|
||||
macro_rules! shader {
|
||||
($name:expr) => {&{
|
||||
let shader = include_str!(concat!(
|
||||
|
|
Loading…
Add table
Reference in a new issue