Skip to content

Commit 3e008a9

Browse files
scottp101igcbot
authored andcommitted
RTStackReflection refactor
RTStackReflection refactor
1 parent ec85ee8 commit 3e008a9

File tree

14 files changed

+528
-322
lines changed

14 files changed

+528
-322
lines changed

IGC/AdaptorCommon/RayTracing/API/RayDispatchGlobalData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SPDX-License-Identifier: MIT
2525
// We need to disable the warnings in such way because this C++ file may be compiled with Clang, GCC, and Microsoft
2626
// Visual Studio Compiler This works around (at least) two known problems:
2727
// - QuickBuild treats compiler warnings as errors
28-
// - RTStackReflection.exe generates warnings when compiling this file
28+
// - IRBuilderGenerator.exe generates warnings when compiling this file
2929
//
3030
// The only macros that are used by the main code are:
3131
// DISABLE_WARNING_PUSH

IGC/AdaptorCommon/RayTracing/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
#
77
#============================ end_copyright_notice =============================
88

9-
add_subdirectory(RTStackReflection)
109
add_subdirectory(RTStackReflectionIRBG)

IGC/AdaptorCommon/RayTracing/RTBuilder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ class RTBuilder : public IGCIRBuilder<> {
362362

363363

364364
private:
365-
#include "AutoGenRTStackAccessPrivate.h"
365+
#include "AutoGenRTStackReflectionPrivate.h"
366366
public:
367-
#include "AutoGenRTStackAccessPublic.h"
367+
#include "AutoGenRTStackReflectionPublic.h"
368368
public:
369369
Type *getSMStack2Ty() const;
370370
Type *getRTStack2Ty() const;

IGC/AdaptorCommon/RayTracing/RTStackFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SPDX-License-Identifier: MIT
2525
// We need to disable the warnings in such way because this C++ file may be compiled with Clang, GCC, and Microsoft
2626
// Visual Studio Compiler This works around (at least) two known problems:
2727
// - QuickBuild treats compiler warnings as errors
28-
// - RTStackReflection.exe generates warnings when compiling this file
28+
// - IRBuilderGenerator.exe generates warnings when compiling this file
2929
//
3030
// The only macros that are used by the main code are:
3131
// DISABLE_WARNING_PUSH

IGC/AdaptorCommon/RayTracing/RTStackReflection/CMakeLists.txt

Lines changed: 0 additions & 52 deletions
This file was deleted.

IGC/AdaptorCommon/RayTracing/RTStackReflection/shared.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

IGC/AdaptorCommon/RayTracing/RTStackReflectionIRBG/CMakeLists.txt

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,60 @@
66
#
77
#============================ end_copyright_notice =============================
88

9-
# Include the RTStackReflection code generation function
10-
include(RTStackReflectionCodeGen)
9+
include(IRBuilderGeneratorCodeGen)
1110

1211
# Set up paths
13-
set(RTSTACK_REFLECTION_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../RTStackReflection)
1412
set(RT_ROOT_FOLDER ${CMAKE_CURRENT_BINARY_DIR})
1513
set(RT_SOURCE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/..)
16-
set(REFLECTION_SOURCE ${RTSTACK_REFLECTION_DIR}/reflection.cpp)
14+
set(REFLECTION_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/reflection.cpp)
15+
set(YAML_DESC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Desc.yaml)
16+
set(IRBUILDER_GENERATOR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../IRBuilderGenerator)
1717

1818
# Set up include directories for clang
1919
set(RTSTACK_INCLUDE_DIRS
20+
${RT_ROOT_FOLDER}
2021
${RT_SOURCE_FOLDER}
22+
${IRBUILDER_GENERATOR_DIR}
2123
)
2224

2325
# Set up dependencies - the reflection.cpp file and any headers it includes
2426
set(RTSTACK_DEPENDENCIES
2527
${REFLECTION_SOURCE}
28+
${YAML_DESC_PATH}
2629
# Add any header files that reflection.cpp depends on
2730
)
2831

2932
# Generate RT Stack reflection headers
30-
generate_rtstack_reflection_headers(
33+
generate_irbuilder_headers(
34+
NAME RTStackReflection
3135
SOURCE_FILE ${REFLECTION_SOURCE}
36+
YAML_PATH ${YAML_DESC_PATH}
3237
OUTPUT_DIR ${RT_ROOT_FOLDER}
3338
INCLUDE_DIRS ${RTSTACK_INCLUDE_DIRS}
3439
DEPENDS ${RTSTACK_DEPENDENCIES}
3540
)
3641

37-
# Create an interface library that other targets can depend on
38-
# The generated headers are added as sources so the custom commands will be triggered
39-
add_library(RTStackReflectionIRBG INTERFACE
40-
${RTSTACK_GENERATED_HEADERS}
42+
add_library(RTStackReflectionIRBG STATIC
43+
${GENERATED_HEADERS}
44+
${REFLECTION_SOURCE}
45+
${YAML_DESC_PATH}
46+
)
47+
48+
# Mark the source files as HEADER_FILE_ONLY so they won't be compiled
49+
set_source_files_properties(
50+
${GENERATED_HEADERS}
51+
${REFLECTION_SOURCE}
52+
${YAML_DESC_PATH}
53+
PROPERTIES HEADER_FILE_ONLY TRUE
4154
)
4255

43-
# Make the generated headers available to consumers of this library
44-
target_include_directories(RTStackReflectionIRBG INTERFACE ${RT_ROOT_FOLDER})
56+
target_include_directories(RTStackReflectionIRBG PUBLIC
57+
${RT_ROOT_FOLDER}
58+
${RT_SOURCE_FOLDER}
59+
${IRBUILDER_GENERATOR_DIR}
60+
${RT_SOURCE_FOLDER}/../common
61+
)
4562

46-
# Add a dependency on the RTStackReflection tool itself
47-
add_dependencies(RTStackReflectionIRBG RTStackReflection)
63+
add_dependencies(RTStackReflectionIRBG IRBuilderGenerator)
4864

49-
set_target_properties(RTStackReflectionIRBG PROPERTIES FOLDER "IGC/Misc")
65+
set_target_properties(RTStackReflectionIRBG PROPERTIES FOLDER "Misc")
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#=========================== begin_copyright_notice ============================
2+
#
3+
# Copyright (C) 2025 Intel Corporation
4+
#
5+
# SPDX-License-Identifier: MIT
6+
#
7+
#============================ end_copyright_notice =============================
8+
9+
address_spaces:
10+
- name: RTSAS
11+
description: RTStack
12+
constant: false
13+
14+
- name: RTGAS
15+
description: RTGlobals
16+
constant: true
17+
18+
- name: RTShadowAS
19+
description: Shadow Memory
20+
constant: false
21+
22+
- name: SWStackAS
23+
description: SWStack
24+
constant: false
25+
26+
- name: SWHotZoneAS
27+
description: SWHotZone
28+
constant: false

0 commit comments

Comments
 (0)