Patent ID: 8159491

Claim:
A data processing apparatus comprising: shader circuitry, responsive to input data for a pixel, to execute a shader program to generate a colour value for said pixel, the shader program having multiple execution paths, each execution path identifying a sequence of instructions that, if executed by the shader program, will produce said colour value, and which of said multiple execution paths is taken by said shader circuitry through the shader program is dependent on said input data; an image buffer having a plurality of storage locations, each storage location for storing the colour value generated by said shader circuitry for an associated pixel; in a trace mode of operation, said shader circuitry configured to execute said shader program to cause a trace vector to be generated containing a plurality of items of execution path information indicative of the execution path taken, the trace vector comprising a plurality of fields, each field being used to store one item of execution path information; the trace vector as output being of the same size as the colour value, and in said trace mode of operation said trace vector being stored in one of said storage locations of the image buffer in place of the colour value generated by the shader program.