Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
Expand All @@ -45,7 +45,7 @@ BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
ColumnLimit: 160
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Expand Down
13 changes: 9 additions & 4 deletions app/apps/apps.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2024, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -44,8 +44,7 @@ using CreateFunc = std::function<std::unique_ptr<vkb::Application>()>;
class AppInfo
{
public:
AppInfo(const std::string &id, const CreateFunc &create) :
id(id), create(create)
AppInfo(const std::string &id, const CreateFunc &create) : id(id), create(create)
{}

std::string id;
Expand All @@ -59,7 +58,13 @@ class AppInfo
class SampleInfo : public AppInfo
{
public:
SampleInfo(const std::string &id, const CreateFunc &create, const std::string &category, const std::string &author, const std::string &name, const std::string &description, const std::vector<std::string> &tags = {}) :
SampleInfo(const std::string &id,
const CreateFunc &create,
const std::string &category,
const std::string &author,
const std::string &name,
const std::string &description,
const std::vector<std::string> &tags = {}) :
AppInfo(id, create), category(category), author(author), name(name), description(description), tags(tags)
{}

Expand Down
9 changes: 4 additions & 5 deletions app/plugins/batch_mode/batch_mode.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, neither the copyright.py fixes such Copyright strings, nor the copyright check of the CI catches them?

*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -34,8 +34,7 @@ BatchMode::BatchMode() :
{"skip", "Skip a sample by id"},
{"tag", "Filter samples by tags"},
{"wrap-to-start", "Once all configurations have run wrap to the start"}})
{
}
{}

bool BatchMode::handle_command(std::deque<std::string> &arguments) const
{
Expand Down Expand Up @@ -143,8 +142,8 @@ void BatchMode::trigger_command()
std::vector<apps::AppInfo *> filtered_list;
filtered_list.reserve(sample_list.size() - skips.size());

std::copy_if(
sample_list.begin(), sample_list.end(), std::back_inserter(filtered_list), [&](const apps::AppInfo *app) { return !skips.count(app->id); });
std::copy_if(sample_list.begin(), sample_list.end(), std::back_inserter(filtered_list),
[&](const apps::AppInfo *app) { return !skips.count(app->id); });

if (filtered_list.size() != sample_list.size())
{
Expand Down
5 changes: 3 additions & 2 deletions app/plugins/batch_mode/batch_mode.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -34,7 +34,8 @@ using BatchModeTags = vkb::PluginBase<vkb::tags::Entrypoint, vkb::tags::FullCont
/**
* @brief Batch Mode
*
* Run a subset of samples. The next sample in the set will start after the current sample being executed has finished. Using --wrap-to-start will start again from the first sample after the last sample is executed.
* Run a subset of samples. The next sample in the set will start after the current sample being executed has finished. Using --wrap-to-start will start again
* from the first sample after the last sample is executed.
*
* Usage: vulkan_samples batch --duration 3 --category performance --tag arm
*
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/benchmark_mode/benchmark_mode.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -28,8 +28,7 @@ BenchmarkMode::BenchmarkMode() :
{vkb::Hook::OnUpdate, vkb::Hook::OnAppStart, vkb::Hook::OnAppClose},
{},
{{"benchmark", "Enable benchmark mode"}})
{
}
{}

bool BenchmarkMode::handle_option(std::deque<std::string> &arguments)
{
Expand Down
5 changes: 3 additions & 2 deletions app/plugins/benchmark_mode/benchmark_mode.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -29,7 +29,8 @@ using BenchmarkModeTags = vkb::PluginBase<BenchmarkMode, vkb::tags::Passive>;
/**
* @brief Benchmark Mode
*
* When enabled frame time statistics of a samples run will be printed to the console when an application closes. The simulation frame time (delta time) is also locked to 60FPS so that statistics can be compared more accurately across different devices.
* When enabled frame time statistics of a samples run will be printed to the console when an application closes. The simulation frame time (delta time) is also
* locked to 60FPS so that statistics can be compared more accurately across different devices.
*
* Usage: vulkan_samples sample afbc --benchmark
*
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/data_path/data_path.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2022-2025, Arm Limited and Contributors
/* Copyright (c) 2022-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -28,8 +28,7 @@ DataPath::DataPath() :
{vkb::Hook::OnAppStart},
{},
{{"data-path", "Folder containing data files"}})
{
}
{}

bool DataPath::handle_option(std::deque<std::string> &arguments)
{
Expand Down
10 changes: 4 additions & 6 deletions app/plugins/file_logger/file_logger.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright (c) 2021-2025, Arm Limited and Contributors
* Copyright (c) 2021-2025, Sascha Willems
/* Copyright (c) 2021-2026, Arm Limited and Contributors
* Copyright (c) 2021-2026, Sascha Willems
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -27,10 +27,8 @@

namespace plugins
{
FileLogger::FileLogger() :
FileLoggerTags("File Logger", "Enable log output to a file.", {}, {}, {{"log-file", "Write log messages to the given file name"}})
{
}
FileLogger::FileLogger() : FileLoggerTags("File Logger", "Enable log output to a file.", {}, {}, {{"log-file", "Write log messages to the given file name"}})
{}

bool FileLogger::handle_option(std::deque<std::string> &arguments)
{
Expand Down
10 changes: 5 additions & 5 deletions app/plugins/file_logger/file_logger.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
* Copyright (c) 2021-2025, Sascha Willems
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2021-2026, Sascha Willems
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -27,11 +27,11 @@ using FileLoggerTags = vkb::PluginBase<vkb::tags::Passive>;

/**
* @brief File Logger
*
*
* Enables writing log messages to a file
*
*
* Usage: vulkan_sample --log-file filename.txt
*
*
*/
class FileLogger : public FileLoggerTags
{
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/force_close/force_close.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -28,8 +28,7 @@ ForceClose::ForceClose() :
{},
{},
{{"force-close", "Force the close of the application if halted before exiting"}})
{
}
{}

bool ForceClose::handle_option(std::deque<std::string> &arguments)
{
Expand Down
8 changes: 3 additions & 5 deletions app/plugins/fps_logger/fps_logger.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -20,10 +20,8 @@

namespace plugins
{
FpsLogger::FpsLogger() :
FpsLoggerTags("FPS Logger", "Enable FPS logging.", {vkb::Hook::OnUpdate, vkb::Hook::OnAppStart}, {}, {{"log-fps", "Log FPS"}})
{
}
FpsLogger::FpsLogger() : FpsLoggerTags("FPS Logger", "Enable FPS logging.", {vkb::Hook::OnUpdate, vkb::Hook::OnAppStart}, {}, {{"log-fps", "Log FPS"}})
{}

bool FpsLogger::handle_option(std::deque<std::string> &arguments)
{
Expand Down
3 changes: 1 addition & 2 deletions app/plugins/gpu_selection/gpu_selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ GpuSelection::GpuSelection() :
{},
{},
{{"gpu", "Zero-based index of the GPU that the sample should use"}})
{
}
{}

bool GpuSelection::handle_option(std::deque<std::string> &arguments)
{
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/screenshot/screenshot.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -32,8 +32,7 @@ Screenshot::Screenshot() :
{vkb::Hook::OnUpdate, vkb::Hook::OnAppStart, vkb::Hook::PostDraw},
{},
{{"screenshot", "Take a screenshot at a given frame"}, {"screenshot-output", "Declare an output name for the image"}})
{
}
{}

bool Screenshot::handle_option(std::deque<std::string> &arguments)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2024-2025, Sascha Willems
/* Copyright (c) 2024-2026, Sascha Willems
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -30,8 +30,7 @@ ShadingLanguageSelection::ShadingLanguageSelection() :
{},
{},
{{"shading-language", "Shading language to use (glsl, hlsl or slang)"}})
{
}
{}

bool ShadingLanguageSelection::handle_option(std::deque<std::string> &arguments)
{
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/start_sample/start_sample.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -29,8 +29,7 @@ StartSample::StartSample() :
{{"sample", "Run a specific sample"},
{"samples", "List available samples with descriptions"},
{"samples-oneline", "List available samples, one per line"}})
{
}
{}

void StartSample::launch_sample(apps::SampleInfo const *sample) const
{
Expand Down
8 changes: 3 additions & 5 deletions app/plugins/start_test/start_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -22,10 +22,8 @@

namespace plugins
{
StartTest::StartTest() :
StartTestTags("Tests", "A collection of flags to run tests.", {}, {{"test", "Run a specific test"}})
{
}
StartTest::StartTest() : StartTestTags("Tests", "A collection of flags to run tests.", {}, {{"test", "Run a specific test"}})
{}

bool StartTest::handle_command(std::deque<std::string> &arguments) const
{
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/stop_after/stop_after.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -26,8 +26,7 @@ StopAfter::StopAfter() :
{vkb::Hook::OnUpdate},
{},
{{"stop-after-frame", "Stop the application after a certain number of frames"}})
{
}
{}

bool StopAfter::handle_option(std::deque<std::string> &arguments)
{
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/user_interface_options/user_interface_options.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2023-2025, Sascha Willems
/* Copyright (c) 2023-2026, Sascha Willems
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -30,8 +30,7 @@ UserInterfaceOptions::UserInterfaceOptions() :
{},
{},
{{"hideui", "If flag is set, hides the user interface at startup"}})
{
}
{}

bool UserInterfaceOptions::handle_option(std::deque<std::string> &arguments)
{
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/window_options/window_options.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2025, Arm Limited and Contributors
/* Copyright (c) 2020-2026, Arm Limited and Contributors
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -37,8 +37,7 @@ WindowOptions::WindowOptions() :
{"stretch", "Stretch window to fullscreen (direct-to-display only)"},
{"vsync", "Force vsync {ON | OFF}. If not set samples decide how vsync is set"},
{"width", "Initial window width"}})
{
}
{}

bool WindowOptions::handle_option(std::deque<std::string> &arguments)
{
Expand Down
8 changes: 3 additions & 5 deletions components/android/src/context.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2023-2024, Thomas Atkinson
/* Copyright (c) 2023-2026, Thomas Atkinson
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -22,8 +22,7 @@
extern "C"
{
// TODO: Arguments can be parsed from the bundle
JNIEXPORT void JNICALL
Java_com_khronos_vulkan_1samples_SampleLauncherActivity_sendArgumentsToPlatform(JNIEnv *env, jobject thiz, jobjectArray arg_strings)
JNIEXPORT void JNICALL Java_com_khronos_vulkan_1samples_SampleLauncherActivity_sendArgumentsToPlatform(JNIEnv *env, jobject thiz, jobjectArray arg_strings)
{
std::vector<std::string> args;

Expand Down Expand Up @@ -75,8 +74,7 @@ namespace vkb
{
std::vector<std::string> AndroidPlatformContext::android_arguments = {};

AndroidPlatformContext::AndroidPlatformContext(android_app *app) :
PlatformContext{}, app{app}
AndroidPlatformContext::AndroidPlatformContext(android_app *app) : PlatformContext{}, app{app}
{
_external_storage_directory = details::get_external_storage_directory(app);
_temp_directory = details::get_external_cache_directory(app);
Expand Down
5 changes: 3 additions & 2 deletions components/filesystem/include/filesystem/legacy.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2025, Arm Limited and Contributors
/* Copyright (c) 2019-2026, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -137,6 +137,7 @@ void write_temp(const std::vector<uint8_t> &data, const std::string &filename);
* @param components The number of bytes per element
* @param row_stride The stride in bytes of a row of pixels
*/
void write_image(const uint8_t *data, const std::string &filename, const uint32_t width, const uint32_t height, const uint32_t components, const uint32_t row_stride);
void write_image(
const uint8_t *data, const std::string &filename, const uint32_t width, const uint32_t height, const uint32_t components, const uint32_t row_stride);
} // namespace fs
} // namespace vkb
Loading
Loading