{"id":15036728,"url":"https://github.com/khronosgroup/vulkan-samples","last_synced_at":"2025-05-13T17:07:04.344Z","repository":{"id":37390755,"uuid":"218329478","full_name":"KhronosGroup/Vulkan-Samples","owner":"KhronosGroup","description":"One stop solution for all Vulkan samples","archived":false,"fork":false,"pushed_at":"2025-04-07T15:21:12.000Z","size":67695,"stargazers_count":4613,"open_issues_count":60,"forks_count":695,"subscribers_count":91,"default_branch":"main","last_synced_at":"2025-04-09T21:10:32.114Z","etag":null,"topics":["best-practices","cpp","graphics","graphics-programming","khronos","tutorials","vulkan","vulkan-api","vulkan-samples"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KhronosGroup.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.adoc","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-29T16:10:56.000Z","updated_at":"2025-04-09T20:14:04.000Z","dependencies_parsed_at":"2023-02-19T08:30:35.331Z","dependency_job_id":"219ef21e-b17a-4260-93a2-c3402d8adc1a","html_url":"https://github.com/KhronosGroup/Vulkan-Samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FVulkan-Samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FVulkan-Samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FVulkan-Samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FVulkan-Samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KhronosGroup","download_url":"https://codeload.github.com/KhronosGroup/Vulkan-Samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250530602,"owners_count":21445818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["best-practices","cpp","graphics","graphics-programming","khronos","tutorials","vulkan","vulkan-api","vulkan-samples"],"created_at":"2024-09-24T20:32:08.640Z","updated_at":"2025-04-23T23:25:55.134Z","avatar_url":"https://github.com/KhronosGroup.png","language":"C++","readme":"////\n- Copyright (c) 2019-2024, Arm Limited and Contributors\n-\n- SPDX-License-Identifier: Apache-2.0\n-\n- Licensed under the Apache License, Version 2.0 the \"License\";\n- you may not use this file except in compliance with the License.\n- You may obtain a copy of the License at\n-\n-     http://www.apache.org/licenses/LICENSE-2.0\n-\n- Unless required by applicable law or agreed to in writing, software\n- distributed under the License is distributed on an \"AS IS\" BASIS,\n- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- See the License for the specific language governing permissions and\n- limitations under the License.\n-\n////\n= Vulkan Samples\n// omit in toc\n:pp: {plus}{plus}\nifndef::site-gen-antora[]\n:toc:\nendif::[]\n\nimage::banner.jpg[Vulkan Samples banner]\n\nifndef::site-gen-antora[]\n== Vulkan Documentation Site\n\nDocumentation for the samples is best viewed at the new link:https://docs.vulkan.org/samples/latest/README.html[Vulkan Documentation Site]. The documentation uses AsciiDoc which isn't fully supported by github.\n\nendif::[]\n\n== Introduction\n\nThe Vulkan Samples is collection of resources to help you develop optimized Vulkan applications.\n\nIf you are new to Vulkan the xref:samples/api/README.adoc[API samples] are the right place to start.\nAdditionally you may find the following links useful:\n\nifdef::site-gen-antora[]\n* xref:guide:ROOT:index.adoc[Vulkan Guide]\n* xref:tutorial:ROOT:00_Introduction.adoc[Get Started in Vulkan]\nendif::[]\n\nifndef::site-gen-antora[]\n* https://docs.vulkan.org/guide/latest/index.html[Vulkan Guide]\n* https://docs.vulkan.org/tutorial/latest/index.html[Get Started in Vulkan]\nendif::[]\n\nxref:samples/performance/README.adoc[Performance samples] show the recommended best practice together with real-time profiling information.\nThey are more advanced but also contain a detailed tutorial with more in-detail explanations.\n\n=== Goals\n\n* Create a collection of resources that demonstrate best-practice recommendations in Vulkan\n* Create tutorials that explain the implementation of best-practices and include performance analysis guides\n* Create a xref:framework/README.adoc[framework] that can be used as reference material and also as a sandbox for advanced experimentation with Vulkan\n\n== Samples\n\n* xref:./samples/README.adoc[Listing of all samples available in this repository]\n\n== General information\n\n* *Project Basics*\n ** xref:./docs/misc.adoc#controls[Controls]\n ** xref:./docs/misc.adoc#debug-window[Debug window]\n ** xref:./scripts/README.adoc[Create a Sample]\n* *Vulkan Essentials*\n ** xref:./samples/vulkan_basics.adoc[How does Vulkan compare to OpenGL ES?\nWhat should you expect when targeting Vulkan?]\n* *Misc*\n ** xref:./docs/misc.adoc#driver-version[Driver version]\n ** xref:./docs/memory_limits.adoc[Memory limits]\n\n== Setup\n\nPrerequisites: https://git-scm.com/downloads[git] with https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage[git large file storage (git-lfs)].\n\nClone the repo with submodules using the following command:\n\n----\ngit clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Samples.git\ncd Vulkan-Samples\n----\n\nFollow build instructions for your platform below.\n\n[NOTE]\n====\nThe full repository is very large, and some ISPs appear to have trouble\nproviding a robust connection to github while the clone is being made.\n\nIf you notice problems such as submodules downloading at reported rates in\nthe tens of kB/s, or fatal timeout errors occurring, these may be due to\nnetwork routing issues to github within your ISP's internal network, rather\nthan anything wrong in your own networking setup.\n\nIt can be very difficult to get ISPs to acknowledge such problems exist, much\nless to fix them.\n\nOne workaround is to switch the repository to use ssh protocol prior to the\nsubmodule download, which can be done via e.g.\n\n[source,sh]\n----\ngit clone git@github.com:KhronosGroup/Vulkan-Samples.git\ncd Vulkan-Samples\nperl -i -p -e 's|https://(.*?)/|git@\\1:|g' .gitmodules\ngit submodule sync\ngit submodule update\n----\n\nWhile this can be a good alternative if you are running into this connection\nissue, you must have GitHub ssh key authentication setup to use ssh\nprotocol - see\nlink:https://docs.github.com/en/authentication/connecting-to-github-with-ssh[Connecting\nto GitHub with SSH] for details.\nSo it is a not a solution we can implement as the repository default.\n\nAnother option which may help is to run github through a VPN service.\n====\n\n\n== Build\n\n=== Supported Platforms\n\n* Windows - xref:./docs/build.adoc#windows[Build Guide]\n* Linux - xref:./docs/build.adoc#linux[Build Guide]\n* Android - xref:./docs/build.adoc#android[Build Guide]\n* macOS - xref:./docs/build.adoc#macos[Build Guide]\n* iOS - xref:./docs/build.adoc#ios[Build Guide]\n\n== Usage\n\nThe following shows some example command line usage on how to configure and run the Vulkan Samples.\n\n\u003e Make sure that you are running the samples from the root directory of the repository.\n\u003e Otherwise the samples will not be able to find the assets.\n\u003e ./build/app/bin/\u003cBuildType\u003e/\u003cArch\u003e/vulkan_samples\n\n----\n# For the entire usage use\nvulkan_samples --help\n\n# For subcommand usage use\nvulkan_samples \u003csub_command\u003e --help\n\n# Run Swapchain Images sample\nvulkan_samples sample swapchain_images\n\n# Run AFBC sample in benchmark mode for 5000 frames\nvulkan_samples sample afbc --benchmark --stop-after-frame 5000\n\n# Run compute nbody using headless_surface and take a screenshot of frame 5 \n# Note: headless_surface uses VK_EXT_headless_surface.\n# This will create a surface and a Swapchain, but present will be a no op.\n# The extension is supported by Swiftshader(https://github.com/google/swiftshader).\n# It allows to quickly test content in environments without a GPU.\nvulkan_samples sample compute_nbody --headless_surface -screenshot 5\n\n# Run all the performance samples for 10 seconds in each configuration\nvulkan_samples batch --category performance --duration 10\n\n# Run Swapchain Images sample on an Android device\nadb shell am start-activity -n com.khronos.vulkan_samples/com.khronos.vulkan_samples.SampleLauncherActivity -e sample swapchain_images\n----\n\n== License\n\nSee link:LICENSE[LICENSE].\n\nThis project has several xref:./third_party/README.adoc[third-party dependencies]\n\nThis project uses assets from https://github.com/KhronosGroup/Vulkan-Samples-Assets[vulkan-samples-assets].\nEach one has its own license.\n\n=== Trademarks\n\nVulkan is a registered trademark of the Khronos Group Inc.\n\n== Contributions\n\nDonated to Khronos by Arm, with further contributions by Sascha Willems and Adam Sawicki.\nSee xref:CONTRIBUTORS.adoc[CONTRIBUTORS] for the full contributor list.\n\nAlso see xref:CONTRIBUTING.adoc[CONTRIBUTING] for contribution guidelines.\n\n== Related resources\n\n* https://developer.arm.com/documentation/101897/latest/[Mali GPU Best Practices]: A document with recommendations for efficient API usage\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhronosgroup%2Fvulkan-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhronosgroup%2Fvulkan-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhronosgroup%2Fvulkan-samples/lists"}