Abstract

Implementors of graphics application programming interfaces (APIs) and algorithms are often required to support a plethora of options for several stages at the back end of the geometry and rasterization pipeline. Implementing these options in high-level programming languages such as C leads to code with many branches and large object modules due to indiscriminate duplication of very similar code. This reduces the speed of execution of the program. This paper examines the problems of branches and code size in detail and presents techniques for transforming typical code sequences in graphics programs to reduce the number of branches and to reduce to the size of the program. A set of branch-free basis functions is defined first. The application of these functions to common geometric queries, geometry pipeline computations, rasterization, and pixel processing algorithms is then discussed.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.