Skip to content

Commit

Permalink
Updates for 2.3 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitBM committed Oct 11, 2019
1 parent a13f242 commit f2cb7cf
Show file tree
Hide file tree
Showing 149 changed files with 4,221 additions and 2,012 deletions.
25 changes: 12 additions & 13 deletions Build/FetchDependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# If "latest" is specified, the latest commit will be checked out.
# Otherwise, the repos will be updated to the commit specified in the "gitMapping" table.
# If the required commit in the "gitMapping" is None, the repo will be updated to the latest commit.

import os
import subprocess
import sys
Expand All @@ -28,12 +28,10 @@
# Assume workspace root is two folders up from scriptRoot (RGA/Build)
workspace = os.path.abspath(os.path.normpath(os.path.join(scriptRoot, "../..")))

# When running this script on Windows (and not under cygwin), we need to set the Shell=True argument to Popen and similar calls
# When running this script on Windows (and not under cygwin), we need to set the shell=True argument to Popen and similar calls
# Without this option, Jenkins builds fail to find the correct version of git
SHELLARG = False
# The environment variable SHELL is only set for Cygwin or Linux
SHELLTYPE = os.environ.get('SHELL')
if ( SHELLTYPE == None ):
if ( sys.platform.startswith("win32")):
# running on windows under default shell
SHELLARG = True

Expand Down Expand Up @@ -91,15 +89,14 @@
"common-src-CElf.git" : ["Common/Src/CElf", "master"],
"common-src-DeviceInfo.git" : ["Common/Src/DeviceInfo", "master"],
"common-src-DynamicLibraryModule.git" : ["Common/Src/DynamicLibraryModule", "master"],
"common-src-ShaderUtils.git" : ["Common/Src/ShaderUtils", "master"],
"common-src-TSingleton.git" : ["Common/Src/TSingleton", "master"],
"common-src-VersionInfo.git" : ["Common/Src/VersionInfo", "master"],
"common-src-Vsprops.git" : ["Common/Src/Vsprops", "master"],
"common-src-Miniz.git" : ["Common/Src/Miniz", "master"],
"common-src-Misc.git" : ["Common/Src/Misc", "master"],
"UpdateCheckAPI.git" : ["Common/Src/UpdateCheckAPI", "1.0"],
"UpdateCheckAPI.git" : ["Common/Src/UpdateCheckAPI", "master"],
# QtCommon.
"QtCommon" : ["QtCommon", "rga-2.1"]
"QtCommon" : ["QtCommon", "rga-2.3"]
}

# The following section contains OS-specific dependencies that are downloaded and placed in the specified target directory.
Expand Down Expand Up @@ -132,14 +129,16 @@
os.chdir(workspace)
if os.path.isdir(path):
# directory exists - get latest from git using pull
print("Directory " + path + " exists. \n\tUsing 'git pull' to get latest from " + source)
print("Directory " + path + " exists. \n\tUsing 'git fetch' to get latest from " + source)
sys.stdout.flush()
try:
subprocess.check_call(["git", "-C", path, "pull", "origin"], shell=SHELLARG)
subprocess.check_call(["git", "-C", path, "fetch", "origin"], shell=SHELLARG)
except subprocess.CalledProcessError as e:
print ("'git fetch' failed with return code: %d\n" % e.returncode)
try:
subprocess.check_call(["git", "-C", path, "checkout", reqdCommit], shell=SHELLARG)
except subprocess.CalledProcessError as e:
print ("'git pull' failed with returncode: %d\n" % e.returncode)
sys.exit(1)
print ("'git checkout' failed with return code: %d\n" % e.returncode)
sys.stderr.flush()
sys.stdout.flush()
else:
Expand All @@ -150,7 +149,7 @@
subprocess.check_call(["git", "clone", source, path], shell=SHELLARG)
subprocess.check_call(["git", "-C", path, "checkout", reqdCommit], shell=SHELLARG)
except subprocess.CalledProcessError as e:
print ("'git clone' failed with returncode: %d\n" % e.returncode)
print ("'git clone' failed with return code: %d\n" % e.returncode)
sys.exit(1)
sys.stderr.flush()
sys.stdout.flush()
Expand Down
30 changes: 24 additions & 6 deletions Build/Util/Linux/copy_post_build_cli.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

#!bash
OUTPUT_DIR=$1

if [ "$2" = "-internal" ]; then
INTERNAL=true
fi

set -x

# Copy the Vulkan offline backend.
cp ../../../Core/VulkanOffline/lnx64/* $OUTPUT_DIR/
chmod +x $OUTPUT_DIR/amdspv
Expand All @@ -14,12 +16,27 @@ chmod +x $OUTPUT_DIR/spvgen.so
cp ../../../Core/OpenGL/VirtualContext/Release/lnx64/VirtualContext $OUTPUT_DIR/
chmod +x $OUTPUT_DIR/VirtualContext

# Copy the ROCm Compiler.
if [ ! -d "$OUTPUT_DIR/ROCm" ]; then
mkdir $OUTPUT_DIR/ROCm
# Copy the LC Compiler.
if [ ! -d "$OUTPUT_DIR/LC" ]; then
mkdir $OUTPUT_DIR/LC
fi
cp -rf ../../../Core/ROCm/OpenCL/linux $OUTPUT_DIR/ROCm/OpenCL
cp -f ../../../Core/ROCm/OpenCL/additional-targets $OUTPUT_DIR/ROCm/OpenCL/
cp -rf ../../../Core/LC/OpenCL/linux $OUTPUT_DIR/LC/OpenCL
cp -f ../../../Core/LC/OpenCL/additional-targets $OUTPUT_DIR/LC/OpenCL/

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

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

# Copy the static analysis backend.
if [ "$INTERNAL" = true ]; then
Expand Down Expand Up @@ -47,6 +64,7 @@ if [ ! -d "$OUTPUT_DIR/Vulkan" ]; then
mkdir $OUTPUT_DIR/Vulkan
fi
cp ../../../Core/Vulkan/tools/Lnx64/bin/* "$OUTPUT_DIR/Vulkan/"
chmod +x $OUTPUT_DIR/Vulkan/*

# Copy the AMDToolsDownloader.
cp ../../../../Commmon/Src/UpdateCheckAPI/AMDToolsDownloader/Linux/AMDToolsDownloader $OUTPUT_DIR/
Expand Down
1 change: 1 addition & 0 deletions Build/Util/Linux/copy_post_build_gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ chmod +x $OUTPUT_DIR/RadeonGPUAnalyzerGUI
if [ "$AUTOMATION" = "-automation" ]; then
cp -rf ../../../../RGA-Internal/Tests/data $OUTPUT_DIR/
cp ../../../../RGA-Internal/Tests-GUI/run.py $OUTPUT_DIR/
chmod +x $OUTPUT_DIR/run.py
fi

# Copy the AMDToolsDownloader.
Expand Down
138 changes: 69 additions & 69 deletions Build/Util/Windows/WindowsBuild.bat
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
REM RGA
REM "RGA_ROOT" is passed in to this build script from Jenkins
REM "SOLUTION_PATH" is passed in to this build script from Jenkins
REM "ARCH" is passed in to this build script from Jenkins (must be "x64" or "x86")
REM "ARCHIVE_NAME" is passed in to this build script from Jenkins
REM
REM Usage:
REM cd RGA_ROOT\RGA\Build
REM call WindowsBuild.bat RGA_ROOT <solution-path> <x86|x64> <archive-name>
REM
@echo on

set RGA_ROOT=%1
set SOLUTION_PATH=%2
set ARCH=%3
set ARCHIVE_NAME=%4
echo RGA_ROOT %RGA_ROOT% %SOLUTION_PATH% %ARCH% %ARCHIVE_NAME%

set CONFIG=Release
set RGAPATH="%RGA_ROOT%\RGA"
set BUILDPATH=%RGAPATH%\BuildOutput
set OUTPUT_PATH=%RGAPATH%\output

REM initialize zip file target for CodeXL bits
echo "Initialize folders for zip package"
set ZIPDIRRGA=%BUILDPATH%
MKDIR %ZIPDIRRGA%
MKDIR %ZIPDIRRGA%\bin

REM build release
call "%VS140COMNTOOLS%\vsvars32.bat"
cd %RGAPATH%\Build
echo "Clean the build"
call JenkinsMSBuildClean.bat %SOLUTION_PATH% %ARCH% %CONFIG%
if not %ERRORLEVEL%==0 (
echo CLEAN FAILED!
exit 1
)
echo "Build Release"
call JenkinsMSBuildRelease.bat %SOLUTION_PATH% %ARCH%
if not %ERRORLEVEL%==0 (
echo BUILD FAILED!
exit 1
)
echo "Build Complete"

cd %WORKSPACE%
REM Copy release binaries to the zip file dir
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\rga.exe" "%ZIPDIRRGA%\bin\rga.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\VirtualContext.exe" "%ZIPDIRRGA%\bin\%ARCH%\VirtualContext.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\amdspv.exe" "%ZIPDIRRGA%\bin\%ARCH%\amdspv.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\spvgen.dll" "%ZIPDIRRGA%\bin\%ARCH%\spvgen.dll*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\shae.exe" "%ZIPDIRRGA%\bin\%ARCH%\shae.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\RGADX11.exe" "%ZIPDIRRGA%\bin\%ARCH%\RGADX11.exe*"
XCopy /e "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\ROCm" "%ZIPDIRRGA%\bin\%ARCH%\ROCm\"
XCopy /i /e "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\Documentation" "%ZIPDIRRGA%\bin\Documentation"

REM Copy the system d3d compiler
XCopy "C:\Program Files (x86)\Windows Kits\10\bin\%ARCH%\d3dcompiler_47.dll" "%ZIPDIRRGA%\bin\%ARCH%\d3dcompiler_47.dll*"

REM Copy the VC++ Redistributable package binaries
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\concrt140.dll" "%ZIPDIRRGA%\bin\concrt140.dll*"
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\msvcp140.dll" "%ZIPDIRRGA%\bin\msvcp140.dll*"
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\vccorlib140.dll" "%ZIPDIRRGA%\bin\vccorlib140.dll*"
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\vcruntime140.dll" "%ZIPDIRRGA%\bin\vcruntime140.dll*"

REM create zip package
cd %ZIPDIRRGA%
powershell compress-archive -DestinationPath %BUILDPATH%\%ARCHIVE_NAME%.%BUILD_NUMBER%.zip -Path .\bin
REM RGA
REM "RGA_ROOT" is passed in to this build script from Jenkins
REM "SOLUTION_PATH" is passed in to this build script from Jenkins
REM "ARCH" is passed in to this build script from Jenkins (must be "x64" or "x86")
REM "ARCHIVE_NAME" is passed in to this build script from Jenkins
REM
REM Usage:
REM cd RGA_ROOT\RGA\Build
REM call WindowsBuild.bat RGA_ROOT <solution-path> <x86|x64> <archive-name>
REM
@echo on

set RGA_ROOT=%1
set SOLUTION_PATH=%2
set ARCH=%3
set ARCHIVE_NAME=%4
echo RGA_ROOT %RGA_ROOT% %SOLUTION_PATH% %ARCH% %ARCHIVE_NAME%

set CONFIG=Release
set RGAPATH="%RGA_ROOT%\RGA"
set BUILDPATH=%RGAPATH%\BuildOutput
set OUTPUT_PATH=%RGAPATH%\output

REM initialize zip file target for CodeXL bits
echo "Initialize folders for zip package"
set ZIPDIRRGA=%BUILDPATH%
MKDIR %ZIPDIRRGA%
MKDIR %ZIPDIRRGA%\bin

REM build release
call "%VS140COMNTOOLS%\vsvars32.bat"
cd %RGAPATH%\Build
echo "Clean the build"
call JenkinsMSBuildClean.bat %SOLUTION_PATH% %ARCH% %CONFIG%
if not %ERRORLEVEL%==0 (
echo CLEAN FAILED!
exit 1
)
echo "Build Release"
call JenkinsMSBuildRelease.bat %SOLUTION_PATH% %ARCH%
if not %ERRORLEVEL%==0 (
echo BUILD FAILED!
exit 1
)
echo "Build Complete"

cd %WORKSPACE%
REM Copy release binaries to the zip file dir
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\rga.exe" "%ZIPDIRRGA%\bin\rga.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\VirtualContext.exe" "%ZIPDIRRGA%\bin\%ARCH%\VirtualContext.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\amdspv.exe" "%ZIPDIRRGA%\bin\%ARCH%\amdspv.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\spvgen.dll" "%ZIPDIRRGA%\bin\%ARCH%\spvgen.dll*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\shae.exe" "%ZIPDIRRGA%\bin\%ARCH%\shae.exe*"
XCopy "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\RGADX11.exe" "%ZIPDIRRGA%\bin\%ARCH%\RGADX11.exe*"
XCopy /e "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\%ARCH%\LC" "%ZIPDIRRGA%\bin\%ARCH%\LC\"
XCopy /i /e "%OUTPUT_PATH%\%ARCH%\bin\%CONFIG%\Documentation" "%ZIPDIRRGA%\bin\Documentation"

REM Copy the system d3d compiler
XCopy "C:\Program Files (x86)\Windows Kits\10\bin\%ARCH%\d3dcompiler_47.dll" "%ZIPDIRRGA%\bin\%ARCH%\d3dcompiler_47.dll*"

REM Copy the VC++ Redistributable package binaries
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\concrt140.dll" "%ZIPDIRRGA%\bin\concrt140.dll*"
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\msvcp140.dll" "%ZIPDIRRGA%\bin\msvcp140.dll*"
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\vccorlib140.dll" "%ZIPDIRRGA%\bin\vccorlib140.dll*"
XCopy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\%ARCH%\Microsoft.VC140.CRT\vcruntime140.dll" "%ZIPDIRRGA%\bin\vcruntime140.dll*"

REM create zip package
cd %ZIPDIRRGA%
powershell compress-archive -DestinationPath %BUILDPATH%\%ARCHIVE_NAME%.%BUILD_NUMBER%.zip -Path .\bin
96 changes: 49 additions & 47 deletions Build/Util/Windows/copy_post_build_cli.bat
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
@echo off

rem Make all variables defined in this script local.
SETLOCAL

set OUTPUT_DIR=%1

rem Parse arguments
rem if (%2 == "-debug" || %3 == "-debug)
IF "%2"=="-debug" goto :set_debug
IF "%3"=="-debug" goto :set_debug
goto :no_debug

:set_debug
set DEBUG=TRUE

:no_debug

IF "%2"=="-internal" goto :set_internal
IF "%3"=="-internal" goto :set_internal
goto :no_internal

:set_internal
set INTERNAL=TRUE

:no_internal

rem Create the output folders:
IF NOT exist %OUTPUT_DIR%\ mkdir %OUTPUT_DIR%\
IF NOT exist %OUTPUT_DIR%\x64\ mkdir %OUTPUT_DIR%\x64\
IF NOT exist %OUTPUT_DIR%\x64\DX12\ mkdir %OUTPUT_DIR%\x64\DX12\
IF NOT exist %OUTPUT_DIR%\x64\DX12\DXC\ mkdir %OUTPUT_DIR%/x64/DX12/DXC
echo

XCopy /r /d /y "..\..\..\Core\OpenGL\VirtualContext\Release\win64\VirtualContext.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /d /y "..\..\..\Core\ShaderAnalysis\Windows\x86\shae.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /d /y "..\..\..\Core\DX\DX10\bin\RGADX11.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /e /d /y "..\..\..\Core\ROCm\OpenCL\win64" "%OUTPUT_DIR%\x64\ROCm\OpenCL\"
XCopy /r /d /y "..\..\..\Core\ROCm\OpenCL\additional-targets" "%OUTPUT_DIR%\x64\ROCm\OpenCL\"
XCopy /r /e /d /y "..\..\..\Core\Vulkan\tools\Win64\bin" "%OUTPUT_DIR%\x64\Vulkan\bin\"
XCopy /r /e /d /y "..\..\..\Core\DX12\DXC\*" "%OUTPUT_DIR%\x64\DX12\DXC\"
XCopy /r /d /y "..\..\..\License.txt" "%OUTPUT_DIR%\"
XCopy /r /d /y "..\..\..\RGAThirdPartyLicenses.txt" "%OUTPUT_DIR%\"
XCopy /r /d /y "..\..\..\..\Common\Src\UpdateCheckAPI\AMDToolsDownloader\Windows\AMDToolsDownloader.exe" "%OUTPUT_DIR%\"

XCopy /r /d /y "..\..\..\Core\VulkanOffline\win64\amdspv.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /d /y "..\..\..\Core\VulkanOffline\win64\spvgen.dll" "%OUTPUT_DIR%\x64\"
@echo off

rem Make all variables defined in this script local.
SETLOCAL

set OUTPUT_DIR=%1

rem Parse arguments
rem if (%2 == "-debug" || %3 == "-debug)
IF "%2"=="-debug" goto :set_debug
IF "%3"=="-debug" goto :set_debug
goto :no_debug

:set_debug
set DEBUG=TRUE

:no_debug

IF "%2"=="-internal" goto :set_internal
IF "%3"=="-internal" goto :set_internal
goto :no_internal

:set_internal
set INTERNAL=TRUE

:no_internal

rem Create the output folders:
IF NOT exist %OUTPUT_DIR%\ mkdir %OUTPUT_DIR%\
IF NOT exist %OUTPUT_DIR%\x64\ mkdir %OUTPUT_DIR%\x64\
IF NOT exist %OUTPUT_DIR%\x64\DX12\ mkdir %OUTPUT_DIR%\x64\DX12\
IF NOT exist %OUTPUT_DIR%\x64\DX12\DXC\ mkdir %OUTPUT_DIR%\x64\DX12\DXC
IF NOT exist %OUTPUT_DIR%\x64\LC\Disassembler\ mkdir %OUTPUT_DIR%\LC\Disassembler\
echo

XCopy /r /d /y "..\..\..\Core\OpenGL\VirtualContext\Release\win64\VirtualContext.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /d /y "..\..\..\Core\ShaderAnalysis\Windows\x64\shae.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /d /y "..\..\..\Core\DX\DX10\bin\RGADX11.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /e /d /y "..\..\..\Core\LC\OpenCL\win64" "%OUTPUT_DIR%\x64\LC\OpenCL\"
XCopy /r /d /y "..\..\..\Core\LC\OpenCL\additional-targets" "%OUTPUT_DIR%\x64\LC\OpenCL\"
XCopy /r /d /y "..\..\..\Core\LC\Disassembler\Windows\amdgpu-dis.exe" "%OUTPUT_DIR%\x64\LC\Disassembler\"
XCopy /r /e /d /y "..\..\..\Core\Vulkan\tools\Win64\bin" "%OUTPUT_DIR%\x64\Vulkan\bin\"
XCopy /r /e /d /y "..\..\..\Core\DX12\DXC\*" "%OUTPUT_DIR%\x64\DX12\DXC\"
XCopy /r /d /y "..\..\..\License.txt" "%OUTPUT_DIR%\"
XCopy /r /d /y "..\..\..\RGAThirdPartyLicenses.txt" "%OUTPUT_DIR%\"
XCopy /r /d /y "..\..\..\..\Common\Src\UpdateCheckAPI\AMDToolsDownloader\Windows\AMDToolsDownloader.exe" "%OUTPUT_DIR%\"

XCopy /r /d /y "..\..\..\Core\VulkanOffline\win64\amdspv.exe" "%OUTPUT_DIR%\x64\"
XCopy /r /d /y "..\..\..\Core\VulkanOffline\win64\spvgen.dll" "%OUTPUT_DIR%\x64\"
3 changes: 3 additions & 0 deletions Core/DX12/Backend/Include/rgDx12DataTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ namespace rga
// Full path to the serialized root signature file.
std::string rsSerialized;

// Full path to the file that describes the pipeline state.
std::string rsPso;

// The ID of the GPU for which to compile the pipeline. If not specified,
// the pipeline would be compiled for the physically installed GPU.
int targetGpu = -1;
Expand Down
Loading

0 comments on commit f2cb7cf

Please sign in to comment.