Batching graphics operations with time stamp tracking
AssigneeApple Inc.
InventorsMichael Jame Elliott Swift, Richard Schrever
Life of this patent
Estimating the term…
Abstract
A method and an apparatus for updating graphics resource usage according to a stream of graphics commands atomically submitted to a graphics processing unit (GPU) are described. The stream of graphics commands may be received from a plurality of graphics APIs (application programming interfaces) by a graphics driver. Availability of graphics resources of the GPU may be monitored by the graphics driver for submitting the stream of graphics commands. A single notification from the GPU may indicate that all graphics commands submitted to the GPU have been executed for updating a usage of graphics resources associated with the executed graphics commands.
Claims31
A computer implemented method for processing graphics data, the method comprising:
- receiving graphics commands in a command buffer from one or more graphics APIs (application programming interfaces) of a plurality of applications, the graphics commands associated with graphics resources, wherein graphics resource usage of the graphics resources are specified by a plurality of counters having values indicating whether the graphics resources are currently in use;
- identifying a stream of graphics commands from the graphics commands maintained in the command buffer to update the graphics resource usage for the stream of graphics commands, the stream of graphics commands being executable in a graphics processing unit (GPU) without waiting for completion of other graphics commands maintained in the command buffer;
- submitting, via a graphics driver, the stream of graphics commands to the GPU atomically in a single transaction with the GPU based on availability of resources of the GPU monitored by the graphics driver, wherein the resources of the GPU include an internal buffer to receive the stream of graphics commands submitted, wherein the internal buffer contains graphics commands when the stream of graphics commands have been received, and wherein the stream of graphics commands are still maintained in the command buffer subsequent to the submitting;
- in response to a single notification from the GPU indicating that all graphics commands submitted to the GPU have been executed, the graphics driver identifying the executed graphics commands;
- and
- updating the graphics resource usage in view of graphics resources associated with the executed graphics commands, such that the graphics resources can be freed if the counters indicate the graphics resources are not currently in use.
A non-transitory machine-readable medium having instructions stored therein which, when executed on a system, cause the system to perform a method for processing graphics data, the method comprising:
- receiving graphics commands in a command buffer from one or more graphics APIs (application programming interfaces) of a plurality of applications, the graphics commands associated with graphics resources, wherein graphics resource usage of the graphics resources are specified by a plurality of counters having values indicating whether the graphics resources are currently in use;
- identifying a stream of graphics commands from the graphics commands maintained in the command buffer to update the graphics resource usage for the stream of graphics commands, the stream of graphics commands being executable in a graphics processing unit (GPU) without waiting for completion of other graphics commands maintained in the command buffer;
- submitting, via a graphics driver, the stream of graphics commands to GPU atomically in a single transaction with the GPU based on availability of graphics resources of the GPU monitored by the graphics driver, wherein the resources of the GPU include an internal buffer to receive the stream of graphics commands submitted, wherein the internal buffer contains graphics commands when the stream of graphics commands have been received, and wherein the stream of graphics commands are still maintained in the command buffer subsequent to the submitting;
- in response to a single notification from the GPU indicating that all graphics commands submitted to the GPU have been executed, the graphics driver identifying the executed graphics commands;
- and
- updating the graphics resource usage in view of graphics resources associated with the executed graphics commands, such that the graphics resources can be freed if the counters indicate the graphics resources are not currently in use.
An apparatus for processing graphics data, comprising:
- means for receiving graphics commands in a command buffer from one or more graphics APIs (application programming interfaces) of a plurality applications, the graphics commands associated with graphics resources, wherein graphics resource usage of the graphics resources are specified by a plurality of counters having values indicating whether the graphics resources are currently in use;
- means for identifying a stream of graphics commands from the graphics commands maintained in the command buffer to update the graphics resource usage for the stream of graphics commands, the stream of graphics commands being executable in a graphics processing unit (GPU) without waiting for completion of other graphics commands of the command buffer;
- means for a graphics driver submitting the stream of graphics commands to the GPU atomically in a single transaction with the GPU based on availability of graphics resources of the GPU monitored by the graphics driver, wherein the resources of the GPU include an internal buffer to receive the stream of graphics commands submitted, wherein the internal buffer contains graphics commands when the stream of graphics commands have been received, and wherein the stream of graphics commands are still maintained in the command buffer subsequent to the submitting;
- means for the graphics driver identifying the executed graphics commands;
- and
- means for updating the graphics resource usage in view of graphics resources associated with the executed graphics commands in response to a single notification from the GPU indicating that all graphics commands submitted to the GPU have been executed, such that the graphics resources can be freed if the counters indicate the graphics resources are not currently in use.
A computer implemented method for processing graphics data, the method comprising:
- receiving in a command buffer graphics commands from one or more graphics APIs (application programming interfaces) of a plurality of applications, the graphics commands associated with graphics resources, wherein graphics resource usage of the graphics resources are specified by a plurality of counters having values indicating whether the graphics resources are currently in use;
- identifying a portion of graphics commands from the graphics commands maintained in the command buffer to update the graphics resource usage for the portion of graphics commands, the portion of graphics commands being executable in a graphics processing unit (GPU) without waiting for completion of other graphics commands maintained in the command buffer;
- sending, via a graphics driver, at least the portion of graphics commands to GPU, wherein the portion of the graphics commands sent to the GPU are temporarily stored in an internal buffer of the GPU and the graphics commands are sent to the GPU until the internal buffer is temporarily storing the graphics commands, wherein the portion of graphics commands are still maintained in the command buffer after the sending;
- when the internal buffer of the GPU is full, the graphics driver sending a synchronization command to the GPU to request a notification from the GPU, wherein the graphics driver is notified by the GPU when the internal buffer is empty and all previously commands sent and stored in the internal buffer have been executed;
- in response to the notification, identifying the portion of graphics commands executed;
- and
- updating the graphics usage in view of the graphics resources associated with the executed graphics commands such that the graphics resources can be freed if the counters indicate the graphics resources are not currently in use.
A non-transitory machine-readable medium having instructions stored therein which, when executed on a system, cause the system to perform a method for processing graphics data, the method comprising:
- receiving in a command buffer graphics commands from one or more graphics APIs (application programming interfaces) of a plurality of applications, the graphics commands associated with graphics resources, wherein graphics resource usage of the graphics resources are specified by a plurality of counters having values indicating whether the graphics resources are currently in use;
- identifying a portion of graphics commands from the graphics commands maintained in the command buffer to update the graphics resource usage for the portion of graphics commands, the portion of graphics commands being executable in a graphics processing unit (GPU) without waiting for completion of other graphics commands maintained in the command buffer;
- sending, via a graphics driver, at least the portion of the graphics commands to a graphics processing unit (GPU), wherein the portion of graphics commands sent to the GPU are temporarily stored in an internal buffer of the GPU and the graphics commands are sent to the GPU until the internal buffer is temporarily storing the graphics commands, wherein the portion of graphics commands are still maintained in the command buffer after the sending;
- when the internal buffer of the GPU is full, the graphics driver sending a synchronization command to the GPU to request a notification from the GPU, wherein the graphics driver is notified by the GPU when the internal buffer is empty and all previously commands sent and stored in the internal buffer have been executed;
- in response to the notification, identifying the portion of graphics commands executed;
- and
- updating the graphics usage in view of the graphics resources associated with the executed graphics commands such that the graphics resources can be freed if the counters indicate the graphics resources are not currently in use.
Dependencies are inferred from the claim text.