summaryrefslogtreecommitdiff
path: root/vulkan
AgeCommit message (Collapse)Author
2025-04-02Downgrade ICD's view of VkApplicationInfo::apiVersion for 1.3 ICD Chris Forbes
Certain 1.3 ICDs in the wild seem to misbehave on seeing VkApplicationInfo::apiVersion = 1.4. Bug: b/403118763 Flag: NONE bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a9972152370858f05df2b79daf90fd2930ff6001) Merged-In: Ic6ec11ecca68add499db864af4a6e96ef8076aa4 Change-Id: Ic6ec11ecca68add499db864af4a6e96ef8076aa4
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-18Merge changes from topic "vkjson_fix" into main Nikita Gupta
* changes: Fix nullpointer dereference at VKJson Update vkjson codegen
2025-03-18Merge "libvulkan: refactor for _FORTIFY_SOURCE=3 support." into main am: ↵ Elliott Hughes
7827597532 am: 6c65610f9f Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3542879 Change-Id: Ic14f61a8baa4f8b9f3d4c81eb38764957dd35817 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-14Fix nullpointer dereference at VKJson Nikita Gupta
Set array values of VkPhysicalDeviceVulkan14Properties. Contributers- angrak.oh@samsung.com Test: adb shell cmd gpu vkjson Flag: NONE infeasible Bug: b/403413507 Change-Id: I8df894343ec759f00f56d55f21a6ed533a15a460
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-13libvulkan: refactor for _FORTIFY_SOURCE=3 support. Elliott Hughes
You can't use malloc_usable_size() when built with _FORTIFY_SOURCE=3, so pull out the allocator into a file that can be built _FORTIFY_SOURCE=2 while still getting the benefits for the rest of the code. Bug: http://b/291762537 Change-Id: Ic3a71bd8eadeb2da167edc0ba28becba2f95f82e
2025-03-12Merge "Update vkjson" into main Nikita Gupta
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
2025-03-12Update vkjson Nikita Gupta
Bug: b/401181863 Test: adb shell cmd gpu vkjson Flag: NONE infeasible Change-Id: If9995c3af5827ebfbe5445c1c649aed947fb2233
2025-03-02Merge "Capture VkPhysicalDeviceImage2DViewOf3DFeaturesEXT in vkjson" into main Nikita Gupta
2025-02-26Add tests for mutable swapchain code Tom Murphy
Add unit tests for the mutable swapchain extension Bug: 341978292 Flag: EXEMPT test Test: atest libvulkan_test Change-Id: I410a5b8c3d0dbe11ccfd2b54d4e4999a67360f07
2025-02-25Verify that vkGetPhysicalDeviceSurfaceFormats2KHR ignores ↵ Tom Murphy
VK_ERROR_FORMAT_NOT_SUPPORTED Verify that vkGetPhysicalDeviceSurfaceFormats2KHR properly ignores VK_ERROR_FORMAT_NOT_SUPPORTED and continues enumerating formats. Bug: 357903074 Test: atest libvulkan_test Flag: EXEMPT test Change-Id: If9195373dfabcaf7fd29151071bf2fc9a4827cee
2025-02-24Capture VkPhysicalDeviceImage2DViewOf3DFeaturesEXT in vkjson Nikita Gupta
Test: adb shell cmd gpu vkjson Flag: NONE infeasible Bug: b/398767733 Change-Id: Ibd1013f4a561e8e99903594fc3d382e0adcb318f
2025-02-21Extract GPDIFP2 getProducerUsage path to seperate function Tom Murphy
Extracting the GPDIFP2 logic to its own function makes it easier to exit early from the GPDIFP2 path when we need to fall back to the GetSwapchainGrallocUsage*ANDROID path. This change also fixes an issue where we would exit getProducerUsage early instead of falling back to the gralloc paths if GPDIFP2 would return an error when called with an unsupported format. Bug: 379230826 Test: atest libvulkan_test Flag: EXEMPT bugfix Change-Id: I42f1fe31e5e4a01c472a12854a1f4e989d2786dc
2025-02-18Merge "Add boilerplate code for vulkan unit tests" into main Tom Murphy
2025-02-17Add boilerplate code for vulkan unit tests Tom Murphy
Vulkan unit tests require a basic vulkan application to run. This adds the boilerplate code for a simple vulkan application. Bug: 388189326 Flag: EXEMPT test Test: atest libvulkan_test Change-Id: I59e2240b4c34b39af9b7f5927cb23f0926e4cf8a
2025-01-30Plumb vpa16 checking through to cmd gpu vkprofiles Chris Forbes
Bug: b/365822403 b/365776049 b/370096306 b/370767995 b/382286666 Change-Id: Ib952b3e4dc14cd9e0374f3d43d7dbaf3c4329395 Flag: NONE test infra
2025-01-30Adjust vkprofiles tool to work with landed vulkan-headers Chris Forbes
Bug: b/365822403 b/365776049 b/370096306 b/370767995 b/382286666 Change-Id: I7c1d507b33331cfcfee13b8131adec0be6dd6922 Flag: NONE test infra
2025-01-30Add VPA16 profile and regenerate Chris Forbes
Bug: b/365822403 b/365776049 b/370096306 b/370767995 b/382286666 Flag: NONE test infra Change-Id: Ic3b8c4ad9e5058bd52b504b44e34373cbb3c5b69
2025-01-13vkjson: Move redefinition of FALLTHROUGH_INTENDED Tim Van Patten
The macro FALLTHROUGH_INTENDED is defined in both vulkan/vkjson/vkjson.h and android-base/macros.h, causing build errors for any other modules that include both header files. Move the redefinition to vkjson.cc. Note that <android-base/macros.h> is not available for the libvkjson_ndk build, so we cannot use that version of the macro and eliminate the redefinition entirely. Bug: 372694741 Test: CQ Flag: EXEMPT bugfix Change-Id: I02a0f2a50f3807ca932e84a5a002598b04c5f92a
2024-12-09Merge "Revert "Keep _FORTIFY_SOURCE=2 for libvulkan when enabling _FORT..."" ↵ Liana Kazanova
into main am: 9639da022b am: 690a9cdc2f Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3398713 Change-Id: Id8f569217d727dd768c3ba708f42f2ce6819d76f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-09Merge "Revert "Keep _FORTIFY_SOURCE=2 for libvulkan when enabling _FORT..."" ↵ Liana Kazanova
into main am: 9639da022b Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3398713 Change-Id: Iaefec7f0b2806abe155562a2b5767a8bce24c575 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-09Revert "Keep _FORTIFY_SOURCE=2 for libvulkan when enabling _FORT..." Liana Kazanova
Revert submission 3391212-_FORTIFY_SOURCE=3 Reason for revert: DroidMonitor: Potential culprit for http://b/383164857 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Reverted changes: /q/submissionid:3391212-_FORTIFY_SOURCE%3D3 Change-Id: I3682429d089d1c26b5ed74d7764ec4a3a447829b
2024-12-09Merge "Keep _FORTIFY_SOURCE=2 for libvulkan when enabling _FORTIFY_SOURCE=3 ↵ Treehugger Robot
globally" into main am: 9f3b420338 am: fd24a0a13b Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3391212 Change-Id: I04d01f0d5279993af7b591109585f38c9ccbffe4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-09Merge "Keep _FORTIFY_SOURCE=2 for libvulkan when enabling _FORTIFY_SOURCE=3 ↵ Treehugger Robot
globally" into main am: 9f3b420338 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3391212 Change-Id: I86d97442b8b9d0d23e973bbf9763451699fd96d6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-09Keep _FORTIFY_SOURCE=2 for libvulkan when enabling _FORTIFY_SOURCE=3 globally Zijun
malloc_usable_size() is not allowed when _FORTIFY_SOURCE=3, so we keep it 2 as a workaround. Bug: b/291762537 Test: mm and presubmit Change-Id: I2eb79bb9673aacfd36b0835edbf821059319189f
2024-12-06Add 1.4 support to VKJson Tom Murphy
Add support for reporting vulkan 1.4 features in vkjson Bug: 370568136 Flag: com.android.graphics.libvulkan.flags.vulkan_1_4_instance_api Test: tested using hacked swiftshader with 1.4 support. Diff'd output with original output Test: atest CtsGraphicsTestCases:android.graphics.cts.VulkanFeaturesTest passed Change-Id: I0912a2cfd6a298ea4ce03e4749c4a7225c3f57c6
2024-11-25Update libvulkan linker map for 1.4 Chris Forbes
Bug: b/370568136 Flag: NONE infeasible Change-Id: Ib8e22978d100ce3007992ca1c107c763821067c6
2024-11-25Add support for Vulkan 1.4 core entrypoints to nulldrv Chris Forbes
Bug: b/370568136 Flag: NONE infeasible Change-Id: I06b343858dc3fe6e95e57a0ee0593c6fc64965c9
2024-11-25Allow vkjson to report on 1.4 instances Chris Forbes
Does not yet output any 1.4 capabilities, but allows the tool to at least work. Bug: b/370568136 Flag: NONE bugfix Change-Id: I969581e9472d8cfd789dd3e5f9b750e54c91c4df
2024-11-25Add support for vulkan api level 1.4 in loader Chris Forbes
Bug: b/370568136 Flag: com.android.graphics.libvulkan.flags.vulkan_1_4_instance_api Change-Id: Ibf168e24f5be16cdf87b683322d291336b11244f
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-11-13Add new flag for exposing 1.4 instance API Chris Forbes
Bug: b/370568136 Flag: com.android.graphics.libvulkan.flags.vulkan_1_4_instance_api Change-Id: Ib259225055c536669d134479634ad5a9289c755d
2024-11-12Merge 24Q4 (ab/12406339) into aosp-main-future Xin Li
Bug: 370570306 Merged-In: I9be1254c3e2685b0aa950b314c581824f40ce26c Change-Id: I35bc501a2b1d9eb100aaab25cd660cf2e0542f99
2024-10-15Merge "Fix build on ToT Clang" into main am: 86e7e6be0e am: 3cc659d71e Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3308593 Change-Id: I9e1dd3574828f9b2948ccb7b54435a58fc10ff3f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15Fix build on ToT Clang Yi Kong
ToT Clang complains about the following error: frameworks/native/vulkan/vkjson/vkjson.cc:1211:20: error: call to 'ToJsonValue' is ambiguous 1211 | object_[key] = ToJsonValue(*value); | ^~~~~~~~~~~ frameworks/native/vulkan/vkjson/vkjson.cc:1173:20: note: candidate function [with T = char, N = 63] 1173 | inline Json::Value ToJsonValue(const T (&value)[N]) { | ^ frameworks/native/vulkan/vkjson/vkjson.cc:1178:20: note: candidate function [with N = 63] 1178 | inline Json::Value ToJsonValue(const char (&value)[N]) { | ^ Test: presubmit Bug: 363682086 Change-Id: Ifa4e8e5df715b1adc99343782a44c8fc302554ae
2024-09-04Merge "Remove NDK exports" into main am: 1af8a3eef4 am: 08aa6b5cf5 Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3248585 Change-Id: Id5aaea2cdd935d56909e8c151e348180a4c9efc2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04Merge "Remove NDK exports" into main am: 1af8a3eef4 Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3248585 Change-Id: Iec3bba30ebcd7f603077c8b6369e2c0522206e01 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04Merge "Remove NDK exports" into main Steven Moreland
2024-09-03Remove NDK exports Steven Moreland
Base headers should come from sysroot. Bug: N/A Test: build Change-Id: I5c085257b3aabc09d9b65a0384c0478a9f19c30e
2024-09-03Merge "Fix GetPhysicalDeviceSurfaceFormats2KHR for compression control ↵ Tom Murphy
struct handling" into main am: 351a8df928 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3242198 Change-Id: I0a5ae4151c9efd4823898bf7ffac3e7a2e357828 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-02Fix GetPhysicalDeviceSurfaceFormats2KHR for compression control struct handling Tom Murphy
As per the spec, vkGetPhysicalDeviceImageFormatProperties2 may return VK_ERROR_FORMAT_NOT_SUPPORTED when an invalid combination of parameters appears in VkPhysicalDeviceImageFormatInfo2 pImageFormatInfo argument which is not handled by the loader. i.e.. loader doesn't loop through all surface formats Fix this by correctly handling vkGetPhysicalDeviceImageFormatProperties2 return value Test: Working separately on testing strategy for this: 357903074 Bug: 357903074 Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a920d2d6dcc97331a8fffe3a2584eb30b890005e) (cherry picked from https://android-review.googlesource.com/q/commit:e5b150b8cc340c23fa6dd3e7e7b648c6493836df) Merged-In: Id0712387e3249ac6118990441a4bb19102cd4a84 Change-Id: Id0712387e3249ac6118990441a4bb19102cd4a84
2024-08-30Merge "Implement the VK_KHR_swapchain_mutable_format device extension in the ↵ Tom Murphy
vulkan loader" into main
2024-08-27Fix GetPhysicalDeviceSurfaceFormats2KHR for compression control struct handling Tom Murphy
As per the spec, vkGetPhysicalDeviceImageFormatProperties2 may return VK_ERROR_FORMAT_NOT_SUPPORTED when an invalid combination of parameters appears in VkPhysicalDeviceImageFormatInfo2 pImageFormatInfo argument which is not handled by the loader. i.e.. loader doesn't loop through all surface formats Fix this by correctly handling vkGetPhysicalDeviceImageFormatProperties2 return value Test: Working separately on testing strategy for this: 361626599 Bug: 357903074 Flag: EXEMPT bugfix Change-Id: Id0712387e3249ac6118990441a4bb19102cd4a84
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-08-06Merge changes I1e6c3c80,I4310618c into main am: 5a2065886b am: 3150c9697c Chris Forbes
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3205054 Change-Id: I4c98c1a8621b80b0f68617bc8e77e7605888e139 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06Merge changes I1e6c3c80,I4310618c into main am: 5a2065886b Chris Forbes
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3205054 Change-Id: Ib75609eb56bba49998afab66b73bfbd076812429 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01Fix updatable driver loading issue with Vulkan. Rob VanReenen
When unloading Vulkan driver, check if close() function is non-NULL before calling it. Bug: 349287141 Change-Id: I1e6c3c80e57dceecd41888541044807e1dab45af
2024-06-26Merge "Add emulated_apit_checker for Vulkan" into main am: dae812b1e6 am: ↵ Victor Khimenko
a7a2ac25a5 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3141362 Change-Id: I4339a5dac6a6ece7fbd1bdc25a22505b1cafa825 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>