Page MenuHome

DrawManager: Graph Task Scheduling
Needs ReviewPublic

Authored by Jeroen Bakker (jbakker) on Mon, May 4, 3:33 PM.



This patch uses a graph flow scheduler for creating all mesh batches.
On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps.

Flame graph before applying patch

Flame graph after applying patch

For each mesh where batches needs to be updated a sub-graph will be added to the task_graph.
This sub-graph starts with an extract_render_data_node. This fills/converts the required data
from Mesh.

Small extractions and extractions that can't be multi-threaded are grouped in a single

Other extractions will create a node for each loop exceeding 4096 items. these nodes are
linked to the user_data_init_task_node. the user_data_init_task_node prepares the userdata
needed for the extraction based on the data extracted from the mesh.

Note: If the lines and lines_loose are requested, the lines_loose sub-buffer is created
as part of the lines extraction. When the lines_loose is only requested the sub-buffer is
created from the existing lines buffer. It is assumed that the lines buffer is always
requested before or together with the lines_loose what is always the case (see
DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES) in draw_cache_impl_mesh.c).

Diff Detail

rB Blender
arcpatch-D7618 (branched from master)
Build Status
Buildable 8197
Build 8197: arc lint + arc unit

Event Timeline

Jeroen Bakker (jbakker) requested review of this revision.Mon, May 4, 3:33 PM
Jeroen Bakker (jbakker) created this revision.
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Thu, May 7, 3:55 PM
  • Updated with latest chanhes of 'T76255'
  • Merge branch 'master' into arcpatch-D7618
  • Merge branch 'master' into arcpatch-D7618
Jeroen Bakker (jbakker) retitled this revision from [WIP] DrawManager: Graph Task Scheduling to DrawManager: Graph Task Scheduling.Mon, May 25, 1:39 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Mon, May 25, 2:27 PM
  • Added documentation and clean-up the code