Skip to content

Commit

Permalink
chore: run pre-commit on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
tomadamatkinson committed Feb 24, 2024
1 parent cc88ca8 commit 6a08017
Show file tree
Hide file tree
Showing 354 changed files with 1,848 additions and 1,882 deletions.
4 changes: 2 additions & 2 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2023, Arm Limited and Contributors
# Copyright (c) 2022-2024, Arm Limited and Contributors
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -18,7 +18,7 @@ FROM ubuntu:20.04

# Vulkan Samples Docker
# This image is using the the KhronosGroup/Vulkan-Samples project
#
#
# When adding new dependencies the /tmp directory can be used for building and installation
# This is cleaned at the end of the docker build

Expand Down
4 changes: 2 additions & 2 deletions .github/docker/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2021, Arm Limited and Contributors
Copyright (c) 2021-2024, Arm Limited and Contributors
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 the "License";
you may not use this file except in compliance with the License.
Expand All @@ -22,4 +22,4 @@ vk_convert.lex - An adaptation of a camal case to snake case converter originall
snake_case.py - A helper script to run the lexer on a subset of files
run-clang-tidy.py - A helper script that can be found in [clang-tools](https://clang.llvm.org/extra/doxygen/run-clang-tidy_8py_source.html)
check_copyright_headers.py - A script used to check that each file contains the correct up to date copyright information
clang_format.py - A helper script used to run clang format over a subset of files [git-clang-format](https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/git-clang-format)
clang_format.py - A helper script used to run clang format over a subset of files [git-clang-format](https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/git-clang-format)
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ repos:
rev: 'v15.0.7'
hooks:
- id: clang-format
'types_or': [c++, c]
2 changes: 1 addition & 1 deletion .snakeignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
glfw*
glad*
glad*
4 changes: 2 additions & 2 deletions antora/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022-2023 The Khronos Group Inc.
# Copyright 2022-2024 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0

# Configure Vulkan Guide Antora tree with transformed markup files.
Expand Down Expand Up @@ -50,4 +50,4 @@ endfunction()

if(VKB_GENERATE_ANTORA_SITE)
gatherAntoraAssets()
endif()
endif()
6 changes: 3 additions & 3 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023, Arm Limited and Contributors
# Copyright (c) 2019-2024, Arm Limited and Contributors
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -50,7 +50,7 @@ if(ANDROID)
set_property(TARGET ${PROJECT_NAME} PROPERTY ANDROID_ASSETS_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/../assets)
set_property(TARGET ${PROJECT_NAME} PROPERTY ANDROID_JAVA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../bldsys/android/java)
endif()

# Add packaging project only if not using CMake's toolchain
if(CMAKE_SYSTEM_VERSION GREATER 1)
add_android_package_project(
Expand Down Expand Up @@ -80,4 +80,4 @@ if(MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${SUFFIX} ${CMAKE_CURRENT_BINARY_DIR}/lib/${CONFIG_DIR}/${TARGET_ARCH})
set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_${SUFFIX} ${CMAKE_CURRENT_BINARY_DIR}/lib/${CONFIG_DIR}/${TARGET_ARCH})
endforeach()
endif()
endif()
4 changes: 2 additions & 2 deletions app/android/java/com/khronos/vulkan_samples/FilterDialog.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2021, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -149,4 +149,4 @@ public void onClick(DialogInterface dialog, int id) {
this.dialog.values = new ArrayList<>(this.dialog.alteredValues);
this.dialog.notifyAdapter();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2021, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -102,4 +102,4 @@ public CharSequence getPageTitle(int position) {
TabFragment getCurrentFragment() {
return currentFragment;
}
}
}
4 changes: 2 additions & 2 deletions app/android/java/com/khronos/vulkan_samples/model/Sample.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2021, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -153,7 +153,7 @@ public boolean equals(Object object) {

/**
* Used when comparing two samples - Alphabetical Case Insensitive
* Sample id's are unique so this is used to compare
* Sample id's are unique so this is used to compare
*
* @param sample To compare too
* @return - if less, 0 if equal + if greater than
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2021, Arm Limited and Contributors
/* Copyright (c) 2021-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -67,4 +67,4 @@ class CheckPermissionClickListener implements View.OnClickListener {
public void onClick(View v) {
activity.requestNextPermission();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2021, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -80,4 +80,4 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
String sampleID = ((Sample) parent.getItemAtPosition(position)).getId();
activity.launchSample(sampleID);
}
}
}
4 changes: 2 additions & 2 deletions app/android/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (c) 2019-2021, Arm Limited and Contributors
- Copyright (c) 2019-2024, Arm Limited and Contributors
-
- SPDX-License-Identifier: Apache-2.0
-
Expand Down Expand Up @@ -71,4 +71,4 @@
android:visibility="invisible"
android:text="@string/permissions_button" />

</RelativeLayout>
</RelativeLayout>
4 changes: 2 additions & 2 deletions app/android/res/layout/fragment_tab.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (c) 2019-2020, Arm Limited and Contributors
- Copyright (c) 2019-2024, Arm Limited and Contributors
-
- SPDX-License-Identifier: Apache-2.0
-
Expand Down Expand Up @@ -36,4 +36,4 @@
android:layout_height="match_parent"
android:layout_centerInParent="true" />

</RelativeLayout>
</RelativeLayout>
4 changes: 2 additions & 2 deletions app/android/res/xml/provider_paths.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (c) 2019, Arm Limited and Contributors
- Copyright (c) 2019-2024, Arm Limited and Contributors
-
- SPDX-License-Identifier: Apache-2.0
-
Expand All @@ -19,4 +19,4 @@
-->
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/>
</paths>
</paths>
2 changes: 1 addition & 1 deletion app/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ foreach(ID ${PROJECT_ID_LIST})
target_link_libraries(${PROJECT_NAME} PUBLIC ${ID})
endif()
endif()
endforeach()
endforeach()
4 changes: 2 additions & 2 deletions app/apps/apps.cpp.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2021, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -137,4 +137,4 @@ std::vector<AppInfo *> get_tests()
return app_ptrs;
}

} // namespace apps
} // namespace apps
16 changes: 8 additions & 8 deletions app/apps/apps.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2021, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -29,7 +29,7 @@
*
* Vulkan Samples currently has two types of apps, Samples and Tests. These apps work from the same interface AppInfo.
* Samples and Tests are categorised into namespaces samples and tests respectively. Each name space has a method to retrieve
* the AppInfo interface version of the app (tests::get_apps, samples::get_apps).
* the AppInfo interface version of the app (tests::get_apps, samples::get_apps).
*
*/

Expand Down Expand Up @@ -84,22 +84,22 @@ class TestInfo : public AppInfo

/**
* @brief Get a specific app
*
*
* @param id ID of a specific app
* @return const std::vector<AppInfo *>
* @return const std::vector<AppInfo *>
*/
AppInfo *get_app(const std::string &id);

/**
* @brief Get all apps
*
*
* @return const std::vector<AppInfo *> A list of all apps
*/
std::vector<AppInfo *> get_apps();

/**
* @brief Get all samples
*
*
* @param categories If not empty the lists will include samples that match on of the categories requested
* @param tags If not empty the lists will include samples that match on of the tags requested
* @return std::vector<AppInfo *> A list of samples
Expand All @@ -110,8 +110,8 @@ SampleInfo *get_sample(const std::string &id);

/**
* @brief Get all tests
*
*
* @return std::vector<AppInfo *> A list of Tests
*/
std::vector<AppInfo *> get_tests();
} // namespace apps
} // namespace apps
4 changes: 2 additions & 2 deletions app/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -59,4 +59,4 @@ CUSTOM_MAIN(context)
platform.terminate(code);

return 0;
}
}
4 changes: 2 additions & 2 deletions app/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[[
Copyright (c) 2019-2023, Arm Limited and Contributors
Copyright (c) 2019-2024, Arm Limited and Contributors
SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -99,4 +99,4 @@ add_library(plugins OBJECT ${SRC_FILES})
target_include_directories(plugins PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} $<TARGET_PROPERTY:apps,INTERFACE_INCLUDE_DIRECTORIES> $<TARGET_PROPERTY:framework,INTERFACE_INCLUDE_DIRECTORIES>)
target_compile_options(plugins PRIVATE $<TARGET_PROPERTY:apps,INTERFACE_COMPILE_OPTIONS> $<TARGET_PROPERTY:framework,INTERFACE_COMPILE_OPTIONS>)
target_compile_features(plugins PRIVATE $<TARGET_PROPERTY:apps,INTERFACE_COMPILE_FEATURES> $<TARGET_PROPERTY:framework,INTERFACE_COMPILE_FEATURES>)
target_compile_definitions(plugins PRIVATE $<TARGET_PROPERTY:apps,INTERFACE_COMPILE_DEFINITIONS> $<TARGET_PROPERTY:framework,INTERFACE_COMPILE_DEFINITIONS>)
target_compile_definitions(plugins PRIVATE $<TARGET_PROPERTY:apps,INTERFACE_COMPILE_DEFINITIONS> $<TARGET_PROPERTY:framework,INTERFACE_COMPILE_DEFINITIONS>)
4 changes: 2 additions & 2 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-2023, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -143,4 +143,4 @@ void BatchMode::load_next_app()
// App will be started before the next update loop
request_app();
}
} // namespace plugins
} // namespace plugins
8 changes: 4 additions & 4 deletions app/plugins/batch_mode/batch_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ 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.
*
*
* Usage: vulkan_samples batch --duration 3 --category performance --tag arm
*
*
*/
class BatchMode : public BatchModeTags
{
Expand Down Expand Up @@ -82,4 +82,4 @@ class BatchMode : public BatchModeTags

void load_next_app();
};
} // namespace plugins
} // namespace plugins
4 changes: 2 additions & 2 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-2021, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -58,4 +58,4 @@ void BenchmarkMode::on_app_close(const std::string &app_id)
{
LOGI("Benchmark for {} completed in {} seconds (ran {} frames, averaged {} fps)", app_id, elapsed_time, total_frames, total_frames / elapsed_time);
}
} // namespace plugins
} // namespace plugins
10 changes: 5 additions & 5 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-2021, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -27,11 +27,11 @@ 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.
*
*
* Usage: vulkan_samples sample afbc --benchmark
*
*
*/
class BenchmarkMode : public BenchmarkModeTags
{
Expand All @@ -57,4 +57,4 @@ class BenchmarkMode : public BenchmarkModeTags

float elapsed_time{0.0f};
};
} // namespace plugins
} // namespace plugins
4 changes: 2 additions & 2 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, Arm Limited and Contributors
/* Copyright (c) 2022-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -39,4 +39,4 @@ void DataPath::init(const vkb::CommandParser &parser)
}
}

} // namespace plugins
} // namespace plugins
4 changes: 2 additions & 2 deletions app/plugins/data_path/data_path.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2022, Arm Limited and Contributors
/* Copyright (c) 2022-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -43,4 +43,4 @@ class DataPath : public DataPathTags

vkb::FlagCommand data_path_flag = {vkb::FlagType::OneValue, "data-path", "", "Folder containing data files"};
};
} // namespace plugins
} // namespace plugins
Loading

0 comments on commit 6a08017

Please sign in to comment.