From bab16b070f95687ec11d43e55f3dd6e69f96a576 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Mon, 4 Sep 2023 15:06:44 -0700 Subject: til: support multi-pass rendering Modules can now use the til_module_t.finish_frame() return value to trigger re-rendering by returning 1, returning 0 finishes the frame. A smattering of til_module_t.finish_frame() implementations were largely mechanically updated to match this change by returning 0, since nothing actually uses multi-pass rendering yet. The impetus for this is experimenting with the flow module doing two passes of threaded rendering per frame. A first pass to sample the flow field and update the elements, per-cpu, but drawing nothing. Then a second pass to render the elements in a tiled manner. --- src/modules/drizzle/drizzle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules/drizzle') diff --git a/src/modules/drizzle/drizzle.c b/src/modules/drizzle/drizzle.c index 0614632..b261448 100644 --- a/src/modules/drizzle/drizzle.c +++ b/src/modules/drizzle/drizzle.c @@ -347,12 +347,14 @@ static void drizzle_render_fragment(til_module_context_t *context, til_stream_t } -static void drizzle_finish_frame(til_module_context_t *context, til_stream_t *stream, unsigned int ticks, til_fb_fragment_t **fragment_ptr) +static int drizzle_finish_frame(til_module_context_t *context, til_stream_t *stream, unsigned int ticks, til_fb_fragment_t **fragment_ptr) { drizzle_context_t *ctxt = (drizzle_context_t *)context; if (ctxt->snapshot) ctxt->snapshot = til_fb_fragment_reclaim(ctxt->snapshot); + + return 0; } -- cgit v1.2.1