aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/smoke/ShellAndroid.cpp16
-rw-r--r--demos/smoke/ShellWayland.cpp3
-rw-r--r--demos/smoke/ShellWin32.cpp3
-rw-r--r--demos/smoke/ShellXcb.cpp3
4 files changed, 15 insertions, 10 deletions
diff --git a/demos/smoke/ShellAndroid.cpp b/demos/smoke/ShellAndroid.cpp
index 2e371e45..059872ae 100644
--- a/demos/smoke/ShellAndroid.cpp
+++ b/demos/smoke/ShellAndroid.cpp
@@ -115,13 +115,15 @@ std::vector<std::string> ShellAndroid::get_args(android_app &app)
ShellAndroid::ShellAndroid(android_app &app, Game &game) : Shell(game), app_(app)
{
- instance_layers_.push_back("VK_LAYER_GOOGLE_threading");
- instance_layers_.push_back("VK_LAYER_LUNARG_parameter_validation");
- instance_layers_.push_back("VK_LAYER_LUNARG_object_tracker");
- instance_layers_.push_back("VK_LAYER_LUNARG_image");
- instance_layers_.push_back("VK_LAYER_LUNARG_core_validation");
- instance_layers_.push_back("VK_LAYER_LUNARG_swapchain");
- instance_layers_.push_back("VK_LAYER_GOOGLE_unique_objects");
+ if (game.settings().validate) {
+ instance_layers_.push_back("VK_LAYER_GOOGLE_threading");
+ instance_layers_.push_back("VK_LAYER_LUNARG_parameter_validation");
+ instance_layers_.push_back("VK_LAYER_LUNARG_object_tracker");
+ instance_layers_.push_back("VK_LAYER_LUNARG_image");
+ instance_layers_.push_back("VK_LAYER_LUNARG_core_validation");
+ instance_layers_.push_back("VK_LAYER_LUNARG_swapchain");
+ instance_layers_.push_back("VK_LAYER_GOOGLE_unique_objects");
+ }
instance_extensions_.push_back(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME);
diff --git a/demos/smoke/ShellWayland.cpp b/demos/smoke/ShellWayland.cpp
index a4d5eb27..4d5f7614 100644
--- a/demos/smoke/ShellWayland.cpp
+++ b/demos/smoke/ShellWayland.cpp
@@ -109,7 +109,8 @@ void ShellWayland::handle_popup_done(
void *data UNUSED, struct wl_shell_surface *shell_surface UNUSED) {}
ShellWayland::ShellWayland(Game &game) : Shell(game) {
- instance_layers_.push_back("VK_LAYER_LUNARG_standard_validation");
+ if (game.settings().validate)
+ instance_layers_.push_back("VK_LAYER_LUNARG_standard_validation");
instance_extensions_.push_back(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME);
init_connection();
diff --git a/demos/smoke/ShellWin32.cpp b/demos/smoke/ShellWin32.cpp
index 11e03aeb..8e9e2303 100644
--- a/demos/smoke/ShellWin32.cpp
+++ b/demos/smoke/ShellWin32.cpp
@@ -57,7 +57,8 @@ private:
ShellWin32::ShellWin32(Game &game) : Shell(game), hwnd_(nullptr)
{
- instance_layers_.push_back("VK_LAYER_LUNARG_standard_validation");
+ if (game.settings().validate)
+ instance_layers_.push_back("VK_LAYER_LUNARG_standard_validation");
instance_extensions_.push_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
init_vk();
}
diff --git a/demos/smoke/ShellXcb.cpp b/demos/smoke/ShellXcb.cpp
index 55f0e8fb..ceca3a7a 100644
--- a/demos/smoke/ShellXcb.cpp
+++ b/demos/smoke/ShellXcb.cpp
@@ -83,7 +83,8 @@ xcb_atom_t intern_atom(xcb_connection_t *c, xcb_intern_atom_cookie_t cookie)
ShellXcb::ShellXcb(Game &game) : Shell(game)
{
- instance_layers_.push_back("VK_LAYER_LUNARG_standard_validation");
+ if (game.settings().validate)
+ instance_layers_.push_back("VK_LAYER_LUNARG_standard_validation");
instance_extensions_.push_back(VK_KHR_XCB_SURFACE_EXTENSION_NAME);
init_connection();