mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-24 13:20:13 +00:00
Enable compilation with clang-cl (LLVM on Windows) (#135)
This commit is contained in:
parent
c7261a0951
commit
86b2bb5194
@ -674,6 +674,7 @@ HRESULT InitDevice( const TexMetadata& mdata )
|
||||
{
|
||||
false,
|
||||
false,
|
||||
{
|
||||
{
|
||||
true,
|
||||
D3D11_BLEND_SRC_ALPHA,
|
||||
@ -683,6 +684,8 @@ HRESULT InitDevice( const TexMetadata& mdata )
|
||||
D3D11_BLEND_ZERO,
|
||||
D3D11_BLEND_OP_ADD,
|
||||
D3D11_COLOR_WRITE_ENABLE_ALL
|
||||
},
|
||||
// ...
|
||||
}
|
||||
};
|
||||
hr = g_pd3dDevice->CreateBlendState(&dsc, &g_AlphaBlendState );
|
||||
|
@ -12,8 +12,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <directxmath.h>
|
||||
#include <directxpackedvector.h>
|
||||
#include <DirectXMath.h>
|
||||
#include <DirectXPackedVector.h>
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ using namespace DirectX::PackedVector;
|
||||
// Macros
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#define SIGN_EXTEND(x,nb) ((((x)&(1<<((nb)-1)))?((~0)<<(nb)):0)|(x))
|
||||
#define SIGN_EXTEND(x,nb) ((((x)&(1<<((nb)-1)))?((~0)^((1<<(nb))-1)):0)|(x))
|
||||
|
||||
// Because these are used in SAL annotations, they need to remain macros rather than const values
|
||||
#define BC6H_MAX_REGIONS 2
|
||||
@ -507,12 +507,9 @@ namespace
|
||||
|
||||
INTColor& SignExtend(_In_ const LDRColorA& Prec)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
r = SIGN_EXTEND(r, int(Prec.r));
|
||||
g = SIGN_EXTEND(g, int(Prec.g));
|
||||
b = SIGN_EXTEND(b, int(Prec.b));
|
||||
#pragma prefast(pop)
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <directxmath.h>
|
||||
#include <DirectXMath.h>
|
||||
|
||||
#include <ocidl.h>
|
||||
#include <OCIdl.h>
|
||||
|
||||
#define DIRECTX_TEX_VERSION 161
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#pragma warning(disable : 4616 6993)
|
||||
#endif
|
||||
|
||||
#include "bc.h"
|
||||
#include "BC.h"
|
||||
|
||||
using namespace DirectX;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "DirectXTexp.h"
|
||||
|
||||
#include "bcdirectcompute.h"
|
||||
#include "BCDirectCompute.h"
|
||||
|
||||
using namespace DirectX;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "DirectXTexp.h"
|
||||
|
||||
#include "dds.h"
|
||||
#include "DDS.h"
|
||||
|
||||
using namespace DirectX;
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
#define _WIN32_WINNT_WIN10 0x0A00
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d12_x.h>
|
||||
@ -81,8 +81,8 @@
|
||||
|
||||
#define _XM_NO_XMVECTOR_OVERLOADS_
|
||||
|
||||
#include <directxmath.h>
|
||||
#include <directxpackedvector.h>
|
||||
#include <DirectXMath.h>
|
||||
#include <DirectXPackedVector.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <malloc.h>
|
||||
@ -93,9 +93,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <search.h>
|
||||
|
||||
#include <ole2.h>
|
||||
#include <Ole2.h>
|
||||
|
||||
#include "directxtex.h"
|
||||
#include "DirectXTex.h"
|
||||
|
||||
#include <wincodec.h>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#include "DirectXTexp.h"
|
||||
#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");
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <directxmath.h>
|
||||
#include <directxpackedvector.h>
|
||||
#include <DirectXMath.h>
|
||||
#include <DirectXPackedVector.h>
|
||||
|
||||
#include <memory>
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <DirectXPackedVector.h>
|
||||
#include <wincodec.h>
|
||||
|
||||
#include "directxtex.h"
|
||||
#include "DirectXTex.h"
|
||||
|
||||
//Uncomment to add support for OpenEXR (.exr)
|
||||
//#define USE_OPENEXR
|
||||
@ -312,20 +312,6 @@ namespace
|
||||
}
|
||||
|
||||
|
||||
const wchar_t* LookupByValue(DWORD pValue, const SValue *pArray)
|
||||
{
|
||||
while (pArray->pName)
|
||||
{
|
||||
if (pValue == pArray->dwValue)
|
||||
return pArray->pName;
|
||||
|
||||
pArray++;
|
||||
}
|
||||
|
||||
return L"";
|
||||
}
|
||||
|
||||
|
||||
void SearchForFiles(const wchar_t* path, std::list<SConversion>& files, bool recursive)
|
||||
{
|
||||
// Process files
|
||||
@ -1407,12 +1393,12 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
else
|
||||
{
|
||||
// WIC shares the same filter values for mode and dither
|
||||
static_assert(WIC_FLAGS_DITHER == TEX_FILTER_DITHER, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER_DIFFUSION == TEX_FILTER_DITHER_DIFFUSION, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_POINT == TEX_FILTER_POINT, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_LINEAR == TEX_FILTER_LINEAR, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_CUBIC == TEX_FILTER_CUBIC, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_FANT == TEX_FILTER_FANT, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_DITHER), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER_DIFFUSION == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_DITHER_DIFFUSION), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_POINT == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_POINT), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_LINEAR == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_LINEAR), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_CUBIC == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_CUBIC), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_FANT == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_FANT), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
|
||||
hr = LoadFromWICFile(pConv->szSrc, dwFilter | WIC_FLAGS_ALL_FRAMES, &info, *image);
|
||||
if (FAILED(hr))
|
||||
@ -1609,7 +1595,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
|
||||
for (size_t j = 0; j < width; ++j)
|
||||
{
|
||||
static const XMVECTORF32 s_luminance = { 0.3f, 0.59f, 0.11f, 0.f };
|
||||
static const XMVECTORF32 s_luminance = {{{ 0.3f, 0.59f, 0.11f, 0.f }}};
|
||||
|
||||
XMVECTOR v = *pixels++;
|
||||
|
||||
@ -1654,7 +1640,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
}
|
||||
|
||||
auto& tinfo = timage->GetMetadata();
|
||||
tinfo;
|
||||
(void)tinfo;
|
||||
|
||||
assert(info.width == tinfo.width);
|
||||
assert(info.height == tinfo.height);
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include <wincodec.h>
|
||||
|
||||
#include "directxtex.h"
|
||||
#include "DirectXTex.h"
|
||||
|
||||
#include "DirectXPackedVector.h"
|
||||
|
||||
@ -930,30 +930,30 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
const XMVECTORF32 c_MaxNitsFor2084 = { 10000.0f, 10000.0f, 10000.0f, 1.f };
|
||||
const XMVECTORF32 c_MaxNitsFor2084 = {{{ 10000.0f, 10000.0f, 10000.0f, 1.f }}};
|
||||
|
||||
const XMMATRIX c_from709to2020 =
|
||||
{
|
||||
{ 0.6274040f, 0.0690970f, 0.0163916f, 0.f },
|
||||
{ 0.3292820f, 0.9195400f, 0.0880132f, 0.f },
|
||||
{ 0.0433136f, 0.0113612f, 0.8955950f, 0.f },
|
||||
{ 0.f, 0.f, 0.f, 1.f }
|
||||
0.6274040f, 0.0690970f, 0.0163916f, 0.f,
|
||||
0.3292820f, 0.9195400f, 0.0880132f, 0.f,
|
||||
0.0433136f, 0.0113612f, 0.8955950f, 0.f,
|
||||
0.f, 0.f, 0.f, 1.f
|
||||
};
|
||||
|
||||
const XMMATRIX c_from2020to709 =
|
||||
{
|
||||
{ 1.6604910f, -0.1245505f, -0.0181508f, 0.f },
|
||||
{ -0.5876411f, 1.1328999f, -0.1005789f, 0.f },
|
||||
{ -0.0728499f, -0.0083494f, 1.1187297f, 0.f },
|
||||
{ 0.f, 0.f, 0.f, 1.f }
|
||||
1.6604910f, -0.1245505f, -0.0181508f, 0.f,
|
||||
-0.5876411f, 1.1328999f, -0.1005789f, 0.f,
|
||||
-0.0728499f, -0.0083494f, 1.1187297f, 0.f,
|
||||
0.f, 0.f, 0.f, 1.f
|
||||
};
|
||||
|
||||
const XMMATRIX c_fromP3to2020 =
|
||||
{
|
||||
{ 0.753845f, 0.0457456f, -0.00121055f, 0.f },
|
||||
{ 0.198593f, 0.941777f, 0.0176041f, 0.f },
|
||||
{ 0.047562f, 0.0124772f, 0.983607f, 0.f },
|
||||
{ 0.f, 0.f, 0.f, 1.f }
|
||||
0.753845f, 0.0457456f, -0.00121055f, 0.f,
|
||||
0.198593f, 0.941777f, 0.0176041f, 0.f,
|
||||
0.047562f, 0.0124772f, 0.983607f, 0.f,
|
||||
0.f, 0.f, 0.f, 1.f
|
||||
};
|
||||
|
||||
inline float LinearToST2084(float normalizedLinearValue)
|
||||
@ -1788,12 +1788,12 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
else
|
||||
{
|
||||
// WIC shares the same filter values for mode and dither
|
||||
static_assert(WIC_FLAGS_DITHER == TEX_FILTER_DITHER, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER_DIFFUSION == TEX_FILTER_DITHER_DIFFUSION, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_POINT == TEX_FILTER_POINT, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_LINEAR == TEX_FILTER_LINEAR, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_CUBIC == TEX_FILTER_CUBIC, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_FANT == TEX_FILTER_FANT, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_DITHER), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER_DIFFUSION == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_DITHER_DIFFUSION), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_POINT == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_POINT), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_LINEAR == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_LINEAR), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_CUBIC == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_CUBIC), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_FANT == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_FANT), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
|
||||
DWORD wicFlags = dwFilter;
|
||||
if (FileType == CODEC_DDS)
|
||||
@ -2078,7 +2078,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
}
|
||||
|
||||
auto& tinfo = timage->GetMetadata();
|
||||
tinfo;
|
||||
(void)tinfo;
|
||||
|
||||
assert(tinfo.format == DXGI_FORMAT_R16G16B16A16_FLOAT);
|
||||
info.format = DXGI_FORMAT_R16G16B16A16_FLOAT;
|
||||
@ -2271,7 +2271,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
}
|
||||
|
||||
auto& tinfo = timage->GetMetadata();
|
||||
tinfo;
|
||||
(void)tinfo;
|
||||
|
||||
assert(info.width == tinfo.width);
|
||||
assert(info.height == tinfo.height);
|
||||
@ -2305,7 +2305,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
|
||||
for (size_t j = 0; j < width; ++j)
|
||||
{
|
||||
static const XMVECTORF32 s_luminance = { 0.3f, 0.59f, 0.11f, 0.f };
|
||||
static const XMVECTORF32 s_luminance = {{{ 0.3f, 0.59f, 0.11f, 0.f }}};
|
||||
|
||||
XMVECTOR v = *pixels++;
|
||||
|
||||
@ -2350,7 +2350,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
}
|
||||
|
||||
auto& tinfo = timage->GetMetadata();
|
||||
tinfo;
|
||||
(void)tinfo;
|
||||
|
||||
assert(info.width == tinfo.width);
|
||||
assert(info.height == tinfo.height);
|
||||
@ -2454,7 +2454,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
hr = TransformImage(image->GetImages(), image->GetImageCount(), image->GetMetadata(),
|
||||
[&](XMVECTOR* outPixels, const XMVECTOR* inPixels, size_t width, size_t y)
|
||||
{
|
||||
static const XMVECTORF32 s_tolerance = { 0.2f, 0.2f, 0.2f, 0.f };
|
||||
static const XMVECTORF32 s_tolerance = {{{ 0.2f, 0.2f, 0.2f, 0.f }}};
|
||||
|
||||
UNREFERENCED_PARAMETER(y);
|
||||
|
||||
@ -2481,7 +2481,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
}
|
||||
|
||||
auto& tinfo = timage->GetMetadata();
|
||||
tinfo;
|
||||
(void)tinfo;
|
||||
|
||||
assert(info.width == tinfo.width);
|
||||
assert(info.height == tinfo.height);
|
||||
@ -2529,7 +2529,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
}
|
||||
|
||||
auto& tinfo = timage->GetMetadata();
|
||||
tinfo;
|
||||
(void)tinfo;
|
||||
|
||||
assert(info.width == tinfo.width);
|
||||
assert(info.height == tinfo.height);
|
||||
@ -2728,7 +2728,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
}
|
||||
|
||||
auto& tinfo = timage->GetMetadata();
|
||||
tinfo;
|
||||
(void)tinfo;
|
||||
|
||||
assert(info.width == tinfo.width);
|
||||
assert(info.height == tinfo.height);
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include <dxgiformat.h>
|
||||
|
||||
#include "directxtex.h"
|
||||
#include "DirectXTex.h"
|
||||
|
||||
//Uncomment to add support for OpenEXR (.exr)
|
||||
//#define USE_OPENEXR
|
||||
@ -626,12 +626,12 @@ namespace
|
||||
else
|
||||
{
|
||||
// WIC shares the same filter values for mode and dither
|
||||
static_assert(WIC_FLAGS_DITHER == TEX_FILTER_DITHER, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER_DIFFUSION == TEX_FILTER_DITHER_DIFFUSION, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_POINT == TEX_FILTER_POINT, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_LINEAR == TEX_FILTER_LINEAR, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_CUBIC == TEX_FILTER_CUBIC, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_FANT == TEX_FILTER_FANT, "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_DITHER), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_DITHER_DIFFUSION == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_DITHER_DIFFUSION), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_POINT == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_POINT), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_LINEAR == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_LINEAR), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_CUBIC == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_CUBIC), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
static_assert(WIC_FLAGS_FILTER_FANT == static_cast<DirectX::WIC_FLAGS>(TEX_FILTER_FANT), "WIC_FLAGS_* & TEX_FILTER_* should match");
|
||||
|
||||
return LoadFromWICFile(fileName, dwFilter | WIC_FLAGS_ALL_FRAMES, &info, *image);
|
||||
}
|
||||
@ -705,7 +705,7 @@ namespace
|
||||
|
||||
HRESULT hr = EvaluateImage(image, [&](const XMVECTOR * pixels, size_t width, size_t y)
|
||||
{
|
||||
static const XMVECTORF32 s_luminance = { 0.3f, 0.59f, 0.11f, 0.f };
|
||||
static const XMVECTORF32 s_luminance = {{{ 0.3f, 0.59f, 0.11f, 0.f }}};
|
||||
|
||||
UNREFERENCED_PARAMETER(y);
|
||||
|
||||
@ -1368,7 +1368,7 @@ namespace
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
#define SIGN_EXTEND(x,nb) ((((x)&(1<<((nb)-1)))?((~0)<<(nb)):0)|(x))
|
||||
#define SIGN_EXTEND(x,nb) ((((x)&(1<<((nb)-1)))?((~0)^((1<<(nb))-1)):0)|(x))
|
||||
|
||||
#define NUM_PIXELS_PER_BLOCK 16
|
||||
|
||||
@ -1728,8 +1728,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 10);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 10);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 10);
|
||||
@ -1745,7 +1743,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 5);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 5);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 5);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 1 - [10 5 5 5] shape %llu\n", m->d);
|
||||
@ -1807,8 +1804,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 7);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 7);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 7);
|
||||
@ -1824,7 +1819,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 6);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 6);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 6);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 2 - [7 6 6 6] shape %llu\n", m->d);
|
||||
@ -1888,8 +1882,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 11);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 11);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 11);
|
||||
@ -1905,7 +1897,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 5);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 4);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 4);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 3 - [11 5 4 4] shape %llu\n", m->d);
|
||||
@ -1969,8 +1960,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 11);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 11);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 11);
|
||||
@ -1986,7 +1975,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 4);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 5);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 4);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 4 - [11 4 5 4] shape %llu\n", m->d);
|
||||
@ -2045,8 +2033,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 11);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 11);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 11);
|
||||
@ -2062,7 +2048,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 4);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 4);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 5);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 5 - [11 4 4 5] shape %llu\n", m->d);
|
||||
@ -2122,8 +2107,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 9);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 9);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 9);
|
||||
@ -2139,7 +2122,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 5);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 5);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 5);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 6 - [9 5 5 5] shape %llu\n", m->d);
|
||||
@ -2199,8 +2181,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 8);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 8);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 8);
|
||||
@ -2216,7 +2196,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 6);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 5);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 5);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 7 - [8 6 5 5] shape %llu\n", m->d);
|
||||
@ -2278,8 +2257,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 8);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 8);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 8);
|
||||
@ -2295,7 +2272,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 5);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 6);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 5);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 8 - [8 5 6 5] shape %llu\n", m->d);
|
||||
@ -2357,8 +2333,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 8);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 8);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 8);
|
||||
@ -2374,7 +2348,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 5);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 5);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 6);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 9 - [8 5 5 6] shape %llu\n", m->d);
|
||||
@ -2436,8 +2409,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 6);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 6);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 6);
|
||||
@ -2453,7 +2424,6 @@ namespace
|
||||
e1_B.x = SIGN_EXTEND(e1_B.x, 6);
|
||||
e1_B.y = SIGN_EXTEND(e1_B.y, 6);
|
||||
e1_B.z = SIGN_EXTEND(e1_B.z, 6);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 10 - [6 6 6 6] shape %llu\n", m->d);
|
||||
@ -2494,8 +2464,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 10);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 10);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 10);
|
||||
@ -2503,7 +2471,6 @@ namespace
|
||||
e0_B.x = SIGN_EXTEND(e0_B.x, 10);
|
||||
e0_B.y = SIGN_EXTEND(e0_B.y, 10);
|
||||
e0_B.z = SIGN_EXTEND(e0_B.z, 10);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 11 - [10 10]\n");
|
||||
@ -2545,8 +2512,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 11);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 11);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 11);
|
||||
@ -2554,7 +2519,6 @@ namespace
|
||||
e0_B.x = SIGN_EXTEND(e0_B.x, 9);
|
||||
e0_B.y = SIGN_EXTEND(e0_B.y, 9);
|
||||
e0_B.z = SIGN_EXTEND(e0_B.z, 9);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 12 - [11 9]\n");
|
||||
@ -2599,8 +2563,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 12);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 12);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 12);
|
||||
@ -2608,7 +2570,6 @@ namespace
|
||||
e0_B.x = SIGN_EXTEND(e0_B.x, 8);
|
||||
e0_B.y = SIGN_EXTEND(e0_B.y, 8);
|
||||
e0_B.z = SIGN_EXTEND(e0_B.z, 8);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 13 - [12 8]\n");
|
||||
@ -2665,8 +2626,6 @@ namespace
|
||||
|
||||
if (bSigned)
|
||||
{
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable : 26453, "Shift here is never negative")
|
||||
e0_A.x = SIGN_EXTEND(e0_A.x, 16);
|
||||
e0_A.y = SIGN_EXTEND(e0_A.y, 16);
|
||||
e0_A.z = SIGN_EXTEND(e0_A.z, 16);
|
||||
@ -2674,7 +2633,6 @@ namespace
|
||||
e0_B.x = SIGN_EXTEND(e0_B.x, 4);
|
||||
e0_B.y = SIGN_EXTEND(e0_B.y, 4);
|
||||
e0_B.z = SIGN_EXTEND(e0_B.z, 4);
|
||||
#pragma prefast(pop)
|
||||
}
|
||||
|
||||
wprintf(L"\tMode 14 - [16 4]\n");
|
||||
|
Loading…
Reference in New Issue
Block a user