Sets the compute shader limits.
public:
void SetComputeShaderLimits(
const D3D11X_COMPUTE_SHADER_LIMITS *pShaderLimits
)
pShaderLimits
Type: D3D11X_COMPUTE_SHADER_LIMITS *
[in, optional] The compute shader limits, as a pointer to a D3D11X_COMPUTE_SHADER_LIMITS structure. “nullptr” causes the driver to revert to its internal defaults.
Populate an instance of the D3D11X_COMPUTE_SHADER_LIMITS structure and pass it to SetComputeShaderLimits.
Caution When using compute contexts at the same time you have on-chip geometry shaders running on the graphics contexts, you must take care to not disable CU 0 using SetComputeShaderLimits. Any other CU can be disabled instead. If CU 0 is disabled on your compute context and the compute dispatches run concurrently with on-chip GS draws, the GPU shader hardware will deadlock.
Usage example:
D3D11X_COMPUTE_SHADER_LIMITS csLimits =
{
{ 0, 0 }, //DisableCuMask[2] (one per SE)
D3D11X_SHADER_MAX_WAVES_DEFAULT, // MaxWaves
D3D11X_SHADER_MAX_THREADGROUPS_PER_CU_DEFAULT, // MaxThreadgroupsPerCu
D3D11X_SHADER_MAX_WAVES_FOR_CU_LOCKING_DEFAULT, // MaxWavesForCuLocking
D3D11X_SHADER_NUM_THREADGROUPS_WALKED_PER_CU_DEFAULT, // NumThreadgroupsWalkedPerCu
D3D11X_SHADER_CS_SIMD_WALK_ALGORITHM_DEFAULT, // SimdWalkAlgorithm
};
pCtx->SetComputeShaderLimits( &csLimits );
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.