From 47083adb7773a17e4b012d4488c19a84f3a34aae Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 29 Feb 2024 16:08:31 -0800 Subject: [PATCH 1/9] Add linux only features for auxiliary --- ports/directxtex/portfile.cmake | 2 ++ ports/directxtex/vcpkg.json | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index 8e0545a15d3382..bdc716d3c9c342 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -15,7 +15,9 @@ vcpkg_check_features( FEATURES dx11 BUILD_DX11 dx12 BUILD_DX12 + jpeg ENABLE_LIBJPEG_SUPPORT openexr ENABLE_OPENEXR_SUPPORT + png ENABLE_LIBPNG_SUPPORT spectre ENABLE_SPECTRE_MITIGATION tools BUILD_TOOLS ) diff --git a/ports/directxtex/vcpkg.json b/ports/directxtex/vcpkg.json index 6d9eef7199caa6..64d9891401ef5b 100644 --- a/ports/directxtex/vcpkg.json +++ b/ports/directxtex/vcpkg.json @@ -41,12 +41,26 @@ } ] }, + "jpeg": { + "description": "Add the JPEG auxiliary functions", + "dependencies": [ + "libjpeg-turbo" + ], + "supports":"linux" + }, "openexr": { "description": "Enable OpenEXR support", "dependencies": [ "openexr" ] }, + "png": { + "description": "Add the PNG auxiliary functions", + "dependencies": [ + "libpng" + ], + "supports":"linux" + }, "spectre": { "description": "Build Spectre-mitigated library" }, From c0833e338f3f910e3ccff48e54cb6bce73caa365 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 29 Feb 2024 16:40:38 -0800 Subject: [PATCH 2/9] Add xbox features --- ports/directxtex/portfile.cmake | 6 ++++++ ports/directxtex/vcpkg.json | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index bdc716d3c9c342..de9b51458f1205 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -20,6 +20,8 @@ vcpkg_check_features( png ENABLE_LIBPNG_SUPPORT spectre ENABLE_SPECTRE_MITIGATION tools BUILD_TOOLS + xboxone BUILD_XBOX_EXTS_XBOXONE + xboxseriesx BUILD_XBOX_EXTS_SCARLETT ) set(EXTRA_OPTIONS -DBUILD_SAMPLE=OFF) @@ -32,6 +34,10 @@ if(VCPKG_TARGET_IS_MINGW AND ("dx11" IN_LIST FEATURES)) message(NOTICE "Building ${PORT} for MinGW requires the HLSL Compiler fxc.exe also be in the PATH. See https://aka.ms/windowssdk.") endif() +if(("xboxone" IN_LIST FEATURES) AND ("xboxseriesx" IN_LIST FEATURES)) + message(FATAL_ERROR "${PORT} can only support one of Xbox One or Xbox Series X|S at a time.") +endif() + if (VCPKG_HOST_IS_LINUX) message(WARNING "Build ${PORT} requires GCC version 9 or later") endif() diff --git a/ports/directxtex/vcpkg.json b/ports/directxtex/vcpkg.json index 64d9891401ef5b..8ef7de78b51fff 100644 --- a/ports/directxtex/vcpkg.json +++ b/ports/directxtex/vcpkg.json @@ -67,6 +67,20 @@ "tools": { "description": "texture command-line tools", "supports": "windows & !uwp & !xbox" + }, + "xboxone": { + "description": "Adds Xbox One specific extensions to the library", + "dependencies": [ + "ms-gdkx" + ], + "supports": "windows & x64 & !uwp & !xbox" + }, + "xboxseriesx": { + "description": "Adds Xbox Series X|S specific extensions to the library", + "dependencies": [ + "ms-gdkx" + ], + "supports": "windows & x64 & !uwp & !xbox" } } } From ec3a71d3630b9e489efcfbf136c3d79300776b9d Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 7 Mar 2024 11:30:30 -0800 Subject: [PATCH 3/9] Update for March 2024 release --- ports/directxtex/portfile.cmake | 7 ++++--- ports/directxtex/vcpkg.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index de9b51458f1205..7e7b40132331cc 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -1,4 +1,4 @@ -set(DIRECTXTEX_TAG feb2024) +set(DIRECTXTEX_TAG mar2024) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -6,7 +6,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTex REF ${DIRECTXTEX_TAG} - SHA512 d82e722746409fccb831cdb85c28403b5e3bb9b60bdc6f80366096998265e009c13868bba9cf187ee10a09df3d6a1426777a1f181d733b61dfe0dffe72b56601 + SHA512 313e66597a101675c9c32032577421ae574229d27defe718a94690446e9c562507209b5912ac48c6dc4d84124b059c9c061e094f44b0b9dbc90ede50d8a2c230 HEAD_REF main ) @@ -55,7 +55,8 @@ if("tools" IN_LIST FEATURES) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/") - if((VCPKG_TARGET_ARCHITECTURE STREQUAL x64) AND (NOT ("openexr" IN_LIST FEATURES))) + if((VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + AND (NOT (("openexr" IN_LIST FEATURES) OR ("xboxone" IN_LIST FEATURES) OR ("xboxseriesx" IN_LIST FEATURES)))) vcpkg_download_distfile( TEXASSEMBLE_EXE diff --git a/ports/directxtex/vcpkg.json b/ports/directxtex/vcpkg.json index 8ef7de78b51fff..3fe8dc03b2fb4b 100644 --- a/ports/directxtex/vcpkg.json +++ b/ports/directxtex/vcpkg.json @@ -1,6 +1,6 @@ { "name": "directxtex", - "version-date": "2024-02-21", + "version-date": "2024-03-06", "description": "DirectXTex texture processing library", "homepage": "https://github.com/Microsoft/DirectXTex", "documentation": "https://github.com/microsoft/DirectXTex/wiki", From 90c358cc0663a666a9a88787bdcfb244f8a05abd Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 7 Mar 2024 12:20:13 -0800 Subject: [PATCH 4/9] Reformat --- ports/directxtex/vcpkg.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/directxtex/vcpkg.json b/ports/directxtex/vcpkg.json index 3fe8dc03b2fb4b..e024967ce80721 100644 --- a/ports/directxtex/vcpkg.json +++ b/ports/directxtex/vcpkg.json @@ -43,10 +43,10 @@ }, "jpeg": { "description": "Add the JPEG auxiliary functions", + "supports": "linux", "dependencies": [ "libjpeg-turbo" - ], - "supports":"linux" + ] }, "openexr": { "description": "Enable OpenEXR support", @@ -56,10 +56,10 @@ }, "png": { "description": "Add the PNG auxiliary functions", + "supports": "linux", "dependencies": [ "libpng" - ], - "supports":"linux" + ] }, "spectre": { "description": "Build Spectre-mitigated library" @@ -70,17 +70,17 @@ }, "xboxone": { "description": "Adds Xbox One specific extensions to the library", + "supports": "windows & x64 & !uwp & !xbox", "dependencies": [ "ms-gdkx" - ], - "supports": "windows & x64 & !uwp & !xbox" + ] }, "xboxseriesx": { "description": "Adds Xbox Series X|S specific extensions to the library", + "supports": "windows & x64 & !uwp & !xbox", "dependencies": [ "ms-gdkx" - ], - "supports": "windows & x64 & !uwp & !xbox" + ] } } } From 2c94a7c49e3cea4dbf3f7e21f15678239fc2c819 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 7 Mar 2024 12:20:27 -0800 Subject: [PATCH 5/9] Update baseline --- versions/baseline.json | 2 +- versions/d-/directxtex.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index a05ce31e19b0aa..71b8c068a0b520 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2225,7 +2225,7 @@ "port-version": 8 }, "directxtex": { - "baseline": "2024-02-21", + "baseline": "2024-03-06", "port-version": 0 }, "directxtk": { diff --git a/versions/d-/directxtex.json b/versions/d-/directxtex.json index 194d8c75d8f6df..7a66235cdc9f20 100644 --- a/versions/d-/directxtex.json +++ b/versions/d-/directxtex.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a861b0333d8ee67db55bca07856ad389f995451c", + "version-date": "2024-03-06", + "port-version": 0 + }, { "git-tree": "a2d746ba7bfd95fe762b07329b0cc6f05aea1808", "version-date": "2024-02-21", From d14502ff93acc8e5fcab059c18cf0acf58c83d6b Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 9 Mar 2024 11:49:30 -0800 Subject: [PATCH 6/9] Rework xbox extensions features per code review feedback --- ports/directxtex/portfile.cmake | 19 ++++++++++++------- ports/directxtex/usage | 7 +++++++ ports/directxtex/vcpkg.json | 11 ++--------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index 7e7b40132331cc..0ea31f6187f85c 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -20,8 +20,6 @@ vcpkg_check_features( png ENABLE_LIBPNG_SUPPORT spectre ENABLE_SPECTRE_MITIGATION tools BUILD_TOOLS - xboxone BUILD_XBOX_EXTS_XBOXONE - xboxseriesx BUILD_XBOX_EXTS_SCARLETT ) set(EXTRA_OPTIONS -DBUILD_SAMPLE=OFF) @@ -31,11 +29,19 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT (VCPKG_TARGET_IS_XBOX OR VCPKG_TARGET_IS_MING endif() if(VCPKG_TARGET_IS_MINGW AND ("dx11" IN_LIST FEATURES)) - message(NOTICE "Building ${PORT} for MinGW requires the HLSL Compiler fxc.exe also be in the PATH. See https://aka.ms/windowssdk.") + message(NOTICE "Building ${PORT} for MinGW requires the HLSL Compiler fxc.exe also be in the PATH. See https://aka.ms/windowssdk.") endif() -if(("xboxone" IN_LIST FEATURES) AND ("xboxseriesx" IN_LIST FEATURES)) - message(FATAL_ERROR "${PORT} can only support one of Xbox One or Xbox Series X|S at a time.") +if("xbox" IN_LIST FEATURES) + if((NOT (DEFINED DIRECTXTEX_XBOX_CONSOLE_TARGET)) OR (DIRECTXTEX_XBOX_CONSOLE_TARGET STREQUAL "scarlett")) + list(APPEND FEATURE_OPTIONS "-DBUILD_XBOX_EXTS_SCARLETT=ON") + message(NOTICE "Building ${PORT} with Xbox Series X|S extensions") + elseif(DIRECTXTEX_XBOX_CONSOLE_TARGET STREQUAL "xboxone") + list(APPEND FEATURE_OPTIONS "-DBUILD_XBOX_EXTS_XBOXONE=ON") + message(NOTICE "Building ${PORT} with Xbox One extensions") + else() + message(FATAL_ERROR "The triplet variable DIRECTXTEX_XBOX_CONSOLE_TARGET should be set to 'xboxone' or 'scarlett'.") + endif() endif() if (VCPKG_HOST_IS_LINUX) @@ -55,8 +61,7 @@ if("tools" IN_LIST FEATURES) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/") - if((VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - AND (NOT (("openexr" IN_LIST FEATURES) OR ("xboxone" IN_LIST FEATURES) OR ("xboxseriesx" IN_LIST FEATURES)))) + if((VCPKG_TARGET_ARCHITECTURE STREQUAL x64) AND (NOT (("openexr" IN_LIST FEATURES) OR ("xbox" IN_LIST FEATURES)))) vcpkg_download_distfile( TEXASSEMBLE_EXE diff --git a/ports/directxtex/usage b/ports/directxtex/usage index 525d1f0c3d9560..6dff14c1b48e52 100644 --- a/ports/directxtex/usage +++ b/ports/directxtex/usage @@ -2,3 +2,10 @@ The DirectXTex package provides CMake targets: find_package(directxtex CONFIG REQUIRED) target_link_libraries(main PRIVATE Microsoft::DirectXTex) + +For the 'xbox' feature, it defaults to targeting Xbox Series X|S. To set it to Xbox One, +create a custom triplet from x64-windows with the addition of the following: + + if (PORT STREQUAL "directxtex") + list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DDIRECTXTEX_XBOX_CONSOLE_TARGET=xboxone") + endif() diff --git a/ports/directxtex/vcpkg.json b/ports/directxtex/vcpkg.json index e024967ce80721..72262524c88940 100644 --- a/ports/directxtex/vcpkg.json +++ b/ports/directxtex/vcpkg.json @@ -68,15 +68,8 @@ "description": "texture command-line tools", "supports": "windows & !uwp & !xbox" }, - "xboxone": { - "description": "Adds Xbox One specific extensions to the library", - "supports": "windows & x64 & !uwp & !xbox", - "dependencies": [ - "ms-gdkx" - ] - }, - "xboxseriesx": { - "description": "Adds Xbox Series X|S specific extensions to the library", + "xbox": { + "description": "Adds Xbox specific extensions to the library", "supports": "windows & x64 & !uwp & !xbox", "dependencies": [ "ms-gdkx" From f10eedbeb8335e1b4f23b4eb8a21810ef7389d92 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 9 Mar 2024 11:49:50 -0800 Subject: [PATCH 7/9] Update baseline --- versions/d-/directxtex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/d-/directxtex.json b/versions/d-/directxtex.json index 7a66235cdc9f20..ea1a2f72bc1810 100644 --- a/versions/d-/directxtex.json +++ b/versions/d-/directxtex.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a861b0333d8ee67db55bca07856ad389f995451c", + "git-tree": "080354c06417df49f9efc155acd0032144fac8e1", "version-date": "2024-03-06", "port-version": 0 }, From 147ff1eebbe131920ef685eb2aeb76c88c06f0af Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 9 Mar 2024 12:04:57 -0800 Subject: [PATCH 8/9] Fix usage for proper triplet variable --- ports/directxtex/usage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/directxtex/usage b/ports/directxtex/usage index 6dff14c1b48e52..6066b0ccb7449f 100644 --- a/ports/directxtex/usage +++ b/ports/directxtex/usage @@ -7,5 +7,5 @@ For the 'xbox' feature, it defaults to targeting Xbox Series X|S. To set it to X create a custom triplet from x64-windows with the addition of the following: if (PORT STREQUAL "directxtex") - list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DDIRECTXTEX_XBOX_CONSOLE_TARGET=xboxone") + set(DIRECTXTEX_XBOX_CONSOLE_TARGET "xboxone") endif() From 187ce540b6e292fde1c3874e3f7f04e32cd26c67 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 9 Mar 2024 12:05:17 -0800 Subject: [PATCH 9/9] Update baseline --- versions/d-/directxtex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/d-/directxtex.json b/versions/d-/directxtex.json index ea1a2f72bc1810..7387c3422e3051 100644 --- a/versions/d-/directxtex.json +++ b/versions/d-/directxtex.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "080354c06417df49f9efc155acd0032144fac8e1", + "git-tree": "73c4c87bb25b805948428dfc2a9674ae0b7078fa", "version-date": "2024-03-06", "port-version": 0 },