The COMPLETE Effect and HLSL Cross-Reference

By Sebastien St-Laurent
ISBN 0-9766132-1-2
Jan 2006 (896 pages)

Buy directly from Paradoxal Press at $20.75 (Save 43%)

Page 34

... and pixel shaders through a set of 18 .ow control assembly instructions. This implies that any non-3.0 shader will have its .ow control transformed into code, which will execute both sides of conditionals and unroll loops. Since hardware .ow control is still in its infancy within graphics hardware,...

Page 5

With this rich set of improvements, developers are now free to set their creativity loose and create stunning effects. At this point, it is probably good to do an overview of their architecture to give you a better understanding of how the information .ows throughout the graphics hardware.

Page 10

compile This keyword is used when declaring vertex or pixel fragments (or shaders), indicating with which pro.le to compile the fragment.. This keyword is to be used when assigning a shader directly to the vertex or pixel shader effect state.

Page 154

...your application is to gather all the parameters within an effect and get their semantics through the ID3DXEffect::GetParameterDesc function. The structure returned by this function contains the semantic associated with each parameter and allows you build a cache of all relevant parameters to an eff...

Page 207

Setup instructions do not actually do anything beyond preparing the shader, for example de.ning some constants to be set into the constant registers. Below is the list of setup instructions supported in the 2.x pixel shader instruction set.

Debugging DirectX Applications

This section covers the following topics pertaining to debugging C and C++ applications.

Debug vs. Retail DLLs

The DirectX SDK installation program provides the option of installing either debug or retail builds of the DirectX DLLs>.

When you develop software in C++, it is best to install the debug versions of the DLLs>. This option installs both debug and retail DLLs> on your system (the retail version installs only the retail DLLs>). The debug DLLs> have additional code that validates internal data structures and outputs debug error messages, using the OutputDebugString function while your program is executing. When an error occurs, the debug output gives you a more detailed description of the problem. The debug DLLs> run more slowly than the retail DLLs> but are much more useful for debugging an application. Be sure to ship the retail version with your application.

If you have the debug SDK installed, you can use the DirectX Control Panel utility to switch between the debug and retail builds of most components. To enable this feature, select the Debug option when you install the SDK.

To see the debug messages, configure your system so that debug output appears in a window or on a remote computer. A development environment such as Visual Studio .NET enables you to do this. Consult the environment documentation for setup instructions.

To ensure that the debugger can find the relevant symbolic information when using debug builds, locate the symbol files as follows:

.pdb file location: Same directory as binary

.dbg file location: %SystemRoot%\Symbols\<binary extension>\

Removing or Adding Debug DLLs

If you installed the retail runtime and would like to change to the debug runtime, run Dxsetup.exe, which is located in the (SDK root)\Redist\ folder.

If you have the debug runtime and would like to revert to the retail runtime, run Undxxpdebug.exe, which is located in the Windows System folder. You can also run this by selecting Run from the Start menu and typing undxxpdebug in the box.

Other Resources

The icrosoft Application Compatibility Toolkit contains the tools and documentation you need to evaluate and mitigate application compatibility issues before deploying your application.

To find C++ memory corruption and other problems, you can use the icrosoft Windows Application Verifier (AppVerifier). The AppVerifier tool monitors an application for things like heap corruption, locks usage, and invalid handles. See the Testing Applications with AppVerifier Article for steps on how to use this tool.