Skip to content

Commit e2abdfd

Browse files
committed
Update source code for RRA v1.3 release
1 parent 9a745b7 commit e2abdfd

285 files changed

Lines changed: 22025 additions & 1104 deletions

File tree

Some content is hidden

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

.clang-format

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
UseTab: Never
4+
ColumnLimit: 160
5+
Language: Cpp
6+
AccessModifierOffset: -4
7+
BreakBeforeBraces: Custom
8+
BraceWrapping:
9+
10+
AfterCaseLabel: true
11+
AfterClass: true
12+
AfterControlStatement: true
13+
AfterEnum: true
14+
AfterFunction: true
15+
AfterNamespace: true
16+
AfterObjCDeclaration: true
17+
AfterStruct: true
18+
AfterUnion: true
19+
AfterExternBlock: false
20+
BeforeCatch: true
21+
BeforeElse: true
22+
IndentBraces: false
23+
SplitEmptyFunction: true
24+
SplitEmptyRecord: true
25+
SplitEmptyNamespace: true
26+
ConstructorInitializerAllOnOneLineOrOnePerLine : false
27+
BreakConstructorInitializers: BeforeComma
28+
DerivePointerAlignment: false
29+
IndentCaseLabels: false
30+
NamespaceIndentation: All
31+
AlignConsecutiveAssignments: true
32+
AlignConsecutiveDeclarations: true
33+
AlignEscapedNewlines: Left
34+
AlignTrailingComments: true
35+
AlignOperands: true
36+
AllowShortFunctionsOnASingleLine: false
37+
AllowShortIfStatementsOnASingleLine: false
38+
AllowShortLoopsOnASingleLine: false
39+
AllowShortBlocksOnASingleLine: false
40+
ReflowComments: false
41+
SortIncludes: false
42+
SortUsingDeclarations: false
43+
BinPackArguments: false
44+
BinPackParameters: false
45+
ExperimentalAutoDetectBinPacking: false
46+
AllowAllParametersOfDeclarationOnNextLine: false

.clang-tidy

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Checks: bugprone-*,clang-analyzer-*,clang-diagnostic-*,google-*,misc-*,modernize-*,-modernize-use-trailing-return-type,-modernize-concat-nested-namespaces,performance-*,readability-*,-modernize-use-auto
2+
WarningsAsErrors: bugprone-*,clang-analyzer-*,clang-diagnostic-*,google-*,misc-*,modernize-*,performance-*,readability-*
3+
FormatStyle: file
4+
CheckOptions:
5+
- key: readability-identifier-naming.ClassCase
6+
value: CamelCase
7+
- key: readability-identifier-naming.ClassConstantCase
8+
value: CamelCase
9+
- key: readability-identifier-naming.ClassConstantPrefix
10+
value: k
11+
- key: readability-identifier-naming.EnumCase
12+
value: CamelCase
13+
- key: readability-identifier-naming.EnumConstantCase
14+
value: CamelCase
15+
- key: readability-identifier-naming.EnumConstantPrefix
16+
value: k
17+
- key: readability-identifier-naming.FunctionCase
18+
value: CamelCase
19+
- key: readability-identifier-naming.GlobalConstantCase
20+
value: CamelCase
21+
- key: readability-identifier-naming.GlobalConstantPrefix
22+
value: k
23+
- key: readability-identifier-naming.GlobalConstantPointerCase
24+
value: CamelCase
25+
- key: readability-identifier-naming.GlobalConstantPointerPrefix
26+
value: k
27+
- key: readability-identifier-naming.MethodCase
28+
value: CamelCase
29+
- key: readability-identifier-naming.NamespaceCase
30+
value: lower_case
31+
- key: readability-identifier-naming.ParameterCase
32+
value: lower_case
33+
- key: readability-identifier-naming.PrivateMemberCase
34+
value: lower_case
35+
- key: readability-identifier-naming.PrivateMemberSuffix
36+
value: _
37+
- key: readability-identifier-naming.PublicMemberCase
38+
value: lower_case
39+
- key: readability-identifier-naming.StaticConstantCase
40+
value: CamelCase
41+
- key: readability-identifier-naming.StaticConstantPrefix
42+
value: k
43+
- key: readability-identifier-naming.TemplateParameterCase
44+
value: CamelCase
45+
- key: readability-identifier-naming.TypeAliasCase
46+
value: CamelCase
47+
- key: readability-identifier-naming.TypedefCase
48+
value: CamelCase
49+
- key: readability-identifier-naming.UnionCase
50+
value: CamelCase
51+
- key: readability-identifier-naming.VariableCase
52+
value: lower_case

CMakeLists.txt

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project(RRA)
77

88
# Define version information
99
set(RRA_MAJOR_VERSION 1)
10-
set(RRA_MINOR_VERSION 2)
10+
set(RRA_MINOR_VERSION 3)
1111
if (NOT RRA_BUGFIX_NUMBER)
1212
set(RRA_BUGFIX_NUMBER 0)
1313
endif ()
@@ -21,6 +21,11 @@ string(TIMESTAMP YEAR_STRING "\"%Y\"")
2121
configure_file("${CMAKE_SOURCE_DIR}/Buildinfo.properties.in" "${CMAKE_SOURCE_DIR}/Buildinfo.properties")
2222
configure_file("${CMAKE_SOURCE_DIR}/source/frontend/version.h.in" "${CMAKE_SOURCE_DIR}/source/frontend/version.h")
2323

24+
# Add cmake utilities
25+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
26+
include(devtools_qt_helper)
27+
include(dev_tools)
28+
2429
option(RDF_ENABLE_CXX_BINDINGS "Allow usage of C++ interface for RDF library" ON)
2530
option(RDF_STATIC "Build RDF as a static library" ON)
2631

@@ -51,9 +56,10 @@ add_definitions(-DJSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
5156
# Define C++ standard for RRA
5257
set(CMAKE_CXX_STANDARD 17)
5358

54-
include_directories("${PROJECT_SOURCE_DIR}/external/qt_common/")
5559
include_directories("${PROJECT_SOURCE_DIR}/external/")
60+
include_directories("${PROJECT_SOURCE_DIR}/external/qt_common/")
5661
include_directories("${PROJECT_SOURCE_DIR}/external/third_party/")
62+
include_directories("${PROJECT_SOURCE_DIR}/external/third_party/vulkan/include/")
5763

5864
# Global compiler options
5965
IF(WIN32)
@@ -103,8 +109,7 @@ MACRO(SOURCE_GROUP_BY_FOLDER target)
103109
ENDIF (files)
104110
ENDMACRO(SOURCE_GROUP_BY_FOLDER)
105111

106-
add_subdirectory(external/qt_common/custom_widgets QtCommon/custom_widgets)
107-
add_subdirectory(external/qt_common/utils QtCommon/utils)
112+
add_subdirectory(external/qt_common qt_common)
108113
add_subdirectory(external/rdf/imported/zstd)
109114
add_subdirectory(external/rdf/rdf)
110115
add_subdirectory(source/backend backend)
@@ -143,9 +148,9 @@ source_group("sphinx" FILES ${ALL_SPHINX_FILES})
143148
# group release documents into a release_docs folder
144149
set (RELEASE_DOCS_IN_ROOT
145150
${CMAKE_SOURCE_DIR}/README.md
146-
${CMAKE_SOURCE_DIR}/Release_Notes.txt
151+
${CMAKE_SOURCE_DIR}/RELEASE_NOTES.txt
147152
${CMAKE_SOURCE_DIR}/NOTICES.txt
148-
${CMAKE_SOURCE_DIR}/License.txt
153+
${CMAKE_SOURCE_DIR}/LICENSE.txt
149154
)
150155
set (RELEASE_DOCS ${RELEASE_DOCS_IN_ROOT})
151156
source_group("release_docs" FILES ${RELEASE_DOCS})
@@ -162,19 +167,22 @@ if(SPHINX_EXECUTABLE)
162167
add_custom_target(Documentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} DEPENDS sphinx_output)
163168
add_custom_command(MAIN_DEPENDENCY ${SPHINX_DOC_MAIN} OUTPUT sphinx_output
164169
COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
165-
COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR}/documentation/source ${DOCS_OUTPUT_DIR}/docs/help/rra/html/. -t ${SPHINX_OPTION}
166-
COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOCS_OUTPUT_DIR}/docs/help/rra/html/.doctrees
167-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/blas_instance_list.html
168-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/blas_list.html
169-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/blas_properties.html
170-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/blas_viewer.html
171-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/capture.html
172-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/overview.html
173-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/settings.html
174-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/tlas_instance_list.html
175-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/tlas_properties.html
176-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/tlas_viewer.html
177-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rra/html/triangle_list.html
170+
COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR}/documentation/source ${DOCS_OUTPUT_DIR}/help/rra/. -t ${SPHINX_OPTION}
171+
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
178186
)
179187
else()
180188
message(WARNING "SPHINX_EXECUTABLE (sphinx-build) is not found! Documentation will not be built!")
@@ -184,9 +192,9 @@ endif()
184192

185193
add_custom_command(TARGET Documentation POST_BUILD
186194
COMMAND ${CMAKE_COMMAND} -E echo "copying Documentation to output directory"
187-
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/docs
188195
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${DOCS_OUTPUT_DIR}/.
189196
COMMAND ${CMAKE_COMMAND} -E echo "copying Samples to output directory"
190197
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/samples
191198
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/samples/landscape.rra ${DOCS_OUTPUT_DIR}/samples/sample_trace.rra
192199
)
200+

build/dependency_map.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#! python3
2-
# Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All rights reserved.
2+
##=============================================================================
3+
## Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All rights reserved.
4+
## \author AMD Developer Tools Team
5+
## \file
6+
## \brief List of all external dependencies.
7+
##=============================================================================
38

49
import sys
510

@@ -10,17 +15,18 @@
1015

1116
# To allow for future updates where we may have cloned the project, store the root of
1217
# the repo in a variable. In future, we can automatically calculate this based on the git config
13-
github_tools = "https://github.com/GPUOpen-Tools/"
14-
github_root = "https://github.com/"
18+
github_tools = "https://github.com/GPUOpen-Tools/"
19+
github_root = "https://github.com/"
1520

1621
# Define a set of dependencies that exist as separate git projects.
1722
# each git dependency has a desired directory where it will be cloned - along with a commit to checkout
1823
git_mapping = {
19-
github_tools + "QtCommon" : ["../external/qt_common", "v3.9.0"],
24+
github_tools + "QtCommon" : ["../external/qt_common", "v3.12.0"],
2025
github_tools + "UpdateCheckAPI" : ["../external/update_check_api", "v2.0.1"],
2126
github_root + "g-truc/glm" : ["../external/third_party/glm", "0.9.9.8"],
2227
github_root + "KhronosGroup/Vulkan-Headers" : ["../external/third_party/vulkan", "sdk-1.3.211"],
2328
github_root + "zeux/volk" : ["../external/third_party/volk", "1.2.190"],
2429
github_root + "GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator" : ["../external/vma", "d2f0313d20c803f83cc3637ac1facf8e4d6899e4"],
25-
github_root + "GPUOpen-Drivers/libamdrdf" : ["../external/rdf", "v1.1.1"],
30+
github_root + "GPUOpen-Drivers/libamdrdf" : ["../external/rdf", "v1.1.2"],
2631
}
32+

build/fetch_dependencies.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
#! python3
2-
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
3-
#
4-
# Script to fetch all external git and/or downloadable dependencies needed to build the project
5-
#
6-
# fetch_dependencies.py
7-
#
8-
# Each git repo will be updated to the commit specified in the "gitMapping" table.
2+
##=============================================================================
3+
## Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
4+
## \author AMD Developer Tools Team
5+
## \file
6+
## \brief Script to fetch all external git and/or downloadable dependencies
7+
## needed to build the project.
8+
##
9+
## fetch_dependencies.py (--internal)
10+
##
11+
## If --internal is specified, then any additional dependencies required for internal builds will also
12+
## be checked out.
13+
##
14+
## Each git repo will be updated to the commit specified in the "gitMapping" table.
15+
##=============================================================================
916

1017
import os
1118
import subprocess

build/pre_build.py

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#! python3
2-
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
3-
#
4-
# Script to perform all necessary pre build steps. This includes:
5-
#
6-
# - Fetching all dependencies
7-
# - Creating output directories
8-
# - Calling CMake with appropriate parameters to generate the build files
9-
#
2+
##=============================================================================
3+
## Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
4+
## \author AMD Developer Tools Team
5+
## \file
6+
## \brief Script to perform all necessary pre build steps. This includes:
7+
##
8+
## - Fetching all dependencies
9+
## - Creating output directories
10+
## - Calling CMake with appropriate parameters to generate the build files
11+
##=============================================================================
12+
1013
import os
1114
import sys
1215
import importlib.util
@@ -33,6 +36,7 @@
3336
else:
3437
can_fetch = False
3538

39+
3640
# to allow the script to be run from anywhere - not just the cwd - store the absolute path to the script file
3741
script_root = os.path.dirname(os.path.realpath(__file__))
3842

@@ -59,6 +63,8 @@
5963
parser.add_argument("--qt-root", default="~/Qt", help="specify the root directory for locating QT on this system (default: ~/Qt) ")
6064
else:
6165
parser.add_argument("--qt-root", default="~/Qt", help="specify the root directory for locating QT on this system (default: ~/Qt) ")
66+
parser.add_argument("--disable-extra-qt-lib-deploy", action="store_true", help="prevent extra Qt library files (XCB and ICU libs) from being copied during post build step")
67+
parser.add_argument("--qt-system", action="store_true", help="use the system-installed version of QT")
6268
parser.add_argument("--qt", default="5.15.2", help="specify the version of QT to be used with the script (default: 5.15.2)" )
6369
parser.add_argument("--clean", action="store_true", help="delete any directories created by this script")
6470
parser.add_argument("--no-qt", action="store_true", help="build a headless version (not applicable for all products)")
@@ -68,7 +74,6 @@
6874
parser.add_argument("--build-jobs", default="4", help="number of simultaneous jobs to run during a build (default = 4)")
6975
parser.add_argument("--analyze", action="store_true", help="perform static analysis of code on build (currently VS2017 only)")
7076
parser.add_argument("--vscode", action="store_true", help="generate CMake options into VsCode settings file for this project")
71-
parser.add_argument("--disable-extra-qt-lib-deploy", action="store_true", help="prevent extra Qt library files (XCB and ICU libs) from being copied during post build step")
7277
if support_32_bit_build:
7378
parser.add_argument("--platform", default="x64", choices=["x64", "x86"], help="specify the platform (32 or 64 bit)")
7479
args = parser.parse_args()
@@ -166,6 +171,7 @@ def check_qt_path(qt_root, qt_root_arg, qt_arg):
166171
if args.platform == "x86":
167172
cmake_output_dir += args.platform
168173

174+
169175
# Clean all files generated by this script or the build process
170176
if (args.clean):
171177
log_print ("Cleaning build ...\n")
@@ -199,6 +205,7 @@ def check_qt_path(qt_root, qt_root_arg, qt_arg):
199205
qt_expanded_root = os.path.expanduser(args.qt_root)
200206
qt_found,qt_path = check_qt_path(qt_expanded_root, args.qt_root, args.qt)
201207

208+
202209
if qt_found == False:
203210
log_error_and_exit(qt_path)
204211

@@ -255,9 +262,14 @@ def generate_config(config):
255262
elif args.toolchain == "2017":
256263
cmake_args.extend(["-Tv141"])
257264

265+
258266
if sys.platform.startswith('linux'):
259267
if args.disable_extra_qt_lib_deploy:
260268
cmake_args.extend(["-DDISABLE_EXTRA_QT_LIB_DEPLOY:BOOL=TRUE"])
269+
if args.qt_system:
270+
cmake_args.extend(["-DQT_SYSTEM:BOOL=TRUE"])
271+
272+
cmake_args.extend(["-DQT_VERSION=" + str(args.qt)])
261273

262274
cmake_args.extend(["-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=" + release_output_dir])
263275
cmake_args.extend(["-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=" + release_output_dir])
@@ -383,3 +395,4 @@ def generate_config(config):
383395
minutes, seconds = divmod(time.time() - start_time, 60)
384396
log_print("Successfully completed in {0:.0f} minutes, {1:.1f} seconds".format(minutes,seconds))
385397
sys.exit(0)
398+

0 commit comments

Comments
 (0)