Method and apparatus for executing graphics pipeline
A method of executing a graphics pipeline includes calculating, while executing the graphics pipeline on a current frame, a resource for processing properties of an object included in a following frame, determining, based on a result of the calculating, whether to perform a pre-process for the object included in the following frame, performing the pre-processing, when the pre-process is determined to be performed, comprising transforming the properties of the object that are to be processed in a graphics pipeline for the following frame, and executing, when the pre-process is to be performed, the graphics pipeline for the following frame by using the transformed properties of the object.
1. A method comprising:
executing a graphics pipeline by a graphics processor coupled to a memory, the executing comprising:
while executing the graphics pipeline on a current frame, receiving properties of an object included in a following frame;
determining whether a time benefit is obtainable if a pre-process of the object in the following frame is performed, the time benefit being obtainable when:
N×f ×( Tc/Tr )>1,
where N represents a number of passes in a rendering process when executing the graphics pipeline, f represents usage frequency of the object that is to be pre-processed, T c represents a time taken for a controller to transform a property of the object, and T r represents a time taken for a renderer to transform a property of the object;
performing the pre-process, when it is determined that the time benefit is obtainable, otherwise skipping the pre-process; and
executing, when the pre-process is to be performed, the graphics pipeline for the following frame by using the transformed property of the object.
2. The method of claim 1 , wherein, when the graphics pipeline is a graphics pipeline for tile-based deferred rendering, the pre-process is performed before a pass for tile binning.
3. The method of claim 1 , wherein, when the property of the object relates to a location of the object, the pre-process comprises transforming coordinates of the location.
4. The method of claim 1 , wherein, when the property of the object in the following frame relates to a location of a graphics area allocated in the memory to store the object, the pre-process comprises changing the location of the graphics area allocated in the memory by changing an array order of graphics areas stored in the memory.
5. A non-transitory processor-readable recording medium having recorded thereon coding to control one or more processor devices to implement a method of executing a graphics pipeline, wherein the method comprises:
while executing the graphics pipeline on a current frame, receiving properties of an object included in a following frame;
determining whether a time benefit is obtainable if a pre-process of the object in the following frame is performed, the time benefit being obtainable when:
N×f ×( Tc/Tr )>1,
where N represents a number of passes in a rendering process when executing the graphics pipeline, f represents usage frequency of the object that is to be pre-processed, T c represents a time taken for a controller to transform a property of the object, and T r represents a time taken for a renderer to transform a property of the object;
performing the pre-process, when it is determined that the time benefit is obtainable, otherwise skipping the pre-process; and
executing, when the pre-process is to be performed, the graphics pipeline for the following frame by using the transformed properties of the object.
6. A rendering system comprising:
a memory; and
a graphics processor configured to:
while executing a graphics pipeline on a current frame, receive properties of an object included in a following frame;
determine whether a time benefit is obtainable if a pre-process of the object in the following frame is performed, the time benefit being obtainable when:
N×f ×( Tc/Tr )>1,
where N represents a number of passes in a rendering process when executing the graphics pipeline, f represents usage frequency of the object that is to be pre-processed, T c represents a time taken for a controller to transform a property of the object, and T r represents a time taken for a renderer to transform a property of the object;
perform the pre-process, when it is determined that the time benefit is obtainable, otherwise skip the pre-process; and
execute, when the pre-process is to be performed, the graphics pipeline for the following frame by using the transformed properties of the object.
7. The rendering system of claim 6 , wherein when the property of the object relates to a location of the object, the graphics processor performs a pre-process of transforming coordinates of the location.
8. The rendering system of claim 6 , wherein when the property of the object in the following frame relates to a location of a graphics area allocated in a memory to store the object, the graphics processor performs a pre-process of changing the location of the graphics area allocated in the memory by changing an array order of graphic areas stored in the memory.