Defines graphics shader limits.
typedef struct D3D12XBOX_GRAPHICS_SHADER_LIMITS_DESC {
UINT MaxWavesWithLateAllocParameterCache;
D3D12XBOX_SHADER_UNIT_DISABLE_FLAGS VSDisableFlags;
D3D12XBOX_SHADER_UNIT_DISABLE_FLAGS DSDisableFlags;
D3D12XBOX_SHADER_UNIT_DISABLE_FLAGS GSDisableFlags;
D3D12XBOX_SHADER_UNIT_DISABLE_FLAGS PSDisableFlags;
UINT VSMaxWaves;
UINT HSMaxWaves;
UINT DSMaxWaves;
UINT GSMaxWaves;
UINT PSMaxWaves;
UINT VSMaxWavesForCuLocking;
UINT HSMaxWavesForCuLocking;
UINT DSMaxWavesForCuLocking;
UINT GSMaxWavesForCuLocking;
UINT PSMaxWavesForCuLocking;
} D3D12XBOX_GRAPHICS_SHADER_LIMITS_DESC;
MaxWavesWithLateAllocParameterCache
The maximum waves with late allocation parameter cache. How many last-stage waves are allowed to run without having allocated space in the parameter cache. Higher numbers allow more waves to run, but can potentially cause contention in the SIMDs, because the shaders will stall on the first “exp” instruction until there’s space, potentially hoarding other shared resources such as wave slots and GPRs.
“Last-stage” means that the stage that comes before the pixel shader (VS, DS or GS). For GS, this only affects the passthrough part of the shader.
To find optimal settings for different part of a scene, consider using Dr. PIX experiments.
Setting MaxWavesWithLateAllocParameterCache higher than 22 may lead to GPU deadlocks. If these deadlocks are caused by a GPU pipeline transition, these deadlocks might be rare and difficult to reproduce. To prevent such deadlocks with high settings of the MaxWavesWithLateAllocParameterCache member, the VSDisableCUMask member should be nonzero, so at least one CU is not running vertex shaders, thus preventing deadlocks. Typically, the performance impact due to the masking operation is negligible compared to the performance gains from setting MaxWavesWithLateAllocParameterCache.
VSDisableFlags
A bit-field that specifies the compute units to disable for the vertex shader.
DSDisableFlags
A bit-field that specifies the compute units to disable for the domain shader.
GSDisableFlags
A bit-field that specifies the compute units to disable for the geometry shader.
PSDisableFlags
A bit-field that specifies the compute units to disable for the pixel shader.
VSMaxWaves
Maximum number of VS waves allowed to run simultaneously on the GPU.
HSMaxWaves
Maximum number of HS waves allowed to run simultaneously on the GPU.
DSMaxWaves
Maximum number of DS waves allowed to run simultaneously on the GPU.
GSMaxWaves
Maximum number of GS waves allowed to run simultaneously on the GPU.
PSMaxWaves
Maximum number of PS waves allowed to run simultaneously on the GPU.
VSMaxWavesForCuLocking
The maximum number of VS waves that allow CU locking to occur.
HSMaxWavesForCuLocking
The maximum number of HS waves that allow CU locking to occur.
DSMaxWavesForCuLocking
The maximum number of DS waves that allow CU locking to occur.
GSMaxWavesForCuLocking
The maximum number of GS waves that allow CU locking to occur.
PSMaxWavesForCuLocking
The maximum number of PS waves that allow CU locking to occur.
With the **MaxWavesForCuLocking parameters, if fewer than this maximum number are running, and a new wave is ready and it cannot be scheduled anywhere, the GPU will “lock” a compute unit (CU) such that no new waves from other stages (or pipes) can use it until the new wave for this stage is finally launched. This helps to control “starvation”.
Use the inline helper function D3D12XboxInitializeDefaultGraphicsShaderLimits to initialize a D3D12XBOX_GRAPHICS_SHADER_LIMITS_DESC structure with defaults.
Header: Declared in d3d12_x.h.