mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[dawn] Use DXC instead of FXC (#49075)
This commit is contained in:
34
ports/dawn/011-fix-dxc.patch
Normal file
34
ports/dawn/011-fix-dxc.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
diff --git a/src/dawn/native/CMakeLists.txt b/src/dawn/native/CMakeLists.txt
|
||||
index 0c5dc4dbba..9f6a8a0c93 100644
|
||||
--- a/src/dawn/native/CMakeLists.txt
|
||||
+++ b/src/dawn/native/CMakeLists.txt
|
||||
@@ -950,7 +950,6 @@ if (DAWN_ENABLE_D3D12)
|
||||
if (DAWN_USE_BUILT_DXC)
|
||||
target_compile_definitions(dawn_native PRIVATE "DAWN_USE_BUILT_DXC")
|
||||
target_compile_definitions(dawn_native_objects PRIVATE "DAWN_USE_BUILT_DXC")
|
||||
- add_dependencies(dawn_native copy_dxil_dll)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1051,7 +1050,7 @@ endif ()
|
||||
# They happen because dxcompiler is declared a shared library and bundle_libraries
|
||||
# doesn't work well with shared libs
|
||||
if (DAWN_USE_BUILT_DXC)
|
||||
- target_link_libraries(dawn_native PRIVATE dxcompiler)
|
||||
+ target_link_libraries(dawn_native PRIVATE Microsoft::DirectXShaderCompiler)
|
||||
endif()
|
||||
|
||||
# Copy d3dcompiler_47.dll from Windows SDK when not using system component loading
|
||||
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
|
||||
index e9dde19a4a..5d64975fb6 100644
|
||||
--- a/third_party/CMakeLists.txt
|
||||
+++ b/third_party/CMakeLists.txt
|
||||
@@ -361,7 +361,7 @@ function(AddSubdirectoryDXC)
|
||||
endfunction()
|
||||
|
||||
if (DAWN_USE_BUILT_DXC)
|
||||
- AddSubdirectoryDXC()
|
||||
+ find_package(directx-dxc CONFIG REQUIRED GLOBAL)
|
||||
endif()
|
||||
|
||||
if (TINT_BUILD_TINTD)
|
||||
@@ -45,6 +45,7 @@ vcpkg_from_github(
|
||||
008-wrong-dxcapi-include.patch
|
||||
009-fix-tint-install.patch
|
||||
010-fix-glslang.patch
|
||||
011-fix-dxc.patch
|
||||
)
|
||||
|
||||
# vcpkg_find_acquire_program(PYTHON3)
|
||||
@@ -136,6 +137,11 @@ vcpkg_check_features(
|
||||
tint TINT_BUILD_CMD_TOOLS
|
||||
)
|
||||
|
||||
set(DAWN_USE_BUILT_DXC OFF)
|
||||
if(DAWN_ENABLE_D3D11 OR DAWN_ENABLE_D3D12)
|
||||
set(DAWN_USE_BUILT_DXC ON)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
@@ -162,6 +168,7 @@ vcpkg_cmake_configure(
|
||||
-DDAWN_ENABLE_VULKAN=${DAWN_ENABLE_VULKAN}
|
||||
-DDAWN_USE_WAYLAND=${DAWN_USE_WAYLAND}
|
||||
-DDAWN_USE_X11=${DAWN_USE_X11}
|
||||
-DDAWN_USE_BUILT_DXC=${DAWN_USE_BUILT_DXC}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dawn",
|
||||
"version": "20251202.213730",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Dawn is an open-source and cross-platform implementation of the WebGPU standard.",
|
||||
"homepage": "https://dawn.googlesource.com/dawn",
|
||||
"license": "BSD-3-Clause",
|
||||
@@ -56,11 +56,17 @@
|
||||
"features": {
|
||||
"d3d11": {
|
||||
"description": "Direct3D 11 backend support",
|
||||
"supports": "windows"
|
||||
"supports": "windows",
|
||||
"dependencies": [
|
||||
"directx-dxc"
|
||||
]
|
||||
},
|
||||
"d3d12": {
|
||||
"description": "Direct3D 12 backend support",
|
||||
"supports": "windows"
|
||||
"supports": "windows",
|
||||
"dependencies": [
|
||||
"directx-dxc"
|
||||
]
|
||||
},
|
||||
"gl": {
|
||||
"description": "Desktop OpenGL backend support",
|
||||
|
||||
@@ -2358,7 +2358,7 @@
|
||||
},
|
||||
"dawn": {
|
||||
"baseline": "20251202.213730",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"daxa": {
|
||||
"baseline": "3.3.1",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f9d0ccec0c29cc0028a3380a85ed8728dc40bf92",
|
||||
"version": "20251202.213730",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "181678a52e8a7859b9b0f6759bacbb41069a78f9",
|
||||
"version": "20251202.213730",
|
||||
|
||||
Reference in New Issue
Block a user