Aurora branch changes

This commit is contained in:
Reece Wilson 2020-09-25 13:04:30 +01:00
parent 67f240e267
commit 634f0ee859
64 changed files with 102 additions and 10 deletions

0
DirectXTex/BC.cpp Normal file → Executable file
View File

0
DirectXTex/BC.h Normal file → Executable file
View File

0
DirectXTex/BC4BC5.cpp Normal file → Executable file
View File

0
DirectXTex/BC6HBC7.cpp Normal file → Executable file
View File

0
DirectXTex/BCDirectCompute.cpp Normal file → Executable file
View File

0
DirectXTex/BCDirectCompute.h Normal file → Executable file
View File

0
DirectXTex/DDS.h Normal file → Executable file
View File

0
DirectXTex/DirectXTex.h Normal file → Executable file
View File

0
DirectXTex/DirectXTex.inl Normal file → Executable file
View File

15
DirectXTex/DirectXTexCompress.cpp Normal file → Executable file
View File

@ -20,6 +20,13 @@
using namespace DirectX;
#if defined(__clang__)
#define ALIGNAS(x) alignas(x)
#else
#define ALGINAS(x) __declspec(align(x))
#endif
namespace
{
inline uint32_t GetBCFlags(_In_ TEX_COMPRESS_FLAGS compress) noexcept
@ -104,7 +111,7 @@ namespace
if (!DetermineEncoderSettings(result.format, pfEncode, blocksize, cflags))
return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
__declspec(align(16)) XMVECTOR temp[16];
ALIGNAS(16) XMVECTOR temp[16];
const uint8_t *pSrc = image.pixels;
const uint8_t *pEnd = image.pixels + image.slicePitch;
const size_t rowPitch = image.rowPitch;
@ -263,7 +270,7 @@ namespace
assert(bytesLeft > 0);
size_t bytesToRead = std::min<size_t>(rowPitch, size_t(bytesLeft));
__declspec(align(16)) XMVECTOR temp[16];
ALIGNAS(16) XMVECTOR temp[16];
if (!_LoadScanline(&temp[0], pw, pSrc, bytesToRead, format))
fail = true;
@ -441,7 +448,7 @@ namespace
return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
}
__declspec(align(16)) XMVECTOR temp[16];
ALIGNAS(16) XMVECTOR temp[16];
const uint8_t *pSrc = cImage.pixels;
const size_t rowPitch = result.rowPitch;
for (size_t h = 0; h < cImage.height; h += 4)
@ -534,7 +541,7 @@ namespace DirectX
// Scan blocks for non-opaque alpha
static const XMVECTORF32 threshold = { { { 0.99f, 0.99f, 0.99f, 0.99f } } };
__declspec(align(16)) XMVECTOR temp[16];
ALIGNAS(16) XMVECTOR temp[16];
const uint8_t *pPixels = cImage.pixels;
for (size_t h = 0; h < cImage.height; h += 4)
{

0
DirectXTex/DirectXTexCompressGPU.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexConvert.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexD3D11.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexD3D12.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexDDS.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexFlipRotate.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexHDR.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexImage.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexMipmaps.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexMisc.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexNormalMaps.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexP.h Normal file → Executable file
View File

0
DirectXTex/DirectXTexPMAlpha.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexResize.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexTGA.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexUtil.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTexWIC.cpp Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Desktop_2017.vcxproj Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Desktop_2017.vcxproj.filters Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Desktop_2017_Win10.vcxproj Normal file → Executable file
View File

View File

0
DirectXTex/DirectXTex_Desktop_2019.vcxproj Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Desktop_2019.vcxproj.filters Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Desktop_2019_Win10.vcxproj Normal file → Executable file
View File

View File

0
DirectXTex/DirectXTex_GDK_2017.vcxproj Normal file → Executable file
View File

0
DirectXTex/DirectXTex_GDK_2017.vcxproj.filters Normal file → Executable file
View File

0
DirectXTex/DirectXTex_GDK_2019.vcxproj Normal file → Executable file
View File

0
DirectXTex/DirectXTex_GDK_2019.vcxproj.filters Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Windows10_2017.vcxproj Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Windows10_2017.vcxproj.filters Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Windows10_2019.vcxproj Normal file → Executable file
View File

0
DirectXTex/DirectXTex_Windows10_2019.vcxproj.filters Normal file → Executable file
View File

0
DirectXTex/DirectXTex_XboxOneXDK_2017.vcxproj Normal file → Executable file
View File

0
DirectXTex/DirectXTex_XboxOneXDK_2017.vcxproj.filters Normal file → Executable file
View File

0
DirectXTex/Shaders/BC6HEncode.hlsl Normal file → Executable file
View File

0
DirectXTex/Shaders/BC7Encode.hlsl Normal file → Executable file
View File

2
DirectXTex/Shaders/CompileShaders.cmd Normal file → Executable file
View File

@ -2,6 +2,8 @@
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem Licensed under the MIT License.
cp %1
setlocal
set error=0

0
DirectXTex/d3dx12.h Normal file → Executable file
View File

0
DirectXTex/filters.h Normal file → Executable file
View File

0
DirectXTex/scoped.h Normal file → Executable file
View File

0
PlatformSupport/ClangBsearch.hpp Normal file → Executable file
View File

0
PlatformSupport/ClangCommon.hpp Normal file → Executable file
View File

0
PlatformSupport/ClangMemCpy_s.hpp Normal file → Executable file
View File

0
PlatformSupport/DXMemory.hpp Normal file → Executable file
View File

0
PlatformSupport/MSVCSal.h Normal file → Executable file
View File

0
PlatformSupport/MSVCStubs.hpp Normal file → Executable file
View File

View File

@ -0,0 +1,8 @@
#pragma once
#if defined(_DXTX_NOWIN)
#include "Win32Public.hpp"
#include "MSVCStubs.hpp"
#endif

0
PlatformSupport/StdFS.hpp Normal file → Executable file
View File

0
PlatformSupport/Win32DXG.hpp Normal file → Executable file
View File

0
PlatformSupport/Win32Errors.hpp Normal file → Executable file
View File

14
PlatformSupport/Win32Public.hpp Normal file → Executable file
View File

@ -14,13 +14,15 @@
#define __cdecl
#endif
#include <cstdint>
#if defined(_DXTX_NOWIN)
using LONG = size_t;
using HANDLE = size_t;
using WORD = int16_t;
using DWORD = uint32_t;
using UINT = uint32_t;
using INT = int32_t;
using LONG = std::size_t;
using HANDLE = std::size_t;
using WORD = std::int16_t;
using DWORD = std::uint32_t;
using UINT = std::uint32_t;
using INT = std::int32_t;
#include "Win32DXG.hpp"
#include "Win32Errors.hpp"

0
PlatformSupport/Win32WIC.hpp Normal file → Executable file
View File

73
premake_helper.lua Executable file
View File

@ -0,0 +1,73 @@
function genProject(path)
local projectFiles = {
path .. "/DirectXTex/BC.h",
path .. "/DirectXTex/BCDirectCompute.h",
path .. "/DirectXTex/DDS.h",
path .. "/DirectXTex/DirectXTex.h",
path .. "/DirectXTex/DirectXTexP.h",
path .. "/DirectXTex/filters.h",
path .. "/DirectXTex/scoped.h",
path .. "/DirectXTex/BC.cpp",
path .. "/DirectXTex/BC4BC5.cpp",
path .. "/DirectXTex/BC6HBC7.cpp",
path .. "/DirectXTex/DirectXTexConvert.cpp",
path .. "/DirectXTex/DirectXTexDDS.cpp",
path .. "/DirectXTex/DirectXTexFlipRotate.cpp",
path .. "/DirectXTex/DirectXTexHDR.cpp",
path .. "/DirectXTex/DirectXTexImage.cpp",
path .. "/DirectXTex/DirectXTexMipmaps.cpp",
path .. "/DirectXTex/DirectXTexMisc.cpp",
path .. "/DirectXTex/DirectXTexNormalMaps.cpp",
path .. "/DirectXTex/DirectXTexPMAlpha.cpp",
path .. "/DirectXTex/DirectXTexResize.cpp",
path .. "/DirectXTex/DirectXTexTGA.cpp",
path .. "/DirectXTex/DirectXTexUtil.cpp"
}
if (_G.win32) then
table.insert(projectFiles, path .. "/DirectXTex/DirectXTexCompressGPU.cpp")
table.insert(projectFiles, path .. "/DirectXTex/BCDirectCompute.cpp")
table.insert(projectFiles, path .. "/DirectXTex/DirectXTexWIC.cpp")
-- TODO: if d3d11
table.insert(projectFiles, path .. "/DirectXTex/DirectXTexD3D12.cpp")
table.insert(projectFiles, path .. "/DirectXTex/d3dx12.h")
else
table.insert(projectFiles, path .. "/DirectXTex/DirectXTexCompress.cpp")
end
local cmd = "\"" .. path .. "\\DirectXTex\\Shaders\\CompileShaders.cmd\" " .. "\"" .. path .. "\\DirectXTex\\Shaders";
print("fxc compile script", cmd)
if (_G.win32) then
buildcommands { cmd }
end
defines
{
"_WIN32_WINNT=0x0A00",
}
if (not _G.win32) then
defines {"_DXTX_NOWIN"}
end
files
{
projectFiles
}
includedirs
{
path .. "/DirectXTex",
path .. "/DirectXMath",
path .. "/PlatformSupport"
}
end
return genProject