Defines graphics shader limits.
struct D3D11X_GRAPHICS_SHADER_LIMITS {
UINT MaxWavesWithLateAllocParameterCache;
UINT VSDisableCuMask;
UINT DSDisableCuMask;
UINT GSDisableCuMask;
UINT PSDisableCuMask;
UINT VSMaxWaves;
UINT HSMaxWaves;
UINT DSMaxWaves;
UINT GSMaxWaves;
UINT PSMaxWaves;
UINT VSMaxWavesForCuLocking;
UINT HSMaxWavesForCuLocking;
UINT DSMaxWavesForCuLocking;
UINT GSMaxWavesForCuLocking;
UINT PSMaxWavesForCuLocking;
};
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.
Prior to the May 2015 XDK, the driver sets the MaxWavesWithLateAllocParameterCache member to 0 by default, in the D3D11X_GRAPHICS_SHADER_LIMITS structure. In the May 2015 XDK, MaxWavesWithLateAllocParameterCache is set to 22 by default. This increases the title’s performance on average, but can also slow down some rendering passes (usually when PS+VS can’t achieve occupancy higher than about 3 together). To find optimal settings for different part of the scene, use 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, we require the VSDisableCUMask member to 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.
VSDisableCuMask
The CU to disable for the Vertex Shader. Pass either:
You can OR multiple values together to disable multiple CUs for the shader stage. It’s illegal to disable all stages.
HS must run in the same CU as VS, so HS has no mask of its own; there’s no HSDisableCuMask member.
DSDisableCuMask
The CU to disable for the Domain Shader. Pass either:
You can OR multiple values together to disable multiple CUs for the shader stage. It’s illegal to disable all stages.
GSDisableCuMask
The CU to disable for the Geometry Shader. Pass either:
You can OR multiple values together to disable multiple CUs for the shader stage. It’s illegal to disable all stages.
PSDisableCuMask
The CU to disable for the Pixel Shader. Pass either:
You can OR multiple values together to disable multiple CUs for the shader stage. It’s illegal to disable all stages.
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. If fewer than this number are running, and a new wave is ready, and it cannot be scheduled anywhere, the GPU will “lock” a CU such that no new waves from other stages (or pipes) can use it until the new wave for this stage finally launched. This helps to control starvation.
HSMaxWavesForCuLocking
The maximum number of HS waves that allow CU locking to occur. If fewer than this number are running, and a new wave is ready, and it cannot be scheduled anywhere, the GPU will “lock” a CU such that no new waves from other stages (or pipes) can use it until the new wave for this stage finally launched. This helps to control starvation.
DSMaxWavesForCuLocking
The maximum number of DS waves that allow CU locking to occur. If fewer than this number are running, and a new wave is ready, and it cannot be scheduled anywhere, the GPU will “lock” a CU such that no new waves from other stages (or pipes) can use it until the new wave for this stage finally launched. This helps to control starvation.
GSMaxWavesForCuLocking
The maximum number of GS waves that allow CU locking to occur. If fewer than this number are running, and a new wave is ready, and it cannot be scheduled anywhere, the GPU will “lock” a CU such that no new waves from other stages (or pipes) can use it until the new wave for this stage finally launched. This helps to control starvation.
PSMaxWavesForCuLocking
The maximum number of PS waves that allow CU locking to occur. If fewer than this number are running, and a new wave is ready, and it cannot be scheduled anywhere, the GPU will “lock” a CU such that no new waves from other stages (or pipes) can use it until the new wave for this stage finally launched. This helps to control starvation.
This structure is used by SetGraphicsShaderLimits.
Header: Declared in d3d11_x.h.