Skip to content

Commit

Permalink
Updates for 2.5 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitBM committed Jul 21, 2021
1 parent 292f4e3 commit 5d2b080
Show file tree
Hide file tree
Showing 905 changed files with 90,621 additions and 91,576 deletions.
25 changes: 13 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Build/CMake
Build/Windows
Build/Linux
Core/DX10ASM/Lib/VS2015/Win32/Release*
Core/DX10ASM/Lib/VS2015/x64
Core/DX12/DXC/dxcompiler.dll
Core/LC/Disassembler
Core/Vulkan/tools/Win64/lib/Debug
Core/VulkanOffline
build/CMake
build/windows
build/linux
external/dx10_asm/lib/VS2015/Win32/Release*
external/dx10_asm/lib/VS2015/x64
external/dxc/dxcompiler.dll
external/lc/disassembler
external/vulkan/tools/windows/lib/Debug
external/vulkan_offline
Output
.vscode
Output_Test
*.vs
BuildOutput
Documentation/build
buildOutput
documentation/build
*.csproj.user
obj
bin
Build/__pycache__
build/__pycache__
external/code_sanitizer
30 changes: 19 additions & 11 deletions Build/Prebuild.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@echo off
:: Prebuild.bat --vs 2017 --qt <path_to_qt>
:: prebuild.bat --vs 2017 --qt <path_to_qt>

SETLOCAL

rem Print help message
Expand All @@ -15,7 +16,7 @@ goto :start
echo:
echo This script generates Visual Studio project and solution files for RGA on Windows.
echo:
echo Usage: Prebuild.bat ^[options^]
echo Usage: prebuild.bat ^[options^]
echo:
echo Options:
echo --no-fetch Do not call fetch_dependencies.py script before running cmake. The default is "false".
Expand All @@ -27,12 +28,13 @@ echo --gui-only Build GUI only (do not build RGA command-line tool)
echo --no-vulkan Build RGA without live Vulkan mode support. If this option is used, Vulkan SDK is not required. The default is "false".
echo --vk-include Path to the Vulkan SDK include folder.
echo --vk-lib Path to the Vulkan SDK library folder.
echo --cppcheck Add "-DCMAKE_CXX_CPPCHECK" to cmake command
echo:
echo Examples:
echo Prebuild.bat
echo Prebuild.bat --vs 2017 --qt C:\Qt\5.7\msvc2015_64
echo Prebuild.bat --vs 2015 --cli-only
echo Prebuild.bat --no-vulkan
echo prebuild.bat
echo prebuild.bat --vs 2017 --qt C:\Qt\5.7\msvc2015_64
echo prebuild.bat --vs 2015 --cli-only
echo prebuild.bat --no-vulkan
goto :exit

:start
Expand All @@ -45,6 +47,7 @@ set VS_VER=2017
set QT_ROOT=
set VK_INCLUDE=
set VK_LIB=
set CPPCHECK=

:begin
if [%1]==[] goto :start_cmake
Expand All @@ -60,6 +63,7 @@ if "%1"=="--no-fetch" goto :set_no_fetch
if "%1"=="--automation" goto :set_automation
if "%1"=="--internal" goto :set_internal
if "%1"=="--verbose" goto :set_verbose
if "%1"=="--cppcheck" goto :set_cppcheck
goto :bad_arg

:set_cmake
Expand Down Expand Up @@ -100,7 +104,7 @@ goto :shift_arg

:set_automation
set AUTOMATION=-DGUI_AUTOMATION^=ON
set TEST_DIR_SUFFIX=_Test
set TEST_DIR_SUFFIX=_test
goto :shift_arg

:set_internal
Expand All @@ -112,6 +116,10 @@ goto :shift_arg
@echo on
goto :shift_arg

:set_cppcheck
set CPPCHECK=-DCMAKE_CXX_CPPCHECK="C:\Program Files\Cppcheck\cppcheck.exe"
goto :shift_arg

:shift_2args
rem Shift to the next pair of arguments
shift
Expand All @@ -135,7 +143,7 @@ if "%VS_VER%"=="2015" (
set CMAKE_VS="Visual Studio 16 2019"
set CMAKE_VSARCH=-A x64
) else (
echo Error: Unknows VisualStudio version provided. Aborting...
echo Error: Unknown VisualStudio version provided. Aborting...
exit /b 1
)
)
Expand All @@ -154,8 +162,8 @@ if not [%VK_LIB%]==[] (
)

rem Create an output folder
set VS_FOLDER=VS%VS_VER%
set OUTPUT_FOLDER=%SCRIPT_DIR%Windows\%VS_FOLDER%%TEST_DIR_SUFFIX%
set VS_FOLDER=vs%VS_VER%
set OUTPUT_FOLDER=%SCRIPT_DIR%windows\%VS_FOLDER%%TEST_DIR_SUFFIX%
if not exist %OUTPUT_FOLDER% (
mkdir %OUTPUT_FOLDER%
)
Expand Down Expand Up @@ -185,7 +193,7 @@ rem Invoke cmake with required arguments.
echo:
echo Running cmake to generate a VisualStudio solution...
cd %OUTPUT_FOLDER%
%CMAKE_PATH% -G %CMAKE_VS% %CMAKE_VSARCH% %CMAKE_QT% %CMAKE_VK_INCLUDE% %CMAKE_VK_LIB% %CLI_ONLY% %GUI_ONLY% %NO_VULKAN% %AUTOMATION% %AMD_INTERNAL% ..\..\..
%CMAKE_PATH% -G %CMAKE_VS% %CMAKE_VSARCH% %CMAKE_QT% %CMAKE_VK_INCLUDE% %CMAKE_VK_LIB% %CLI_ONLY% %GUI_ONLY% %NO_VULKAN% %AUTOMATION% %AMD_INTERNAL% %CPPCHECK% ..\..\..
if not %ERRORLEVEL%==0 (
echo "ERROR: cmake failed. Aborting..."
exit /b 1
Expand Down
35 changes: 14 additions & 21 deletions Build/Prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [[ "$1" == "-h" ]] || [[ "$1" == "-help" ]] || [[ "$1" == "--h" ]] || [[ "$1"
echo ""
echo "This script generates Makefiles for RGA on Linux."
echo ""
echo "Usage: Prebuild.sh [options]"
echo "Usage: prebuild.sh [options]"
echo ""
echo "Options:"
echo " --no-fetch Do not call fetch_dependencies.py script before running cmake. The default is \"false\"."
Expand All @@ -18,13 +18,14 @@ if [[ "$1" == "-h" ]] || [[ "$1" == "-help" ]] || [[ "$1" == "--h" ]] || [[ "$1"
echo " --vulkan-sdk Path to the Vulkan SDK. The Vulkan SDK is required to build the RGA vulkan backend."
echo " --vk-include Path to the Vulkan SDK include folder."
echo " --vk-lib Path to the Vulkan SDK library folder."
echo " --cppcheck Add CMAKE_CXX_CPPCHECK preprocess option to cmake."
echo ""
echo "Examples:"
echo " Prebuild.sh"
echo " Prebuild.sh --build release"
echo " Prebuild.sh --qt C:\Qt\5.7\msvc2015_64"
echo " Prebuild.sh --build release --cli-only"
echo " Prebuild.sh --no-vulkan"
echo " prebuild.sh"
echo " prebuild.sh --build release"
echo " prebuild.sh --qt C:\Qt\5.7\msvc2015_64"
echo " prebuild.sh --build release --cli-only"
echo " prebuild.sh --no-vulkan"
echo ""
exit 0
fi
Expand All @@ -42,6 +43,7 @@ CLI_ONLY=
GUI_ONLY=
NO_VULKAN=
TEST_DIR_SUFFIX=""
CMAKE_CPPCHECK=

# Parse command line arguments
args=("$@")
Expand Down Expand Up @@ -78,7 +80,9 @@ for ((i=0; i<$#; i++)); do
NO_UPDATE="TRUE"
elif [ "$arg" == "--automation" ]; then
AUTOMATION="-DGUI_AUTOMATION=ON"
TEST_DIR_SUFFIX="_Test"
TEST_DIR_SUFFIX="_test"
elif [ "$arg" == "--cppcheck" ]; then
CMAKE_CPPCHECK="-DCMAKE_CXX_CPPCHECK=cppcheck"
else
echo "Unexpected argument: $arg. Aborting...";
exit 1
Expand All @@ -99,8 +103,8 @@ fi

CURRENT_DIR=$(pwd)
SCRIPT_DIR=$(dirname "$0")
OUTPUT_LINUX_DIR="$SCRIPT_DIR/Linux"
OUTPUT_DIR="$OUTPUT_LINUX_DIR/Make$TEST_DIR_SUFFIX"
OUTPUT_LINUX_DIR="$SCRIPT_DIR/linux"
OUTPUT_DIR="$OUTPUT_LINUX_DIR/make$TEST_DIR_SUFFIX"

# Create output folder
if [ ! -d "$OUTPUT_LINUX_DIR" ]; then
Expand All @@ -120,23 +124,12 @@ if [ "$NO_UPDATE" != "TRUE" ]; then
echo "Error: encountered an error while fetching dependencies. Aborting..."
exit 1
fi

if [ -e $SCRIPT_DIR/FetchDependencies-Internal.py ]; then
python $SCRIPT_DIR/FetchDependencies-Internal.py

if [ $? -ne 0 ]; then
echo "Error: encountered an error while fetching internal dependencies. Aborting..."
exit 1
fi
fi
fi



# Launch cmake
echo ""
echo "Running cmake to generate Makefiles..."
cd $OUTPUT_DIR
$CMAKE_PATH -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_QT $CMAKE_VK_INC $CMAKE_VK_LIB $CLI_ONLY $GUI_ONLY $NO_VULKAN $AUTOMATION ../../..
$CMAKE_PATH -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_QT $CMAKE_VK_INC $CMAKE_VK_LIB $CLI_ONLY $GUI_ONLY $NO_VULKAN $AUTOMATION $CMAKE_CPPCHECK ../../..
cd $CURRENT_DIR
echo "Done."
32 changes: 18 additions & 14 deletions Build/Util/Linux/copy_post_build_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,45 @@ set -x
X64_DIR=$OUTPUT_DIR/utils

# Get the build version string
export MAJOR=`python3 ../../../Build/Util/get_version.py --major`
export MINOR=`python3 ../../../Build/Util/get_version.py --minor`
export MAJOR=`python3 ../../../build/util/get_version.py --major`
export MINOR=`python3 ../../../build/util/get_version.py --minor`

# Copy the Vulkan offline backend.
if [ ! -d "$X64_DIR" ]; then
mkdir -p $X64_DIR
fi
cp ../../../Core/VulkanOffline/lnx64/* $X64_DIR/
cp ../../../external/vulkan_offline/linux/* $X64_DIR/
chmod +x $X64_DIR/amdspv
chmod +x $X64_DIR/spvgen.so

# Copy the OpenGL backend.
cp ../../../Core/OpenGL/VirtualContext/Release/lnx64/VirtualContext $X64_DIR/
cp ../../../external/opengl/VirtualContext/linux/VirtualContext $X64_DIR/
chmod +x $X64_DIR/VirtualContext

# Copy the LC Compiler.
if [ ! -d "$X64_DIR/LC" ]; then
mkdir -p $X64_DIR/LC
fi
cp -rf ../../../Core/LC/OpenCL/linux $X64_DIR/LC/OpenCL
cp -f ../../../Core/LC/OpenCL/additional-targets $X64_DIR/LC/OpenCL/
mkdir -p $X64_DIR/LC/OpenCL/lib/clang/13.0.0/include
cp -rf ../../../external/lc/opencl/linux/* $X64_DIR/LC/OpenCL
rm -f $X64_DIR/LC/OpenCL/include/opencl-c-base.h
cp -f ../../../external/lc/opencl/additional-targets $X64_DIR/LC/OpenCL/
cp -f ../../../external/lc/opencl/linux/include/opencl-c-base.h $X64_DIR/LC/OpenCL/lib/clang/13.0.0/include/

# Copy the LC disassembler.
if [ ! -d "$X64_DIR/LC/Disassembler" ]; then
mkdir $X64_DIR/LC/Disassembler
fi
cp ../../../Core/LC/Disassembler/Linux/amdgpu-dis $X64_DIR/LC/Disassembler
cp ../../../external/lc/disassembler/linux/amdgpu-dis $X64_DIR/LC/Disassembler

# make sure LC/OpenCL/bin/clang is link to clang-7
# make sure LC/OpenCL/bin/clang is link to clang-13
CURDIR=`pwd`
rm -f $X64_DIR/LC/OpenCL/bin/clang
cd $X64_DIR/LC/OpenCL/bin/
ln -s clang-7 clang
ln -s clang-13 clang
cd $CURDIR
chmod +x $X64_DIR/LC/OpenCL/bin/l* $X64_DIR/LC/OpenCL/bin/clang*

chmod +x $X64_DIR/LC/OpenCL/bin/lld $X64_DIR/LC/OpenCL/bin/clang-13 $X64_DIR/LC/OpenCL/bin/llvm-objdump $X64_DIR/LC/OpenCL/bin/llvm-readobj
chmod +x $X64_DIR/LC/OpenCL/lib/bitcode/*.bc

# Copy the static analysis backend.
Expand All @@ -58,7 +62,7 @@ if [ "$INTERNAL" = true ]; then
rm $OUTPUT_DIR/rga-bin
fi
else
cp ../../../Core/ShaderAnalysis/Linux/x64/shae $X64_DIR/
cp ../../../source/utils/shader_analysis/linux/x64/shae $X64_DIR/
chmod +x $X64_DIR/shae
if [ -e b$X64_DIR/shae-internal ]; then
rm $X64_DIR/shae-internal
Expand All @@ -72,7 +76,7 @@ fi
if [ ! -d "$X64_DIR/Vulkan" ]; then
mkdir -p $X64_DIR/Vulkan
fi
cp ../../../Core/Vulkan/tools/Lnx64/bin/* "$X64_DIR/Vulkan/"
cp ../../../external/vulkan/tools/linux/bin/* "$X64_DIR/Vulkan/"
chmod +x $X64_DIR/Vulkan/*

# Copy the Radeon Tools Download Assistant.
Expand All @@ -88,5 +92,5 @@ cp ../../../License.txt $OUTPUT_DIR/
cp ../../../RGA_NOTICES.txt $OUTPUT_DIR/

# Copy README.md and Release notes
cp ../../../README.md $OUTPUT_DIR/README.md
cp ../../../Documentation/RGA_RELEASE_NOTES.txt $OUTPUT_DIR/
cp ../../../README.md $OUTPUT_DIR/
cp ../../../documentation/RGA_RELEASE_NOTES.txt $OUTPUT_DIR/
6 changes: 3 additions & 3 deletions Build/Util/Linux/copy_post_build_gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ if [ -n "$QT_LIB_DIR" ]; then
cp $QT_LIB_DIR/libQt5Gui.so.5 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libQt5Widgets.so.5 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libQt5XcbQpa.so.5 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libicui18n.so.56 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libicudata.so.56 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libicuuc.so.56 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libicui18n.so.50 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libicudata.so.50 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libicuuc.so.50 $OUTPUT_DIR/lib/
cp $QT_LIB_DIR/libQt5Svg.so.5 $OUTPUT_DIR/lib/
cp $QT_PLUGINS_DIR/imageformats/libqsvg.so $OUTPUT_DIR/lib/platforms/imageformats/
cp $QT_PLUGINS_DIR/platforms/libqxcb.so $OUTPUT_DIR/lib/platforms/
Expand Down
31 changes: 17 additions & 14 deletions Build/Util/Windows/copy_post_build_cli.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

rem Make all variables defined in this script local.
SETLOCAL
SETLOCAL ENABLEEXTENSIONS

set OUTPUT_DIR=%1

Expand All @@ -26,10 +27,10 @@ set INTERNAL=TRUE
:no_internal

REM Get version information to use in package name.
for /F "tokens=* USEBACKQ" %%F in (`python ..\..\..\Build\Util\get_version.py --major`) do (
for /F "tokens=* USEBACKQ" %%F in (`python ..\..\..\build\util\get_version.py --major`) do (
set MAJOR=%%F
)
for /F "tokens=* USEBACKQ" %%F in (`python ..\..\..\Build\Util\get_version.py --minor`) do (
for /F "tokens=* USEBACKQ" %%F in (`python ..\..\..\build\util\get_version.py --minor`) do (
set MINOR=%%F
)

Expand All @@ -40,22 +41,24 @@ IF NOT exist %OUTPUT_DIR%\utils\DX12\ mkdir %OUTPUT_DIR%\utils\DX12\
IF NOT exist %OUTPUT_DIR%\utils\DX12\DXC\ mkdir %OUTPUT_DIR%\utils\DX12\DXC\
IF NOT exist %OUTPUT_DIR%\utils\LC\ mkdir %OUTPUT_DIR%\utils\LC\
IF NOT exist %OUTPUT_DIR%\utils\LC\Disassembler\ mkdir %OUTPUT_DIR%\utils\LC\Disassembler\
IF NOT exist %OUTPUT_DIR%\utils\LC\OpenCL\ mkdir %OUTPUT_DIR%\utils\LC\OpenCL\
IF NOT exist %OUTPUT_DIR%\utils\LC\OpenCL\ mkdir %OUTPUT_DIR%\utils\LC\OpenCL\lib\clang\13.0.0\include\
echo

XCopy /r /d /y "..\..\..\Core\OpenGL\VirtualContext\Release\win64\VirtualContext.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /d /y "..\..\..\Core\ShaderAnalysis\Windows\x64\shae.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /d /y "..\..\..\Core\DX\DX10\bin\RGADX11.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /e /d /y "..\..\..\Core\LC\OpenCL\win64\*" "%OUTPUT_DIR%\utils\LC\OpenCL\"
XCopy /r /d /y "..\..\..\Core\LC\OpenCL\additional-targets" "%OUTPUT_DIR%\utils\LC\OpenCL\"
XCopy /r /d /y "..\..\..\Core\LC\Disassembler\Windows\amdgpu-dis.exe" "%OUTPUT_DIR%\utils\LC\Disassembler\"
XCopy /r /e /d /y "..\..\..\Core\Vulkan\tools\Win64\bin" "%OUTPUT_DIR%\utils\Vulkan\"
XCopy /r /e /d /y "..\..\..\Core\DX12\DXC\*" "%OUTPUT_DIR%\utils\DX12\DXC\"
XCopy /r /d /y "..\..\..\external\opengl\VirtualContext\windows\VirtualContext.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /d /y "..\..\..\source\utils\shader_analysis\windows\x64\shae.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /d /y "..\..\..\source\utils\dx11\bin\dx11_adapter.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /e /d /y "..\..\..\external\lc\opencl\windows\*" "%OUTPUT_DIR%\utils\LC\OpenCL\"
del /f "%OUTPUT_DIR%\utils\LC\OpenCL\include\opencl-c-base.h"
XCopy /r /d /y "..\..\..\external\lc\opencl\windows\include\opencl-c-base.h" "%OUTPUT_DIR%\utils\LC\OpenCL\lib\clang\13.0.0\include\"
XCopy /r /d /y "..\..\..\external\lc\opencl\additional-targets" "%OUTPUT_DIR%\utils\LC\OpenCL\"
XCopy /r /d /y "..\..\..\external\lc\disassembler\windows\amdgpu-dis.exe" "%OUTPUT_DIR%\utils\LC\Disassembler\"
XCopy /r /e /d /y "..\..\..\external\vulkan\tools\windows\bin" "%OUTPUT_DIR%\utils\Vulkan\"
XCopy /r /e /d /y "..\..\..\external\dxc\*" "%OUTPUT_DIR%\utils\DX12\DXC\"
XCopy /r /d /y "..\..\..\License.txt" "%OUTPUT_DIR%\License.txt*"
XCopy /r /d /y "..\..\..\RGA_NOTICES.txt" "%OUTPUT_DIR%\RGA_NOTICES.txt*"
XCopy /r /d /y "..\..\..\README.md" "%OUTPUT_DIR%\README.md*"
XCopy /r /d /y "..\..\..\Documentation\RGA_RELEASE_NOTES.txt" "%OUTPUT_DIR%\RGA_RELEASE_NOTES.txt*"
XCopy /r /d /y "..\..\..\documentation\RGA_RELEASE_NOTES.txt" "%OUTPUT_DIR%\RGA_RELEASE_NOTES.txt*"
XCopy /r /d /y "..\..\..\..\Common\Src\UpdateCheckAPI\rtda\windows\rtda.exe" "%OUTPUT_DIR%\rtda.exe*"

XCopy /r /d /y "..\..\..\Core\VulkanOffline\win64\amdspv.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /d /y "..\..\..\Core\VulkanOffline\win64\spvgen.dll" "%OUTPUT_DIR%\utils\"
XCopy /r /d /y "..\..\..\external\vulkan_offline\windows\amdspv.exe" "%OUTPUT_DIR%\utils\"
XCopy /r /d /y "..\..\..\external\vulkan_offline\windows\spvgen.dll" "%OUTPUT_DIR%\utils\"
1 change: 1 addition & 0 deletions Build/Util/Windows/copy_post_build_gui.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

rem Make all variables defined in this script local.
SETLOCAL
SETLOCAL ENABLEEXTENSIONS

set OUTPUT_DIR=%1
set QT_LIB_DIR=%2
Expand Down
Loading

0 comments on commit 5d2b080

Please sign in to comment.