About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Publication
Visual Computer
Paper
Superscalar RISC machines, straight-line programs, and graphics
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.