Adds dynamic validation of AHardwareBufferFormats and return as
VkSurfaceFormatKHR instead of hardware coded values
Test: verified on Pixel 4 with test app that it returned two pair of surface
formats
Bug: b/143296550
Merged-In: I972ea97d7930be56057c18584e84bf01331ae31f
Change-Id: I972ea97d7930be56057c18584e84bf01331ae31f
Set VK_ERROR_OUT_OF_DEVICE_MEMORY in case the cause of the failure from
dequeueBuffer is an actual ENOMEM situation. Otherwise set
VK_ERROR_SURFACE_LOST_KHR as catch-all.
Bug: 145331195
Test: dEQP-VK.wsi.android.swapchain.create.image_extent
Change-Id: I8e7b4af3133e2a851beeda3618e24ca86279d317
Merged-In: I8e7b4af3133e2a851beeda3618e24ca86279d317
-Weverything is not recommended, use -Wextra.
Bug: 143713277
Test: m native
Change-Id: Ia3935fa155eac7777269ed3b97e74bc869fb58a4
Merged-In: Ia3935fa155eac7777269ed3b97e74bc869fb58a4
-Weverything is not recommended, use -Wextra.
Requires adding a few more disabled warnings to libvulkan,
-Weverything appears to not turn on warnings that were disabled
by earlier command line arguments, while -Wextra does.
Bug: 143713277
Test: m native
Change-Id: I3997c2afe094deca66018e3cc43921aaecd82028
This reverts commit 94ace213b8.
The Android Vulkan loader has never queried what formats are available for use
with swapchains; but has always hard-coded a list of formats. All initial
Vulkan 1.0/1.1 drivers on Android supported those formats in order to work.
The change being reverted added to the hard-coded list, but not all drivers
support those formats for use by swapchains. A future extension will be
created to allow the swapchain code to query which formats can be supported.
Bug: b/124942437
Test: mm
C++20 is stricter about member ordering in designated initializers than
C99.
Bug: 139945549
Test: mm
Merged-In: I8532a1b8d224605c91f2f5a046f548385243a7cf
Change-Id: I058370e89c9005ddaa70950c6bb5cdb3d4f4a8fb
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
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: Ieb814516a4019f1a330178bfeb414e1450895c5c
Merged-In: I0a3e06dc04bade4f36a7e68ee2f53979c656ee4e
This warning was turned off globally but it is only needed for few
projects. Move the flag to the individual project blueprint files.
Test: presubmit
Change-Id: I0836e11fcf75d9eca353edf7e7290cfb84727f9a
This change makes it easy for adding single stats pieces into GpuService without
adding or modifying the binder interface each time.
Bug: 141003796
Test: adb shell dumpsys gpu
Change-Id: I2907065a55d03a6c1494737e6f0a77f6e94272eb
Merged-In: I2907065a55d03a6c1494737e6f0a77f6e94272eb
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iec1802ce9226570d3a02cc5242f7ca72e1370635
When VK_GOOGLE_display_timing extension is in use, if the swapchain is
not in active status, during vkDestroySwapchainKHR, a nullptr checker
for the ANativeWindow* is missing and that will cause a crashing when
calling window api with window being nullptr. This change just adds a
nullptr check for that ANativeWindow*.
Bug: 134185757
Test: manual
Change-Id: Ica4543666c4aadc0a4d9a6caddaefd4ab08f8627
Merged-In: Ic8a4baf7e219cc8e1fb3838d4e4b710b242efa9c
We should let vkQueuePresentKHR return VK_SUBOPTIMAL_KHR if the preTransform bit
in VkSwapchainCreateInfoKHR doesn't match the window’s current transform.
Bug: 132976488
Test: VulkanPreTransformTest
Change-Id: I409609ab84a6be0f4e8c351b1bef88784c8f086d
The Vulkan specification for MAILBOX allows for a swapchain to be
created with 3 images, assuming 1 "current image": one image is
displayed, and the app can ping-pong between the other 2.
MAILBOX mode is the equivalent of eglSwapInterval(0).
The platform swapchain code always added min_undequeued_buffers-1
(i.e. normally 1) to what the app requested for MAILBOX.
Apps often request the advertised minimum of 2. However, a SF and HWC
change, some time ago, resulted in HWC displaying 1 image, SF latching
another image, and the app blocked ~30% of the time. This equates to
a "current image" count of 2, breaking MAILBOX with 3 images. Nobody
noticed this until ANGLE discovered that the glmark2 composite score
decreased when it only asked for minimum (2) images (per the spec).
Analysis determined that 4 images are needed in order to get the
ping-pong semantics of MAILBOX, and to not slow down benchmarks. When
this was tried, glmark2's composite score increased by 30%.
In talking with the SF team, we realized what happened. The agreement
is that we need to ensure that the Vulkan swapchain code needs to
ensure that the swapchain has at least 4 images (in the normal case)
when MAILBOX is enabled. This CL still honors min_undequeued_buffers,
for cases when it's higher than the normal 2 for MAILBOX.
Bug: b/132806469
Test: Run glmark2 with ANGLE
Change-Id: I152f61f318236fd4718895aec7188135ee849f46
When VK_GOOGLE_display_timing was first created, we assumed displays
never changed refresh rates. Now that they are dynamic, we need to
query SF everytime the app requests it.
Test: ANGLE-on-Vulkan
Bug: b/130888074
Change-Id: I5eb9a20690f82b8663899a2ded8b5bb866cebe58
vk_android_native_buffer.h and vk_layer_interface.h remain, since
they're Android-internal additions and not provided by the upstream
API header repository.
Bug: 129696724
Test: make checkbuild
Change-Id: If4677d08a6891b18ce347e3fa3be393fc6111fc8
Merged-In: If4677d08a6891b18ce347e3fa3be393fc6111fc8
In preparation for importing Vulkan headers from
external/vulkan-headers, this reorganizes the Vulkan Soong modules a
bit:
* Separate the Vulkan API headers from the Vulkan HAL headers. The
former will move, the latter won't. Also, many things need the
API headers but very few should use the HAL headers. These probably
should have always been separate modules, but now they have to be.
* Add a llndk_headers module separate from the llndk_library module, so
the header module can be in external/vulkan-headers but the library
module can stay in frameworks/native.
* Merge "vulkan_headers_ndk" into "vulkan_headers". A single module can
serve both unbundled and platform clients, these never needed to be
duplicated.
Bug: 129696724
Test: make checkbuild
Change-Id: I955c880298843db4a2f4c08d93f7c8edbb205ef8
Merged-In: I955c880298843db4a2f4c08d93f7c8edbb205ef8
This change ramps up the ANDROID_native_buffer spec version becasue of
the new behavior introduced to support the new structure added in
VK_KHR_swapchain v69. This change also advertise the swapchain spec
verison based upon the ANDROID_native_buffer version the drivers are
reporting.
Bug: 130182551
Test: CtsDeqpTestCases
Change-Id: Ic95489dac883726d10e1a949875a576116622f3c
vk_android_native_buffer.h and vk_layer_interface.h remain, since
they're Android-internal additions and not provided by the upstream
API header repository.
Bug: 129696724
Test: make checkbuild
Change-Id: If4677d08a6891b18ce347e3fa3be393fc6111fc8
In preparation for importing Vulkan headers from
external/vulkan-headers, this reorganizes the Vulkan Soong modules a
bit:
* Separate the Vulkan API headers from the Vulkan HAL headers. The
former will move, the latter won't. Also, many things need the
API headers but very few should use the HAL headers. These probably
should have always been separate modules, but now they have to be.
* Add a llndk_headers module separate from the llndk_library module, so
the header module can be in external/vulkan-headers but the library
module can stay in frameworks/native.
* Merge "vulkan_headers_ndk" into "vulkan_headers". A single module can
serve both unbundled and platform clients, these never needed to be
duplicated.
Bug: 129696724
Test: make checkbuild
Change-Id: I955c880298843db4a2f4c08d93f7c8edbb205ef8
Merged-In: I955c880298843db4a2f4c08d93f7c8edbb205ef8
This change checks if VkBindImageMemorySwapchainInfoKHR is chained in
any VkBindImageMemoryInfo struct. If existed, a VkNativeBufferANDROID
struct is properly constructed and additionally chained to the original
VkBindImageMemoryInfo struct.
Bug: 130182551
Test: CtsDeqpTestCases
Change-Id: I1a9e35dbd228060fcfade11be6e7d1b47dad474f
This change just updates the code generator template to add the
interception of vkBindImageMemory2 and vkBindImageMemory2KHR at
vulkan::driver level.
Bug: 130182551
Test: CtsDeqpTestCases
Change-Id: I2083d7048bba93bea80c010ba89dbc5f8ab6de0c
platform private symbols have been moved to libdl_android.so
since they are not intended to be accessible from apps.
Test: make
Bug: http://b/129387775
Merged-In: I34935206e078a064841fe00b293f24df358e50ad
Change-Id: I34935206e078a064841fe00b293f24df358e50ad
(cherry picked from commit 6d23529344)
platform private symbols have been moved to libdl_android.so
since they are not intended to be accessible from apps.
Test: make
Change-Id: I34935206e078a064841fe00b293f24df358e50ad
The Android Vulkan loader initially supported only 3 VkFormat's for
swapchain creation, with a TODO comment to add more. In order for
ANGLE to match native GLES drivers, the Android Vulkan loader needs to
support the following formats:
- VK_FORMAT_A2B10G10R10_UNORM_PACK32
- VK_FORMAT_R16G16B16A16_SFLOAT
Bug: b/124942437
Test: GLES dEQP on top of ANGLE on top of Vulkan
Change-Id: If893f4cc81c94242e6d66e0109572f9892323ea4
This change plumb the below info from GL and Vulkan loader:
1. Intended driver to use
2. Whether intended driver is loaded
3. Total driver loading time
Bug: 123529932
Test: Build, flash and boot. Verify the GpuService receiver side.
Change-Id: I967d4361bf0e04c02390c7555617575c19ecadd4