ABSTRACT
The latest real-time graphics architectures include programmable floating-point vertex and fragment processors, with support for data-dependent control flow in the vertex processor. We present a programming language and a supporting system that are designed for programming these stream processors. The language follows the philosophy of C, in that it is a hardware-oriented, general-purpose language, rather than an application-specific shading language. The language includes a variety of facilities designed to support the key architectural features of programmable graphics processors, and is designed to support multiple generations of graphics architectures with different levels of functionality. The system supports both of the major 3D graphics APIs: OpenGL and Direct3D. This paper identifies many of the choices that we faced as we designed the system, and explains why we made the decisions that we did.
Supplemental Material
- 3DLABS. 2002. OpenGL 2.0 shading language white paper, version 1.2, Feb.Google Scholar
- AKELEY, K. 1993. RealityEngine graphics. In SIGGRAPH 93, 109--116. Google ScholarDigital Library
- BOLTZ, J., FARMER, I., GRINSPUN, E., AND SCHRODER, P. 2003. The GPU as numerical simulation engine. In SIGGRAPH 2003.Google Scholar
- BUCK, I., AND HANRAHAN, P. 2003. Data parallel computation on graphics hardware. unpublished report, Jan.Google Scholar
- CHAN, E., NG, R., SEN, P., PROUDFOOT, K., AND HANRAHAN, P. 2002. Efficient partitioning of fragment shaders for multipass rendering on programmable graphics hardware. In SIGGRAPH/Eurographics workshop on graphics hardware. Google ScholarDigital Library
- CODEPLAY CORPORATION. 2003. VectorC documentation, Jan. Available at http://www.codeplay.com/support/documentation.html.Google Scholar
- COOK, R. L. 1984. Shade trees. In SIGGRAPH 84, 223--231. Google ScholarDigital Library
- DALLY, W. J., AND POULTON, J. W. 1998. Digital Systems Engineering. Cambridge University Press. Google ScholarDigital Library
- FERNANDO, R., AND KILGARD, M. J. 2003. The Cg Tutorial: The definitive guide to programmable real-time graphics. Addison-Wesley. Google ScholarDigital Library
- HANRAHAN, P., AND LAWSON, J. 1990. A language for shading and lighting calculations. In SIGGRAPH 90, 289--298. Google ScholarDigital Library
- HERWITZ, P. S., AND POMERENE, J. H. 1960. The Harvest system. In Proc. of the AIEE-ACM-IRE 1960 Western Joint Computer Conf., 23--32.Google ScholarDigital Library
- JAQUAYS, P., AND HOOK, B. 1999. Quake 3: Arena Shader Manual, Revision 10, Sept.Google Scholar
- JOY, B., STEELE, G., GOSLING, J., AND BRACHA, G. 2000. Java(TM) Language Specification, 2nd ed. Addison-Wesley.Google Scholar
- KAPASI, U. J., DALLY, W. J., RIXNER, S., OWENS, J. D., AND KHAILANY, B. 2002. The Imagine stream processor. In Proc. of IEEE Conf. on Computer Design, 295--302.Google ScholarCross Ref
- KERNIGHAN, B. W., AND RITCHIE, D. M. 1988. The C Programming Language. Prentice Hall. Google ScholarDigital Library
- KESSENICH, J., BALDWIN, D., AND ROST, R. 2003. The OpenGL Shading Language, version 1.05, Feb.Google Scholar
- LALONDE, P., AND SCHENK, E. 2002. Shader-driven compilation of rendering assets. In SIGGRAPH 2002, 713--720. Google ScholarDigital Library
- LARSEN, S., AND AMARASINGHE, S. 2000. Exploiting superworld level parallelism with multimedia instruction sets. In Proc. of ACM SIGPLAN PLDI 2000, 145--156. Google ScholarDigital Library
- LEECH, J. 1998. OpenGL extensions and restrictions for PixelFlow. Technical Report UNC-CH TR98-019, Univ. of North Carolina at Chapel Hill, Dept. of Computer Science, Apr.Google Scholar
- LEVINTHAL, A., HANRAHAN, P., PAQUETTE, M., AND LAWSON, J. 1987. Parallel computers for graphics applications. In Proc. of 2nd Intl. Conf. on architectural support for programming languages and operating systems (ASPLOS '87), 193--198. Google ScholarDigital Library
- LINDHOLM, E., KILGARD, M. J., AND MORETON, H. 2001. A user-programmable vertex engine. In SIGGRAPH 2001. Google ScholarDigital Library
- MARK, W. R., AND PROUDFOOT, K. 2001. Compiling to a VLIW fragment pipeline. In SIGGRAPH/Eurographics workshop on graphics hardware. Google ScholarDigital Library
- MATTSON, P. 2001. A Programming System for the Imagine Media Processor. PhD thesis, Stanford University. Google ScholarDigital Library
- MCCOOL, M. D., QIN, Z., AND POPA, T. S. 2002. Shader metaprogramming. In Eurographics/SIGGRAPH workshop on graphics hardware, 57--68. Google ScholarDigital Library
- MICROSOFT CORP. 2002. DirectX 9.0 graphics, Dec. Available at http://msdn.microsoft.com/directx.Google Scholar
- MICROSOFT CORP. 2002. High-level shader language. In DirectX 9.0 graphics. Dec. Available at http://msdn.microsoft.com/directx.Google Scholar
- MICROSOFT CORP. 2003. Common type system. In .NET framework developer's guide. Jan. Available at http://msdn.microsoft.com/.Google Scholar
- MITCHELL, J. L. 2002. RADEON 9700 Shading (ATI Technologies white paper), July.Google Scholar
- MOLNAR, S., EYLES, J., AND POULTON, J. 1992. PixelFlow: high-speed rendering using image composition. In SIGGRAPH 92, 231--240. Google ScholarDigital Library
- MOTOROLA CORP. 1999. AltiVec Technology Programming Interface Manual, June.Google Scholar
- NVIDIA CORP. 2003. Cg Toolkit, Release 1.1. Software and documentation available at http://developer.nvidia.com/Cg.Google Scholar
- NVIDIA CORP. 2003. NV_fragment_program. In NVIDIA OpenGL Extension Specifications. Jan.Google Scholar
- NVIDIA CORP. 2003. NV_vertex_program2. In NVIDIA OpenGL Extension Specifications. Jan.Google Scholar
- OLANO, M., AND LASTRA, A. 1998. A shading language on graphics hardware: The PixelFlow shading system. In SIGGRAPH 98, 159--168. Google ScholarDigital Library
- PEERCY, M., OLANO, M., AIREY, J., AND UNGAR, J. 2000. Interactive multi-pass programmable shading. In SIGGRAPH 2000, 425--432. Google ScholarDigital Library
- PERLIN, K. 1985. An image synthesizer. In SIGGRAPH 85, 287--296. Google ScholarDigital Library
- PROUDFOOT, K., MARK, W. R., TZVETKOV, S., AND HANRAHAN, P. 2001. A real-time procedural shading system for programmable graphics hardware. In SIGGRAPH 2001. Google ScholarDigital Library
- RITCHIE, D. M. 1993. The development of the C language. In Second ACM SIGPLAN Conference on History of Programming Languages, 201--208. Google ScholarDigital Library
- ROHLF, J., AND HELMAN, J. 1994. IRIS performer: A high performance multiprocessing toolkit for real--time 3D graphics. In SIGGRAPH 94, 381--394. Google ScholarDigital Library
- SEGAL, M., AND AKELEY, K. 2002. The OpenGL Graphics System: A Specification (Version 1.4). OpenGL Architecture Review Board. Editor: Jon Leech.Google Scholar
- STEPHENS, R. 1997. A survey of stream processing. Acta Informatica 34, 7, 491--541.Google ScholarCross Ref
- STROUSTRUP, B. 2000. The C++ Programming Language, 3rd ed. Addison-Wesley. Google ScholarDigital Library
- THIES, W., KARCZMAREK, M., AND AMARASINGHE, S. 2002. StreamIt: a language for streaming applications. In Proc. Intl. Conf. on Compiler Construction. Google ScholarDigital Library
Index Terms
- Cg: a system for programming graphics hardware in a C-like language
Recommendations
Cg: a system for programming graphics hardware in a C-like language
The latest real-time graphics architectures include programmable floating-point vertex and fragment processors, with support for data-dependent control flow in the vertex processor. We present a programming language and a supporting system that are ...
Uses, Improvements, and Extensions of Prolog+CG: Case Studies
ICCS '01: Proceedings of the 9th International Conference on Conceptual Structures: Broadening the BaseProlog+CG is a CG-Based logic programming language which integrates Prolog, the manipulation of conceptual graphs (CGs), Java and object-oriented constructs. It provides a powerful development environment for the creation of knowledge-based applications ...
Comments