From 11d07e544c85836bf18cf3b79f9fc3d1f88d070d Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 9 May 2023 23:56:40 -0700 Subject: modules/compose: pass n_cpus to layers/texture context creates Existing code was passing 0 which turns into the number of cores/threads. That's fine when compose isn't running nested in an already threaded render, but falls down in something like checkers w/fill_module=compose since checkers is already threading. But when checkers creates its fill_module context, it's careful to pass 1 for n_cpus to prevent that kind of thing. With this change that no longer falls apart. --- src/modules/compose/compose.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/compose') diff --git a/src/modules/compose/compose.c b/src/modules/compose/compose.c index 954f0d3..14a23f4 100644 --- a/src/modules/compose/compose.c +++ b/src/modules/compose/compose.c @@ -89,7 +89,7 @@ static til_module_context_t * compose_create_context(const til_module_t *module, (void) til_module_randomize_setup(layer_module, rand_r(&seed), &layer_setup, NULL); ctxt->layers[i].module = layer_module; - (void) til_module_create_context(layer_module, stream, rand_r(&seed), ticks, 0, path, layer_setup, &ctxt->layers[i].module_ctxt); + (void) til_module_create_context(layer_module, stream, rand_r(&seed), ticks, n_cpus, path, layer_setup, &ctxt->layers[i].module_ctxt); til_setup_free(layer_setup); ctxt->n_layers++; @@ -101,7 +101,7 @@ static til_module_context_t * compose_create_context(const til_module_t *module, ctxt->texture.module = til_lookup_module(((compose_setup_t *)setup)->texture); (void) til_module_randomize_setup(ctxt->texture.module, rand_r(&seed), &texture_setup, NULL); - (void) til_module_create_context(ctxt->texture.module, stream, rand_r(&seed), ticks, 0, path, texture_setup, &ctxt->texture.module_ctxt); + (void) til_module_create_context(ctxt->texture.module, stream, rand_r(&seed), ticks, n_cpus, path, texture_setup, &ctxt->texture.module_ctxt); til_setup_free(texture_setup); } -- cgit v1.2.3