;================================================================================================================================= ; Task Scheduler Configuration file ; v00 - 08/08/2007 - Morten Pedersen - Initial version ; v01 - ...too many to tell... ; v02 - 31/08/2007 - Morten Pedersen - Boot config data added ; v03 - ...again, tons of updates, but priorities and '>>' command to allow for comments in this file ; v04 - 11/2011 - Michael Bailey - Added Thread ID of 1, to lock to thread number 1 ; v05 - 17/07/2013 - Angel Cunado - Added support for custom thread masks based in task types. ;================================================================================================================================= ; Thread masks to determine which thread can run which tasks, this is curently mainly required in the xbox 360 as hyperthreading ; together with the lack of OS scheduler ability of moving logical thread across hw threads means we need to be caredul of what ; tasks run in which processors. ; ; The main render tasks currently unlock during it execution dependencies that make possible for core tasks to run, so it must be ; prevented to run in the main thread. ; ; Core tasks that must run in the main thread. ; | Data parallel tasks that can safely use hyperthreads as they mostly run in parallel with thenselves. ; | | Generic tasks that may form part of the critical path. ; | | | Low priority tasks as they will rarely be in the critical path and can be scheduled in slower/busier worker threads. ; | | | | ; | | | | ; | | | | ;Task Mask c p x l ; Xbox 360: ; Odd threads share the same core with the previous thread, so they are used only for data parallel jobs. ; HW thread 4 is not used because it get preemted for long periods by the audio kinetic event handling. ; HW thread 5 is also slower than normal as it shares the same core than thread 4. BOOT_360 [cpx,p,px,p,pl] BOOT_PS3 [cpxl,px] BOOT_PC [cpx,pxl,pxl,pxl] BOOT_DURANGO [cpx,px,px,px,l,l] BOOT_ORBIS [cpx,pxl,pxl,pxl,pxl,pxl] ;================================================================================================================================= ; '>>' indicates task - it's used by the text scanner to locate next command ; this is added to allow for comments at the end of the line ; Task type (r=root, a=automatic, m=manual) (automatic/manual states who handles the task, if manual handling the user handles it and the task is used mainly for dependencies) ; | Thread ID (c=main,x=any,1=thread 1) ; | | Amount of calls per frame (#=count,x=at least once, u=user defined; task function should return number of jobs when called with param=-1) ; | | | Priority (1=low, 99=highest) ; | | | | Name of Task (to be matched up with at codeside) ; | | | | | Dependencies ; | | | | | | BEGIN >> m [c] [1] [50] START_NEXT_FRAME [] >> a [c] [1] [50] PLATFORM_UPDATE [START_NEXT_FRAME] >> a [c] [1] [50] EFFECT_MANAGER_UPDATE [PLATFORM_UPDATE] >> a [x] [1] [30] DEFRAGMENT_AND_COMPACT_HEAPS [PLATFORM_UPDATE] >> a [x] [1] [30] EFFECT_UPDATE [PLATFORM_UPDATE] >> a [x] [1] [30] CONTROLLER_UPDATE [PLATFORM_UPDATE] >> a [x] [1] [30] PATHFINDING_PATH_QUEUE_UPDATE [EFFECT_MANAGER_UPDATE,ANIMATION_MANAGER_UPDATE] ; Pushing this after IK to run in parallel with entity update. ;Building using havok. Must be main thread. ; Compute the player camera orientation first (no position) so we could use the information to ; correctly rotate the character. >> a [c] [1] [50] PLAYER_CAMERA_UPDATE [PLATFORM_UPDATE] ; Build the primary animation layer - we do this first so: ; - we can update the camera asap ; - we can react to primary pose in secondary actions in the SAME frame - super important >> a [c] [1] [50] CHARACTER_BUILD_START_PRIMARY_ANIMATION [PLAYER_CAMERA_UPDATE] >> a [c] [1] [50] CHARACTER_BUILD_WAIT_FOR_PRIMARY_ANIMATION [CHARACTER_BUILD_START_PRIMARY_ANIMATION] ; This will essentially compute the camera target position before the animation system compute the aiming pose. >> a [c] [1] [50] CAMERA_PRE_UPDATE [CONTROLLER_UPDATE,CHARACTER_BUILD_WAIT_FOR_PRIMARY_ANIMATION] ; After the primary animation layer has built we can now update secondary and persistent actions ; before blending them for the frame >> a [c] [1] [50] CHARACTER_BUILD_SECONDARY_ANIMATION [CAMERA_PRE_UPDATE] >> a [c] [1] [50] CHARACTER_BUILD_FINALISE_ANIMATION [CHARACTER_BUILD_SECONDARY_ANIMATION] >> a [c] [1] [50] CHARACTER_IK_AND_RAGDOLL [CHARACTER_BUILD_FINALISE_ANIMATION] ; Find the position of the character first and then use that to position the camera. ; All rendered objects are then culled/rendered based upon this. >> a [c] [1] [50] CAMERA_UPDATE [CHARACTER_IK_AND_RAGDOLL] ; character and cam are done >> m [c] [1] [50] CHARACTER_PROCESS_SYNCHRONIZE [CHARACTER_IK_AND_RAGDOLL, CAMERA_UPDATE] >> a [x] [1] [30] CHARACTER_TRANSFER_SETUP [CHARACTER_IK_AND_RAGDOLL] >> a [c] [1] [50] ANIMATION_MANAGER_UPDATE [CHARACTER_TRANSFER_SETUP] >> m [c] [1] [70] MATRIXSTACK_TRANSFER_OPEN [CHARACTER_IK_AND_RAGDOLL] >> a [x] [1] [70] CHARACTER_TRANSFER_COPY [ANIMATION_MANAGER_UPDATE,MATRIXSTACK_TRANSFER_OPEN] >> a [c] [1] [70] MATRIXSTACK_TRANSFER_CLOSE [CHARACTER_TRANSFER_COPY] >> a [x] [1] [30] SOFTWARE_Z_KICK [CHARACTER_IK_AND_RAGDOLL, CAMERA_UPDATE, ANIMATION_MANAGER_UPDATE ] ; after character build to not interrupt other spu tasks on PS3 >> a [c] [1] [50] ENTITY_MANAGER [EFFECT_MANAGER_UPDATE,ANIMATION_MANAGER_UPDATE] >> a [c] [1] [50] PICKUP_MANAGER_TICK [ENTITY_MANAGER] >> a [c] [1] [50] ZONE_MANAGER [ENTITY_MANAGER] >> a [x] [1] [30] DYNAMIC_EFFECTS_UPDATE [MATRIXSTACK_TRANSFER_CLOSE,ZONE_MANAGER,HAVOK_UPDATE_DYNAMIC_OBJECTS] ; Needs to occur after character ik and entity >> a [x] [1] [30] CALCULATE_POVS [ZONE_MANAGER] ; Moved earlier in frame to run in parallel >> a [x] [1] [30] RADIOSITY_PREPARE_COMMON [SOFTWARE_Z_KICK, CALCULATE_POVS, ANIMATION_MANAGER_UPDATE] >> a [x] [1] [30] RADIOSITY_PREPARE_INDIRECT [RADIOSITY_PREPARE_COMMON] >> a [x] [1] [30] SOFTWARE_Z_WAIT [SOFTWARE_Z_KICK, CALCULATE_POVS, ANIMATION_MANAGER_UPDATE, MATRIXSTACK_TRANSFER_CLOSE, DYNAMIC_EFFECTS_UPDATE] ; PS3 only >> a [x] [1] [30] BUILD_PRE_MAIN_RENDER_LISTS [SOFTWARE_Z_WAIT, RADIOSITY_PREPARE_COMMON, HAVOK_UPDATE_DYNAMIC_OBJECTS] >> a [x] [1] [30] SORT_PRE_MAIN_RENDER_LISTS [BUILD_PRE_MAIN_RENDER_LISTS] >> a [x] [1] [30] BUILD_MAIN_RENDER_LIST [BUILD_PRE_MAIN_RENDER_LISTS] >> a [x] [1] [30] SORT_MAIN_RENDER_LIST [SORT_PRE_MAIN_RENDER_LISTS,BUILD_MAIN_RENDER_LIST] >> a [x] [1] [30] BUILD_SHADOWS_RENDER_LISTS [BUILD_MAIN_RENDER_LIST, RENDER_GATHER_LIGHTS_MAIN_POV] >> a [x] [1] [30] SORT_SHADOWS_RENDER_LISTS [SORT_MAIN_RENDER_LIST,BUILD_SHADOWS_RENDER_LISTS] >> a [x] [1] [30] BUILD_SHADOW_CONTEXT_COMMANDLIST0 [SORT_SHADOWS_RENDER_LISTS] >> a [x] [1] [30] BUILD_SHADOW_CONTEXT_COMMANDLIST1 [SORT_SHADOWS_RENDER_LISTS] >> a [x] [1] [30] BUILD_SHADOW_CONTEXT_COMMANDLIST2 [SORT_SHADOWS_RENDER_LISTS] >> a [x] [1] [30] BUILD_SHADOW_CONTEXT_COMMANDLIST3 [SORT_SHADOWS_RENDER_LISTS] ; Radiosity direct light culling depends on RenderableScene::Zone renderables having been compacted and sorted, which happens in BUILD_PRE_MAIN_RENDER_LISTS. >> a [x] [1] [30] RADIOSITY_PREPARE_DIRECT [RADIOSITY_PREPARE_COMMON, BUILD_PRE_MAIN_RENDER_LISTS] >> a [x] [1] [30] RENDER_BEGIN_SCENE [MAIN_THREAD_CHARACTER_PROCESSING,PATHFINDING_PATH_QUEUE_UPDATE,DEFRAGMENT_AND_COMPACT_HEAPS,NET_AI_UPDATE, RADIOSITY_PREPARE_DIRECT, RADIOSITY_PREPARE_INDIRECT, AI_CHARACTER_LOGIC_ACTIONS] >> a [x] [1] [30] PROCESS_RSX_AUDIO_PASS_1 [RENDER_BEGIN_SCENE] >> a [x] [1] [30] RENDER_EXTRACT_PROBES [PROCESS_RSX_AUDIO_PASS_1, RADIOSITY_PREPARE_DIRECT, SORT_MAIN_RENDER_LIST] >> a [x] [1] [30] RENDER_PRE_MAIN_POV [RENDER_EXTRACT_PROBES, SORT_PRE_MAIN_RENDER_LISTS] >> a [x] [1] [30] RENDER_BEGIN_MAIN_POV [RENDER_PRE_MAIN_POV, SORT_MAIN_RENDER_LIST] >> a [x] [1] [30] RENDER_GATHER_LIGHTS_MAIN_POV [RENDER_BEGIN_MAIN_POV] >> a [x] [1] [30] RENDER_SOLIDS_MAIN_POV [RENDER_EXTRACT_PROBES, RENDER_GATHER_LIGHTS_MAIN_POV] >> a [x] [1] [30] RENDER_LIGHTS_MAIN_POV [RENDER_SOLIDS_MAIN_POV, ALPHALIGHT_TASK, BUILD_SHADOW_CONTEXT_COMMANDLIST0, BUILD_SHADOW_CONTEXT_COMMANDLIST1, BUILD_SHADOW_CONTEXT_COMMANDLIST2, BUILD_SHADOW_CONTEXT_COMMANDLIST3] >> a [x] [1] [30] RENDER_DISTORSION_MAIN_POV [RENDER_LIGHTS_MAIN_POV] >> a [x] [1] [30] RENDER_VELOCITY_MAIN_POV [RENDER_DISTORSION_MAIN_POV] >> a [x] [1] [30] RENDER_ALPHA_MAIN_POV [RENDER_VELOCITY_MAIN_POV] >> a [x] [1] [30] RENDER_END_MAIN_POV [RENDER_ALPHA_MAIN_POV] >> a [x] [1] [30] RENDER_STEREO_EYE [RENDER_END_MAIN_POV] >> a [x] [1] [30] RENDER_END_SCENE [RENDER_STEREO_EYE] >> m [x] [1] [30] ALPHALIGHT_TASK [RENDER_GATHER_LIGHTS_MAIN_POV, DYNAMIC_EFFECTS_UPDATE] ; Needs to know the particle positions >> m [c] [1] [50] RENDER_MAIN [RENDER_END_SCENE, DYNAMIC_EFFECTS_UPDATE] >> a [c] [1] [50] CPU_LIGHT_SAMPLER_UPDATE [DUMMY_RENDER_SYNC] >> a [c] [1] [50] SCALEFORM_UPDATE [DUMMY_RENDER_SYNC, NET_AI_UPDATE;BUILD_MAIN_RENDER_LIST] >> a [l] [1] [20] FILE_IO_UPDATE [SCA...
mariusztobi