summaryrefslogtreecommitdiff
path: root/vulkan/scripts
AgeCommit message (Collapse)Author
2025-04-01Add missing pushDescriptor field to VkPhysicalDeviceVulkan14Features Nikita Gupta
Bug: b/403413507 Test: adb shell cmd gpu vkjson Flag: NONE infeasible (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b5e5941572cc1c35c502bddaeac47398e7270e40) Merged-In: I68403240b59985f79d7660398a000ed50371539f Change-Id: I68403240b59985f79d7660398a000ed50371539f
2025-03-14Update vkjson codegen Nikita Gupta
Fixing vkJson null pointer dereference for Vulkan1.4 driver by setting array values of VkPhysicalDeviceVulkan14Properties. Test: adb shell cmd gpu vkjson Bug: b/403413507 Flag: NONE infeasible Change-Id: Ibc3f77ea4606c38da008a00294546a63c83889cb
2025-03-12Codegen of vkjson Nikita Gupta
The vkjson_generate.py script generates vkjson files from data in vkjson_constants.py. While ideally vk.xml would serve as the source (a future improvement), deriving vkjson_constants.py from vk.xml is a separate task. To maintain concise CLs, this derivation will be addressed in a separate CL. Adding symbols (features, properties, extensions, limits) to vkjson is now straightforward. Simply define their dependencies within vkjson_constants.py, and the script will automatically update vkjson.h, vkjson.cc, and vkjson_instance.cc accordingly. Test: adb shell cmd gpu vkjson Flag: NONE infeasible Bug: b/401180969 Change-Id: I3652e80c465145e86cc4c25f79523a6dc2111d18
2024-11-25Regenerate vulkan-loader for 1.4 Chris Forbes
Manual changes to scripts/generator_common.py, then generated by running scripts/code_generator.py Bug: b/370568136 Flag: NONE infeasible Change-Id: I91937577496488b18e6972224a79de31a863c327
2024-08-15Implement the VK_KHR_swapchain_mutable_format device extension in the vulkan ↵ Tom Murphy
loader Add an implementation for the VK_KHR_swapchain_mutable_format extension. Test: Stepped through changes in debugger Test: Ran sample app with VVL which used the extension Test: Ran dEQP-VK.image.swapchain_mutable.android.* dEQP tests Flag: com.android.graphics.libvulkan.flags.swapchain_mutable_format_ext Bug: 341978292 Change-Id: Ib0e5b9f750cd5a94ab65419542898db207716fcc
2024-06-25Unbitrot libvulkan's code generator Chris Forbes
The generator py scripts were broken when VKSC was released. Fix them and submit the updated autogenerated code. Bug: b/346650750 Flag: EXEMPT bugfix Test: ran the script after fixes Change-Id: I44352b052e5d018b91b327f1c8b3763146ed8fbe
2024-05-15Filter hook entry points by ICD entry point presence Jörg Wagner
For device proc hooks which intercept core functions check whether there exists an exposed core function from the ICD, and skip exposure if none is found. This avoids having to replicate exposure filtering based on requested Vulkan API versions inside the Loader - rely on the ICD to handle it correctly. Bug: 309752984 Change-Id: Ibeb13dae8eccaa859072ee5233013d99d5b26ef0
2023-08-03Add swapchainImageUsage to VkGrallocUsageInfo2 Trevor David Black
Bug: 288286529 Test: Build Change-Id: I8091d9c4db11394b85ceb1d266f97d35a00cc246
2022-12-28Revert "Revert "Reland: "libvulkan: Implement EXT_swapchain_maintenance1"""" Chris Forbes
This reverts commit 334a4105c8d52848c48c4c843a33522423010c4c. Reason for revert: all failures tracked to original CL, not the reland. No issues seen now in manual hwasan tests. Change-Id: Icd2f12f18b5f1a77237703983e11bced16cb8865
2022-12-22Revert "Reland: "libvulkan: Implement EXT_swapchain_maintenance1""" Ian Elliott
This reverts commit 2dcb4f0064d3d6a01105d2c8a12368c347d85227. Reason for revert: Appears to cause HWASAN failures. See b/263442454, b/263446408, b/263444233, and b/263445588. Change-Id: I6de0027ae2db803445a66de575dda97826b8eb6a
2022-12-22Reland: "libvulkan: Implement EXT_swapchain_maintenance1"" Chris Forbes
This reverts commit ac40c1e284453e10a7c2b6f2c6090fc4be322398 and incorporates a fix for the memory corruption that caused us to revert it initially. Bug: b/255376900 Change-Id: I3d8ab1977ea705bebdb8cd2c69d39f06ab5c4158
2022-12-21Revert "libvulkan: Implement EXT_swapchain_maintenance1" Ian Elliott
This reverts commit 08c7bb1fdb33d6ad34ba1b2de3ac0579750456fe. Reason for revert: Possibly the cause of b/263412882 (will revert and see if that clears up the problem) Change-Id: If217e36c67fcea8b5270dbf20b0c13c42d1da09a
2022-12-21libvulkan: Implement EXT_swapchain_maintenance1 Chris Forbes
The loader now implements EXT_swapchain_maintenance1 and EXT_surface_maintenance1, which fix assorted issues with the original swapchain extension. Our implementation of EXT_swapchain_maintenance1 is conditional on the underlying driver having support for importing sync fds as external fences (which requires Vulkan 1.1 + support for VK_KHR_external_fence_fd). Bug: b/255376900 Change-Id: I72ce770a7296e4e97cccf13bad420aa5a1001a6a
2022-11-16Vulkan loader changes to support VK_EXT_image_compression_control Trevor David Black
Bug: 218365766 Test: Build Change-Id: I91cddbee0daac27d838e6201ba63c51a5158412c
2022-03-16swapchain: Implement VK_KHR_surface_protected_capabilities Ian Elliott
This version tries to address some subtle differences between upstream and downstream branches. Bug: 221490496 Test: Test with ANGLE EGLConfig-generation code Change-Id: I750f052e3560e76b2035ed3c92a3ec38745b9ef4
2022-03-16swapchain: Implement VK_GOOGLE_surfaceless_query Ian Elliott
This extension allows ANGLE to call Vulkan WSI queries before it has a VkSurfaceKHR. This version tries to address some subtle differences between upstream and downstream branches. Bug: 203826952 Test: Test with ANGLE EGLConfig-generation code Change-Id: I7eb013efbaa5dd19ebed045583616238cea57023
2022-03-15Revert "swapchain: Implement VK_GOOGLE_surfaceless_query" Ian Elliott
In order to help the automerger get this everywhere, am reverting it here, and then will land it in AOSP master (which will automerge here again). This reverts commit 8e0f12163f90a1a511625ba1f290de95777beb86. Test: Manual inspection Bug: 203826952 Change-Id: I227993c87b1601b8dc0d1cf4bb008d5af9abc930
2022-03-14Revert "swapchain: Implement VK_KHR_surface_protected_capabilities" Ian Elliott
In order to help the automerger get this everywhere, am reverting it here, and then will land it in AOSP master (which will automerge here again). This reverts commit a9e06fd447e8ebf22b2dd025d6ee1aa3f93b2bc1. Test: Manual Inspection Bug: 221490496 Change-Id: I21dcc2ab87d34b2366d32d06b910c88400c5f70d
2022-03-01swapchain: Implement VK_KHR_surface_protected_capabilities Ian Elliott
Bug: 221490496 Test: Test with ANGLE EGLConfig-generation code Change-Id: Id01e677175a2cf98f4d893e21f3c654375772153
2022-03-01swapchain: Implement VK_GOOGLE_surfaceless_query Ian Elliott
This extension allows ANGLE to call Vulkan WSI queries before it has a VkSurfaceKHR. Bug: 203826952 Test: Test with ANGLE EGLConfig-generation code Change-Id: I7e53a8a28157023658baac0778033159bdd2285e
2021-06-28Vulkan: update the loader for vulkan-headers v1.2.183 Trevor David Black
Bug: 192288751 Test: build Change-Id: Icee2374114f14285c6e522c0ccfbf106390a8fa3
2020-10-23Merge changes from topic "vulkan-header-1.2.158" am: 373e4fd03e am: ↵ Treehugger Robot
64f80d1b45 am: b932d1c701 am: fa5109f4cd Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1465688 Change-Id: Ib518ffa5be638239f8d3655c8e3e6194e93cce9b
2020-10-22Vulkan: update the loader for vulkan-headers v1.2.158 Yiwei Zhang
1. Fixed a false assumption on max api version in gen script 2. Updated thae gens via ./vulkan/scripts/code_generator.py 3. Added the new entry points to null_driver. 4. Updated the llndk symbol map Bug: 171402955 Test: build Change-Id: Ifa0b9dce7f4138ca0c72c1c17ca3af8eed538abf
2020-07-13libvulkan: cleanup some redundant codes Yiwei Zhang
This change also removes some unnecessary clang-format operations. Test: build Change-Id: I6dae3a72448b931e07e5f94087e7a477582b4ca4
2020-07-07libvulkan: fix support for promoted VK_KHR_external_* extensions Yiwei Zhang
This change intercepts below entry points: vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalFenceProperties Bug: 160276146 Test: adb shell cmd gpu vkjson Test: dEQP-VK.api.external.* Change-Id: I08e5647fd7ea48c2a0b2e28ef688dee44f85684c
2020-07-07libvulkan: fix support for promoted GPDP2 Yiwei Zhang
This change intercepts below entry points: vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 Bug: 160276146 Test: adb shell cmd gpu vkjson Test: dEQP-VK.api.* Change-Id: I446192e3d29a3b0496d8d274a5a9cd3f2c0b3ee5
2020-07-07libvulkan: fix support for 1.1 vkEnumeratePhysicalDeviceGroups Yiwei Zhang
When the icd instance is 1.0, VK_KHR_device_group_creation will be enabled by the loader if the extension is advertised. Then we will try to use vkEnumeratePhysicalDeviceGroupsKHR as a fallback. Bug: 160276146 Test: adb shell cmd gpu vkjson Test: dEQP-VK.api.info.instance.physical_device_groups Change-Id: I9e2d9af66e80244f1d43b54ac2800316200c0d00
2020-07-07libvulkan: enable promoted instance extensions for 1.0 icd instance Yiwei Zhang
QueryPresentationProperties requires GetPhysicalDeviceProperties2KHR, however, for 1.0 icd instance, GPDP2 extension needs to be enabled by the loader since the loader advertises 1.1 instance support. Bug: 160276146 Test: dEQP-VK.wsi.android.shared_presentable_image* Change-Id: Id0195d4a115e78e1d82b719059de271cd29446e0
2020-06-15vulkan/opengl: rename some vars and comments Yiwei Zhang
Fixes: 159027425 Test: ./vulkan/scripts/code_generator.py and build Change-Id: I23524a0c65d0c7c31e4dc3859ce7b979f9093553
2020-05-21libvulkan: support vkGIPA self-query Jesse Hall
vkGetInstanceProcAddr(nullptr, ...) is valid and is effectively a globally dispatched function, so it's consistent to support querying vkGetInstanceProcAddr from itself without an instance. This is required in Vulkan 1.2 and is supported for all Vulkan versions by the loader on other platforms. To maximize app compatibility and minimize surprises, this makes it work on Android also, even for pre-1.2 versions where the result is undefined by the spec. Bug: 157173922 Test: dEQP-VK.api.version_check.entry_points with https://gerrit.khronos.org/#/c/5490/ applied and modified to check even on pre-1.2 implementations. Change-Id: I820dd1239df54a415b7ff5db47cf2c2b349f6155
2019-10-17Vulkan: correctly expose Vulkan entry points Yiwei Zhang
This change fixes the advertisement of core Vulkan entry points as below: 1. GIPA returns a valid checked_proc for 1.1 core device APIs. 2. GDPA returns NULL for 1.1 core device APIs on a 1.0 physical device. Bug: 134185757 Bug: 142266108 Test: dEQP-VK.memory.binding on 1.1 loader and 1.0 device ICD Test: dEQP-VK.api.info.instance on 1.1 loader and 1.0 instance ICD Change-Id: I0a3e06dc04bade4f36a7e68ee2f53979c656ee4e
2019-10-16Vulkan: factor base extension name into a function -- continue Yiwei Zhang
Bug: 134185757 Test: ./scripts/code_generator.py && build Change-Id: I5d1e604a4c70e009605cb6f5a28d4214be796dda
2019-10-11Vulkan: factor base extension name into a function Yiwei Zhang
Bug: 134185757 Test: ./scripts/code_generator.py && build Change-Id: I839adc28b94a6e429ea25753f2f8c3e469449c24
2019-10-11Vulkan: add docs for the framework generation scripts Yiwei Zhang
Bug: 134185757 Test: ./scripts/code_generator.py && build Change-Id: I108412fdc672c5513f570ddac9221074a0027cd0
2019-10-11vulkan: clean up the framework generation script Yiwei Zhang
1. Instead of mixing up all code formats, stick to pep8 and python style guide 2. Removed some redundant functions 3. Simplified seme code logic 4. Move constant codes back to main code gen blocks for readibility 5. Moved most of the hard-coded constants to the top 6. Removed a redundant clang format hint 7. Removed any mention of the legacy code gen stuff Bug: 134185757 Test: ./scripts/code_generator.py && build Change-Id: I1eca91fb0d181b7e8353c4c6a651d80ed1f2d1e0
2019-10-10Vulkan: remove redundant function definitions in null_driver Yiwei Zhang
When deprecating the old gen scripts, there's some duplicate entries get added, which is fixed by this change. This change also reorders the extension constants in the gen scripts so that future modification is less likely to put duplicate entries. Bug: 134185757 Test: ./scripts/code_generator.py && build Change-Id: I6c8356b01e8a9c042293804eb628ed0a72da4a5c
2019-09-23libvulkan: intercept vkQueueSubmit to insert a tracepoint Yiwei Zhang
Bug: 141501384 Test: build, flash and boot. Run deqp Change-Id: I840270f213455250f72b2e7dc996124692bbc473
2019-09-23vulkan: remove the temp hack for VK_ANDROID_native_buffer and regen framework Yiwei Zhang
Previously the VK_ANDROID_native_buffer spec in the Vulkan registry is out of date. Since the upstream Vulkan registry has been fixed and imported to the Android downstream now, this change removes the hack and regenerate the Vulkan framework. This change also fixes below bugs: 1. Some device apis are treated as non-device. 2. The last command in the registry is ignored. Bug: 134711355 Test: Build, flash and dEQP tests Change-Id: I4eb77faf38b466f76caefdabb19a4d67a8ea789e
2019-07-12Generate Vulkan framework from Vulkan registry (Part 4) Adithya Srinivasan
Instead of using the manually created vulkan.api file for generating the Vulkan driver framework, we generate it directly from the vulkan registry (vk.xml) Bug: 134711355 Test: Build and flash, dEQP tests Change-Id: Ie38d93c51ff16d2108cbe9a9a717a0bea24947df
2019-07-11Merge "Generate Vulkan framework from Vulkan registry (Part 3)" TreeHugger Robot
2019-07-11Generate Vulkan framework from Vulkan registry (Part 3) Adithya Srinivasan
Instead of using the manually created vulkan.api file for generating the Vulkan driver framework, we generate it directly from the vulkan registry (vk.xml) Bug: 134711355 Test: Build and flash, dEQP tests Change-Id: I2fc3bc03489bd47c2239eb083c988157979fd674
2019-07-11Merge "Vulkan: make framework gen script executable" TreeHugger Robot
2019-07-10Vulkan: make framework gen script executable Yiwei Zhang
Also adds the .gitignore file to ignore the auto generated .pyc files. Bug: 134711355 Test: build, flash and boot. Change-Id: I68621c4af73c422c9f42c92822fc4a1daf89a451
2019-07-10Generate Vulkan framework from Vulkan registry (Part 2) Adithya Srinivasan
Instead of using the manually created vulkan.api file for generating the Vulkan driver framework, we generate it directly from the vulkan registry (vk.xml) Bug : 134711355 Test: Build and flash, dEQP tests Change-Id: I7a7c04a05d9eea5a03b4651fcff75948d3353933
2019-07-02Generate Vulkan framework from Vulkan registry Adithya Srinivasan
Instead of using the manually created vulkan.api file for generating the Vulkan framework, we generate it directly from the vulkan registry (vk.xml) Bug: 134711355 Test: Build and flash, dEQP tests Change-Id: I7e85cd4b64d13b8ed2c54678090f405171854a40