-
Notifications
You must be signed in to change notification settings - Fork 346
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
Make vulkan build as optional #4815
Make vulkan build as optional #4815
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
RunVulkanTutorial(); | ||
#else | ||
ORBIT_ERROR("Vulkan isn't enabled"); |
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.
Nit: Can you extend the comment to include the flag? Something like: "Compile with WITH_VULKAN".
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.
Thanks, done (commits are squashed).
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.
Thanks for your change. Please address the suggested formatting changes.
@@ -19,7 +19,9 @@ | |||
#include "OrbitBase/ExecutablePath.h" | |||
#include "OrbitBase/Logging.h" | |||
#include "OrbitBase/ThreadUtils.h" | |||
#include "VulkanTutorial/OffscreenRenderingVulkanTutorial.h" | |||
#ifdef VULKAN_ENABLED | |||
#include "VulkanTutorial/OffscreenRenderingVulkanTutorial.h" |
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.
clang-format:
#include "VulkanTutorial/OffscreenRenderingVulkanTutorial.h" | |
#include "VulkanTutorial/OffscreenRenderingVulkanTutorial.h" |
Add option WITH_VULKAN, which is ON by default. If set to OFF, modules OrbitTriggerCaptureVulkanLayer, OrbitVulkanLayer, and VulkanTutorial won't be built
28008c9
to
de858a5
Compare
By the way, I didn't update conanfile.py with the new option, which means that for Conan build Vulkan is enabled unconditionally. |
I guess this is fine for now. |
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.
LGTM. Thanks!
Add option WITH_VULKAN, which is ON by default. If set to OFF, modules OrbitTriggerCaptureVulkanLayer, OrbitVulkanLayer, and VulkanTutorial won't be built
Add cmake option
WITH_VULKAN
, which enables/disables Vulkan in Orbit in a straightforward way. It should introduce a bit of additional modularity to the Orbit. By default, this option set toON
(i.e., Vulkan enabled).This change affects only Linux, related to #4814.
I'm not sure about one place:
orbit/src/OrbitGl/GpuSubmissionTrack.cpp
Lines 61 to 63 in 3034421
Basically, this file is compiled fine. On the other hand, it looks like it implicitly relies on Vulkan as a background layer.