summaryrefslogtreecommitdiff
path: root/src/modules/roto/roto.c
AgeCommit message (Collapse)Author
2019-11-23rototiller: pass cpu to .render_fragment()Vito Caputo
Mostly mechanical change, though threads.c needed some jiggering to make the logical cpu id available to the worker threads. Now render_fragment() can easily addresss per-cpu data created by create_context().
2019-11-23rototiller: pass num_cpus to .create_context()Vito Caputo
Back in the day, there was no {create,destroy}_context(), so passing num_cpus to just prepare_frame made sense. Modules then would implicitly initialize themselves on the first prepare_frame() call using a static initialized variable. Since then things have been decomposed a bit for more sophisticated (and cleaner) modules. It can be necessary to allocate per-cpu data structures and the natural place to do that is @ create_context(). So this commit wires that up. A later commit will probably have to plumb a "current cpu" identifier into the render_fragment() function. Because a per-cpu data structure isn't particularly useful if you can't easily address it from within your execution context.
2019-11-10roto: drop roto64, turning roto32 back into rotoVito Caputo
Initially I was going to make 32 vs. 64 be a setting, but decided now that SDL is supported it's fairly likely there will be odd fb dimensions (arbitrary window sizes). Since this never really brought anything of significant value, just drop the version that mostly just demonstrated how to pack multiple pixels into a single u64 write to the framebuffer more than anything else.
2017-09-15modules/*: cease dividing stride by 4Vito Caputo
Just cast buf to (void *) for the pointer arithmetic, stride is in units of bytes and no assumptions should be made about its value such as divisability by 4.
2017-09-14fb: s/fb_fragment_divide_single/fb_fragment_slice_single/Vito Caputo
Mechanical cosmetic change
2017-09-14*: use fragment generatorVito Caputo
Rather than laying out all fragments in a frame up-front in ray_module_t.prepare_frame(), return a fragment generator (rototiller_fragmenter_t) which produces the numbered fragment as needed. This removes complexity from the serially-executed prepare_frame() and allows the individual fragments to be computed in parallel by the different threads. It also eliminates the need for a fragments array in the rototiller_frame_t, indeed rototiller_frame_t is eliminated altogether.
2017-04-22roto: utilize context struct for module stateVito Caputo
2017-04-22*: add module context machineryVito Caputo
introduces create_context() and destroy_context() methods, and adds a 'void *context' first parameter to the module methods. If a module doesn't supply create_context() then NULL is simply passed around as the context, so trivial modules can continue to only implement render_fragment(). A subsequent commit will update the modules to encapsulate their global state in module-specific contexts.
2017-04-22roto: enable threaded renderingVito Caputo
Same basic changes as the previous commits made to julia and plasma.
2017-04-22*: /render/render_fragment/ in rototiller_module_tVito Caputo
Adding more context to the name in anticipation of adding a prepare_frame() method to the module struct.
2017-04-21*: s/renderer/module/gVito Caputo
Make consistent with the source directory structure naming.
2017-01-18*: move source into src/ subdirVito Caputo
Restoring some organizational sanity since adopting autotools.
© All Rights Reserved