mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-24 02:16:32 +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::{
|
use super::{
|
||||||
BinHeader, Clip, ClipBbox, ClipBic, ClipElement, Cubic, DrawBbox, DrawMonoid, Encoding, Layout,
|
BinHeader, Clip, ClipBbox, ClipBic, ClipElement, Cubic, DrawBbox, DrawMonoid, Layout, Path,
|
||||||
Path, PathBbox, PathMonoid, PathSegment, Tile,
|
PathBbox, PathMonoid, PathSegment, Tile,
|
||||||
};
|
};
|
||||||
use bytemuck::{Pod, Zeroable};
|
use bytemuck::{Pod, Zeroable};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
@ -8,7 +8,8 @@ use std::mem;
|
||||||
const TILE_WIDTH: u32 = 16;
|
const TILE_WIDTH: u32 = 16;
|
||||||
const TILE_HEIGHT: 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_BBOX_WG: u32 = 256;
|
||||||
const PATH_COARSE_WG: u32 = 256;
|
const PATH_COARSE_WG: u32 = 256;
|
||||||
const CLIP_REDUCE_WG: u32 = 256;
|
const CLIP_REDUCE_WG: u32 = 256;
|
||||||
|
|
|
@ -137,7 +137,6 @@ impl Resolver {
|
||||||
&'a mut self,
|
&'a mut self,
|
||||||
encoding: &Encoding,
|
encoding: &Encoding,
|
||||||
packed: &mut Vec<u8>,
|
packed: &mut Vec<u8>,
|
||||||
workgroup_size: u32,
|
|
||||||
) -> (Layout, Ramps<'a>, Images<'a>) {
|
) -> (Layout, Ramps<'a>, Images<'a>) {
|
||||||
let sizes = self.resolve_patches(encoding);
|
let sizes = self.resolve_patches(encoding);
|
||||||
self.resolve_pending_images();
|
self.resolve_pending_images();
|
||||||
|
@ -149,7 +148,7 @@ impl Resolver {
|
||||||
// Compute size of data buffer
|
// Compute size of data buffer
|
||||||
let n_path_tags =
|
let n_path_tags =
|
||||||
encoding.path_tags.len() + sizes.path_tags + encoding.n_open_clips as usize;
|
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
|
let capacity = path_tag_padded
|
||||||
+ slice_size_in_bytes(&encoding.path_data, sizes.path_data)
|
+ slice_size_in_bytes(&encoding.path_data, sizes.path_data)
|
||||||
+ slice_size_in_bytes(
|
+ slice_size_in_bytes(
|
||||||
|
|
|
@ -75,8 +75,7 @@ impl Render {
|
||||||
let mut recording = Recording::default();
|
let mut recording = Recording::default();
|
||||||
let mut resolver = Resolver::new();
|
let mut resolver = Resolver::new();
|
||||||
let mut packed = vec![];
|
let mut packed = vec![];
|
||||||
let (layout, ramps, images) =
|
let (layout, ramps, images) = resolver.resolve(encoding, &mut packed);
|
||||||
resolver.resolve(encoding, &mut packed, shaders::PATHTAG_REDUCE_WG);
|
|
||||||
let gradient_image = if ramps.height == 0 {
|
let gradient_image = if ramps.height == 0 {
|
||||||
ResourceProxy::new_image(1, 1, ImageFormat::Rgba8)
|
ResourceProxy::new_image(1, 1, ImageFormat::Rgba8)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -24,12 +24,6 @@ use wgpu::Device;
|
||||||
|
|
||||||
use crate::engine::{BindType, Engine, Error, ImageFormat, ShaderId};
|
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 {
|
macro_rules! shader {
|
||||||
($name:expr) => {&{
|
($name:expr) => {&{
|
||||||
let shader = include_str!(concat!(
|
let shader = include_str!(concat!(
|
||||||
|
|
Loading…
Add table
Reference in a new issue