Patent ID: 7737983

Claim:
A method to synchronize an application and a graphics pipeline, comprising the steps of: receiving an application generated graphics processing unit (GPU) instruction in an input stream at a predetermined component of a graphics pipeline, the application generated GPU instruction being inserted into the input stream in accordance with an application executed by a central processing unit (CPU), the predetermined component having a first portion coupled to a next component in the graphics pipeline and a second portion coupled by a feedback path to a component of the graphics pipeline; forwarding a GPU command associated with the application generated GPU instruction from the first portion to at least one of the next component and another component coupled to the predetermined component; receiving the GPU command associated with the application generated GPU instruction at the at least one of the next component and the another component, the at least one of the next component and the another component executing a predetermined number of actions associated with the GPU command; wherein the application generated GPU instruction is a wait instruction, the wait instruction further comprising the steps of: recognizing at the first portion of the predetermined component the wait command in the input stream; checking a counter to determine if a value of the counter is greater than or equal to a threshold value; decrementing the counter if the value of the counter is greater than the threshold value and continuing to execute instructions associated with a current graphics context; and switching at the first portion of the predetermined component from the current graphics context to another graphics context if the value of the counter is equal to the threshold value; wherein the counter is a flip counter internal to a graphics processing unit containing the graphics pipeline.