211 for (FormatOpIndex = 0; FormatOpIndex < NumFormatOps; FormatOpIndex++)
214 if (pSurfaceDesc->ddpfPixelFormat.dwFourCC == DisplayFormat &&
215 (pSurfaceDesc->ddpfPixelFormat.dwOperations & FormatOp) == FormatOp)
231 if (DisplayFormat != BackBufferFormat)
233 D3DFORMAT AdjustedDisplayFormat = DisplayFormat;
244 if (AdjustedDisplayFormat == BackBufferFormat)
253 else if (
FALSE == Windowed)
285 return CheckFormat - 1;
329 DWORD NonCompatibleOperations = 0, MustSupportOperations = 0;
430 if (AdapterFormat == CheckFormat)
442 if (NonAlphaAdapterFormat == NonAlphaCheckFormat &&
469 for (FormatOpIndex = 0; FormatOpIndex < NumFormatOps; FormatOpIndex++)
474 if (pSurfaceDesc->ddpfPixelFormat.dwFourCC != CheckFormat)
477 dwOperations = pSurfaceDesc->ddpfPixelFormat.dwOperations;
482 if ((
dwOperations & MustSupportOperations) == MustSupportOperations)
486 bSupportedWithAutogen =
TRUE;
489 if (
TRUE == bSupportedWithAutogen)
503 if (NonAlphaSourceFormat == NonAlphaTargetFormat)
510 switch (SourceFormat)
557 bForceSameDepthStencilBits =
TRUE;
561 if (
FALSE == bForceSameDepthStencilBits &&
564 bForceSameDepthStencilBits =
TRUE;
570 for (FormatIndex = 0; FormatIndex < NumFormatOps && (bRenderTargetAvailable ==
FALSE || bDepthStencilAvailable ==
FALSE); FormatIndex++)
573 const DWORD FourCC = pSurfaceDesc->ddpfPixelFormat.dwFourCC;
574 const DWORD FormatOperations = pSurfaceDesc->ddpfPixelFormat.dwOperations;
576 if (
FALSE == bRenderTargetAvailable &&
577 FourCC == RenderTargetFormat &&
580 bRenderTargetAvailable =
TRUE;
583 if (
FALSE == bDepthStencilAvailable &&
584 FourCC == DepthStencilFormat &&
587 bDepthStencilAvailable =
TRUE;
591 bForceSameDepthStencilBits =
FALSE;
596 if (
FALSE == bRenderTargetAvailable ||
FALSE == bDepthStencilAvailable)
601 if (
TRUE == bForceSameDepthStencilBits)
#define D3DPTEXTURECAPS_MIPCUBEMAP
#define D3DPTEXTURECAPS_MIPMAP
#define D3DPTEXTURECAPS_MIPVOLUMEMAP
enum _D3DRESOURCETYPE D3DRESOURCETYPE
#define D3DUSAGE_RENDERTARGET
enum _D3DFORMAT D3DFORMAT
#define D3DUSAGE_DEPTHSTENCIL
#define D3DUSAGE_QUERY_SRGBREAD
#define D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
#define D3DUSAGE_QUERY_FILTER
#define D3DUSAGE_QUERY_WRAPANDMIP
#define D3DUSAGE_QUERY_LEGACYBUMPMAP
#define D3DUSAGE_AUTOGENMIPMAP
#define D3DUSAGE_QUERY_SRGBWRITE
#define D3DUSAGE_QUERY_VERTEXTEXTURE
#define D3DERR_INVALIDCALL
#define D3DFORMAT_MEMBEROFGROUP_ARGB
#define D3DFORMAT_OP_NOALPHABLEND
#define D3DFORMAT_OP_OFFSCREEN_RENDERTARGET
#define D3DFORMAT_OP_AUTOGENMIPMAP
#define D3DFORMAT_OP_TEXTURE
#define D3DFORMAT_OP_CONVERT_TO_ARGB
#define D3DFORMAT_OP_BUMPMAP
#define D3DFORMAT_OP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH
#define D3DFORMAT_OP_VERTEXTEXTURE
#define D3DFORMAT_OP_DISPLAYMODE
#define D3DFORMAT_OP_SRGBWRITE
#define D3DFORMAT_OP_CUBETEXTURE
#define D3DFORMAT_OP_ZSTENCIL
#define D3DFORMAT_OP_OFFSCREENPLAIN
#define D3DFORMAT_OP_SRGBREAD
#define D3DFORMAT_OP_SAME_FORMAT_RENDERTARGET
#define D3DFORMAT_OP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET
#define D3DFORMAT_OP_3DACCELERATION
#define D3DFORMAT_OP_VOLUMETEXTURE
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
#define D3DERR_NOTAVAILABLE
LPDDSURFACEDESC pSupportedFormatOps
DWORD NumSupportedFormatOps