History log of /frameworks/native/vulkan/libvulkan/Android.mk
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3e654dc68a954b150c141c4a2e96418883bd7c9b 20-May-2016 Chia-I Wu <olv@google.com> vulkan: do not use exported functions internally

Our vkGet*ProcAddr uses the exported functions. They will break when any
of the exported functions are overridden (e.g., through LD_PRELOAD).

Unexport and move all exported functions to vulkan::api namespace.
Re-export them by having vkFoo as a wrapper to vulkan::api::Foo.

Another option is to re-export vulkan::api::Foo by having vkFoo as an
alias using __attribute__((alias)). That results in smaller binaries.
But we will not be able to catch mismatches between vulkan.h and
vulkan.api.

To avoid future breakage, define VK_NO_PROTOTYPES for all files except
api_gen.cpp.

Bug: 28886971
Change-Id: I08fde7ebb247f8c7e040ccf812b40b02094d3c7f
/frameworks/native/vulkan/libvulkan/Android.mk
1a7eb59c2a7907ea4c4925c6d13d66e53fb60339 01-May-2016 Jesse Hall <jessehall@google.com> libvulkan: Discover layer libraries in entire search path

Previously we only searched the unpacked native library path for layer
libraries. Now we search all directories in the dynamic linker's
search path, including unpacked libraries in the APK itself.

Bug: 28213888
Change-Id: I37772fd90f705592ae1725c7c8603b0174e6b133
/frameworks/native/vulkan/libvulkan/Android.mk
e8e689f1190a936ebd6bf6cbe28ab8625e94c6c7 18-Apr-2016 Chia-I Wu <olv@google.com> vulkan: replace std::shared_ptr by android::sp

With the change, we do not handle exceptions anymore. Remove
-fexceptions.

Bug: 26732452
Change-Id: I2782f9b522cb25f158515fcf90312013e672225b
/frameworks/native/vulkan/libvulkan/Android.mk
b7c4e3b7c97c952ba26f061d74d2038e6c94e689 11-Apr-2016 Jesse Hall <jessehall@google.com> libvulkan: Use a stub HAL when no real Vulkan HAL is present

This stub HAL enumerates zero VkPhysicalDevices. This allows a
VkInstane to be created and queried for physical devices successfully
even on devices without a Vulkan driver. Handling this with a stub HAL
avoids the need for NULL HAL and NULL driver function pointer checks
in many places throughout the loader, which would be more error-prone.

Fixes bug: 28100673
Change-Id: I76bea975929a85eda354730d6c815567b412b160
/frameworks/native/vulkan/libvulkan/Android.mk
3b6b5adbddf7415bff3c3d0bc11efd5df9cc132f 26-Mar-2016 Chia-I Wu <olv@google.com> vulkan: remove unused loader.{cpp.h}

Change-Id: I21f07545cf286f7e5796d9a6c9642cfdd3001f17
/frameworks/native/vulkan/libvulkan/Android.mk
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/Android.mk
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/Android.mk
9d51816145b008b7b4b091a8c90faf30ba0394e4 24-Mar-2016 Chia-I Wu <olv@google.com> vulkan: move driver::Debuggable

Move it from loader.cpp to driver.cpp. No functional change.

Change-Id: I455e798d6001f9719d378ae0295f2b4b181b0c09
/frameworks/native/vulkan/libvulkan/Android.mk
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/Android.mk
c4eee83b6eb4b4ebc67ddda2c7119988ce654101 29-Feb-2016 Jesse Hall <jessehall@google.com> libvulkan: Enable integer sanitization

This causes the compiler to add runtime checks for undefined (e.g.
shift by larger than bitwidth) or suspicious (e.g. unsigned integer
overflow) operations. The process will abort if they occur.

In particular, we do many allocations of the form pfnAllocation(n *
sizeof(T)); if 'n' is large these will overflow and we'll allocate
less memory than expected, possibly leading to exploitable buffer
overruns.

Requested during security audit in bug 27118888.

Change-Id: Id81c94595579df034b948a40270f164e38635070
/frameworks/native/vulkan/libvulkan/Android.mk
517274a29e50522a11e65107bb2c0d5b123aa7d5 10-Feb-2016 Jesse Hall <jessehall@google.com> libvulkan: Support R5G6B5_UNORM_PACK16 as a swapchain format

Change-Id: I489cf12965372d5281d200102a4632e6e8d75ede
/frameworks/native/vulkan/libvulkan/Android.mk
26cecff368f2edba67d136ce00d27bb55634c0f1 22-Jan-2016 Jesse Hall <jessehall@google.com> libvulkan: Fix dEQP-VK.api.object_management.alloc_callback_fail.instance

The loader was crashing when a std::vector::resize() operation called
the test-provided allocator, which returned failure, and then the
vector blindly started writing into the returned pointer.

Obvious in hindsight, but stdlib containers+strings + user-provided
allocation funcs implies that the loader must be built with exceptions
enabled, and must be exception-safe at least where it uses
containers/strings. We were doing neither.

This change has the minimally invasive fix, which is to (a) throw an
exception from the stdlib Allocator when the app-provided allocation
function fails, and (b) wrap every stdlib operation that might
allocate in a try..catch and turn it into a
VK_ERROR_OUT_OF_HOST_MEMORY error.

This is pretty unsatisfying and I'm not happy with the resulting
mismash of error-handling styles, with having exceptions at all in
code that was not written to be exception-safe, or with the
fine-grained try..catch. We need to decide whether to keep using parts
of stdlib that can allocate, and rewrite a lot of code to be
exception-friendly, or we need to replace the stdlib code with manual
containers and strings. Bug 26732452 filed.

Change-Id: I6f096f25a43a0e3c5f56796c2af19f114d2edac6
(cherry picked from commit ccca46db073dfadc81a68ac1533d8859ed3e109a)
/frameworks/native/vulkan/libvulkan/Android.mk
715b86ac7d0853131b375ff786c87d8d87a762a1 17-Jan-2016 Jesse Hall <jessehall@google.com> vulkan: Support VK_EXT_debug_report in loader and nulldrv

* Add extension to vulkan.api.
* Fix a few errors in upstream vk_ext_debug_report.h; bugs filed.
* Loader enumerates extension iff the driver supports it.
- TODO: Also enumerate if any layers that support it are implicitly
enabled.
- Note extension may still be enabled if any layer supports it.
* Add loader bottom procs for the extension functions. These will call
through to the driver version if the driver supports the extension.
* Add no-op support to nulldrv, mostly for testing the loader.

Change-Id: I092d2da56ee4c64498f8edae75e0d995478bb6f2
(cherry picked from commit a5ef7c27bc85e3628814532a32ffb9a5c33c4b73)
/frameworks/native/vulkan/libvulkan/Android.mk
80523e2e39c29b06ab40573468dde43a9867f487 07-Jan-2016 Jesse Hall <jessehall@google.com> vulkan: Implement layer and extension enumeration

Change-Id: I485ebbe3e57da396d361f772793e1e89850c334c
(cherry picked from commit 4bee2c3f2fdff04f1eb437f24a7bcf841364d5b3)
/frameworks/native/vulkan/libvulkan/Android.mk
1f91d390ac013ea2514a67e12ddb083119d636d7 12-Dec-2015 Jesse Hall <jessehall@google.com> vulkan: Implement new vkGet*ProcAddrBehavior

The primary goal of this change is to switch to the revised GPA
behavior:
- GIPA(NULL, ..) only works for non-dispatched (global) commands
- GIPA(instance, ..) returns functions for commands that dispatch on any
object type, and the function works for any object of the appropriate
type if it is a child of the instance.
- GDPA(NULL, ..) returns NULL.
- GDPA(device, ..) returns a device-specific function for the command.

This change refactors/tidies many of the things it modified. Some
notable changes:
- All the loader generated code is now in dispatch.tmpl ->
dispatch_gen.{h,cpp}, instead of two separate templates.
- Reorganization allowed generating the dispatch table structures,
eliminating one source of frequent bugs.
- Removes some error-prone macro duplication.
- Handling of extensions and special loader functions is now much
more uniform and hopefully clearer.
- Loader top- and bottom-level functions are now consistently named with
_Top and _Bottom suffixes, and are grouped by level in loader.cpp.
- The VkInstance and VkDevice implementations are no longer derived from
::VkInstance_T and ::VkDevice_T. Was more trouble than it was worth.
- Renamed 'vtbl' to 'dispatch' in most places.
- Renamed nulldrv template and generated files to match the loader
naming pattern: null_driver.tmpl -> null_driver_gen.{h,cpp}
- Now all the entry point prototypes are generated, instead of having
to be updated by hand (another source of several bugs).

Change-Id: Ic263f802d0d523b18a0f00420b3a722aa04ce299
(cherry picked from commit 3cffb8e837222f413a1fe53522e2cc33366b8eeb)
/frameworks/native/vulkan/libvulkan/Android.mk
bd88884111a3ef38322741c15de9bd215f7a7eb9 01-Dec-2015 Jesse Hall <jessehall@google.com> vulkan: Update from version 0.210.0 to 0.210.1

Change-Id: I9adf217587a8b666bcf04818004dce4e97b87fd1
(cherry picked from commit 871aab516eafee2ede88b095dad6670b06ab6f8a)
/frameworks/native/vulkan/libvulkan/Android.mk
dba27f71fad236f08deae3d0b987e83700b32f94 30-Nov-2015 Jesse Hall <jessehall@google.com> vulkan: Update from version 0.205.0 to 0.206.0

Change-Id: I36370f6ec41abf235975a0c769c03c8f25851d14
(cherry picked from commit c7d7dcfffafda197458d6c4afebb486bd64e0d53)
/frameworks/native/vulkan/libvulkan/Android.mk
1c69b9e33e34c6aef571b8383bdb7e2b3a5e0849 14-Sep-2015 Michael Lentine <mlentine@google.com> Add support for loading layers from the apk.

Added the vulkan_layer_path interface which is used to set the path from
ThreadedRenderer. The vulkan loader then uses this path to search for layer
libraries that come preinstalled with the app.

Change-Id: Iee7d56c1950296ba5ece3a119741406d705479a8
(cherry picked from commit 1f920c1e52bbd59405761e5403def5dbc22e331b)
/frameworks/native/vulkan/libvulkan/Android.mk
03c64b0b525a2f259456a220c51bbc8438ae2c03 27-Aug-2015 Michael Lentine <mlentine@google.com> Add layer loading to android vulkan loader.

Change-Id: I500d248f03a14db82ce725e600aef82c115b9b35
(cherry picked from commit ad17ac2e5bec7a65e3170043eb958e5a97107bd4)
/frameworks/native/vulkan/libvulkan/Android.mk
d7b994a0cfb9054aafc1dadc85085a7d0ef8789a 07-Sep-2015 Jesse Hall <jessehall@google.com> vulkan: Implement vk_ext_khr_*swapchain extensions

Change-Id: I46312c9ba1332e0a5b8ac4c1b5608f0465c3962c
(cherry picked from commit e5ca41cb11212bbfbd608eddb92d794e12e1528e)
/frameworks/native/vulkan/libvulkan/Android.mk
b1352bce9cd82ceaef287b8b3cd7a5c39703a14c 05-Sep-2015 Jesse Hall <jessehall@google.com> vulkan: Add skeleton swapchain support

Loader and driver entry points exist and the call chains are hooked up
properly, but functions are just empty stubs for now.

Change-Id: I6ff95e47d1d09ebed41eda8accb71686c8249546
(cherry picked from commit 038c8a740bbda4650bec776023a26a7fcbf93864)
/frameworks/native/vulkan/libvulkan/Android.mk
d02edcbb40d476b6d3b5ae279a6ccef786be8848 08-Sep-2015 Jesse Hall <jessehall@google.com> vulkan: add copyright notices

Change-Id: I62ec6d02a052c9e9cee9753057d55c165dfc9713
(cherry picked from commit b7f416a9cc3d136ffe4a60b5f6fb2dc8b92a623b)
/frameworks/native/vulkan/libvulkan/Android.mk
04f4f4746481571148eaf3aaf768ee5c6dccec9d 17-Aug-2015 Jesse Hall <jessehall@google.com> vulkan: initial loader and null driver

Change-Id: Id5ebb5f01e61e9b114990f49c64c88fbbb7b730e
(cherry picked from commit 4df205cdfc61e66de774ba50be9ef59a08cf88bb)
/frameworks/native/vulkan/libvulkan/Android.mk