summaryrefslogtreecommitdiff
path: root/src/til.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/til.h')
-rw-r--r--src/til.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/til.h b/src/til.h
index ab8f6b8..e38ad9c 100644
--- a/src/til.h
+++ b/src/til.h
@@ -5,10 +5,16 @@
#include "til_module_context.h"
#include "til_setup.h"
-/* til_fragmenter produces fragments from an input fragment, num being the desired fragment for the current call.
+/* til_fragmenter_t produces fragments from an input fragment, num being the desired fragment for the current call.
* return value of 1 means a fragment has been produced, 0 means num is beyond the end of fragments. */
typedef int (*til_fragmenter_t)(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment);
+/* til_frame_plan_t is what til_module_t.prepare_frame() populates to return a fragmenter and any flags/rules */
+typedef struct til_frame_plan_t {
+ unsigned cpu_affinity:1; /* maintain a stable fragnum:cpu/thread mapping? (slower) */
+ til_fragmenter_t fragmenter; /* fragmenter to use in rendering the frame */
+} til_frame_plan_t;
+
typedef struct til_settings_t settings;
typedef struct til_setting_desc_t til_setting_desc_t;
typedef struct til_knob_t til_knob_t;
@@ -18,7 +24,7 @@ typedef struct til_knob_t til_knob_t;
typedef struct til_module_t {
til_module_context_t * (*create_context)(unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup);
void (*destroy_context)(til_module_context_t *context);
- void (*prepare_frame)(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment, til_fragmenter_t *res_fragmenter);
+ void (*prepare_frame)(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment, til_frame_plan_t *res_frame_plan);
void (*render_fragment)(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t *fragment);
void (*finish_frame)(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment);
int (*setup)(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup);
© All Rights Reserved