D3D12XBOX_MSAA_PARAMETERS Structure

Controls the settings in the depth block for multi-sampling antialiasing (MSAA).

Syntax

typedef struct D3D12XBOX_MSAA_PARAMETERS {
    union {
        struct {
            UINT NumSamplesMsaaLog2 : 3;
            UINT MaxSampleDistanceInSubpixels : 4;
            UINT NumSamplesMsaaExposedToPSLog2 : 3;
            UINT DetailToExposedMode : 2;
            UINT ApplyMaskAfterCentroid : 1;
        };
        UINT Dword0;
    };
    union {
        struct {
            UINT MaxAnchorSamplesLog2 : 3;
            UINT NumSamplesForPSIterationLog2 : 3;
            UINT NumSamplesForMaskExportLog2 : 3;
            UINT NumSamplesForAlphaToMaskLog2 : 3;
            UINT HighQualityIntersections : 1;
            UINT Reserved0 : 1;
            UINT InterpolateCompZ : 1;
            UINT InterpolateSrcZ : 1;
            UINT StaticAnchorAssociations : 1;
            UINT Reserved1 : 1;
            UINT OverrasterizationAmount : 3;
            UINT EnablePostZOverrasterization : 1;
        };
        UINT Dword1;
    };
} D3D12XBOX_MSAA_PARAMETERS;  

Members

NumSamplesMsaaLog2
Specifies the number of samples to use for MSAA sampling.

MaxSampleDistanceInSubpixels
Specifies the maximum distance in 1/16 subpixels between the pixel centre and the outermost subpixel sample. Should be set to 0 when not anti-aliasing.

NumSamplesMsaaExposedToPSLog2
Specifies the number of sample the pixel shader can see from the primitive’s coverage in the pixel.

DetailToExposedMode
Specifies the mode to use when converting from a higher NumSamplesMsaaLog2 to NumSamplesMsaaExposedToPSLog2:

Value Description
0 Mask-off higher samples. If the result is empty, OR the upper bits down into lower samples.
1 Mask-off higher samples.
2 OR the higher samples down into lower samples.
3 Reserved; do not use.

ApplyMaskAfterCentroid
Specifies whether to apply the MSAA mask before or after the centroid determination.

Dword0
Reserved.

MaxAnchorSamplesLog2
Sets the most number of anchor samples that the CB is allowed to use. Set this to the minium allocated sample amount of the DB surfaces to limit the potential of needing the CB to discard non-anchored fragments after they’re created.

NumSamplesForPSIterationLog2
Specifies how many samples to iterate across when per-sample execution is enabled, thus setting the amount of super-sampling. Typical this is the number of app exposed samples. Values greater than the depth surface samples is not supported.

NumSamplesForMaskExportLog2
Specifies how many samples to use for shader mask exports.

NumSamplesForAlphaToMaskLog2
How many samples of quality are generated for alpha to mask.

HighQualityIntersections
If not set, all fully covered tiles run through the detail walker at tile rate, only later slowing down to the DB’s surface rate if it exists and the depth test results are not known, or slowing down to pixel rate if the shader executes. If set, will only speed up fully covered tiles that have known Z-test results, but still allows tiles that have potential Z-intersections to run at the detail rate and therefore get AAed intersections. Should be used with INTERPOLATE_COMP_Z for best quality.

Reserved0
Reserved.

InterpolateCompZ
Allows unanchored samples to interpolate a unique Z from compressed Z Planes. Creates nice AAed intersections on first intersection per pixel. Introduces latency-dependant results.

InterpolateSrcZ
Forces unanchored samples to interpolate a unique source Z even when destination Z is not compressed, for a smoother intersection even with uncompressed Z. May cause blending with ZFUNC==EQUALS on uncompressed Z to fail due to comparing against non-interpolated dest Z. Likely will never be set except for experimentation.

StaticAnchorAssociations
Forces replicated destination data to always come from the statically associated anchor sample, as opposed to trying to pull destination data from the nearest anchor sample that is inside the primitive. When set, may cause additional coherency stalls and a degradation of quality for abutting triangles.

Reserved1
Reserved.

OverrasterizationAmount
Log2 of the number of times to or reduce the sample mask for over-rasterization.

EnablePostZOverrasterization
Enables overrasterization in PostZ (that is, after the shader).

Dword1
Reserved.

Remarks

This structure is used by RSSetMSAAParametersX.

Requirements

Header: Declared in d3d12_x.h.