NVIDIA® Nsight™ Development Platform, Visual Studio Edition 2.2 User Guide
Send Feedback
To set a breakpoint in a shader:
A conditional breakpoint expression can be any HLSL expression that evaluates to a Boolean result. All (scalar) operations (+, -, *, <, >, <=, ==, ., [], type casts, swizzles … ) on local variables, global variables, and pseudo-variables (intrinsic variables) are allowed.
Limitations
Be aware of the following limitations in expressions for conditional breakpoints:
Additional Intrinsic Variables
There are additional intrinsic variables that you can use, depending on the kind of shader you are debugging:
Shader can use the following variables in expressions... Vertex Shader uint @vertexId
uint @instanceId
uint @drawCallIdGeometry Shader uint @primitiveId
uint @drawCallIdPixel Shader float3 @pixel
uint @sampleId
uint @drawCallIdCompute Shader uint3 @groupThreadId
uint3 @groupId
uint @dispatchIdHull Shader uint @controlPointId
uint @drawCallIdDomain Shader uint @domainPointId
uint @drawCallId
The following macros are also supported in Compute Shaders:
#define @GroupIdx(X, Y, Z) (@groupId.x == X && @groupId.y == Y && @groupId.z == Z)
#define @ThreadIdx(X, Y, Z) (@groupThreadId.x == X && @groupThreadId.y == Y && @groupThreadId.z == Z)
NVIDIA® Nsight™ Development Platform, Visual Studio Edition User Guide Rev. 2.2.120522 ©2009-2012. NVIDIA Corporation. All Rights Reserved. | |