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/swab/swab.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/modules/swab/swab.c') diff --git a/src/modules/swab/swab.c b/src/modules/swab/swab.c index 63d5649..8c71049 100644 --- a/src/modules/swab/swab.c +++ b/src/modules/swab/swab.c @@ -31,7 +31,6 @@ typedef struct swab_context_t { din_t *din; float r; - unsigned n_cpus; } swab_context_t; typedef struct color_t { @@ -65,7 +64,7 @@ static inline uint32_t color_to_uint32(color_t color) { } -static void * swab_create_context(unsigned ticks, unsigned num_cpus, til_setup_t *setup) +static void * swab_create_context(unsigned ticks, unsigned n_cpus, til_setup_t *setup) { swab_context_t *ctxt; @@ -92,22 +91,13 @@ static void swab_destroy_context(void *context) } -static int swab_fragmenter(void *context, unsigned n_cpus, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment) -{ - swab_context_t *ctxt = context; - - return til_fb_fragment_tile_single(fragment, 64, number, res_fragment); -} - - static void swab_prepare_frame(void *context, unsigned ticks, unsigned n_cpus, til_fb_fragment_t *fragment, til_fragmenter_t *res_fragmenter) { swab_context_t *ctxt = context; - *res_fragmenter = swab_fragmenter; + *res_fragmenter = til_fragmenter_tile64; ctxt->r += .0001f; - ctxt->n_cpus = n_cpus; } -- cgit v1.2.1