typedef struct _DXGIX_PRESENTARRAY_PARAMETERS {
BOOL Disable;
BOOL UsePreviousBuffer;
D3D11_RECT SourceRect;
POINT DestRectUpperLeft;
FLOAT ScaleFactorVert;
FLOAT ScaleFactorHorz;
VOID *Cookie;
UINT Flags;
} DXGIX_PRESENTARRAY_PARAMETERS;
Disable
Whether to disable.
UsePreviousBuffer
Whether to use the previous buffer. TRUE means that this plane does not need to be flipped and the previously specified buffer can continue to be displayed. This is useful if one plane is updated at 60 Hz and the other at 30 Hz, for example. When TRUE, all other parameters in this structure for this plane are ignored.
SourceRect
The source rectangle.
DestRectUpperLeft
The destination rectangle’s upper left point. Should be expressed in units of a virtual destination desktop of 1920x1080. The system will adjust appropriately if the true TV output resolution is different from the virtual destination resolution.
Note that the destination rectangle must be within the bounds of (0,0) for the upper left side and (1920, 1080) for the lower right side. Visual corruptions might occur if the destination rectangle is not contained within these bounds.
ScaleFactorVert
The vertical scale factor. Should be calculated assuming a virtual destination desktop of 1920x1080 if both dimensions of the swap chain are less than or equal 1920x1080, or 3840x2160 if either or both dimensions of the swap chain are greater than 1920x1080. For more information, see Remarks. The system will adjust appropriately if the true TV output resolution is different from the virtual destination resolution.
ScaleFactorHorz
The horizontal scale factor. Should be calculated assuming a virtual destination desktop of 1920x1080 if both dimensions of the swap chain are less than or equal 1920x1080, or 3840x2160 if either or both dimensions of the swap chain are greater than 1920x1080. For more information, see Remarks. The system will adjust appropriately if the true TV output resolution is different from the virtual destination resolution.
Cookie
Currently unused and should be set to NULL.
Flags
Flags to control DXGIXPresentArray or IDXGISwapChain::Present. as a bitwise-OR’d combination of #define constants. This parameter enables switching between different scaler coefficient settings, which enables programmable scaling on a per-plane, per-frame basis. Titles can choose from a set number of display plane filters and can choose from a set of preset values. This feature enables exclusive-mode apps to programmatically choose from 7 different upscaling filter types (BINLINEAR through LANCZOS10).
| Value | Description |
|---|---|
| DXGIX_PRESENT_UPSCALE_FILTER_DEFAULT | Enables 6-tap horizontal scaling. The filter used is 6-tap Lanczos. |
| DXGIX_PRESENT_UPSCALE_FILTER_BILINEAR | Bilinear. |
| DXGIX_PRESENT_UPSCALE_FILTER_SINC4 | 4-tap SINC. This filter is four-tap only, but does the best job of preserving high frequencies with a subsequent risk of artifacts with aliased content. |
| DXGIX_PRESENT_UPSCALE_FILTER_LANCZOS4 | 4-tap Lanczos. A small number of taps produces fewer artifacts, but attenuates higher frequencies. |
| DXGIX_PRESENT_UPSCALE_FILTER_LANCZOS6 | 6-tap Lanczos. |
| DXGIX_PRESENT_UPSCALE_FILTER_LANCZOS6_SOFT | 6-tap Lanczos using low-pass filtering, which will moderately blur the source. If particular source content produces artifacts, experiment with this filter. |
| DXGIX_PRESENT_UPSCALE_FILTER_LANCZOS8 | 8-tap Lanczos. |
| DXGIX_PRESENT_UPSCALE_FILTER_LANCZOS10 | 10-tap Lanczos. A large number of taps preserves higher frequencies in the source image, but may produce artifacts. |
| DXGIX_PRESENT_UPSCALE_FILTER_MASK | Mask. |
| DXGIX_PRESENT_PRESERVE_FRAMEBUFFER | Preserves the frame buffer. This flag is for CoreApplication::RestartApplicationOnly so that the screen does not go black while the application shuts down and then starts back up. Before calling RestartApplicationOnly, the application can optionally render an interstitial splash screen that the system will retain on the screen until the restarted application starts presenting again. To render an interstitial splash screen, the application can do either of the following:
|
The filter-type flag can be specified when calling DXGIXPresentArray or IDXGISwapChain::Present.
Upsampling works best when the source image is already anti-aliased. Because of limitations of upsampling filters, undesirable artifacts such as ringing and halos can occur. When the source image is aliased or has sharp edges, these artifacts can become worse. If particular source content produces artifacts, experiment with different filter types, especially LANCZOS6_SOFT, which uses low-pass filtering which will moderately blur the source.
In general, with a Lanczos filter kernel, a greater number of taps will preserve progressively more of the higher frequencies in the source image, but depending on the source content, may produce artifacts as well. Fewer taps will produce fewer artifacts, but will attenuate higher frequencies. The SINC4 filter is four-tap only, but does the best job of preserving high frequencies with a subsequent risk of artifacts with aliased content. It is possible for the title to switch filters on the fly depending on source content.
This structure is passed into the callback function PFN_DXGIX_PRESENT_ARRAY and is passed into the DXGIXPresentArray function.
The dimensions of a swap chain can be up to 3840x2160 on XBox One S and Xbox One X. If either or both dimensions of a swap chain exceed 1920x1080 swap chain is assumed to be intended for 4k device output and the scale factors should be calculated assuming a virtual destination desktop of 3840x2160. For example:
Header: Declared in d3d11_x.h.