Skip to content

Commit

Permalink
update to build DXC-based shader compilers to arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
NicSavichev committed Jan 21, 2025
1 parent 88f0aff commit 7b765ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
5 changes: 3 additions & 2 deletions make_devtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,10 @@ def install_3ds_Max_SDK(ver, url):
zip_file.extractall(dest_dir+'/.packages/DirectXShaderCompiler-1.7.2207/_win')

pathlib.Path(dxc_dest_folder+'/include').mkdir(parents=True, exist_ok=True)
pathlib.Path(dxc_dest_folder+'/lib/win64').mkdir(parents=True, exist_ok=True)
pathlib.Path(dxc_dest_folder+'/lib').mkdir(parents=True, exist_ok=True)
make_directory_symlink(dest_dir+'/.packages/DirectXShaderCompiler-1.7.2207/include/dxc', dxc_dest_folder+'/include/dxc')
shutil.copyfile(dest_dir+'/.packages/DirectXShaderCompiler-1.7.2207/_win/bin/x64/dxcompiler.dll', dxc_dest_folder+'/lib/win64/dxcompiler.dll')
make_directory_symlink(dest_dir+'/.packages/DirectXShaderCompiler-1.7.2207/_win/bin/x64', dxc_dest_folder+'/lib/win64')
make_directory_symlink(dest_dir+'/.packages/DirectXShaderCompiler-1.7.2207/_win/bin/arm64', dxc_dest_folder+'/lib/win-arm64')
shutil.copyfile(dest_dir+'/.packages/DirectXShaderCompiler-1.7.2207/LICENSE.TXT', dxc_dest_folder+'/LICENSE.TXT')
print('+++ DXC Jul 2022 installed at {0}'.format(dxc_dest_folder))

Expand Down
16 changes: 16 additions & 0 deletions prog/tools/ShaderCompiler2/jamfile-dx12
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,20 @@ for l in $(scarlett_dlls) {
}
}

if $(Platform) = windows {
local dxc_dir = $(_DEVTOOL)/DXC-$(DXC_VERSION)/lib/$(LegacyPlatformSuffix) ;
local dst_dir = $(OutDir)/dxc-dx12/pc ;
if ! [ GLOB $(dxc_dir) : * ] { exit FATAL\: \"$(dxc_dir)\" not found! Please, update DEVTOOLS ; }
for library in dxcompiler.dll dxil.dll {
if ! [ GLOB $(dst_dir) : $(library) ] {
local src = $(dxc_dir)/$(library) ;
local dst = $(dst_dir)/$(library) ;
MakeDirectory $(dst) : $(dst:D) ;
Depends $(dst) : $(src) ;
copy_file $(dst) : $(src) ;
Depends all : $(dst) ;
}
}
}

include $(Root)/prog/_jBuild/build.jam ;

0 comments on commit 7b765ea

Please sign in to comment.