Patent ID: 7911471

Claim:
A programmable multipass shader, comprising: a remap unit including: an instruction processing unit configured to receive program instructions, convert the program instructions into codewords, and place the codewords in a program counter token, wherein the shader program instructions include a loop instruction, and the loop instruction is not converted into a codeword and is not placed in a program counter token, a fragment selector configured to select a first number of fragments under control of the instruction processing unit from a total number of fragments to produce a fragment set, wherein the first number of fragments is based on a number of storage elements included in a recirculating shader pipeline, a multiplexor configured to output the fragment set and a first program counter token that includes codewords corresponding to a first set of program instructions, a program counter unit configured to compute and output a current program counter (PC) under control of the instruction processing unit, wherein the current PC is included in the first program counter token and the current PC specifies a location of the program instructions corresponding to the codewords included in the first program counter token, and a loop count unit configured to compute and output a current loop count under control of the instruction processing unit; and a shader core unit, a shader back end unit, and a combiner unit, each including at least one programmable computation unit configured by the codewords included in the first program counter token to perform arithmetic operations on the fragment set, wherein the first program counter token includes a plurality of fields, wherein each programmable computation unit is associated with at least one of the fields included in the first program counter token, and wherein a first codeword corresponding to a first program instruction is placed in the first program counter token only when the first codeword can be placed into a field not already occupied by a second codeword corresponding to a second program instruction.