-
Notifications
You must be signed in to change notification settings - Fork 51
Ecosystem and profiles chapters #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Introduced `12_Ecosystem_Utilities_and_Compatibility.adoc` and `13_Vulkan_Profiles.adoc` documentation. - Updated navigation to include new chapters. - Added new example code for ecosystem utilities (`32_ecosystem_utilities.cpp`) and Vulkan profiles. - Replaced hard-coded validation layer logic with external `vulkanconfig` management for cleaner implementation and flexibility. - Enhanced CMake setup for new chapters `32_ecosystem_utilities` and `33_vulkan_profiles`.
- Introduced Vulkan Android project setup with `AndroidManifest.xml` and platform-specific `34_android.cpp`. - Added cross-platform support for Vulkan initialization, rendering, and asset management between Android and desktop. - Included Android-specific utilities and logging for Vulkan deployment.
…ment - Expanded Linux, Windows, and Android scripts to include `tinygltf`, `nlohmann-json`, and `KTX` dependencies. - Introduced `FindKTX.cmake` and `FindTinyGLTF.cmake` for cross-platform library handling with fallback to FetchContent if unavailable. - Added `35_gltf_ktx` chapter featuring glTF model and KTX texture integration in Vulkan, with Android and desktop support. - Enhanced Gradle and CMake configurations for selective chapter builds and streamlined dependencies.
- Replace redundant dependency installation commands in GitHub workflows with cross-platform scripts for Linux and Windows. - Suppress error messages in `FindKTX.cmake` and `FindTinyGLTF.cmake` to allow fallbacks, improving build resilience.
- Introduced `ccache` on Linux and `sccache` on Windows for improved compilation caching in GitHub workflows. - Updated build scripts with compiler launcher configurations to leverage caching tools. - Added steps to install and configure `ccache`/`sccache` based on the runner's platform. - Enhanced CI efficiency with cache restoration for Vulkan SDK and compiler caches. - Defined platform-specific `AssetManagerType` for better Android and desktop compatibility.
- Introduced `android-build` job in GitHub Actions for building Android chapters. - Added caching for Gradle, KTX, tinygltf, and ccache to optimize builds. - Integrated setup steps for Android SDK, NDK, KTX library, and tinygltf. - Enabled dynamic chapter builds with Gradle based on supported chapters in `CMakeLists.txt`.
- Moved `-DCHAPTER` argument from `android.externalNativeBuild.cmake` to `defaultConfig.externalNativeBuild.cmake` for better configuration consistency.
…rations - Introduced `FindVulkanHpp.cmake`, `Findglm.cmake`, and `Findstb.cmake` for handling Vulkan-Hpp, GLM, and stb dependencies respectively. - Added support for fetching missing dependencies using `FetchContent` if not found locally. - Updated Android `GameActivity` lifecycle code to improve memory handling and match Vulkan initialization requirements. - Enabled all-data cloud backup and device transfer with `data_extraction_rules.xml`. - Added essential Vulkan feature declarations in `AndroidManifest.xml`.
- Implemented Android adaptive launcher icon using `ic_launcher_round.xml` with a foreground and background drawable. - Added `viking_room.obj` asset to attachments for 3D model usage in Vulkan setup or testing.
… Findnlohmann_json.cmake
|
Gave this a first try. The glTF/KTX chapter crashes for me at loading the image. Seems to be caused by the image begin RGB, which is rarely supported (at least not on my NV RTX 4070). |
|
Chapter 32 will also crash for me with the following error: The vector referrenced here seems to be the one for semaphores, so this might be related to #65 |
|
Thanks for testing @SaschaWillems, I'll change the colorspace of the texture; good call there. I'm debating about using basisu compression but I don't know if texture compression is too much for that tutorial. Do you have thoughts on that? And I know what that specific crash is. In some of these draw functions I need to use the other iterator which goes by frames in flight instead of swapchain images. Or, a better solution, as you and VUID points out, use one semaphore per swapchain image. Today's a holiday for me; will try to get some of this done this weekend when I get some more time. |
|
No presure. You're doing a truly awesome job with the tutorial 👍🏻 |
Might be a bit too much for beginners. I think KTX(2) is fine. We might want to point people at tools that can create KTX(2) files. |
- Addressed Vulkan RAII object handling with proper dereferencing using `*`. - Adjusted Vulkan profile compatibility for Android and non-Android platforms. - Updated API version to `VK_API_VERSION_1_3` and removed unused extensions. - Simplified debug messenger setup for code compatibility. - Updated Android lifecycle handling to improve Vulkan initialization. - Fixed transition from `ALooper_pollAll` to `ALooper_pollOnce` in event handling.
- Ensure `viking_room.ktx2` uses `vk::Format::eR8G8B8A8Unorm` when detected. - Adjust logic to prioritize texture path check before KTX class ID validation.
- Expanded guide with methods to create KTX2 files using tools, libraries, and image editing software. - Included instructions for converting popular formats (PNG, JPEG, DDS, HDR, etc.) to KTX2. - Detailed optimization techniques like compression, mipmaps, and metadata. - Listed tools, libraries, viewers, and game engine integrations for working with KTX2 files.
- Removed unused `LOG_INFO` and `LOG_ERROR` macros. - Replaced `LOG_INFO` and `LOG_ERROR` usage with standardized `LOGI` and `LOGE`. - Eliminated unnecessary `semaphoreIndex` variable, leveraging `currentFrame` for semaphore indexing. - Simplified Vulkan profile logging logic and texture format determination.
…ile in Android again.
- Improved caching strategy with specific cache keys. - Enabled ccache/sccache for better performance. - Switched to minimal Vulkan SDK installation. - Configured parallel builds for all platforms. - Replaced Ninja with MSVC for Windows builds. - Enhanced Linux builds by utilizing clang with ccache. - Updated Android configs to enable AndroidX and Jetifier.
…cache/sccache configuration
…mal Vulkan SDK installation - Simplified Vulkan SDK installation process with caching and aria2 integration. - Enabled sccache binary caching for Windows builds. - Enhanced vcpkg binary caching and streamlined dependency installation. - Updated Android build to support `abiFilters` configuration.
…ild.gradle` file - Introduced `vcpkg.json` to manage project dependencies. - Updated `build.gradle` to fix syntax for `abiFilters` configuration.
- Added `check-android-changes` job to detect Android-related changes and conditionally trigger builds. - Introduced `vcpkg.json` for better dependency management. - Updated `install_dependencies_windows.bat` to utilize `vcpkg.json` for streamlined dependency installation.
|
I think the CI is now as optimized as I can reasonably make it. All other comments in this PR have been hopefully addressed. I'm going to wait for this to land before I add more chapters. |
- Implemented VulkanApplication class with Android and Windows compatibility. - Added a Vulkan renderer for rendering multiple GameObjects with glTF models and KTX textures. - Introduced platform-specific handling for logging, input events, and Vulkan surface creation. - Included utility classes for vertex attributes, uniform buffers, and descriptor sets.
- Introduced multithreading example to demonstrate efficient particle computation using Vulkan. - Added compute shaders for particle updates with boundary collision handling. - Implemented thread-safe resource manager and worker thread coordination for compute operations. - Included GLSL and Slang shader implementations for compute workloads.
SaschaWillems
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty substantial and improves the tutorial a lot 👍🏻
Only had a few minor remarks that should be easy to fix.
…ents and fixes - Add frame time-based rotation to `36_multiple_objects.cpp` for consistent object rotation speed. - Enhance Vulkan Configurator documentation for clarity and consistency. - Convert `README.md` to AsciiDoc (`README.adoc`) with improved structure and detailed instructions. - Include reference links for Khronos formats (glTF, KTX2) and improve descriptions. - Refine shared and per-object resource explanations in the multiple objects guide.
SaschaWillems
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
|
Thanks, I'll merge it and start adding more chapters. |

These two new additions demonstrate how to work with older GPUs and use the tools that are freely available to the developer to discover what the requirements are for their target environment. Additionally, we introduce using vulkanconfig to set the validation layer use. And we introduce one of the most powerful features of Vulkan, profiles. This is leading up to the next chapter, mobile.