Skip to content

Commit 5dd4ef2

Browse files
committed
Update source code for RRA v1.6 release
1 parent 036ccef commit 5dd4ef2

File tree

69 files changed

+624
-510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+624
-510
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ documentation/build
1111
documentation/source/_build
1212
source/frontend/version.h
1313
Buildinfo.properties
14+
external
1415
.vscode
1516
*.aps
16-

BUILD.md

+34-33
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@ Clone the project radeon_raytracing_analyzer from github.com
77
git clone https://github.com/GPUOpen-Tools/radeon_raytracing_analyzer.git
88
```
99

10+
### Get Qt6
11+
Qt V6.7.0 can be installed using the Qt online installer available from the Qt 6.7.0 release page [here][qt-online].
12+
As an alternative, the Qt 6.7.0 offline installer can be used [here][qt-offline].
13+
Packages for Windows and Linux are provided.
14+
1015
### Building on Windows
1116
As a preliminary step, make sure that you have the following installed on your system:
1217
* CMake 3.11 or above.
1318
* Python 3.7 or above.
14-
* Qt® 5 or above (5.15.2 is the default and recommended).
15-
* Visual Studio® 2015 or above (2019 is the default).
19+
* Qt® 6 or above (6.7.0 is the default and recommended).
20+
* Visual Studio® 2019 or above (2022 is the default).
1621

17-
Qt V5.15.2 can be installed using the Qt online installer available from the Qt 5.15.2 release page [here][qt-online].
18-
As an alternative, the Qt 5.12.6 offline installer can be used [here][qt-offline].
19-
Qt should be installed to the default location (C:\Qt\Qt5.xx.x).
22+
Qt should be installed to the default location (C:\Qt\Qt6.xx.x).
2023
Be sure to select msvc2017/msvc2019 64-bit during Qt installation, depending on the compiler you decide to use.
24+
Select msvc2019 if using Visual Studio 2022.
2125
A reboot is required after Qt is installed.
2226

2327
CMake can be downloaded from [here](https://cmake.org/download/).
@@ -27,17 +31,19 @@ This can be installed once Python is installed, as follows:
2731
* pip install -U sphinx
2832
* pip install sphinx_rtd_theme
2933

30-
Run the python pre_build.py script in the build folder from a command prompt. If no command line options are provided, the defaults will be used (Qt 5.15.2 and Visual Studio 2019)
34+
Run the python pre_build.py script in the build folder from a command prompt. If no command line options are provided, the defaults will be used (Qt 6.7.0 and Visual Studio 2022)
3135

3236
Some useful options of the pre_build.py script:
3337
* --vs <Visual Studio version>: generate the solution files for a specific Visual Studio version. For example, to target Visual Studio 2017, add --vs 2017 to the command.
3438
* --qt <path>: full path to the folder from where you would like the Qt binaries to be retrieved. By default, CMake would try to auto-detect Qt on the system.
3539

36-
Once the script has finished, in the case of Visual Studio 2019, a sub-folder called 'vs2019' will be created containing the necessary build files.
37-
Go into the 'vs2019' folder (build/win/vs2019) and double click on the RRA.sln file and build the 64-bit Debug and Release builds.
40+
Once the script has finished, in the case of Visual Studio 2022, a sub-folder called 'vs2022' will be created containing the necessary build files.
41+
Go into the 'vs2022' folder (build/win/vs2022) and double click on the RRA.sln file and build the 64-bit Debug and Release builds.
3842
The Release and Debug builds of RRA will be available in the build/release and build/debug folders.
3943

4044
### Building on Ubuntu
45+
If Qt is installed from a Qt installer, it should be installed to ~/Qt/Qt6.7.0 (the default of ~/Qt6.7.0 will not work).
46+
4147
Required dependencies can be installed as follows:
4248
```bash
4349
sudo apt-get update
@@ -50,22 +56,28 @@ sudo apt-get install git-lfs
5056
sudo apt-get install python3-sphinx
5157
sudo apt-get install libxcb-xinerama0
5258
sudo apt-get install mesa-common-dev libglu1-mesa-dev
59+
sudo apt install libtbb-dev
5360
```
54-
Qt V5.15.2 can be installed using the Qt online installer available from the Qt 5.15.2 release page [here][qt-online].
55-
As an alternative, the Qt 5.12.6 offline installer can be used [here][qt-offline] (the .run file) and installed
56-
to ~/Qt/Qt5.12.6 (the default of ~/Qt5.12.6 will not work).
5761

58-
XCB libraries are required for Qt v5.15.x (they are not needed for older Qt versions). By default, the CMake configuration will attempt to copy
59-
these files from the Qt lib folder. If needed, the XCB library files (libxcb*) can be obtained from the /lib folder of the Radeon Developer Tool
60-
Suite download found [here](https://gpuopen.com/tools/).
62+
Qt6 can be installed from the package manager using:
63+
```bash
64+
sudo apt-get install qt6-base-dev
65+
sudo apt-get install qt6-base-private-dev
66+
```
67+
As of this writing, this package on Ubuntu 2204 is 6.2.4
68+
69+
XCB libraries are required for Qt v5 and above. These can be installed by using:
70+
```bash
71+
sudo apt-get install libxcb-cursor-dev
72+
```
6173

6274
Run the python pre_build.py in the build folder.
6375
```bash
6476
python3 pre_build.py
6577
```
6678
Or run the pre_build.py script with the -qt option to specify another version of Qt. For example:
6779
```bash
68-
python3 pre_build.py --qt 5.12.6
80+
python3 pre_build.py --qt 6.7.0
6981
```
7082
The pre_build.py script will construct the output folders and build the necessary makefiles.
7183
To build the release build, use:
@@ -81,25 +93,14 @@ Alternatively, building can be done directly from the prebuild script with the -
8193
python3 pre_build.py --build
8294
```
8395

84-
It is possible to use the system-installed version of Qt rather than using a Qt installer described above. At the time of this writing, Ubuntu 22.04 LTS
85-
comes with Qt 5.15.3. To use the system Qt, a fake Qt package is needed. For Qt 5.15.3, this can be made by creating the required directory structure
96+
If Qt is not installed from a Qt installer, a fake Qt package is needed. This can be made by creating the required directory structure
8697
and setting up symbolic links to point to the system Qt lib and include directories:
8798
```bash
88-
mkdir -p ~/Qt/Qt5.15.3/5.15.3/gcc_64
89-
sudo ln -s /usr/lib/x86_64-linux-gnu ~/Qt/Qt5.15.3/5.15.3/gcc_64/lib
90-
sudo ln -s /usr/include/x86_64-linux-gnu/qt5 ~/Qt/Qt5.15.3/5.15.3/gcc_64/include
91-
```
92-
python3 pre_build.py --qt 5.15.3 --qt-system --build
93-
94-
Some additional Qt components may be required, so install those:
95-
96-
```
97-
sudo apt-get install qtbase5-dev
98-
sudo apt-get install qtbase5-dev-tools
99-
sudo apt-get install libqt5svg5-dev
100-
sudo apt-get install libqt5x11extras5
101-
sudo apt-get install qtbase5-private-dev
99+
mkdir -p ~/Qt/Qt6.7.0/6.7.0/gcc_64
100+
sudo ln -s /usr/lib/x86_64-linux-gnu ~/Qt/Qt6.7.0/6.7.0/gcc_64/lib
101+
sudo ln -s /usr/include/x86_64-linux-gnu/qt6 ~/Qt/Qt6.7.0/6.7.0/gcc_64/include
102102
```
103+
python3 pre_build.py --qt 6.7.0 --build
103104

104-
[qt-online]: https://www.qt.io/blog/qt-5.15.2-released
105-
[qt-offline]: https://download.qt.io/archive/qt/5.12/5.12.6/
105+
[qt-online]: https://www.qt.io/blog/qt-6.7-released
106+
[qt-offline]: https://download.qt.io/archive/qt/6.7/6.7.0

CMakeLists.txt

+1-19
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ cmake_minimum_required(VERSION 3.11)
77

88
set(SYSTEM_INFO_BUILD_RDF_INTERFACES ON)
99

10-
1110
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
1211
include(dev_tools)
1312

@@ -16,7 +15,7 @@ project(RRA)
1615

1716
# Define version information
1817
set(RRA_MAJOR_VERSION 1)
19-
set(RRA_MINOR_VERSION 5)
18+
set(RRA_MINOR_VERSION 6)
2019
if (NOT RRA_BUGFIX_NUMBER)
2120
set(RRA_BUGFIX_NUMBER 0)
2221
endif ()
@@ -60,7 +59,6 @@ ELSE(WIN32)
6059
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../debug)
6160
ENDIF(WIN32)
6261

63-
6462
# Add for CentOS compiler warning
6563
add_definitions(-DJSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
6664

@@ -169,20 +167,6 @@ if(SPHINX_EXECUTABLE)
169167
COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
170168
COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR}/documentation/source ${DOCS_OUTPUT_DIR}/help/rra/. -t ${SPHINX_OPTION}
171169
COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOCS_OUTPUT_DIR}/help/rra/.doctrees
172-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/blas_instance_list.html
173-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/blas_list.html
174-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/blas_properties.html
175-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/blas_viewer.html
176-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/capture.html
177-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/geometries_list.html
178-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/overview.html
179-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/ray_dispatches.html
180-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/ray_inspector.html
181-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/settings.html
182-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/tlas_instance_list.html
183-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/tlas_properties.html
184-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/tlas_viewer.html
185-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rra/triangle_list.html
186170
)
187171
else()
188172
message(WARNING "SPHINX_EXECUTABLE (sphinx-build) is not found! Documentation will not be built!")
@@ -197,5 +181,3 @@ add_custom_command(TARGET Documentation POST_BUILD
197181
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/samples
198182
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/samples/landscape.rra ${DOCS_OUTPUT_DIR}/samples/sample_trace.rra
199183
)
200-
201-

build/dependency_map.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@
2222
# each git dependency has a desired directory where it will be cloned - along with a commit to checkout
2323
# The third parameter in the value field is whether to do a shallow clone. Usually, this will be True but if a commit hash is used as a branch, a full clone is needed.
2424
git_mapping = {
25-
github_tools + "QtCommon" : ["../external/qt_common", "v3.12.0", True],
26-
github_tools + "UpdateCheckApi" : ["../external/update_check_api", "v2.1.0", True],
25+
github_tools + "qt_common" : ["../external/qt_common", "v4.0.0", True],
26+
github_tools + "update_check_api" : ["../external/update_check_api", "v2.1.1", True],
2727
github_tools + "system_info_utils" : ["../external/system_info_utils", "88a338a01949f8d8bad60a30b78b65300fd13a9f", False],
2828
github_root + "g-truc/glm" : ["../external/third_party/glm", "0.9.9.8", True],
2929
github_root + "KhronosGroup/Vulkan-Headers" : ["../external/third_party/vulkan", "sdk-1.3.211", True],
3030
github_root + "zeux/volk" : ["../external/third_party/volk", "1.2.190", True],
3131
github_root + "GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator" : ["../external/vma", "d2f0313d20c803f83cc3637ac1facf8e4d6899e4", False],
3232
github_root + "GPUOpen-Drivers/libamdrdf" : ["../external/rdf", "v1.1.2", True],
3333
}
34-

build/pre_build.py

+13-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212

1313
import os
1414
import sys
15+
import stat
1516
import importlib.util
1617
import argparse
1718
import shutil
1819
import subprocess
19-
import distutils.spawn
2020
import platform
2121
import time
2222

@@ -63,9 +63,10 @@
6363
else:
6464
parser.add_argument("--qt-root", default="~/Qt", help="specify the root directory for locating QT on this system (default: ~/Qt) ")
6565
parser.add_argument("--qt-system", action="store_true", help="use the system-installed version of QT")
66-
parser.add_argument("--qt", default="5.15.2", help="specify the version of QT to be used with the script (default: 5.15.2)" )
66+
parser.add_argument("--qt", default="6.7.0", help="specify the version of QT to be used with the script (default: 6.7.0)" )
6767
parser.add_argument("--clean", action="store_true", help="delete any directories created by this script")
6868
parser.add_argument("--no-qt", action="store_true", help="build a headless version (not applicable for all products)")
69+
parser.add_argument("--build-number", default="0", help="specify the build number, primarily to be used by build machines to produce versioned builds")
6970
parser.add_argument("--update", action="store_true", help="Force fetch_dependencies script to update all dependencies")
7071
parser.add_argument("--output", default=output_root, help="specify the output location for generated cmake and build output files (default = OS specific subdirectory of location of pre_build.py script)")
7172
parser.add_argument("--build", action="store_true", help="build all supported configurations on completion of prebuild step")
@@ -114,10 +115,10 @@ def mkdir_print(dir):
114115
# Look for Qt path in specified Qt root directory
115116
# Example:
116117
# --qt-root=C:\\Qt
117-
# --qt=5.15.2
118-
# Look first for C:\\Qt\\Qt5.15.2\\5.15.2
118+
# --qt=6.7.0
119+
# Look first for C:\\Qt\\Qt6.7.0\\6.7.0
119120
# (if not found..)
120-
# Look next for C:\\Qt\\5.15.2
121+
# Look next for C:\\Qt\\6.7.0
121122
#
122123
# If neither of those can be found AND we are using the default
123124
# qt-root dir (i.e. the user did not specify --qt-root), then also
@@ -262,6 +263,12 @@ def generate_config(config):
262263
if args.qt_system:
263264
cmake_args.extend(["-DQT_SYSTEM:BOOL=TRUE"])
264265

266+
# Add execute file permission to dxc
267+
dxc_file = os.path.join(script_root, "../external/third_party/dxc/bin/dxc")
268+
if os.path.exists(dxc_file):
269+
os.chmod(dxc_file, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
270+
271+
cmake_args.extend(["-DRRA_BUILD_NUMBER=" + str(args.build_number)])
265272
cmake_args.extend(["-DQT_VERSION=" + str(args.qt)])
266273

267274
cmake_args.extend(["-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=" + release_output_dir])
@@ -326,7 +333,7 @@ def generate_config(config):
326333
with open(vscode_json_file, 'w') as f:
327334
json.dump(json_data, f, indent=4)
328335

329-
if not distutils.spawn.find_executable(cmake_args[0]):
336+
if not shutil.which(cmake_args[0]):
330337
log_error_and_exit("cmake not found")
331338

332339
p = subprocess.Popen(cmake_args, cwd=cmake_dir, stderr=subprocess.STDOUT)

cmake/devtools_qt_helper.cmake

+12-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
cmake_minimum_required(VERSION 3.10)
77

8-
98
# Attempt to automatically find Qt on the local machine
109
if (UNIX AND NOT APPLE)
1110
find_package(Qt6 QUIET COMPONENTS Core Widgets Network Gui Svg Test GuiPrivate CorePrivate)
@@ -32,6 +31,16 @@ if (NOT Qt6_DIR)
3231
endif ()
3332
endif ()
3433

34+
# linuxdeployqt
35+
if (UNIX AND NOT APPLE)
36+
37+
find_program(LINUXDEPLOYQT "linuxdeployqt" HINTS "${PROJECT_SOURCE_DIR}/external/linuxdeployqt")
38+
if (LINUXDEPLOYQT)
39+
message(STATUS "Found linuxdeployqt: ${LINUXDEPLOYQT}")
40+
else ()
41+
message(ERROR "linuxdeployqt not found but is required for build")
42+
endif ()
43+
endif ()
3544

3645
if (Qt5_DIR OR Qt6_DIR)
3746
#######################################################################################################################
@@ -57,7 +66,7 @@ if (Qt5_DIR OR Qt6_DIR)
5766
if (WIN32)
5867
if (Qt6_DIR)
5968
set(DEPLOYQT_POST_BUILD_COMMAND
60-
${DEPLOYQT_EXECUTABLE} $<TARGET_FILE:${target}> -verbose 0 --no-compiler-runtime --no-translations
69+
${DEPLOYQT_EXECUTABLE} $<TARGET_FILE:${target}> -verbose 0 --no-compiler-runtime --no-translations --no-system-d3d-compiler --no-system-dxc-compiler --no-opengl-sw --no-network
6170
WORKING_DIRECTORY ${output_directory})
6271
else ()
6372
set(DEPLOYQT_POST_BUILD_COMMAND
@@ -67,7 +76,7 @@ if (Qt5_DIR OR Qt6_DIR)
6776
elseif (UNIX AND NOT APPLE)
6877
set(DEPLOYQT_POST_BUILD_COMMAND
6978
${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${EXTERNAL_DIR}/libtraceevent/lib:${EXTERNAL_DIR}/libtracefs/lib:${_qt_bin_dir}/../lib
70-
${DEPLOYQT_EXECUTABLE} $<TARGET_FILE:${target}> -qmake=${QT_QMAKE_EXECUTABLE} -verbose=0 -unsupported-allow-new-glibc
79+
${DEPLOYQT_EXECUTABLE} $<TARGET_FILE:${target}> -qmake=${QT_QMAKE_EXECUTABLE} -verbose=0 -unsupported-allow-new-glibc -no-translations
7180
WORKING_DIRECTORY ${output_directory})
7281
# If Qt5, install X11Extras
7382
if (Qt5_DIR)

source/backend/asic_info.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "rdf/rdf/inc/amdrdf.h"
1111

12-
static_assert(sizeof(rra::AsicInfo::TraceChunkAsicInfo) == 576, "AsicInfo does not have the expected byte size.");
12+
static_assert(sizeof(rra::AsicInfo::TraceChunkAsicInfo) == 608, "AsicInfo does not have the expected byte size.");
1313

1414
namespace rra
1515
{
@@ -59,6 +59,11 @@ namespace rra
5959
chunk_file.ReadChunkDataToBuffer(identifier, chunk_index, &chunk_data_.shader_core_clock_frequency);
6060
chunk_data_.pci_id = 0;
6161
}
62+
else if (chunk_version == 2)
63+
{
64+
memset(&chunk_data_, 0, sizeof(TraceChunkAsicInfo));
65+
chunk_file.ReadChunkDataToBuffer(identifier, chunk_index, &chunk_data_);
66+
}
6267
else
6368
{
6469
chunk_file.ReadChunkDataToBuffer(identifier, chunk_index, &chunk_data_);

0 commit comments

Comments
 (0)