History log of /frameworks/native/vulkan/libvulkan/driver.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fa25e630f3d658da685e8e0dc8c3e6b7510145fa 21-Feb-2017 Chris Forbes <chrisforbes@google.com> vulkan: Conditionally enumerate KHR_shared_presentable_image

This requires:
- GPDP2 present and enabled
- ANDROID_native_buffer V7 implemented
- Driver supporting at least one shared presentation mode

This unpicks the weird case of the hal having to expose the
extension while the api surface was all implemented in the
loader.

V3: Single flag

Change-Id: I336af1a9d2549b74631c7a93a2c3e0e1469a9622
Test: build
/frameworks/native/vulkan/libvulkan/driver.h
85bb0c5a57be2b456079c14448127fa9bb8cff66 10-Feb-2017 Jesse Hall <jessehall@google.com> vulkan: Temporarily hack around loader/driver mismatch

A driver was built with an older declaration of
vkGetSwapchainGrallocUsage2KHR, and doesn't match what libvulkan
expects. This is a temporary workaround until the driver can be
rebuilt against the current header. When a new driver is available,
this change should be reverted.

Test: vulkanGears on affected device
Change-Id: I5a8bb16f0f9563e32314cff2a2a7a45760cfc356
/frameworks/native/vulkan/libvulkan/driver.h
7823e124e00576e20e47ec717cbe8bc89f0f2bf2 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if possible
- add system includes that are assumed as side effects
- define LOG_TAG first

Test: compile
Bug: 31289077
Bug: 30465923
Change-Id: I8d99b24c333578c9b5aa9f2a01324bd0bba268dd
/frameworks/native/vulkan/libvulkan/driver.h
a5e161b1207ef447a51e99856097d69d4a6111e1 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if required
- add system includes that are assumed as side effects of log.h
- modules that use SLOG should use SLOG for all logging (installd)
- define LOG_TAG first
- remove logging infrastructure if not used

Test: build
Bug: 31289077
Change-Id: Iea147a0104c7ab7f12451304131d6500f42141e7
/frameworks/native/vulkan/libvulkan/driver.h
d56988d1fc3a42f5728f2ae707cc8faf73860745 01-Sep-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in vulkan.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I13c32bd5bc53fe897df58eda331ff70ebcf0b349
/frameworks/native/vulkan/libvulkan/driver.h
dc22507e6fd6659c886aa1218f7681fd43b74598 31-May-2016 Jesse Hall <jessehall@google.com> libvulkan: Slightly better handling of swapchain re-creation

Previously we would fail vkCreateSwapchainKHR if
VkSwapchainCreateInfo::oldSwapchain was used, because we were unable
to dequeue all buffers for the new swapchain from an already-used
native window.

Now we disconnect and re-connect to the native window in order to
fully reset state, and allow us to dequeue all buffers. Additionally,
we tag the old swapchain as out-of-date, so future image acquires and
presents will fail with VK_ERROR_OUT_OF_DATE_KHR on that swapchain.
This is less than ideal, but better than what we had, and the best we
have time to do for N.

Bug: 26927424
Change-Id: Ifaa5048376f72a63ecb1dca3d1ff85dbee2c24d0
/frameworks/native/vulkan/libvulkan/driver.h
bc011fc4d78442d1f0167b04aea3484c62e0a92b 02-May-2016 Chia-I Wu <olv@google.com> vulkan: add DebugReportLogger

Add DebugReportLogger that can be used during vkCreateInstance and other
commands. Add vulkan::driver::Logger to create a temporary
DebugReportLogger from a dispatchable object. With them, we can log to
debug report by, for example,

Logger(instance).Warn(obj, "failed with %s", err);

Bug: 28120066
Change-Id: If059d38d3cfcfe591031ca135695d08cad42e0a4
/frameworks/native/vulkan/libvulkan/driver.h
950d6e1102077d6a3905eb77268800002e792fb0 03-May-2016 Chia-I Wu <olv@google.com> vulkan: make debug report callbacks available in DeviceData

This allows device commands to send messages to debug report.

Bug: 28120066
Change-Id: I43d217fc23799b06fd3fda73e1876d8773c723fc
/frameworks/native/vulkan/libvulkan/driver.h
c3a28913b6a95d2faee0db537c48557e04267511 14-Apr-2016 Chia-I Wu <olv@google.com> vulkan: deprecate device layers

Allow instance layers to intercept all commands and enumerate device
extensions. Ignore application device layers. Enumerate all enabled
instance layers in vkEnumerateDeviceLayerProperties.

Bug: 27911856
Change-Id: I6e89439ab10835dd1a43732c2333a92201e52550
/frameworks/native/vulkan/libvulkan/driver.h
cbe07ef239121dc99a31a19b9593d76d76abb08b 13-Apr-2016 Chia-I Wu <olv@google.com> vulkan: pass hal_extensions to InitDriverTable

We only need hal_extensions to initialize the driver tables. There is no
need to save it in driver::{Instance,Device}Data.

Change-Id: I56ebc0ee9c5bc5e543e7a84412b03b842bd8ced5
/frameworks/native/vulkan/libvulkan/driver.h
94a2c0ecd4537c52e6b4a3ef9d119dce44627ca8 13-Apr-2016 Chia-I Wu <olv@google.com> vulkan: pass VK_LAYER_FUNCTION_DATA_CALLBACK to layers

VK_LAYER_FUNCTION_DATA_CALLBACK effectively allows us to pass
driver::SetDataInternal to layers. It will be called on handles of
potentially unknown types. Add two internal types

VK_DEFINE_HANDLE(InstanceDispatchable)
VK_DEFINE_HANDLE(DeviceDispatchable)

in driver namespace for type safety.

Bug: 28015368
Change-Id: I7389829a7d8c374197cd7046973777b49e436961
/frameworks/native/vulkan/libvulkan/driver.h
4a6a91647c57abb5c06cde57c57afe944f8cefa4 26-Mar-2016 Chia-I Wu <olv@google.com> vulkan: use driver::GetData everywhere

Move away from the one-liners defined in loader.cpp.

Change-Id: I73c39cbe21aa3b2079f67590bb40f0cd55563f84
/frameworks/native/vulkan/libvulkan/driver.h
ff4a6c772aaf3ff0b71348647330031a059b1f51 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: rework CreateInstance_Bottom and related ones

The reworked driver::CreateInstance will

- call HAL's EnumerateInstanceExtensionProperties and filter out
extensions unknown to HAL, if there is any extension enabled.

We do not expect or enumerate any HAL layer yet as that requires some
works to layers_extensions.cpp.

The reworked driver::EnumerateInstanceExtensionProperties instead will
return all extensions enumerated by HAL, after prepending VK_KHR_surface
and VK_KHR_android_surface to them. This allows extensions unknown to the
loader to be enumerated.

Change-Id: I73b496582a773e06c7b79f0c5c166700737f2953
/frameworks/native/vulkan/libvulkan/driver.h
01cf305325f3789c573d7eff435e409f04677c66 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: rework EnumerateDeviceExtensionProperties_Bottom

The reworked driver::EnumerateDeviceExtensionProperties will simply return
all extensions enumerated by HAL, with VK_ANDROID_native_buffer replaced
by VK_KHR_swapchain. This allows extensions unknown to the loader to be
enumerated.

Change-Id: Iceed8ee3f16a968d005ae3ba42f1bd1839c2ab9f
/frameworks/native/vulkan/libvulkan/driver.h
4901db70b12801cf1966937a58eb7566bfdeb4ce 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: rework {Create,Destroy}Device_Bottom

The reworked driver::CreateDevice will

- use the providied pAllocator,
- call HAL's EnumerateDeviceExtensionProperties and filter out extensions
unknown to HAL, if there is any extension enabled.

We do not expect or enumerate any HAL layer yet as that requires some
works to layers_extensions.cpp.

Change-Id: I3ba4019d18dfed994d7037d95825bf54096f2a5d
/frameworks/native/vulkan/libvulkan/driver.h
6a58a8a7813450038cb15575e3333b83f268c972 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: move AllocateCommandBuffers_Bottom

Move it from loader.cpp to driver.cpp and rename it to
driver::AllocateCommandBuffers. No functional change.

Change-Id: I0abdca7dea128df0b313b90cfb5d5825566fc790
/frameworks/native/vulkan/libvulkan/driver.h
ba0be41afe39dcbed0a712a32d1ab6c341797007 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: move GetDeviceQueue_Bottom

Move it from loader.cpp to driver.cpp and rename it to
driver::GetDeviceQueue. No functional change.

Change-Id: Ide8ebe044e62b8ef6fc64ac03dcc1d920f5bf9a6
/frameworks/native/vulkan/libvulkan/driver.h
cc5e2765a9d56b03b69d0c3f25b94721f82d034e 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: rework DriverDispatchTable

Generate {Instance,Device}DriverTable from code-generator.tmpl to replace
dispatch.tmpl entirely. The new code avoids initializing
VK_ANDROID_native_buffer entries when the extension is not enabled. The
separation of instance and device driver tables also allows us to
initialize the device driver table with vkGetDeviceProcAddr, which is
expected to return more efficient function pointers on properly
implemented HALs.

CreateInstance_Bottom always has a potential resource leak when the
HAL-created instance does not contain HWVULKAN_DISPATCH_MAGIC.
CreateDevice_Bottom now has the same issue. Both of them will be fixed in
following commits.

Change-Id: If7800ef23098121f1fff643a2c5224c2c9be0711
/frameworks/native/vulkan/libvulkan/driver.h
eb7db124e46da9a9210cf868353f5ea79502ffec 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: rework driver::Get*ProcAddr

Introduce driver::ProcHook which is a struct to describe an intercepted
function. Given a function name, GetProcHook returns a ProcHook if the
function is intercepted. NULL otherwise.

A ProcHook has three function pointers. ProcHook::proc points to the real
intercepting function. ProcHook::disabled_proc points to a no-op function
that logs an error. ProcHook::checked_proc points to a trampoline that
calls either ProcHook::proc or ProcHook::disabled_proc.

For core functions, driver::Get*ProcAddr simply return ProcHook::proc.
For extension functions, driver::Get*ProcAddr return ProcHook::proc when
the extension is known to be enabled. They return ProcHook::disabled_proc
when the extension is known to be disabled. Finally, they return
ProcHook::checked_proc when they do not know if the extension is enabled
or not.

All ProcHooks as well as their disabled_proc/checked_proc are generated in
driver_gen.cpp. This allows us to get rid of all hand-written "_Disabled"
functions, all no-op "_Bottom" functions, and special cases for
VK_ANDROID_native_buffer. The reworked driver::Get*ProcAddr also detects
more applications' errors and logs them.

Change-Id: I8e6f476f450688b5547fd75243c66cb603c516b5
/frameworks/native/vulkan/libvulkan/driver.h
0c2032490b80178ec823bf22a7f5d08398851cc3 15-Mar-2016 Chia-I Wu <olv@google.com> vulkan: rewrite top of loader

The top is responsible for layer discovery and chaining, and the bottom is
like a regular layer that is always enabled and is inserted just before
the driver. Make the separation clear by rewriting the top and stripping
the layer managment code from loader.cpp.

Change-Id: I64e525e27bd4c297bccd94a1eb9b88e28088e85d
/frameworks/native/vulkan/libvulkan/driver.h