|
| 1 | +<!-- |
| 2 | +- Copyright (c) 2019, Arm Limited and Contributors |
| 3 | +- |
| 4 | +- SPDX-License-Identifier: MIT |
| 5 | +- |
| 6 | +- Permission is hereby granted, free of charge, |
| 7 | +- to any person obtaining a copy of this software and associated documentation files (the "Software"), |
| 8 | +- to deal in the Software without restriction, including without limitation the rights to |
| 9 | +- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, |
| 10 | +- and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
| 11 | +- |
| 12 | +- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 13 | +- |
| 14 | +- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
| 15 | +- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | +- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 17 | +- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 18 | +- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | +- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 20 | +- |
| 21 | +--> |
| 22 | + |
| 23 | +# Vulkan Best Practice for Mobile Developers <!-- omit in toc --> |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +## Contents <!-- omit in toc --> |
| 28 | + |
| 29 | +- [Introduction](#introduction) |
| 30 | + - [Goals](#goals) |
| 31 | +- [Tutorials](#tutorials) |
| 32 | +- [Setup](#setup) |
| 33 | +- [Build](#build) |
| 34 | + - [Supported Platforms](#supported-platforms) |
| 35 | +- [License](#license) |
| 36 | + - [Trademarks](#trademarks) |
| 37 | + |
| 38 | +## Introduction |
| 39 | + |
| 40 | +The Vulkan Best Practice for Mobile Developers is collection of resources to help you develop optimized Vulkan applications for mobile platforms. |
| 41 | + |
| 42 | +### Goals |
| 43 | +- Create a collection of resources that demonstrate best-practice recommendations in Vulkan |
| 44 | +- Create tutorials that explain the implementation of best-practices and include performance analysis guides |
| 45 | +- Create a framework that can be used as reference material and also as a sandbox for advanced experimentation with Vulkan |
| 46 | + |
| 47 | +> **Disclaimer:** This project covers advanced vulkan concepts. If you are new to Vulkan here are a few links to get you started: |
| 48 | +> - [Beginners Guide to Vulkan](https://www.khronos.org/blog/beginners-guide-to-vulkan) |
| 49 | +> - [Get Started in Vulkan](https://vulkan-tutorial.com/) |
| 50 | +
|
| 51 | +## Tutorials |
| 52 | +- **General** |
| 53 | + - [Controls](./docs/controls.md) |
| 54 | + - [Create a Sample](./docs/create_sample.md) |
| 55 | +- **Vulkan Essentials** |
| 56 | + - [How does Vulkan compare to OpenGL ES? What should you expect when targeting Vulkan?](./samples/vulkan_basics.md) |
| 57 | +- **Vulkan Swapchains** |
| 58 | +More detailed look at swapchains, and how you might want to use them |
| 59 | + - [Appropriate use of N-buffering](./samples/swapchain_images/swapchain_images_tutorial.md) |
| 60 | + - [Appropriate use of surface rotation](./samples/surface_rotation/surface_rotation_tutorial.md) |
| 61 | +- **Render Passes** |
| 62 | + - [Appropriate use of load/store operations, and use of transient attachments](./samples/render_passes/render_passes_tutorial.md) |
| 63 | +- **AFBC** |
| 64 | + - [Appropriate use of AFBC](./samples/afbc/afbc_tutorial.md) |
| 65 | + |
| 66 | +## Setup |
| 67 | + |
| 68 | +Clone the repo with submodules using the following command: |
| 69 | + |
| 70 | +``` |
| 71 | +git clone --recurse-submodules https://github.com/ARM-software/vulkan_best_practice_for_mobile_developers.git |
| 72 | +cd vulkan_best_practice_for_mobile_developers |
| 73 | +``` |
| 74 | + |
| 75 | +Follow build instructions for your platform below. |
| 76 | + |
| 77 | +## Build |
| 78 | + |
| 79 | +### Supported Platforms |
| 80 | +- Windows - [Build Guide](./docs/build.md#windows "Windows Build Guide") |
| 81 | +- Linux - [Build Guide](./docs/build.md#linux "Linux Build Guide") |
| 82 | +- Android - [Build Guide](./docs/build.md#android "Android Build Guide") |
| 83 | +<!-- - Mac OSX (Experimental) - [Build Guide](./build.md#mac "Mac OSX Build Guide") --> |
| 84 | + |
| 85 | +> Tested on: Samsung Galaxy S9, Samsung Galaxy S10, Huawei Mate 20 Pro, OPPO R15 |
| 86 | +
|
| 87 | +## License |
| 88 | + |
| 89 | +See [LICENSE](LICENSE). |
| 90 | + |
| 91 | +This project has some third-party dependencies, each of which may have independent licensing: |
| 92 | + |
| 93 | +- [glfw](https://github.com/glfw/glfw): A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input |
| 94 | +- [glm](https://github.com/g-truc/glm): OpenGL Mathematics |
| 95 | +- [glslang](https://github.com/KhronosGroup/glslang): Shader front end and validator |
| 96 | +- [HWCPipe](https://github.com/ARM-software/HWCPipe): Interface to mobile Hardware Counters |
| 97 | +- [dear imgui](https://github.com/ocornut/imgui): Immediate Mode Graphical User Interface |
| 98 | + - [dear imgui shaders](https://github.com/SaschaWillems/Vulkan/tree/master/data/shaders/imgui): GLSL shaders for dear imgui |
| 99 | +- [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross): Parses and converts SPIR-V to other shader languages |
| 100 | +- [stb](https://github.com/nothings/stb): Single-file public domain (or MIT licensed) libraries |
| 101 | +- [tinygltf](https://github.com/syoyo/tinygltf): Header only C++11 tiny glTF 2.0 library |
| 102 | +- [vma](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator): Vulkan Memory Allocator |
| 103 | +- [volk](https://github.com/zeux/volk): Meta loader for Vulkan API |
| 104 | +- [vulkan](https://github.com/KhronosGroup/Vulkan-Docs): Sources for the formal documentation of the Vulkan API |
| 105 | + |
| 106 | +This project uses the following 3D models. Each one has its own licence. |
| 107 | + |
| 108 | +- Sponza [license](https://creativecommons.org/licenses/by/3.0/) with the following modifications: |
| 109 | + - All textures are converted to ASTC in .ktx format. |
| 110 | + - Converted to gltf using [Blender exporter](https://github.com/KhronosGroup/glTF-Blender-IO). |
| 111 | + |
| 112 | +Models downloaded from Morgan McGuire's [Computer Graphics Archive](https://casual-effects.com/data). |
| 113 | + |
| 114 | +### Trademarks |
| 115 | + |
| 116 | +Vulkan is a registered trademark of the Khronos Group Inc. |
0 commit comments