Skip to content

[Feature] Taskflow for performance and parallel tasking #206

Draft
The3dVehicleguy wants to merge 7 commits intoPanosK92:masterfrom
The3dVehicleguy:TaskFlow-implimentation
Draft

[Feature] Taskflow for performance and parallel tasking #206
The3dVehicleguy wants to merge 7 commits intoPanosK92:masterfrom
The3dVehicleguy:TaskFlow-implimentation

Conversation

@The3dVehicleguy
Copy link
Copy Markdown

@The3dVehicleguy The3dVehicleguy commented Jan 18, 2026

**Taskflow Implementation for performance and parallel tasking **

This pull request implements the Taskflow library into Spartan with wrapper functions to allow multiple parallel task operations and GPU side task execution with Nvidia CUDA Graph

TODO List:

  • Add Taskflow to third_party directory + add to premake5 config process.
  • Create a "Task_Manager" class to provide wrapper functions for high-level usage.
  • Add ability to create new task graphs.
  • Add ability to declare the type of tasking (async tasking, static tasking)
  • Add wrapper functions to create GPU side tasking. See Taskflow documentation on CUDA use.
  • Implement RHI_Renderer tasking loops.
  • Create wrapper function for creating and managing a Taskflow Task Group.
  • Setup runtime tasking execution wrapper.

* master:
  [ray_tracing] replaced single bounce gi with restir path tracing, which is just a work in progress for now
  [memory] improved memory allocator with memory tags, marking and did some bug fixes
  [physics] cleanup
  [game] adjusted showroom light intensity
  [ray_tracing] global illumination (WIP)
  [ray_tracing] made ray tracing shaodws mutually exlusive to raster and screen space
  [ray_tracing] fixed an issue where if you loaded a second world, acceleration structures wouldn't update properly
  [ray_tracing] directional light shadows
  [game] different car views are now working
  [d3d12] implemented so more, getting closer editor rendering
(Note: I had AI to write the commit message because I was lazy. Plz don't hate me)
Adds a modular, thread-safe taskflow system for parallel task execution using the Taskflow library. Includes:
- FrameTaskflow: reference frame pipeline with customizable stage callbacks (Input, AI, Physics, Renderer) and dependency management.
- TaskflowExecutor: singleton executor managing a global thread pool for all engine taskflows.
- Taskflow_Utils: utility functions for common parallel patterns (run, async, parallel_for, subflow, reduce).
Refactors Task_Manager to use the new executor and updates member naming for consistency. All new code is well-documented and marked experimental. Lays groundwork for scalable, parallel task scheduling across engine subsystems.
@PanosK92
Copy link
Copy Markdown
Owner

The engine is already extremely GPU-driven, with almost no CPU overhead in rendering and thread pool handling the rest of the work fine.

Is there another reason I am not seeing for this PR? Are you still working on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants