mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-05 20:56:13 +01:00
.edtiorconfig driven reformat of source (#271)
This commit is contained in:
@@ -65,12 +65,12 @@ namespace
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char(&name)[TNameLength]) noexcept
|
||||
{
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);
|
||||
#else
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(resource);
|
||||
UNREFERENCED_PARAMETER(name);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
@@ -116,7 +116,7 @@ namespace
|
||||
const GUID& target;
|
||||
};
|
||||
|
||||
constexpr WICConvert g_WICConvert [] =
|
||||
constexpr WICConvert g_WICConvert[] =
|
||||
{
|
||||
// Note target GUID in this conversion table must be one of those directly supported formats (above).
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace
|
||||
|
||||
BOOL WINAPI InitializeWICFactory(PINIT_ONCE, PVOID, PVOID *ifactory) noexcept
|
||||
{
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
HRESULT hr = CoCreateInstance(
|
||||
CLSID_WICImagingFactory2,
|
||||
nullptr,
|
||||
@@ -206,14 +206,14 @@ namespace
|
||||
);
|
||||
return SUCCEEDED(hr) ? TRUE : FALSE;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
return SUCCEEDED(CoCreateInstance(
|
||||
CLSID_WICImagingFactory,
|
||||
nullptr,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
__uuidof(IWICImagingFactory),
|
||||
ifactory)) ? TRUE : FALSE;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
IWICImagingFactory* GetWIC() noexcept
|
||||
@@ -242,13 +242,13 @@ namespace
|
||||
return g_WICFormats[i].format;
|
||||
}
|
||||
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
if (g_WIC2)
|
||||
{
|
||||
if (memcmp(&GUID_WICPixelFormat96bppRGBFloat, &guid, sizeof(GUID)) == 0)
|
||||
return DXGI_FORMAT_R32G32B32_FLOAT;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return DXGI_FORMAT_UNKNOWN;
|
||||
}
|
||||
@@ -454,7 +454,7 @@ namespace
|
||||
{
|
||||
if (memcmp(&GUID_WICPixelFormat96bppRGBFixedPoint, &pixelFormat, sizeof(WICPixelFormatGUID)) == 0)
|
||||
{
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
if (g_WIC2)
|
||||
{
|
||||
memcpy_s(&convertGUID, sizeof(WICPixelFormatGUID), &GUID_WICPixelFormat96bppRGBFloat, sizeof(GUID));
|
||||
@@ -462,7 +462,7 @@ namespace
|
||||
bpp = 96;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
memcpy_s(&convertGUID, sizeof(WICPixelFormatGUID), &GUID_WICPixelFormat128bppRGBAFloat, sizeof(GUID));
|
||||
format = DXGI_FORMAT_R32G32B32A32_FLOAT;
|
||||
@@ -493,7 +493,7 @@ namespace
|
||||
bpp = WICBitsPerPixel(pixelFormat);
|
||||
}
|
||||
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
|
||||
if ((format == DXGI_FORMAT_R32G32B32_FLOAT) && d3dContext && textureView)
|
||||
{
|
||||
// Special case test for optional device support for autogen mipchains for R32G32B32_FLOAT
|
||||
@@ -507,7 +507,7 @@ namespace
|
||||
bpp = 128;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (loadFlags & WIC_LOADER_FORCE_RGBA32)
|
||||
{
|
||||
@@ -773,7 +773,7 @@ namespace
|
||||
_In_opt_ ID3D11Resource** texture,
|
||||
_In_opt_ ID3D11ShaderResourceView** textureView) noexcept
|
||||
{
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
if (texture || textureView)
|
||||
{
|
||||
CHAR strFileA[MAX_PATH];
|
||||
@@ -815,11 +815,11 @@ namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(fileName);
|
||||
UNREFERENCED_PARAMETER(texture);
|
||||
UNREFERENCED_PARAMETER(textureView);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user