mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 20:51:29 +11:00
compute IMAGE_WIDTH and IMAGE_HEIGHT; remove dead code from setup.h
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
parent
fa38101e39
commit
05636995dd
|
@ -3,44 +3,18 @@
|
||||||
// Much of this will be made dynamic in various ways, but for now it's easiest
|
// Much of this will be made dynamic in various ways, but for now it's easiest
|
||||||
// to hardcode and keep all in one place.
|
// to hardcode and keep all in one place.
|
||||||
|
|
||||||
// TODO: make the image size dynamic.
|
|
||||||
#define IMAGE_WIDTH 2048
|
|
||||||
#define IMAGE_HEIGHT 1536
|
|
||||||
|
|
||||||
// TODO: compute this
|
|
||||||
#define WIDTH_IN_TILEGROUPS 4
|
|
||||||
|
|
||||||
#define TILEGROUP_WIDTH_PX 512
|
|
||||||
#define TILEGROUP_HEIGHT_PX 16
|
|
||||||
|
|
||||||
#define TILEGROUP_INITIAL_ALLOC 1024
|
|
||||||
|
|
||||||
// Quick note on layout of tilegroups (k1 output): in the base,
|
|
||||||
// there is a region of size TILEGROUP_STRIDE for each tilegroup.
|
|
||||||
// At offset 0 are the main instances, encoded with Jump. At offset
|
|
||||||
// TILEGROUP_STROKE_START are the stroke instances, encoded with
|
|
||||||
// Head and Link. Similarly for fill.
|
|
||||||
#define TILEGROUP_STRIDE 2048
|
|
||||||
#define TILEGROUP_STROKE_START 1024
|
|
||||||
#define TILEGROUP_FILL_START 1536
|
|
||||||
#define TILEGROUP_STROKE_ALLOC 1024
|
|
||||||
#define TILEGROUP_FILL_ALLOC 1024
|
|
||||||
#define TILEGROUP_INITIAL_STROKE_ALLOC 512
|
|
||||||
#define TILEGROUP_INITIAL_FILL_ALLOC 512
|
|
||||||
|
|
||||||
// TODO: compute all these
|
// TODO: compute all these
|
||||||
|
|
||||||
#define WIDTH_IN_TILES 128
|
#define WIDTH_IN_TILES 128
|
||||||
#define HEIGHT_IN_TILES 96
|
#define HEIGHT_IN_TILES 96
|
||||||
#define TILEGROUP_WIDTH_TILES 32
|
|
||||||
#define TILE_WIDTH_PX 16
|
#define TILE_WIDTH_PX 16
|
||||||
#define TILE_HEIGHT_PX 16
|
#define TILE_HEIGHT_PX 16
|
||||||
|
|
||||||
#define PTCL_INITIAL_ALLOC 1024
|
// TODO: make the image size dynamic.
|
||||||
|
#define IMAGE_WIDTH (WIDTH_IN_TILES*TILE_WIDTH_PX)
|
||||||
|
#define IMAGE_HEIGHT (HEIGHT_IN_TILES*TILE_HEIGHT_PX)
|
||||||
|
|
||||||
// Maximum number of segments in a SegChunk
|
#define PTCL_INITIAL_ALLOC 1024
|
||||||
#define SEG_CHUNK_N 32
|
|
||||||
#define SEG_CHUNK_ALLOC 512
|
|
||||||
|
|
||||||
// Stuff for new algorithm follows; some of the above should get
|
// Stuff for new algorithm follows; some of the above should get
|
||||||
// deleted.
|
// deleted.
|
||||||
|
@ -54,12 +28,3 @@
|
||||||
#define N_TILE (N_TILE_X * N_TILE_Y)
|
#define N_TILE (N_TILE_X * N_TILE_Y)
|
||||||
#define LG_N_TILE 8
|
#define LG_N_TILE 8
|
||||||
#define N_SLICE (N_TILE / 32)
|
#define N_SLICE (N_TILE / 32)
|
||||||
// Number of workgroups for binning kernel
|
|
||||||
#define N_WG 16
|
|
||||||
|
|
||||||
// This is the ratio of the number of elements in a binning workgroup
|
|
||||||
// over the number of elements in a partition workgroup.
|
|
||||||
#define ELEMENT_BINNING_RATIO 2
|
|
||||||
|
|
||||||
#define BIN_INITIAL_ALLOC 64
|
|
||||||
#define BIN_ALLOC 256
|
|
||||||
|
|
Loading…
Reference in a new issue