Introduction to DirectX Application Development on Adreno GPU (4)

3 Tools and Resources

This section introduces development tools from Microsoft and Qualcomm that can be used for graphic application development and analysis on the Windows RT platform supported by Snapdragon. Microsoft tools can be found on the Microsoft MSDN website http://msdn.microsoft.com The tools provided by Qualcomm can be downloaded for free on the Qualcomm Developer Network: http://developer.qualcomm.com .

3.1 Microsoft Direct3D11.1 Tools

In the past, Microsoft created a separate installation program for the Microsoft DirectX SDK.

However, starting from Windows 8, Microsoft now uses Direct3D as part of the standard Windows SDK. Microsoft has also made many improvements in providing integrated Direct3D tools in Visual Studio 2012.


.

Figure 3-1 HLSL in Visual Studio 2012

Visual Studio 2012 provides syntax highlighting for developing shaders in HLSL.

In addition, the HLSL compiler is directly integrated into the Visual Studio build system, so that shaders will be compiled using fxc (Microsoft HLSL compiler) at build time.

The construction rules of HLSL files include options such as setting shader types and shader models. For example, an HLSL pixel shader compiled for Adreno GPU will be set to Shader Type "pixel shader (/ps)" and Shader Model "Shader Model 4 Level 9_3 (/4:0_level_9_3)", as shown in Figure 3-1.

In early versions of Direct3D, applications could use D3DX to compile HLSL shader code at runtime. However, in Metro applications, it is necessary to pre compile HLSL using fxc. The construction process highlighted above will generate a binary shader file (usually named '. cso' for Compiled Shader Object) that can be loaded at runtime. Microsoft does provide a debugging D3DCompiler API that can be used for debugging and building applications, compiling HLSL code at runtime, but this API cannot be used by released Metro applications.


.

Figure 3-2 Visual Studio Graphics Debugger

Visual Studio 2012 also includes a built-in graphics debugger (formerly Windows PIX), including the performance and debugging features of Direct3D 11.1. The graphics debugger can be called from the Debug * Graphics menu in Visual Studio 2012 by clicking on Start Diagnostics (ALT+ F5), as shown in Figure 3-2.

Microsoft provides a complete guide to using its graphical debugger
http://msdn.microsoft.com/en-us/library/hh315751 (v= vs.110). aspx.

DirectX debugging layer.

The Microsoft Windows SDK includes a debugging layer for DirectX that can be used to identify various types of Direct3D issues. All Adreno SDK examples for DirectX are application specific_ The DEBUG build has enabled the Debug SDK layer. It is strongly recommended that developers enable the Debug SDK layer during the development process to capture Direct3D issues. The code in section 3.1 demonstrates how to set D3D11_ CREATE_ DEVICE_ Use the DEBUG flag to enable the debugging layer.

DirectX Control Panel.

Other debugging settings for the DirectX debugging layer can be set through Microsoft's DirectX control panel. This tool can be used to force the debugger to interrupt when encountering certain DirectX errors, warnings, corruption, information, or messages. The DirectX control panel can also be directly obtained from the Debug * Graphics menu in Visual Studio 2012.


.

Figure 3-3 DirectX Control Panel

3.2 Qualcomm Adreno SDK


.

Overview The Adreno SDK includes support for simulation and other utilities that are important for graphic application development. The SDK is provided as the development environment for the Qualcomm Adreno graphics processor. It is aimed at a wide range of developers, from those who want to learn technologies such as DirectX to those who want to leverage the more advanced features of Snapdragon Adreno graphics solutions. The Adreno SDK can be downloaded by accessing Qualcomm's developer network https://developer.qualcomm.com/mobile-development/mobile-technologies/gaming-graphics-optimization-adreno/tools-a%20nd -Resources.

Features The Adreno SDK includes the following features:

  • Simulation support in desktop environment
  • SDK Help System
  • SDK browser
  • Advanced example of Metro style DirectX11
  • Visual Studio project template for creating new examples
    For more information, please refer to the Adreno SDK documentation.

3.3 Qualcomm Adreno Profiler


.

Figure 3-4 Adreno Profiler for DirectX development

Overview Adreno Profiler is a leading PC based tool used by 3D content developers to test, analyze, analyze, and optimize embedded 3D games and commercial applications
Snapdragon based devices do not require changes to the application
Adreno Profiler provides valuable and time-saving feedback to improve application performance and efficiency. This feedback includes:

  • GPU and system level performance metrics
  • DirectX11 API call tracking and simulation
  • Real time driver coverage
  • Shader analysis function for estimating the complexity of source shaders

Adreno Profiler can be downloaded for free by accessing the Adreno section on the Qualcomm developer network at https://developer.qualcomm.com/mobile-development/mobile-technologies/gaming-graphics-optimization-adreno/tools-and-resources
For more detailed information, please refer to the documentation in Adreno Profiler.