From 9170d08854796f8595c9f6cebe85827a71e86e19 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 2 Sep 2023 23:37:28 -0700 Subject: til,til_fb: introduce a noop_per_cpu fragmenter This is intended to perhaps be of use for threaded rendering that don't actually produce pixels during their render phase, but still need n_cpus fragments to dispatch the parallel work keying off the fragment.number. Such a renderer might then put its pixels on-screen serially @ finish_frame(), or maybe the rendering functions will get a return value to trigger multi-pass rendering on the same tick. --- src/til.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/til.c') diff --git a/src/til.c b/src/til.c index e1f15cc..5a295a5 100644 --- a/src/til.c +++ b/src/til.c @@ -629,6 +629,13 @@ int til_module_settings_finalize(const til_module_t *module, const til_settings_ } +/* generic noop fragmenter that does no subfragmenting at all, producing a whole fragment per-cpu */ +int til_fragmenter_noop_per_cpu(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment) +{ + return til_fb_fragment_noop_single(fragment, context->n_cpus, number, res_fragment); +} + + /* generic fragmenter using a horizontal slice per cpu according to context->n_cpus */ int til_fragmenter_slice_per_cpu(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment) { -- cgit v1.2.1