forked from GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request GPUOpen-LibrariesAndSDKs#200 from AvKhokhlov/datag…
…enerator-library Datagenerator library
- Loading branch information
Showing
31 changed files
with
1,378 additions
and
1,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,83 @@ | ||
set(DATAGENERATOR_SOURCES | ||
Source/main.cpp | ||
# Library | ||
|
||
set(DATAGENERATOR_LIB_SOURCES | ||
Source/data_generator.h | ||
Source/data_generator.cpp | ||
Source/devices.h | ||
Source/devices.cpp | ||
Source/filesystem.h | ||
Source/cmd_line_parser.h | ||
Source/cmd_line_parser.cpp | ||
Source/render.h | ||
Source/render.cpp | ||
Source/data_generator_impl.h | ||
Source/data_generator_impl.cpp | ||
Source/utils.h | ||
Source/config_loader.h | ||
Source/config_loader.cpp | ||
Source/input_info.h | ||
Source/logging.h | ||
Source/logging.cpp | ||
) | ||
|
||
set(SOURCES | ||
${DATAGENERATOR_SOURCES}) | ||
add_library(BaikalDataGenerator SHARED ${DATAGENERATOR_LIB_SOURCES}) | ||
|
||
source_group("Source" FILES ${DATAGENERATOR_SOURCES}) | ||
|
||
add_executable(BaikalDataGenerator ${SOURCES}) | ||
target_compile_features(BaikalDataGenerator PRIVATE cxx_std_17) | ||
|
||
#Add project root since BaikalStandalone directly includes Baikal/* files | ||
target_compile_definitions(BaikalDataGenerator PRIVATE RPR_EXPORT_API) | ||
|
||
target_include_directories(BaikalDataGenerator | ||
PRIVATE . | ||
PRIVATE ${Baikal_SOURCE_DIR} | ||
PRIVATE .) | ||
|
||
target_link_libraries(BaikalDataGenerator PRIVATE Baikal BaikalIO) | ||
PRIVATE ${Baikal_SOURCE_DIR}/Rpr | ||
PRIVATE ${Baikal_SOURCE_DIR}/RadeonRays/include | ||
) | ||
|
||
target_link_libraries(BaikalDataGenerator PRIVATE RadeonProRender64 Baikal BaikalIO) | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||
target_link_libraries(BaikalDataGenerator PRIVATE stdc++fs) | ||
endif() | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
target_link_libraries(BaikalDataGenerator PRIVATE c++experimental) | ||
endif () | ||
|
||
set_target_properties(BaikalDataGenerator | ||
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${Baikal_SOURCE_DIR}/BaikalDataGenerator) | ||
|
||
add_dependencies(BaikalDataGenerator ResourcesDir Copy3rdParty) | ||
|
||
# Install target | ||
install(TARGETS BaikalDataGenerator RUNTIME DESTINATION bin) | ||
if (WIN32) | ||
install(TARGETS BaikalDataGenerator RUNTIME DESTINATION bin) | ||
else () | ||
install(TARGETS BaikalDataGenerator LIBRARY DESTINATION lib) | ||
endif () | ||
|
||
|
||
# Application | ||
|
||
set(DATAGENERATOR_APP_SOURCES | ||
Source/app_config.h | ||
Source/cmd_line_parser.h | ||
Source/cmd_line_parser.cpp | ||
Source/devices.h | ||
Source/devices.cpp | ||
Source/filesystem.h | ||
Source/object_loader.h | ||
Source/object_loader.cpp | ||
Source/logging.h | ||
Source/logging.cpp | ||
Source/main.cpp | ||
) | ||
|
||
add_executable(BaikalDataGeneratorApp ${DATAGENERATOR_APP_SOURCES}) | ||
|
||
target_compile_features(BaikalDataGeneratorApp PRIVATE cxx_std_17) | ||
|
||
target_include_directories(BaikalDataGeneratorApp | ||
PRIVATE ${Baikal_SOURCE_DIR} | ||
PRIVATE . | ||
) | ||
|
||
target_link_libraries(BaikalDataGeneratorApp PRIVATE BaikalDataGenerator RadeonProRender64 Baikal) | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||
target_link_libraries(BaikalDataGeneratorApp PRIVATE stdc++fs) | ||
endif() | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
target_link_libraries(BaikalDataGeneratorApp PRIVATE c++experimental) | ||
endif () | ||
|
||
set_target_properties(BaikalDataGeneratorApp | ||
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${Baikal_SOURCE_DIR}/BaikalDataGenerator) | ||
|
||
install(TARGETS BaikalDataGeneratorApp RUNTIME DESTINATION bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include "filesystem.h" | ||
|
||
#include <vector> | ||
|
||
const int kDefaultStartOutputIndex = -1; | ||
|
||
struct AppConfig | ||
{ | ||
std::filesystem::path scene_file; | ||
std::filesystem::path light_file; | ||
std::filesystem::path camera_file; | ||
std::filesystem::path spp_file; | ||
std::filesystem::path output_dir; | ||
unsigned width = 0; | ||
unsigned height = 0; | ||
unsigned split_num = 1; | ||
unsigned split_idx = 0; | ||
int start_output_idx = kDefaultStartOutputIndex; | ||
unsigned num_bounces = 5; | ||
unsigned device_idx = 0; | ||
bool gamma_correction = false; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.