Graphics processing
When generating a sequence of render outputs using a graphics processor, the completion status of rendering tasks from different render outputs is tracked so that processing tasks for later render outputs in the sequence of outputs can be processed concurrently with processing tasks for earlier render outputs in the sequence of outputs whilst ensuring that any dependencies between the rendering tasks for the different render outputs are enforced.
1 . A method of operating a graphics processor when performing a sequence of rendering jobs, the graphics processor including a set of one or more processing cores, the method comprising:
when performing a sequence of rendering jobs:
wherein each rendering job in the sequence of rendering jobs comprises a respective set of one or more rendering tasks to be processed by processing cores of the graphics processor to generate an overall output for the rendering job, and wherein at least some processing of a rendering task for a later rendering job in the sequence of rendering jobs may depend on processing of a rendering task for an earlier rendering job in the sequence of rendering jobs:
tracking the processing of rendering jobs in the sequence of rendering jobs, wherein the tracking comprises, for each of a plurality of groups of plural rendering tasks for a first, earlier rendering job in the sequence of rendering jobs, tracking whether the group of plural rendering tasks as a whole has completed its processing; and
when a rendering task for a second, later rendering job in the sequence of rendering jobs is to be processed wherein processing the rendering task for the second, later rendering job depends on one or more rendering tasks for the first, earlier rendering job that are included within a respective group of plural rendering tasks for which it is being tracked whether the group of plural rendering tasks as a whole has completed its processing:
controlling processing of the rendering task for the second, later rendering job based on the tracking of whether the group of plural rendering tasks including the one or more rendering tasks on which processing the rendering task for the second, later rendering job depends has completed its processing to enforce the dependency,
wherein tracking the processing of rendering jobs in the sequence of rendering jobs is performed using task completion status data structures, wherein a task completion status data structure allocated to a rendering job in the sequence of rendering jobs stores in respective entries of the task completion status data structure respective indicators for respective groups of plural rendering tasks for the rendering job, and wherein an indicator for a respective group of plural rendering tasks indicates whether the group of plural rendering tasks as a whole has completed its processing, and
wherein a same size task completion status data structure is allocated and used for different ones of the rendering jobs in the sequence of rendering jobs, so that the number of rendering tasks within the groups of plural rendering tasks that the entries of the task completion status data structure are storing the respective indicators for depends on the number of rendering tasks in the rendering job that the rendering task completion data structure is allocated for.
2 . The method of claim 1 , wherein the indicators comprise respective counters for the respective groups of plural rendering tasks, wherein the counter that is stored for a group of plural rendering tasks can be incremented or decremented appropriately as the rendering tasks in the group of plural rendering tasks complete their processing, the counter for a respective group of plural rendering tasks thereby indicating how many of the rendering tasks within the group of plural rendering tasks have completed their processing.
3 . The method of claim 2 , wherein the counter for a respective group of plural rendering tasks is initialised to zero, and is incremented as rendering tasks in the group of plural rendering tasks are issued for processing, and then decremented as the rendering tasks complete their processing, such that when the counter is decremented to zero this indicates that all of the rendering tasks within the group of plural rendering tasks have completed their processing.
4 . The method of claim 1 , comprising issuing rendering tasks for processing such that the rendering tasks within each group of plural rendering tasks are issued for processing as a contiguous sequence, wherein different groups of plural rendering tasks are therefore issued for processing one after another.
5 . The method of claim 1 , wherein the rendering tasks correspond to respective tiles into which the render output has been subdivided for rendering, and wherein the group of plural rendering tasks corresponds to a respective block of the tiles into which the render output has been subdivided for rendering.
6 . The method of claim 1 , wherein the controlling processing of the rendering task for the second, later rendering job based on the tracking of whether all of the rendering tasks in the group of plural rendering tasks including the one or more rendering tasks on which processing the rendering task for the second, later rendering job depends have completed their processing comprises: when it is determined that not all of the rendering tasks in the group of plural rendering tasks including the one or more rendering tasks on which processing the rendering task for the second, later rendering job depends have completed their processing: stalling processing of the rendering task for the second, later rendering job until it is determined that all of the rendering tasks in the group of plural rendering tasks including the one or more rendering tasks on which processing the rendering task for the second, later rendering job depends have completed their processing.
7 . The method of claim 6 , whereas when it is determined that all of the rendering tasks in the group of plural rendering tasks including the one or more rendering tasks on which processing the rendering task for the second, later rendering job depends have completed their processing: the method comprises permitting processing of the rendering task for the second, later rendering job.
8 . The method of claim 1 , further comprising: once a rendering job has completed, discarding the respective task completion status data structure that was allocated for that rendering job.
9 . The method of claim 1 , comprising:
determining, when processing the sequence of rendering jobs, that a processing barrier should be enforced between a third rendering job and a fourth rendering job in the sequence of rendering jobs to prevent the graphics processor issuing any rendering tasks for the fourth rendering job for processing until all of the rendering tasks for the third rendering job have completed processing; and
enforcing the processing barrier between the third and fourth rendering jobs.
10 . A graphics processor comprising:
a set of one or more processing cores; and
a control circuit that is configured to:
when the graphics processor is performing a sequence of rendering jobs:
wherein each rendering job in the sequence of rendering jobs comprises a respective set of one or more rendering tasks to be processed by processing cores of the graphics processor to generate an overall output for the rendering job, and wherein at least some processing of a rendering task for a later rendering job in the sequence of rendering jobs may depend on processing of a rendering task for an earlier rendering job in the sequence of rendering jobs:
track for each of a plurality of groups of plural rendering tasks for a particular rendering job in the sequence of rendering jobs whether the group of plural rendering tasks as a whole has completed its processing; and
control processing of rendering tasks for a later rendering job in the sequence of rendering jobs that may depend on one or more rendering tasks for an earlier rendering job in the sequence of rendering jobs based on the tracking of whether the groups of plural rendering tasks for the earlier rendering job have completed their processing to enforce dependencies between the earlier and later rendering jobs,
wherein the control circuit is configured to track the processing of rendering jobs in the sequence of rendering jobs using task completion status data structures, wherein a task completion status data structure allocated to a rendering job in the sequence of rendering jobs stores in respective entries of the task completion status data structure respective indicators for respective groups of plural rendering tasks for the rendering job, and wherein an indicator for a respective group of plural rendering tasks indicates whether the group of plural rendering tasks as a whole has completed its processing, and
wherein the graphics processor is configured for a same size task completion status data structure to be allocated and used for different ones of the rendering jobs in the sequence of rendering jobs, so that the number of rendering tasks within the groups of plural rendering tasks that the entries of the task completion status data structure are storing the respective indicators for depends on the number of rendering tasks in the rendering job that the rendering task completion data structure is allocated for.
11 . The graphics processor of claim 10 , wherein the indicators comprise respective counters for the respective groups of plural rendering tasks, wherein the counter that is stored for a group of plural rendering tasks can be incremented or decremented appropriately as the rendering tasks in the group of plural rendering tasks complete their processing, the counter for a respective group of plural rendering tasks thereby indicating how many of the rendering tasks within the group of plural rendering tasks have completed their processing.
12 . The graphics processor of claim 11 , wherein the counter for a respective group of plural rendering tasks is initialised to zero, and is incremented as rendering tasks in the group of plural rendering tasks are issued for processing, and then decremented as the rendering tasks complete their processing, such that when the counter is decremented to zero this indicates that all of the rendering tasks within the group of plural rendering tasks have completed their processing.
13 . The graphics processor of claim 10 , comprising issuing rendering tasks for processing such that the rendering tasks within each group of plural rendering tasks are issued for processing as a contiguous sequence, wherein different groups of plural rendering tasks are therefore issued for processing one after another.
14 . The graphics processor of claim 10 , wherein the rendering tasks correspond to respective tiles into which the render output has been subdivided for rendering, and wherein the group of plural rendering tasks corresponds to a respective block of the tiles into which the render output has been subdivided for rendering.
15 . The graphics processor of claim 10 , wherein the controlling processing of rendering tasks for a later rendering job in the sequence of rendering jobs that may depend on one or more rendering tasks for an earlier rendering job in the sequence of rendering jobs based on the tracking of whether the groups of plural rendering tasks for the earlier rendering job have completed their processing to enforce dependencies between the earlier and later rendering jobs by the control circuit comprises the control circuit stalling processing of rendering tasks for a later rendering job when it is determined that the rendering task for the later rendering job depends on one or more rendering tasks for an earlier rendering job and it is determined that not all of the rendering tasks in the group or groups of rendering tasks including the one or more rendering tasks for the earlier rendering job on which the rendering task for the later rendering job depends have completed their processing.
16 . The graphics processor of claim 15 , whereas when it is determined that all of the rendering tasks in all group or groups of plural rendering tasks including any rendering tasks on which processing of the rendering task for later rendering job depends have completed their processing: the control circuit is configured to permit processing of the rendering task for the second, later rendering job.
17 . The graphics processor of claim 10 , wherein the control circuit is configured to: once a rendering job has completed, discard the respective task completion status data structure that was allocated for that rendering job.
18 . The graphics processor of claim 10 , wherein the control circuit is configured to:
determine, when the graphics processor is processing the sequence of rendering jobs, that a processing barrier should be enforced between first and second rendering jobs in the sequence of rendering jobs to prevent the graphics processor issuing any rendering tasks for the first rendering job for processing until all of the rendering tasks for the second rendering job have completed processing; and
enforcing the processing barrier between the first and second rendering jobs.
19 . A non-transitory computer readable medium storing instructions that when execute by a data processor cause the data processor to perform a method of operating a graphics processor when performing a sequence of rendering jobs, the graphics processor including a set of one or more processing cores, the method comprising:
when performing a sequence of rendering jobs:
wherein each rendering job in the sequence of rendering jobs comprises a respective set of one or more rendering tasks to be processed by processing cores of the graphics processor to generate an overall output for the rendering job, and wherein at least some processing of a rendering task for a later rendering job in the sequence of rendering jobs may depend on processing of a rendering task for an earlier rendering job in the sequence of rendering jobs:
tracking the processing of rendering jobs in the sequence of rendering jobs, wherein the tracking comprises, for each of a plurality of groups of plural rendering tasks for a first, earlier rendering job in the sequence of rendering jobs, tracking whether the group of plural rendering tasks as a whole has completed its processing; and
when a rendering task for a second, later rendering job in the sequence of rendering jobs is to be processed wherein processing the rendering task for the second, later rendering job depends on one or more rendering tasks for the first, earlier rendering job that are included within a respective group of plural rendering tasks for which it is being tracked whether the group of plural rendering tasks as a whole has completed its processing:
controlling processing of the rendering task for the second, later rendering job based on the tracking of whether the group of plural rendering tasks including the one or more rendering tasks on which processing the rendering task for the second, later rendering job depends has completed its processing to enforce the dependency,
wherein tracking the processing of rendering jobs in the sequence of rendering jobs is performed using task completion status data structures, wherein a task completion status data structure allocated to a rendering job in the sequence of rendering jobs stores in respective entries of the task completion status data structure respective indicators for respective groups of plural rendering tasks for the rendering job, and wherein an indicator for a respective group of plural rendering tasks indicates whether the group of plural rendering tasks as a whole has completed its processing, and
wherein a same size task completion status data structure is allocated and used for different ones of the rendering jobs in the sequence of rendering jobs, so that the number of rendering tasks within the groups of plural rendering tasks that the entries of the task completion status data structure are storing the respective indicators for depends on the number of rendering tasks in the rendering job that the rendering task completion data structure is allocated for.
20 . The non-transitory computer readable medium of claim 19 , wherein the method comprises:
determining, when processing the sequence of rendering jobs, that a processing barrier should be enforced between a third rendering job and a fourth rendering job in the sequence of rendering jobs to prevent the graphics processor issuing any rendering tasks for the fourth rendering job for processing until all of the rendering tasks for the third rendering job have completed processing; and
enforcing the processing barrier between the third and fourth rendering jobs.