From 9fb5335cacced802044d25b67d2afb7a1e8642ae Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 27 Sep 2016 00:04:19 -0700 Subject: [PATCH] Minor code review --- Texassemble/texassemble.cpp | 2 -- Texconv/texconv.cpp | 17 +++++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Texassemble/texassemble.cpp b/Texassemble/texassemble.cpp index fc1914b..32dae5a 100644 --- a/Texassemble/texassemble.cpp +++ b/Texassemble/texassemble.cpp @@ -647,8 +647,6 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[]) wchar_t ext[_MAX_EXT]; _wsplitpath_s(szOutputFile, nullptr, 0, nullptr, 0, nullptr, 0, ext, _MAX_EXT); - wprintf(L"Ext = %ls\n", ext); - CrossFileType = LookupByName(ext, g_pExtFileTypes); switch (dwCommand) diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index cea7531..5b5388c 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -110,7 +110,7 @@ struct SValue ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -const SValue g_pOptions [] = +const SValue g_pOptions[] = { { L"r", OPT_RECURSIVE }, { L"w", OPT_WIDTH }, @@ -162,7 +162,7 @@ const SValue g_pOptions [] = #define DEFFMT(fmt) { L#fmt, DXGI_FORMAT_ ## fmt } -const SValue g_pFormats [] = +const SValue g_pFormats[] = { // List does not include _TYPELESS or depth/stencil formats DEFFMT(R32G32B32A32_FLOAT), @@ -249,7 +249,7 @@ const SValue g_pFormats [] = { nullptr, DXGI_FORMAT_UNKNOWN } }; -const SValue g_pReadOnlyFormats [] = +const SValue g_pReadOnlyFormats[] = { DEFFMT(R32G32B32A32_TYPELESS), DEFFMT(R32G32B32_TYPELESS), @@ -290,10 +290,15 @@ const SValue g_pReadOnlyFormats [] = DEFFMT(420_OPAQUE), DEFFMT(NV11), + // DXGI 1.3 formats + { L"P208", DXGI_FORMAT(130) }, + { L"V208", DXGI_FORMAT(131) }, + { L"V408", DXGI_FORMAT(132) }, + { nullptr, DXGI_FORMAT_UNKNOWN } }; -const SValue g_pFilters [] = +const SValue g_pFilters[] = { { L"POINT", TEX_FILTER_POINT }, { L"LINEAR", TEX_FILTER_LINEAR }, @@ -322,7 +327,7 @@ const SValue g_pFilters [] = #define CODEC_JXR 0xFFFF0004 #define CODEC_HDR 0xFFFF0005 -const SValue g_pSaveFileTypes [] = // valid formats to write to +const SValue g_pSaveFileTypes[] = // valid formats to write to { { L"BMP", WIC_CODEC_BMP }, { L"JPG", WIC_CODEC_JPEG }, @@ -339,7 +344,7 @@ const SValue g_pSaveFileTypes [] = // valid formats to write to { nullptr, CODEC_DDS } }; -const SValue g_pFeatureLevels [] = // valid feature levels for -fl for maximimum size +const SValue g_pFeatureLevels[] = // valid feature levels for -fl for maximimum size { { L"9.1", 2048 }, { L"9.2", 2048 },