vello/piet-wgsl/shader/shared/config.wgsl
Elias Naur 18c0da02e5
Clarify licensing for WGSL shaders (#205)
As stated by the README, the intention is for the shaders to be
provided under the terms of the Unlicense in addition to the MIT
and Apache-2.0 licenses.

While here, add a self-contained UNLICENSE file to replace the
external reference to unlicense.org.
2022-11-19 16:45:42 +00:00

32 lines
647 B
WebGPU Shading Language

// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
struct Config {
width_in_tiles: u32,
height_in_tiles: u32,
n_drawobj: u32,
n_path: u32,
n_clip: u32,
// offsets within scene buffer (in u32 units)
// Note: this is a difference from piet-gpu, which is in bytes
pathtag_base: u32,
pathdata_base: u32,
drawtag_base: u32,
drawdata_base: u32,
transform_base: u32,
linewidth_base: u32,
}
// Geometry of tiles and bins
let TILE_WIDTH = 16u;
let TILE_HEIGHT = 16u;
// Number of tiles per bin
let N_TILE_X = 16u;
let N_TILE_Y = 16u;
//let N_TILE = N_TILE_X * N_TILE_Y;
let N_TILE = 256u;