-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add system and libraries information to render log #328
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,8 @@ | |
#include "renderer/api/texture.h" | ||
|
||
// appleseed.foundation headers. | ||
#include "foundation/core/appleseed.h" | ||
#include "foundation/core/thirdparties.h" | ||
#include "foundation/image/canvasproperties.h" | ||
#include "foundation/image/tile.h" | ||
#include "foundation/utility/searchpaths.h" | ||
|
@@ -68,6 +70,89 @@ | |
namespace asf = foundation; | ||
namespace asr = renderer; | ||
|
||
const char* to_enabled_disabled(const bool value) | ||
{ | ||
return value ? "enabled" : "disabled"; | ||
} | ||
|
||
void print_libraries_information() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
{ | ||
RENDERER_LOG_INFO( | ||
"appleseed for Autodesk 3ds Max using %s version %s, %s configuration\n" | ||
"compiled on %s at %s using %s version %s\n" | ||
"copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited\n" | ||
"copyright (c) 2014-2019 The appleseedhq Organization\n" | ||
"this software is released under the MIT license (https://opensource.org/licenses/MIT).\n" | ||
"visit https://appleseedhq.net/ for additional information and resources.", | ||
asf::Appleseed::get_lib_name(), | ||
asf::Appleseed::get_lib_version(), | ||
asf::Appleseed::get_lib_configuration(), | ||
asf::Appleseed::get_lib_compilation_date(), | ||
asf::Appleseed::get_lib_compilation_time(), | ||
asf::Compiler::get_compiler_name(), | ||
asf::Compiler::get_compiler_version()); | ||
} | ||
|
||
void print_libraries_features() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, |
||
{ | ||
const bool WithDisneyMaterial = | ||
#ifdef APPLESEED_WITH_DISNEY_MATERIAL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Left-align preprocessor statements. |
||
true; | ||
#else | ||
false; | ||
#endif | ||
|
||
const bool WithEmbree = | ||
#ifdef APPLESEED_WITH_EMBREE | ||
true; | ||
#else | ||
false; | ||
#endif | ||
|
||
const bool WithSpectralSupport = | ||
#ifdef APPLESEED_WITH_SPECTRAL_SUPPORT | ||
true; | ||
#else | ||
false; | ||
#endif | ||
|
||
const bool WithGPUSupport = | ||
#ifdef APPLESEED_WITH_GPU | ||
true; | ||
#else | ||
false; | ||
#endif | ||
|
||
RENDERER_LOG_INFO( | ||
"library features:\n" | ||
" Instruction sets %s\n" | ||
" Disney material with SeExpr %s\n" | ||
" Embree %s\n" | ||
" Spectral support %s\n" | ||
" GPU support %s", | ||
asf::Appleseed::get_lib_cpu_features(), | ||
to_enabled_disabled(WithDisneyMaterial), | ||
to_enabled_disabled(WithEmbree), | ||
to_enabled_disabled(WithSpectralSupport), | ||
to_enabled_disabled(WithGPUSupport)); | ||
} | ||
|
||
void print_third_party_libraries_information() | ||
{ | ||
const asf::LibraryVersionArray versions = asf::ThirdParties::get_versions(); | ||
RENDERER_LOG_INFO("third party libraries:\n"); | ||
for (size_t i = 0, e = versions.size(); i < e; ++i) | ||
{ | ||
const asf::APIStringPair& version = versions[i]; | ||
const char* lib_name = version.m_first.c_str(); | ||
const char* lib_version = version.m_second.c_str(); | ||
const size_t lib_name_length = strlen(lib_name); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
(And yes, the |
||
const std::string spacing(30 - lib_name_length, ' '); | ||
RENDERER_LOG_INFO(" %s%s%s", lib_name, spacing.c_str(), lib_version); | ||
} | ||
} | ||
|
||
|
||
void update_map_buttons(IParamMap2* param_map) | ||
{ | ||
if (param_map == nullptr) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,6 @@ class Texmap; | |
|
||
void update_map_buttons(IParamMap2* param_map); | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert, we use two blank lines before block comments. |
||
// | ||
// Bitmap functions. | ||
// | ||
|
@@ -129,6 +128,17 @@ std::string insert_procedural_texture_and_instance( | |
renderer::ParamArray texture_params = renderer::ParamArray(), | ||
renderer::ParamArray texture_instance_params = renderer::ParamArray()); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add additional blank line. |
||
// | ||
// Version information functions. | ||
// | ||
|
||
extern void print_libraries_information(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
||
extern void print_libraries_features(); | ||
|
||
extern const char* to_enabled_disabled(const bool value); | ||
|
||
extern void print_third_party_libraries_information(); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add additional blank line. |
||
// | ||
// Implementation. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep a single blank line.