摘要 |
<p>A graphics processing system includes one or more programmable processing (shading) stages, e.g. a geometry, hull, domain, vertex or fragment shader. A compiler receives a program (40) (e.g. for a draw call) and run time constant expressions are identified in the program (41). The identified expressions are removed from the original program, and are substituted with load instructions pointing to where the output results from a pilot shader program will be stored (42), e.g. in a colour buffer. A separate pilot program is then created for the identified run-time constant expressions (43). The pilot program is executed on the graphics processing pipeline (44), before the modified main program (45). Upon executing the main program, the identified expressions, which were replaced with the load instructions, are replaced with previously derived results. Unnecessary repetition of the identified expressions is therefore avoided.</p> |