summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-05-09 23:56:40 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-05-09 23:56:40 -0700
commit11d07e544c85836bf18cf3b79f9fc3d1f88d070d (patch)
treeab3ed59f9006256492b643c3887c1c419000f0bc /src/modules
parent26d3f180de32f102ddb4fa3db222690b34128274 (diff)
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.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/compose/compose.c4
1 files changed, 2 insertions, 2 deletions
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);
}
© All Rights Reserved