Patent ID: 8624906

Claim:
A method for graphics instruction fetching for shader program execution, comprising: executing a plurality of threads in a multithreaded execution environment; fetching a respective plurality of instructions for the threads; during runtime, prefetching at least one instruction for one of the threads to a prefetch buffer; accessing the at least one instruction from the prefetch buffer if required by the one thread; discarding the at least one instruction if not required by the one thread; assigning a respective priority to each of the threads; assigning a respective age to each of the threads; prefetching new instructions for each of the threads in accordance with the respective priority and with the respective age wherein priority and age are used together to select a thread for prefetching and wherein the age of the selected thread is used to determine a subsequent age assignment for each of the threads; executing the plurality of threads using a non-stalling graphics rendering pipeline; and executing the plurality of threads using a non-stalling vertex pipeline of a GPU (graphics processor unit), wherein the plurality of instructions are vertex instructions.