From a81425632db81527bcecd2d0fbdb5b09c25141ba Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 1 May 2022 11:43:42 -0700 Subject: modules/*: make use of generic fragmenters Just one case, modules/submit, was using 32x32 tiles and is now using 64x64. I don't expect it to make any difference. While here I fixed up the num_cpus/n_cpus naming inconsistencies, normalizing on n_cpus. --- src/modules/voronoi/voronoi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/modules/voronoi') diff --git a/src/modules/voronoi/voronoi.c b/src/modules/voronoi/voronoi.c index 204746f..ea90389 100644 --- a/src/modules/voronoi/voronoi.c +++ b/src/modules/voronoi/voronoi.c @@ -77,7 +77,7 @@ static void voronoi_randomize(voronoi_context_t *ctxt) } -static void * voronoi_create_context(unsigned ticks, unsigned num_cpus, til_setup_t *setup) +static void * voronoi_create_context(unsigned ticks, unsigned n_cpus, til_setup_t *setup) { voronoi_context_t *ctxt; @@ -105,14 +105,6 @@ static void voronoi_destroy_context(void *context) } -static int voronoi_fragmenter(void *context, unsigned n_cpus, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment) -{ - voronoi_context_t *ctxt = context; - - return til_fb_fragment_tile_single(fragment, 64, number, res_fragment); -} - - static inline size_t voronoi_cell_origin_to_distance_idx(const voronoi_context_t *ctxt, const voronoi_cell_t *cell) { size_t x, y; @@ -289,7 +281,7 @@ static void voronoi_prepare_frame(void *context, unsigned ticks, unsigned n_cpus { voronoi_context_t *ctxt = context; - *res_fragmenter = voronoi_fragmenter; + *res_fragmenter = til_fragmenter_tile64; if (!ctxt->distances.buf || ctxt->distances.width != fragment->frame_width || -- cgit v1.2.3