Cg Toolkit. Cg 1.2 Release Notes

Similar documents
Cg Toolkit. Cg 1.3 Release Notes. December 2004

Cg Toolkit. Cg 1.4 rc 1 Release Notes

Cg Toolkit. Cg 2.0 January 2008 Release Notes

Cg Toolkit. Cg 2.0 May 2008 Release Notes

Cg Toolkit. Cg 2.1 beta August 2008 Release Notes

Cg Toolkit. Cg 2.1 October 2008 Release Notes

Cg Toolkit. Cg 2.2 April 2009 Release Notes

Cg Toolkit. Cg 2.2 February 2010 Release Notes

SDK White Paper. Vertex Lighting Achieving fast lighting results

Cg Toolkit. Cg 1.2 User s Manual Addendum

SDK White Paper. Matrix Palette Skinning An Example

Technical Report. Anisotropic Lighting using HLSL

User Guide. Vertex Texture Fetch Water

GLExpert NVIDIA Performance Toolkit

User Guide. GLExpert NVIDIA Performance Toolkit

Application Note. NVIDIA Business Platform System Builder Certification Guide. September 2005 DA _v01

Technical Report. GLSL Pseudo-Instancing

SDK White Paper. Occlusion Query Checking for Hidden Pixels

GPU LIBRARY ADVISOR. DA _v8.0 September Application Note

User Guide. TexturePerformancePBO Demo

Technical Report. Mesh Instancing

White Paper. Soft Shadows. February 2007 WP _v01

Tuning CUDA Applications for Fermi. Version 1.2

SDK White Paper. HLSL Blood Shader Gravity Maps

NSIGHT ECLIPSE PLUGINS INSTALLATION GUIDE

Android PerfHUD ES quick start guide

NVIDIA nforce 790i SLI Chipsets

White Paper. Denoising. February 2007 WP _v01

CUDA TOOLKIT 3.2 READINESS FOR CUDA APPLICATIONS

Order Independent Transparency with Dual Depth Peeling. Louis Bavoil, Kevin Myers

User Guide. GPGPU Disease

Soft Particles. Tristan Lorach

GRID SOFTWARE FOR RED HAT ENTERPRISE LINUX WITH KVM VERSION /370.28

Horizon-Based Ambient Occlusion using Compute Shaders. Louis Bavoil

User Guide. DU _v01f January 2004

Multi-View Soft Shadows. Louis Bavoil

NVWMI VERSION 2.24 STANDALONE PACKAGE

NVIDIA SDK. NVMeshMender Code Sample User Guide

Technical Brief. LinkBoost Technology Faster Clocks Out-of-the-Box. May 2006 TB _v01

Enthusiast System Architecture Certification Feature Requirements

Technical Report. SLI Best Practices

GRID SOFTWARE FOR MICROSOFT WINDOWS SERVER VERSION /370.12

Semantic and Annotation Remapping in FX Composer

SDK White Paper. Soft Shadows

Technical Report. Non-Power-of-Two Mipmap Creation

White Paper. Solid Wireframe. February 2007 WP _v01

White Paper. Texture Arrays Terrain Rendering. February 2007 WP _v01

Technical Report. SLI Best Practices

NVIDIA CAPTURE SDK 7.1 (WINDOWS)

NVWMI VERSION 2.18 STANDALONE PACKAGE

Technical Brief. FirstPacket Technology Improved System Performance. May 2006 TB _v01

Technical Brief. NVIDIA Quadro FX Rotated Grid Full-Scene Antialiasing (RG FSAA)

QUADRO SYNC II FIRMWARE VERSION 2.02

CUDA/OpenGL Fluid Simulation. Nolan Goodnight

Technical Brief. NVIDIA and Microsoft Windows Vista Getting the Most Out Of Microsoft Windows Vista

Sparkling Effect. February 2007 WP _v01

NVIDIA CAPTURE SDK 6.1 (WINDOWS)

Deinterleaved Texturing for Cache-Efficient Interleaved Sampling. Louis Bavoil

Constant-Memory Order-Independent Transparency Techniques

Cg_language(Cg) Cg Language Specification Cg_language(Cg)

NVIDIA CAPTURE SDK 6.0 (WINDOWS)

KEPLER COMPATIBILITY GUIDE FOR CUDA APPLICATIONS

TUNING CUDA APPLICATIONS FOR MAXWELL

Technical Brief. AGP 8X Evolving the Graphics Interface

Getting Started. NVIDIA CUDA Development Tools 2.2 Installation and Verification on Mac OS X. May 2009 DU _v01

USING INLINE PTX ASSEMBLY IN CUDA

NVIDIA DEBUG MANAGER FOR ANDROID NDK - VERSION 8.0.1

Appendix A Cg Language Specification

TUNING CUDA APPLICATIONS FOR MAXWELL

Cg 2.0. Mark Kilgard

Histogram calculation in CUDA. Victor Podlozhnyuk

CUDA-GDB: The NVIDIA CUDA Debugger

SDK White Paper. Video Filtering on the GPU. Eric Young NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050

High Quality DXT Compression using OpenCL for CUDA. Ignacio Castaño

INLINE PTX ASSEMBLY IN CUDA

PASCAL COMPATIBILITY GUIDE FOR CUDA APPLICATIONS

RMA PROCESS. vr384 October RMA Process

GETTING STARTED WITH CUDA SDK SAMPLES

CUDA Particles. Simon Green

Skinned Instancing. Bryan Dudash

Getting Started. NVIDIA CUDA Development Tools 2.3 Installation and Verification on Mac OS X

MAXWELL COMPATIBILITY GUIDE FOR CUDA APPLICATIONS

Technical Brief. NVIDIA Storage Technology Confidently Store Your Digital Assets

Histogram calculation in OpenCL. Victor Podlozhnyuk

NSIGHT ECLIPSE EDITION

NSIGHT ECLIPSE EDITION

Getting Started with Cg. Release 1.2 February 2004

NSIGHT ECLIPSE EDITION

NVIDIA CUDA DEBUGGER CUDA-GDB. User Manual

Getting Started. NVIDIA CUDA C Installation and Verification on Mac OS X

User Guide. Melody 1.2 Normal Map Creation & Multiple LOD Generation

CUDA Toolkit 4.1 CUSPARSE Library. PG _v01 January 2012

NVIDIA CUDA C GETTING STARTED GUIDE FOR MAC OS X

VIRTUAL GPU LICENSE SERVER VERSION

Programming with OpenGL Part 3: Shaders. Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express

NVBLAS LIBRARY. DU _v6.0 February User Guide

Tegra 250 Development Kit Android Setup Experience

NVJPEG. DA _v0.2.0 October nvjpeg Libary Guide

Shaders (some slides taken from David M. course)

Transcription:

Cg Toolkit Cg 1.2 Release Notes

Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware platforms and graphics APIs. Originally released in December 2002, the Toolkit supports 14 different DirectX and OpenGL profile targets. It provides a compiler for the Cg language, runtime libraries for use with the OpenGL and DirectX graphics APIs, runtime libraries for CgFX, example applications, and extensive documentation. This 1.2 release of Cg introduces several significant new features:! Interfaces, a language construct that facilitates the creation of general, reconfigurable Cg programs, are now supported by the Cg compiler and runtime.! Unsized arrays are now supported in the Cg compiler and runtime! Parameter instances may be created and shared between multiple programs via the Cg runtime.! Parameters may be marked as compile-time constants via the Cg runtime, leading to more efficient compiled code Note that some of this new functionality is currently only supported when using the CgGL OpenGL runtime library. The Direct3D-specific Cg runtime libraries currently do not support shared parameters, for example. An Addendum to the Cg Users Manual covering the new language and runtime features is included in this release. In addition, documentation for the new runtime entry points may be found in the docs/manuals directory. Example source code demonstrating the use of some of these new features may be found in the examples/interfaces_ogl directory. The Cg 1.2 core, CgGL, and CgD3D runtime libraries are backward compatible with those of the Cg 1.1 release, although some low-level implementation details have changed. The vast majority of applications compiled under Cg 1.1 will work using the Cg 1.2 runtime libraries without the need for recompilation. The CgFX API has been substantially modified to provide better compatibility and better support for OpenGL profiles. See the CgFX Overview document for more details. The CgFX runtime libraries are not backward-compatible with previous releases of CgFX. Cg is available for a wide variety of hardware and OS platforms. Please visit the NVIDIA Cg website at developer.nvidia.com/cg for complete availability and compatibility information. Please report any bugs, issues, and feedback to NVIDIA by email at cgsupport@nvidia.com. We will expeditiously address any reported problems. 808-00505-0000-005 2

Supported Profiles and Platforms The Cg compiler currently supports the following hardware profiles: OpenGL! arbvp1 (ARB_vertex_program 1.0)! arbfp1 (ARB_fragment_program 1.0)! vp30 (NV_vertex_program 2.0)! fp30 (NV_fragment_program 1.0)! vp20 (NV_vertex_program 1.0)! fp20 (NV_register_combiners and NV_texture_shader) DirectX 8 & 9! vs_1_1 (Vertex Shader 1.1)! ps_1_1, ps_1_2 and ps_1_3 (Pixel Shader 1.1, 1.2, 1.3) DirectX 9! vs_2_0 and vs_2_x (Vertex Shader 2.0 and Extended VS 2.0)! ps_2_0, and ps_2_x/ps_2_a (Pixel Shader PS 2.0 and Extended PS 2.0) The Cg Runtime libraries include:! The Cg core runtime library for managing parameters and loading programs! The CgGL runtime library for OpenGL based applications! The CgD3D8 runtime library for DirectX 8 based applications! The CgD3D9 runtime library for DirectX 9 based applications The CgFX Runtime libraries include:! The CgFX core/parser runtime library! The CgFXGL library for OpenGL-based applications! The CgFXD3D8 library for Direct3D 8-based applications! The CgFXD3D9 library for Direct3D 9-based applications 808-00505-0000-005 3

Improvements & Bug Fixes New features! Support for interfaces, a language feature that greatly simplifies the creation of general, reconfigurable Cg programs, has been added to the compiler and core runtime.! Structures may contain methods, and may optionally implement a single interface.! Program parameter instances may be created via runtime and shared between multiple programs.! A parameter may be connected to another, which causes it to inherit its value and variability from other parameters. This feature provides copy by reference parameter assignment and value setting.! Parameter variability may be changed via the runtime, including marking uniforms as compile-time constants (literals), allowing for more targeted and efficient compiled programs.! The core runtime now includes entry points for directly setting parameters.! By default, the CgGL runtime will now automatically enable texture parameters (by making calls to cgglenabletextureparameter() when a program is bound. This behavior may be toggled via the cgglsetmanagetextureparameters() entry point.! Many new core Cg API entry points have been added to support these new features. See the Cg User Manual Addendum and on-line documentation for more details.! The CgFX API has been changed substantially. Please see the CgFX Overview document for details. Improvements! Compilation time for longer programs has been reduced.! The compiler now performs more aggressive constant folding and constant propagation. This often results in shorter, more efficient programs, especially in cases where parameter variability is set to CG_LITERAL via cgsetparametervariability() Removed features! The original Cg core runtime API, previously deprecated in the Cg 1.1 release, is no longer supported. 808-00505-0000-005 4

Bug Fixes! Problems with the order of arguments to lerp() has been fixed.! cgglsetparameterpointer() now takes a const pointer argument! Fixed problem wherein compiler could successfully compile some programs that used more than the maximum number of temporary registers.! Fixed problem with incorrect swizzles being generated when e.g. dot products were interspersed with vector ops.! Fixed issues with certain kinds of conditions in vertex programs.! Fixed several issues with conditional matrix assignment! Fixed bug wherein unrecognized function parameter qualifiers were silently ignored.! Fixed scoping-related problems with identically-named variables! Many smaller fixes and improvements Known issues Known runtime issues! The CgD3D runtimes do not work in conjunction with the cgsetparameter*() or cgconnectparameter() core entry points. As a result, many of the new Cg 1.2 features, including parameter sharing and the use of top-level interface parameters, are effectively not supported when using the CgD3D runtimes.! The cgisparameterreferenced() entry point sometimes returns true even if a parameter may not be referenced in the final compiled output.! Setting a parameter that is declared but never referenced can sometimes cause the runtime to return an error.! The 1.2 Cg core runtime currently consumes more memory than the 1.1 runtime. Known compiler issues! Determining the length of a multidimensional array via a[].length is currently not supported. Instead, the syntax a[0].length must be used.! When using interfaces or unsized arrays, the compiler sometimes emits spurious warnings about uninitialized variables.! The compiler does not currently optimize instructions involving matrix parameters whose variability is set to CG_LITERAL via the Cg core runtime.! The # and ## preprocessor macro operators are not supported 808-00505-0000-005 5

! Some error and warning messages are less clear than we would like them to be. Some of the issues to be aware of are: " reported line numbers do not match source code lines when standard library functions are being used, " in some cases, errors are not reported in the order they appear in the program, " errors are not reported when constants are out of range for untyped constants.! Side effects in conditional (?:) and logical expressions (&& and ) are always evaluated, regardless of the condition; currently warnings are not always issued.! Only one return statement is allowed per function.! Return statements in if/for blocks are not supported.! while loops, loops with multiple induction variables, and loops that use a == conditional test are not currently unrolled. In these cases, compilation errors will result under profiles that do not support dynamic branching.! All matrices are assumed to be row-major. Currently, column-major matrices are not supported.! At most one binding semantic per uniform variable is supported by the compiler. Multiple profile-specific binding semantics per uniform variable are not supported.! The % operator is not supported. Integer division is not fully emulated, and is implemented as floating point division.! Conditional assignments to arrays and matrices do not work in all cases. Known profile-specific issues:! Directly accessing the OpenGL state structure is not yet supported under the ARB fragment program (arbfp1) profile. This limitation can be somewhat inefficiently overcome by setting explicit uniform parameters to the OpenGL state in the application.! Some third-party graphics drivers use a conservative method for computing the number of indirect or dependent texture reads in a compiled program. The Cg compiler currently does not calculate the number of dependent texture reads in the same way; and as a result, some drivers will sometimes fail to load compiled Cg programs under the more recent fragment program profiles (e.g., arbfp1, ps_2_*).! Writing to multiple color outputs is not yet supported under the ps_2_* profiles.! Because the underlying hardware support for the fp20 and ps_1_* profiles is quite limited and inflexible, it is not always possible to compile seemingly simple Cg programs under these profiles. For more details on these limitations, please see the NV_register_combiners, NV_texture_shader OpenGL extension specifications, or the DirectX PixelShader 1.* specifications.! The FOG varying input semantic is not yet supported under the fp20 profile. 808-00505-0000-005 6

Notice ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, MATERIALS ) ARE BEING PROVIDED AS IS. NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use. No license is granted by implication or otherwise under any patent or patent rights of NVIDIA Corporation. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. NVIDIA Corporation products are not authorized for use as critical components in life support devices or systems without express written approval of NVIDIA Corporation. Trademarks NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation. Microsoft, Windows, the Windows logo, and DirectX are registered trademarks of Microsoft Corporation. OpenGL is a trademark of SGI. Other company and product names may be trademarks of the respective companies with which they are associated. Copyright Copyright 2004 NVIDIA Corporation. All rights reserved. NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050 www.nvidia.com