Skip to content

Commit

Permalink
Vulkan backend is now unconditionally built
Browse files Browse the repository at this point in the history
Fixes CMake Warning
Manually specified variables were not used by the project
SWIFTSHADER_BUILD_VULKAN
  • Loading branch information
pal1000 committed Dec 23, 2021
1 parent ee17f4e commit c468d21
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
git clone --depth=1 https://swiftshader.googlesource.com/SwiftShader swiftshader
git clone https://github.com/pal1000/swiftshader-dist-win.git swiftshader-dist-win
cd swiftshader-dist-win
git checkout 1.0.7
git checkout 1.0.7.1
cd ..
displayName: Get sources
- script: swiftshader-dist-win\buildscript\ci\ci.cmd collectuids
Expand Down
1 change: 0 additions & 1 deletion buildscript/ci/x64-llvm10.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@set buildswiftshader=y
@set srcupd=n
@set ninja=n
@set vk-swiftshader=y
@set subzerojit=n
@set spirvtools=y
@set test-swiftshader=n
Expand Down
1 change: 0 additions & 1 deletion buildscript/ci/x64-subzero.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
@set buildswiftshader=y
@set srcupd=n
@set ninja=n
@set vk-swiftshader=y
@set subzerojit=y
@set spirvtools=y
@set test-swiftshader=n
Expand Down
1 change: 0 additions & 1 deletion buildscript/ci/x86-llvm10.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@set buildswiftshader=y
@set srcupd=n
@set ninja=n
@set vk-swiftshader=y
@set subzerojit=n
@set spirvtools=y
@set test-swiftshader=n
Expand Down
1 change: 0 additions & 1 deletion buildscript/ci/x86-subzero.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@set buildswiftshader=y
@set srcupd=n
@set ninja=n
@set vk-swiftshader=y
@set subzerojit=y
@set spirvtools=y
@set test-swiftshader=n
Expand Down
21 changes: 7 additions & 14 deletions buildscript/modules/swiftshader.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@
@if /I "%debugbuildscript%"=="y" GOTO donebldcfg
@if /I NOT "%debugbuildscript%"=="y" set buildconf=%buildconf% -DSWIFTSHADER_WARNINGS_AS_ERRORS=OFF

@IF %cimode% EQU 0 set "vk-swiftshader="
@IF %cimode% EQU 0 set /p vk-swiftshader=Build SwiftShader Vulkan Driver - default^:yes (y/n)^:
@IF %cimode% EQU 1 echo Build SwiftShader Vulkan Driver - default^:yes (y/n)^:%vk-swiftshader%
@echo.
@IF /I "%vk-swiftshader%"=="n" set buildconf=%buildconf% -DSWIFTSHADER_BUILD_VULKAN=OFF
@IF /I NOT "%vk-swiftshader%"=="n" set buildconf=%buildconf% -DSWIFTSHADER_BUILD_VULKAN=ON

@IF %cimode% EQU 0 set "subzerojit="
@IF %cimode% EQU 0 set /p subzerojit=Use Subzero JIT instead of LLVM - default^:no (y/n)^:
@IF %cimode% EQU 1 echo Use Subzero JIT instead of LLVM - default^:no (y/n)^:%subzerojit%
Expand All @@ -82,11 +75,11 @@
@IF /I NOT "%subzerojit%"=="y" set buildconf=%buildconf% -DREACTOR_BACKEND=LLVM

@IF %cimode% EQU 0 set "spirvtools="
@IF /I NOT "%vk-swiftshader%"=="n" IF %cimode% EQU 0 set /p spirvtools=Include SPIRV-Tools in release - default^:yes (y/n)^:
@IF /I NOT "%vk-swiftshader%"=="n" IF %cimode% EQU 1 echo Include SPIRV-Tools in release - default^:yes (y/n)^:%spirvtools%
@IF /I NOT "%vk-swiftshader%"=="n" echo.
@IF /I NOT "%vk-swiftshader%"=="n" IF /I NOT "%spirvtools%"=="n" set buildconf=%buildconf% -DSKIP_SPIRV_TOOLS_INSTALL=OFF
@IF /I NOT "%vk-swiftshader%"=="n" IF /I "%spirvtools%"=="n" set buildconf=%buildconf% -DSKIP_SPIRV_TOOLS_INSTALL=ON
@IF %cimode% EQU 0 set /p spirvtools=Include SPIRV-Tools in release - default^:yes (y/n)^:
@IF %cimode% EQU 1 echo Include SPIRV-Tools in release - default^:yes (y/n)^:%spirvtools%
@echo.
@IF /I NOT "%spirvtools%"=="n" set buildconf=%buildconf% -DSKIP_SPIRV_TOOLS_INSTALL=OFF
@IF /I "%spirvtools%"=="n" set buildconf=%buildconf% -DSKIP_SPIRV_TOOLS_INSTALL=ON

@IF %cimode% EQU 0 set "test-swiftshader="
@IF %cimode% EQU 0 set /p test-swiftshader=Build SwiftShader tests - default^:no (y/n)^:
Expand Down Expand Up @@ -114,10 +107,10 @@
@rem Generate build perform command
@if /I NOT "%ninja%"=="y" if %abi%==x86 set buildcmd=msbuild -p^:Configuration^=release,Platform^=Win32 swiftshader.sln
@if /I NOT "%ninja%"=="y" if %abi%==x64 set buildcmd=msbuild -p^:Configuration^=release,Platform^=x64 swiftshader.sln
@if /I NOT "%ninja%"=="y" IF /I NOT "%vk-swiftshader%"=="n" IF /I NOT "%spirvtools%"=="n" set buildcmd=%buildcmd:~0,-15%INSTALL.vcxproj
@if /I NOT "%ninja%"=="y" IF /I NOT "%spirvtools%"=="n" set buildcmd=%buildcmd:~0,-15%INSTALL.vcxproj
@if /I NOT "%ninja%"=="y" set buildcmd=%buildcmd% -m^:%throttle% -v^:m
@if /I "%ninja%"=="y" set buildcmd=ninja -j %throttle%
@if /I "%ninja%"=="y" IF /I NOT "%vk-swiftshader%"=="n" IF /I NOT "%spirvtools%"=="n" set buildcmd=%buildcmd% install
@if /I "%ninja%"=="y" IF /I NOT "%spirvtools%"=="n" set buildcmd=%buildcmd% install
@rem Debug code to list ninja targets.
@if /I "%debugbuildscript%"=="y" set buildcmd=ninja -t targets all

Expand Down

0 comments on commit c468d21

Please sign in to comment.