Initializes a D3D12XBOX_COMPUTE_SHADER_LIMITS_DESC structure with default limits.
public:
void D3D12XboxInitializeDefaultComputeShaderLimits(
bool ApplyLowCuLimits,
D3D12XBOX_COMPUTE_SHADER_LIMITS_DESC *pDesc
)
ApplyLowCuLimits
Type: bool
Pass true to disable compute units 1 through 4; false to enable all compute units.
pDesc
Type: D3D12XBOX_COMPUTE_SHADER_LIMITS_DESC *
The address of the compute shader limits description structure that will be initialized.
This helper function initializes the D3D12XBOX_COMPUTE_SHADER_LIMITS_DESC structure pDesc with default limits.
D3DINLINE void D3D12XboxInitializeDefaultComputeShaderLimits(bool ApplyLowCuLimits, D3D12XBOX_COMPUTE_SHADER_LIMITS_DESC* pDesc)
{
if (!ApplyLowCuLimits)
{
pDesc->DisableFlags = D3D12XBOX_SHADER_UNIT_DISABLE_FLAG_NONE;
}
else
{
// Disable four compute units per shader engine, leaving two active
// CUs per SE for a total of four active CUs. Compute unit 0 is
// left active by default, so low priority compute doesn't deadlock on-chip GS.
pDesc->DisableFlags = D3D12XBOX_SHADER_UNIT_DISABLE_FLAG_CU_1 |
D3D12XBOX_SHADER_UNIT_DISABLE_FLAG_CU_2 |
D3D12XBOX_SHADER_UNIT_DISABLE_FLAG_CU_3 |
D3D12XBOX_SHADER_UNIT_DISABLE_FLAG_CU_4;
}
pDesc->MaxWaves = D3D12XBOX_SHADER_MAX_WAVES_DEFAULT;
pDesc->MaxThreadgroupsPerCu = D3D12XBOX_SHADER_MAX_THREADGROUPS_PER_CU_DEFAULT;
pDesc->MaxWavesForCuLocking = D3D12XBOX_SHADER_MAX_WAVES_FOR_CU_LOCKING_DEFAULT;
pDesc->NumThreadgroupsWalkedPerCu = D3D12XBOX_SHADER_NUM_THREADGROUPS_WALKED_PER_CU_DEFAULT;
pDesc->SimdWalkAlgorithm = D3D12XBOX_SHADER_CS_SIMD_WALK_ALGORITHM_DEFAULT;
}
Header: Declared in d3d12_x.h.
Library: Use d3d12_x.lib.