summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-05-30 14:52:14 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-05-30 14:52:14 -0700
commit249112803107d6341b5eb67caf5b730d3cc14d4f (patch)
tree326f4b06b533e91819a2ef6befcde08c0122993a /src/modules
parentdb3f0619cca328f77fd935a5a9e581ba9b1d9ff9 (diff)
til,*: pivot to til_setup_t for context paths
This changes til_setup_t* from optional to required for til_module_context_t creation, while dropping the separate path parameter construction and passing throughout.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/blinds/blinds.c4
-rw-r--r--src/modules/checkers/checkers.c14
-rw-r--r--src/modules/compose/compose.c44
-rw-r--r--src/modules/drizzle/drizzle.c4
-rw-r--r--src/modules/flui2d/flui2d.c4
-rw-r--r--src/modules/julia/julia.c4
-rw-r--r--src/modules/meta2d/meta2d.c4
-rw-r--r--src/modules/moire/moire.c4
-rw-r--r--src/modules/montage/montage.c8
-rw-r--r--src/modules/pixbounce/pixbounce.c4
-rw-r--r--src/modules/plasma/plasma.c4
-rw-r--r--src/modules/plato/plato.c4
-rw-r--r--src/modules/ray/ray.c4
-rw-r--r--src/modules/rkt/rkt.c8
-rw-r--r--src/modules/roto/roto.c4
-rw-r--r--src/modules/rtv/rtv.c10
-rw-r--r--src/modules/shapes/shapes.c4
-rw-r--r--src/modules/snow/snow.c4
-rw-r--r--src/modules/sparkler/sparkler.c4
-rw-r--r--src/modules/spiro/spiro.c4
-rw-r--r--src/modules/stars/stars.c4
-rw-r--r--src/modules/strobe/strobe.c4
-rw-r--r--src/modules/submit/submit.c4
-rw-r--r--src/modules/swab/swab.c4
-rw-r--r--src/modules/swarm/swarm.c4
-rw-r--r--src/modules/voronoi/voronoi.c4
26 files changed, 63 insertions, 105 deletions
diff --git a/src/modules/blinds/blinds.c b/src/modules/blinds/blinds.c
index 39b439f..529cdaa 100644
--- a/src/modules/blinds/blinds.c
+++ b/src/modules/blinds/blinds.c
@@ -42,11 +42,11 @@ typedef struct blinds_context_t {
} blinds_context_t;
-static til_module_context_t * blinds_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * blinds_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
blinds_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(blinds_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(blinds_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/checkers/checkers.c b/src/modules/checkers/checkers.c
index be83f9e..36b20f8 100644
--- a/src/modules/checkers/checkers.c
+++ b/src/modules/checkers/checkers.c
@@ -71,7 +71,7 @@ typedef struct checkers_context_t {
} checkers_context_t;
-static til_module_context_t * checkers_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * checkers_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
size_t size = sizeof(checkers_context_t);
checkers_context_t *ctxt;
@@ -79,7 +79,7 @@ static til_module_context_t * checkers_create_context(const til_module_t *module
if (((checkers_setup_t *)setup)->fill_module)
size += sizeof(til_module_context_t *) * n_cpus;
- ctxt = til_module_context_new(module, size, stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, size, stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
@@ -87,17 +87,10 @@ static til_module_context_t * checkers_create_context(const til_module_t *module
if (ctxt->setup->fill_module) {
const til_module_t *module = ctxt->setup->fill_module;
- size_t fill_module_path_len = snprintf(NULL, 0, "%s/fill_module", path) + 1; /* FIXME TODO: revisit path construction, see big comment in modules/compose FIXME TODO */
- char *fill_module_path = calloc(1, fill_module_path_len);
-
- if (!fill_module_path)
- return til_module_context_free(&ctxt->til_module_context);
-
- snprintf(fill_module_path, fill_module_path_len, "%s/fill_module", path);
/* since checkers is already threaded, create an n_cpus=1 context per-cpu */
for (unsigned i = 0; i < n_cpus; i++) /* TODO: errors */
- (void) til_module_create_context(module, stream, seed, ticks, 1, fill_module_path, ctxt->setup->fill_module_setup, &ctxt->fill_module_contexts[i]);
+ (void) til_module_create_context(module, stream, seed, ticks, 1, ctxt->setup->fill_module_setup, &ctxt->fill_module_contexts[i]);
/* FIXME TODO ^^^ sharing the fill_module_path across the per-cpu contexts aliases them _across_threads_ no less, this needs attention/thought FIXME TODO */
/* but the problem with just doing something like suffixing the cpu # to give each context a unique path per-cpu is then the taps/pipes would all be
* unique on a per-cpu basis. That's _very_ undesirable in terms of sequencing the pipes by name, we don't want sequencing tracks per-cpu and that's
@@ -111,7 +104,6 @@ static til_module_context_t * checkers_create_context(const til_module_t *module
* just roll with the punches and share the first instance of tap variables then all the others just get left alone. FIXME TODO FIXME TODO
*/
- free(fill_module_path);
/* XXX: it would be interesting to support various patterns/layouts by varying the seed, but this will require
* more complex context allocation strategies while also maintaining the per-cpu allocation.
*/
diff --git a/src/modules/compose/compose.c b/src/modules/compose/compose.c
index 78a5fe1..f41b838 100644
--- a/src/modules/compose/compose.c
+++ b/src/modules/compose/compose.c
@@ -51,7 +51,7 @@ typedef struct compose_setup_t {
compose_setup_layer_t layers[];
} compose_setup_t;
-static til_module_context_t * compose_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup);
+static til_module_context_t * compose_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup);
static void compose_destroy_context(til_module_context_t *context);
static void compose_render_fragment(til_module_context_t *context, til_stream_t *stream, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr);
static int compose_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup);
@@ -67,64 +67,30 @@ til_module_t compose_module = {
};
-static til_module_context_t * compose_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * compose_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
compose_setup_t *s = (compose_setup_t *)setup;
- size_t layers_path_len;
- char *layers_path;
compose_context_t *ctxt;
assert(setup);
- ctxt = til_module_context_new(module, sizeof(compose_context_t) + s->n_layers * sizeof(compose_layer_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(compose_context_t) + s->n_layers * sizeof(compose_layer_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
- layers_path_len = snprintf(NULL, 0, "%s/%s", path, "layers") + 1;
- layers_path = calloc(1, layers_path_len);
- /* FIXME TODO: path allocation/construction needs revisiting something fierce:
- * 1. Layers can have the same module recur, using compose/layers/$modname will just collide.
- * 2. We don't want to be ad-hoc constructing these things like this, but I'm deliberately leaving it ridiculous for now.
- * 3. Giving the til_setup_t a settings-instance-derived path might Just Fix Everything and eliminate the need for passing around a path altogether:
- *
- * In scenarios like layers the settings code already generate instance labels in an enumerated array subscript fashion, so the path would be:
- * compose/layers/layers[N]
- *
- * Some things need to change before that happens though, for starters always creating and supplying a til_setup_t to modules even ones without
- * a .setup() method would be necessary. Also there isn't a trivial way to take an arbitrary settings instance anywhere in the heirarchy and
- * ask til_settings to generate its path - there are no parent pointers going up the tree to construct it in reverse, and the instances don't
- * get a full path copy placed into them at creation time, only the label. The label could be changed to an absolute path though, which would
- * really be fine since these things don't move around the heirarchy, they just stay where they were created.
- */
- if (!layers_path)
- return til_module_context_free(&ctxt->til_module_context);
-
- snprintf(layers_path, layers_path_len, "%s/%s", path, "layers");
-
for (size_t i = 0; i < s->n_layers; i++) {
const til_module_t *layer_module;
layer_module = til_lookup_module(((compose_setup_t *)setup)->layers[i].module);
ctxt->layers[i].module = layer_module;
- (void) til_module_create_context(layer_module, stream, rand_r(&seed), ticks, n_cpus, layers_path, s->layers[i].setup, &ctxt->layers[i].module_ctxt); /* TODO: errors */
+ (void) til_module_create_context(layer_module, stream, rand_r(&seed), ticks, n_cpus, s->layers[i].setup, &ctxt->layers[i].module_ctxt); /* TODO: errors */
ctxt->n_layers++;
}
- free(layers_path);
-
if (((compose_setup_t *)setup)->texture.module) {
- size_t texture_path_len = snprintf(NULL, 0, "%s/%s", path, "texture") + 1;
- char *texture_path = calloc(1, texture_path_len);
-
- if (!texture_path)
- return til_module_context_free(&ctxt->til_module_context);
-
- snprintf(texture_path, texture_path_len, "%s/%s", path, "texture");
-
ctxt->texture.module = til_lookup_module(((compose_setup_t *)setup)->texture.module);
- (void) til_module_create_context(ctxt->texture.module, stream, rand_r(&seed), ticks, n_cpus, texture_path, s->texture.setup, &ctxt->texture.module_ctxt); /* TODO: errors */
- free(texture_path);
+ (void) til_module_create_context(ctxt->texture.module, stream, rand_r(&seed), ticks, n_cpus, s->texture.setup, &ctxt->texture.module_ctxt); /* TODO: errors */
}
return &ctxt->til_module_context;
diff --git a/src/modules/drizzle/drizzle.c b/src/modules/drizzle/drizzle.c
index 844a19a..83ba334 100644
--- a/src/modules/drizzle/drizzle.c
+++ b/src/modules/drizzle/drizzle.c
@@ -91,11 +91,11 @@ static inline uint32_t color_to_uint32(v3f_t color) {
}
-static til_module_context_t * drizzle_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * drizzle_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
drizzle_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(drizzle_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(drizzle_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/flui2d/flui2d.c b/src/modules/flui2d/flui2d.c
index 41baaac..09869b3 100644
--- a/src/modules/flui2d/flui2d.c
+++ b/src/modules/flui2d/flui2d.c
@@ -249,12 +249,12 @@ static void gamma_init(float gamma)
}
-static til_module_context_t * flui2d_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * flui2d_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
static int initialized;
flui2d_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(flui2d_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(flui2d_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/julia/julia.c b/src/modules/julia/julia.c
index 3428490..e5ce433 100644
--- a/src/modules/julia/julia.c
+++ b/src/modules/julia/julia.c
@@ -67,11 +67,11 @@ static uint32_t colors[] = {
};
-static til_module_context_t * julia_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * julia_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
julia_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(julia_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(julia_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/meta2d/meta2d.c b/src/modules/meta2d/meta2d.c
index c4fd9f8..804e4fc 100644
--- a/src/modules/meta2d/meta2d.c
+++ b/src/modules/meta2d/meta2d.c
@@ -80,11 +80,11 @@ static inline uint32_t color_to_uint32(v3f_t color) {
}
-static til_module_context_t * meta2d_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * meta2d_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
meta2d_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(meta2d_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(meta2d_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/moire/moire.c b/src/modules/moire/moire.c
index e75a5df..f8907af 100644
--- a/src/modules/moire/moire.c
+++ b/src/modules/moire/moire.c
@@ -42,11 +42,11 @@ typedef struct moire_context_t {
moire_center_t centers[];
} moire_context_t;
-static til_module_context_t * moire_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * moire_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
moire_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(moire_context_t) + ((moire_setup_t *)setup)->n_centers * sizeof(moire_center_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(moire_context_t) + ((moire_setup_t *)setup)->n_centers * sizeof(moire_center_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c
index 78d40e2..301f323 100644
--- a/src/modules/montage/montage.c
+++ b/src/modules/montage/montage.c
@@ -16,7 +16,7 @@ typedef struct montage_context_t {
size_t n_modules;
} montage_context_t;
-static til_module_context_t * montage_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup);
+static til_module_context_t * montage_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup);
static void montage_destroy_context(til_module_context_t *context);
static void montage_prepare_frame(til_module_context_t *context, til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr, til_frame_plan_t *res_frame_plan);
static void montage_render_fragment(til_module_context_t *context, til_stream_t *stream, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr);
@@ -32,13 +32,13 @@ til_module_t montage_module = {
};
-static til_module_context_t * montage_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * montage_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
const til_module_t **modules, *rtv_module, *compose_module;
size_t n_modules;
montage_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(montage_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(montage_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
@@ -93,7 +93,7 @@ static til_module_context_t * montage_create_context(const til_module_t *module,
(void) til_module_randomize_setup(module, rand_r(&seed), &setup, NULL);
/* FIXME errors */
- (void) til_module_create_context(module, stream, rand_r(&seed), ticks, 1, path, setup, &ctxt->contexts[i]);
+ (void) til_module_create_context(module, stream, rand_r(&seed), ticks, 1, setup, &ctxt->contexts[i]);
til_setup_free(setup);
}
diff --git a/src/modules/pixbounce/pixbounce.c b/src/modules/pixbounce/pixbounce.c
index 4589b60..fcc3c5b 100644
--- a/src/modules/pixbounce/pixbounce.c
+++ b/src/modules/pixbounce/pixbounce.c
@@ -235,11 +235,11 @@ static uint32_t pick_color(unsigned *seedp)
return makergb(rand_r(seedp)%256, rand_r(seedp)%256, rand_r(seedp)%256, 1);
}
-static til_module_context_t * pixbounce_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * pixbounce_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
pixbounce_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(pixbounce_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(pixbounce_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/plasma/plasma.c b/src/modules/plasma/plasma.c
index e23599a..473574a 100644
--- a/src/modules/plasma/plasma.c
+++ b/src/modules/plasma/plasma.c
@@ -53,7 +53,7 @@ static void init_plasma(int32_t *costab, int32_t *sintab)
}
-static til_module_context_t * plasma_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * plasma_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
static int initialized;
plasma_context_t *ctxt;
@@ -64,7 +64,7 @@ static til_module_context_t * plasma_create_context(const til_module_t *module,
init_plasma(costab, sintab);
}
- ctxt = til_module_context_new(module, sizeof(plasma_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(plasma_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/plato/plato.c b/src/modules/plato/plato.c
index 52e653a..5551268 100644
--- a/src/modules/plato/plato.c
+++ b/src/modules/plato/plato.c
@@ -630,11 +630,11 @@ static void draw_polyhedron(const polyhedron_t *polyhedron, m4f_t *transform, ti
}
-static til_module_context_t * plato_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * plato_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
plato_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(plato_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(plato_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/ray/ray.c b/src/modules/ray/ray.c
index 911fe1d..9ed023d 100644
--- a/src/modules/ray/ray.c
+++ b/src/modules/ray/ray.c
@@ -132,11 +132,11 @@ typedef struct ray_context_t {
} ray_context_t;
-static til_module_context_t * ray_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * ray_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
ray_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(ray_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(ray_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c
index 6bd4ddd..e76070a 100644
--- a/src/modules/rkt/rkt.c
+++ b/src/modules/rkt/rkt.c
@@ -47,16 +47,16 @@ typedef struct rkt_setup_t {
} rkt_setup_t;
-static til_module_context_t * rkt_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * rkt_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
- rkt_context_t *ctxt;
+ rkt_context_t *ctxt;
const til_module_t *seq_module;
seq_module = til_lookup_module(((rkt_setup_t *)setup)->seq_module_name);
if (!seq_module)
return NULL;
- ctxt = til_module_context_new(module, sizeof(rkt_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(rkt_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
@@ -77,7 +77,7 @@ static til_module_context_t * rkt_create_context(const til_module_t *module, til
(void) til_module_randomize_setup(ctxt->seq_module, rand_r(&seed), &module_setup, NULL);
- (void) til_module_create_context(ctxt->seq_module, stream, rand_r(&seed), ticks, 0, path, module_setup, &ctxt->seq_module_ctxt);
+ (void) til_module_create_context(ctxt->seq_module, stream, rand_r(&seed), ticks, 0, module_setup, &ctxt->seq_module_ctxt);
til_setup_free(module_setup);
}
diff --git a/src/modules/roto/roto.c b/src/modules/roto/roto.c
index 1838f62..322b967 100644
--- a/src/modules/roto/roto.c
+++ b/src/modules/roto/roto.c
@@ -62,7 +62,7 @@ static void init_roto(uint8_t texture[256][256], int32_t *costab, int32_t *sinta
}
-static til_module_context_t * roto_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * roto_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
static int initialized;
roto_context_t *ctxt;
@@ -73,7 +73,7 @@ static til_module_context_t * roto_create_context(const til_module_t *module, ti
init_roto(texture, costab, sintab);
}
- ctxt = til_module_context_new(module, sizeof(roto_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(roto_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c
index a2bc3c9..c3555c5 100644
--- a/src/modules/rtv/rtv.c
+++ b/src/modules/rtv/rtv.c
@@ -67,7 +67,7 @@ typedef struct rtv_setup_t {
} rtv_setup_t;
static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks);
-static til_module_context_t * rtv_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup);
+static til_module_context_t * rtv_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup);
static void rtv_destroy_context(til_module_context_t *context);
static void rtv_render_fragment(til_module_context_t *context, til_stream_t *stream, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr);
static void rtv_finish_frame(til_module_context_t *context, til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr);
@@ -195,7 +195,7 @@ static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks)
}
if (!ctxt->channel->module_ctxt)
- (void) til_module_create_context(ctxt->channel->module, ctxt->til_module_context.stream, rand_r(&ctxt->til_module_context.seed), ticks, ctxt->til_module_context.n_cpus, ctxt->til_module_context.path, ctxt->channel->module_setup, &ctxt->channel->module_ctxt);
+ (void) til_module_create_context(ctxt->channel->module, ctxt->til_module_context.stream, rand_r(&ctxt->til_module_context.seed), ticks, ctxt->til_module_context.n_cpus, ctxt->channel->module_setup, &ctxt->channel->module_ctxt);
ctxt->channel->last_on_time = now;
}
@@ -227,7 +227,7 @@ static int rtv_should_skip_module(const rtv_setup_t *setup, const til_module_t *
}
-static til_module_context_t * rtv_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * rtv_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
rtv_context_t *ctxt;
const til_module_t **modules;
@@ -241,7 +241,7 @@ static til_module_context_t * rtv_create_context(const til_module_t *module, til
n_channels++;
}
- ctxt = til_module_context_new(module, sizeof(rtv_context_t) + n_channels * sizeof(rtv_channel_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(rtv_context_t) + n_channels * sizeof(rtv_channel_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
@@ -257,7 +257,7 @@ static til_module_context_t * rtv_create_context(const til_module_t *module, til
((rtv_setup_t *)setup)->snow_module_setup = NULL;
ctxt->snow_channel.module = til_lookup_module(((rtv_setup_t *)setup)->snow_module_name);
- (void) til_module_create_context(ctxt->snow_channel.module, stream, rand_r(&seed), ticks, n_cpus, path, ctxt->snow_channel.module_setup, &ctxt->snow_channel.module_ctxt);
+ (void) til_module_create_context(ctxt->snow_channel.module, stream, rand_r(&seed), ticks, n_cpus, ctxt->snow_channel.module_setup, &ctxt->snow_channel.module_ctxt);
}
ctxt->log_channels = ((rtv_setup_t *)setup)->log_channels;
diff --git a/src/modules/shapes/shapes.c b/src/modules/shapes/shapes.c
index ab836a0..e7a0b56 100644
--- a/src/modules/shapes/shapes.c
+++ b/src/modules/shapes/shapes.c
@@ -93,11 +93,11 @@ typedef struct shapes_context_t {
} shapes_context_t;
-static til_module_context_t * shapes_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * shapes_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
shapes_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(shapes_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(shapes_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/snow/snow.c b/src/modules/snow/snow.c
index 7ffd3af..1640ff2 100644
--- a/src/modules/snow/snow.c
+++ b/src/modules/snow/snow.c
@@ -22,11 +22,11 @@ typedef struct snow_context_t {
} snow_context_t;
-static til_module_context_t * snow_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * snow_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
snow_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(snow_context_t) + n_cpus * sizeof(snow_seed_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(snow_context_t) + n_cpus * sizeof(snow_seed_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/sparkler/sparkler.c b/src/modules/sparkler/sparkler.c
index b6ffd01..8cd1bf9 100644
--- a/src/modules/sparkler/sparkler.c
+++ b/src/modules/sparkler/sparkler.c
@@ -33,11 +33,11 @@ typedef struct sparkler_context_t {
extern particle_ops_t simple_ops;
-static til_module_context_t * sparkler_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * sparkler_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
sparkler_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(sparkler_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(sparkler_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/spiro/spiro.c b/src/modules/spiro/spiro.c
index 3fa8f7e..ef9e7b6 100644
--- a/src/modules/spiro/spiro.c
+++ b/src/modules/spiro/spiro.c
@@ -31,12 +31,12 @@ typedef struct spiro_context_t {
} spiro_context_t;
-static til_module_context_t * spiro_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * spiro_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
spiro_context_t *ctxt;
float z;
- ctxt = til_module_context_new(module, sizeof(spiro_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(spiro_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/stars/stars.c b/src/modules/stars/stars.c
index 6d5f3c0..033794b 100644
--- a/src/modules/stars/stars.c
+++ b/src/modules/stars/stars.c
@@ -66,13 +66,13 @@ float get_random_unit_coord(unsigned *seed) {
}
-static til_module_context_t * stars_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * stars_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
stars_context_t *ctxt;
float z;
struct points* p_ptr = NULL;
- ctxt = til_module_context_new(module, sizeof(stars_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(stars_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/strobe/strobe.c b/src/modules/strobe/strobe.c
index 9f6b04a..a8d4237 100644
--- a/src/modules/strobe/strobe.c
+++ b/src/modules/strobe/strobe.c
@@ -35,11 +35,11 @@ typedef struct strobe_context_t {
} strobe_context_t;
-static til_module_context_t * strobe_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * strobe_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
strobe_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(strobe_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(strobe_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/submit/submit.c b/src/modules/submit/submit.c
index c50b67c..a3f7b25 100644
--- a/src/modules/submit/submit.c
+++ b/src/modules/submit/submit.c
@@ -265,11 +265,11 @@ static void setup_grid(submit_context_t *ctxt)
}
-static til_module_context_t * submit_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * submit_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
submit_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(submit_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(submit_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/swab/swab.c b/src/modules/swab/swab.c
index bff6f6b..9b7043c 100644
--- a/src/modules/swab/swab.c
+++ b/src/modules/swab/swab.c
@@ -66,11 +66,11 @@ static inline uint32_t color_to_uint32(color_t color) {
}
-static til_module_context_t * swab_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * swab_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
swab_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(swab_context_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(swab_context_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/swarm/swarm.c b/src/modules/swarm/swarm.c
index 4a21260..8e2d853 100644
--- a/src/modules/swarm/swarm.c
+++ b/src/modules/swarm/swarm.c
@@ -177,11 +177,11 @@ static inline uint32_t color_to_uint32(v3f_t color) {
}
-static til_module_context_t * swarm_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * swarm_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
swarm_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(swarm_context_t) + sizeof(*(ctxt->boids)) * SWARM_SIZE, stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(swarm_context_t) + sizeof(*(ctxt->boids)) * SWARM_SIZE, stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
diff --git a/src/modules/voronoi/voronoi.c b/src/modules/voronoi/voronoi.c
index 45333b0..b2eff94 100644
--- a/src/modules/voronoi/voronoi.c
+++ b/src/modules/voronoi/voronoi.c
@@ -89,11 +89,11 @@ static void voronoi_randomize(voronoi_context_t *ctxt, int do_colors)
}
-static til_module_context_t * voronoi_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup)
+static til_module_context_t * voronoi_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup)
{
voronoi_context_t *ctxt;
- ctxt = til_module_context_new(module, sizeof(voronoi_context_t) + ((voronoi_setup_t *)setup)->n_cells * sizeof(voronoi_cell_t), stream, seed, ticks, n_cpus, path, setup);
+ ctxt = til_module_context_new(module, sizeof(voronoi_context_t) + ((voronoi_setup_t *)setup)->n_cells * sizeof(voronoi_cell_t), stream, seed, ticks, n_cpus, setup);
if (!ctxt)
return NULL;
© All Rights Reserved