Updates for Xbox
This commit is contained in:
parent
8aee4d3ccf
commit
b0667d7da9
@ -17,7 +17,9 @@
|
||||
#include <vector>
|
||||
|
||||
#if !defined(__d3d11_h__) && !defined(__d3d11_x_h__) && !defined(__d3d12_h__) && !defined(__d3d12_x_h__) && !defined(__XBOX_D3D12_X__)
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#ifdef _GAMING_XBOX
|
||||
#include <d3d12_x.h>
|
||||
#elif defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
|
@ -4407,13 +4407,13 @@ namespace
|
||||
}
|
||||
|
||||
// Check for special cases
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
if (sformat == DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
|| sformat == DXGI_FORMAT_R16_FLOAT
|
||||
|| tformat == DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
|| tformat == DXGI_FORMAT_R16_FLOAT)
|
||||
{
|
||||
// Use non-WIC code paths as these conversions are not supported by Xbox One XDK
|
||||
// Use non-WIC code paths as these conversions are not supported by Xbox version of WIC
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -11,7 +11,9 @@
|
||||
|
||||
#include "DirectXTexP.h"
|
||||
|
||||
#if !defined(_XBOX_ONE) || !defined(_TITLE)
|
||||
#ifdef _GAMING_XBOX
|
||||
#error This module is not supported for GDK
|
||||
#elif !defined(_XBOX_ONE) || !defined(_TITLE)
|
||||
#include <d3d10.h>
|
||||
#endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#pragma clang diagnostic ignored "-Wsign-conversion"
|
||||
#endif
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
#include "d3dx12_x.h"
|
||||
#else
|
||||
#define D3DX12_NO_STATE_OBJECT_HELPERS
|
||||
|
@ -632,11 +632,11 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
if (format == DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
|| format == DXGI_FORMAT_R16_FLOAT)
|
||||
{
|
||||
// Use non-WIC code paths as these conversions are not supported by Xbox One XDK
|
||||
// Use non-WIC code paths as these conversions are not supported by Xbox version of WIC
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -91,7 +91,9 @@
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#ifdef _GAMING_XBOX
|
||||
#include <d3d12_x.h>
|
||||
#elif defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d12_x.h>
|
||||
#include <d3d11_x.h>
|
||||
#elif (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
|
||||
|
@ -190,11 +190,11 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
if (format == DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
|| format == DXGI_FORMAT_R16_FLOAT)
|
||||
{
|
||||
// Use non-WIC code paths as these conversions are not supported by Xbox One XDK
|
||||
// Use non-WIC code paths as these conversions are not supported by Xbox version of WIC
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -11,14 +11,14 @@
|
||||
|
||||
#include "DirectXTexP.h"
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
static_assert(XBOX_DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT == DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT, "Xbox One XDK mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT == DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT, "Xbox One XDK mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_D16_UNORM_S8_UINT == DXGI_FORMAT_D16_UNORM_S8_UINT, "Xbox One XDK mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R16_UNORM_X8_TYPELESS == DXGI_FORMAT_R16_UNORM_X8_TYPELESS, "Xbox One XDK mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_X16_TYPELESS_G8_UINT == DXGI_FORMAT_X16_TYPELESS_G8_UINT, "Xbox One XDK mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R10G10B10_SNORM_A2_UNORM == DXGI_FORMAT_R10G10B10_SNORM_A2_UNORM, "Xbox One XDK mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R4G4_UNORM == DXGI_FORMAT_R4G4_UNORM, "Xbox One XDK mismatch detected");
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
static_assert(XBOX_DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT == DXGI_FORMAT_R10G10B10_7E3_A2_FLOAT, "Xbox mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT == DXGI_FORMAT_R10G10B10_6E4_A2_FLOAT, "Xbox mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_D16_UNORM_S8_UINT == DXGI_FORMAT_D16_UNORM_S8_UINT, "Xbox mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R16_UNORM_X8_TYPELESS == DXGI_FORMAT_R16_UNORM_X8_TYPELESS, "Xbox mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_X16_TYPELESS_G8_UINT == DXGI_FORMAT_X16_TYPELESS_G8_UINT, "Xbox mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R10G10B10_SNORM_A2_UNORM == DXGI_FORMAT_R10G10B10_SNORM_A2_UNORM, "Xbox mismatch detected");
|
||||
static_assert(XBOX_DXGI_FORMAT_R4G4_UNORM == DXGI_FORMAT_R4G4_UNORM, "Xbox mismatch detected");
|
||||
#endif
|
||||
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
|
||||
|
@ -334,7 +334,7 @@ namespace
|
||||
sRGB = (flags & WIC_FLAGS_DEFAULT_SRGB) != 0;
|
||||
}
|
||||
}
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
else if (memcmp(&containerFormat, &GUID_ContainerFormatJpeg, sizeof(GUID)) == 0)
|
||||
{
|
||||
if (SUCCEEDED(metareader->GetMetadataByName(L"/app1/ifd/exif/{ushort=40961}", &value)) && value.vt == VT_UI2)
|
||||
@ -642,7 +642,7 @@ namespace
|
||||
(void)metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
||||
}
|
||||
}
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||
else if (memcmp(&containerFormat, &GUID_ContainerFormatJpeg, sizeof(GUID)) == 0)
|
||||
{
|
||||
// Set Software name
|
||||
|
Loading…
Reference in New Issue
Block a user