summaryrefslogtreecommitdiff
path: root/src/intel/Android.vulkan.mk
AgeCommit message (Collapse)AuthorFilesLines
2018-10-12anv/android: we need git_sha1.h in include pathsTapani Pälli1-0/+1
Fixes: e4538b9 "anv: Implement VK_KHR_driver_properties" Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2018-04-10vulkan: Drop vk_android_native_buffer.xmlJason Ekstrand1-5/+1
All the information in vk_android_native_buffer.xml is now in vk.xml. The only exception is the extension type attribute which we can work around in the generators while we wait for the XML to be fixed. Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-07android: anv: add libmesa_intel_dev static dependencyMauro Rossi1-0/+1
Fixes the following building errors: external/mesa/src/intel/vulkan/anv_device.c:300: error: undefined reference to 'gen_get_pci_device_id_override' external/mesa/src/intel/vulkan/anv_device.c:312: error: undefined reference to 'gen_get_device_name' external/mesa/src/intel/vulkan/anv_device.c:313: error: undefined reference to 'gen_get_device_info' clang.real: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: 272bef0601a "intel: Split gen_device_info out into libintel_dev" Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-02-27android: fix source files path for libmesa_anv_gen11Harish Krupo1-1/+1
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-02-26android: anv: add dependency on libnativewindow for O and laterMauro Rossi1-8/+14
Similar to 90dd6e5 ("Android: egl: add dependency on libnativewindow") Fixes the following building errors: In file included from external/mesa/src/intel/vulkan/gen7_cmd_buffer.c:30: In file included from external/mesa/src/intel/vulkan/anv_private.h:72: external/mesa/include/vulkan/vk_android_native_buffer.h:22:10: fatal error: 'system/window.h' file not found ^~~~~~~~~~~~~~~~~ 1 error generated. ... In file included from external/mesa/src/intel/vulkan/anv_gem.c:32: In file included from external/mesa/src/intel/vulkan/anv_private.h:72: external/mesa/include/vulkan/vk_android_native_buffer.h:22:10: fatal error: 'system/window.h' file not found ^~~~~~~~~~~~~~~~~ 1 error generated. Cc: "18.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2018-02-26android: anv/extensions: fix generated sources buildMauro Rossi1-3/+13
Building rules are aligned to automake ones The correct script to build anv_extensions.{c,h} is anv_extensions_gen.py Generation rules for anv_extensions.c requires --out-c option Generation rules for anv_extensions.h were missing Necessary include paths are added to avoid following build errors: cp: cannot stat '.../gen/STATIC_LIBRARIES/libmesa_vulkan_common_intermediates/vulkan/anv_extensions.c': No such file or directory In file included from external/mesa/src/intel/vulkan/anv_gem.c:32: external/mesa/src/intel/vulkan/anv_private.h:75:10: fatal error: 'anv_extensions.h' file not found ^~~~~~~~~~~~~~~~~~ 1 error generated. In file included from external/mesa/src/intel/vulkan/anv_batch_chain.c:30: external/mesa/src/intel/vulkan/anv_private.h:75:10: fatal error: 'anv_extensions.h' file not found ^~~~~~~~~~~~~~~~~~ 1 error generated. Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables") Cc: "18.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-02-16anv/icl: Build anv libs for gen11Anuj Phogat1-0/+21
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-18anv: Install as Vulkan HAL module in Android.mk buildTapani Pälli1-1/+3
Now that anvil fully implements the Vulkan HAL interface, we can install it as the vendor HAL module at /vendor/lib/hw/vulkan.${board}.so. To do so: - Rename LOCAL_MODULE to vulkan.$(TARGET_BOARD_PLATFORM). - Use LOCAL_PROPRIETARY_MODULE to install under vendor path. Tested by running different Sascha Williams demos on Android-IA. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> [chadv: Extract this hunk from Tapani's patch, and embed it as stand-alone patch in my arc-vulkan series]. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-18anv: Implement VK_ANDROID_native_buffer (v9)Chad Versace1-2/+5
This implementation is correct (afaict), but takes two shortcuts regarding the import/export of Android sync fds. Shortcut 1. When Android calls vkAcquireImageANDROID to import a sync fd into a VkSemaphore or VkFence, the driver instead simply blocks on the sync fd, then puts the VkSemaphore or VkFence into the signalled state. Thanks to implicit sync, this produces correct behavior (with extra latency overhead, perhaps) despite its ugliness. Shortcut 2. When Android calls vkQueueSignalReleaseImageANDROID to export a collection of wait semaphores as a sync fd, the driver instead submits the semaphores to the queue, then returns sync fd -1, which informs the caller that no additional synchronization is needed. Again, thanks to implicit sync, this produces correct behavior (with extra batch submission overhead) despite its ugliness. I chose to take the shortcuts instead of properly importing/exporting the sync fds for two reasons: Reason 1. I've already tested this patch with dEQP and with demos apps. It works. I wanted to get the tested patches into the tree now, and polish the implementation afterwards. Reason 2. I want to run this on a 3.18 kernel (gasp!). In 3.18, i915 supports neither Android's sync_fence, nor upstream's sync_file, nor drm_syncobj. Again, I tested these patches on Android with a 3.18 kernel and they work. I plan to quickly follow-up with patches that remove the shortcuts and properly import/export the sync fds. Non-Testing =========== I did not test at all using the Android.mk buildsystem. I may have broke it. Please test and review that. Testing ======= I tested with 64-bit ARC++ on a Skylake Chromebook and a 3.18 kernel. The following pass (as of patchset v9): - a little spinning cube demo APK - several Sascha demos - dEQP-VK.info.* - dEQP-VK.api.wsi.android.* (except dEQP-VK.api.wsi.android.swapchain.*.image_usage, because dEQP wants to create swapchains with VK_IMAGE_USAGE_STORAGE_BIT) - dEQP-VK.api.smoke.* - dEQP-VK.api.info.instance.* - dEQP-VK.api.info.device.* v2: - Reject VkNativeBufferANDROID if the dma-buf's size is too small for the VkImage. - Stop abusing VkNativeBufferANDROID by passing it to vkAllocateMemory during vkCreateImage. Instead, directly import its dma-buf during vkCreateImage with anv_bo_cache_import(). [for jekstrand] - Rebase onto Tapani's VK_EXT_debug_report changes. - Drop `CPPFLAGS += $(top_srcdir)/include/android`. The dir does not exist. v3: - Delete duplicate #include "anv_private.h". [per Tapani] - Try to fix the Android-IA build in Android.vulkan.mk by following Tapani's example. v4: - Unset EXEC_OBJECT_ASYNC and set EXEC_OBJECT_WRITE on the imported gralloc buffer, just as we do for all other winsys buffers in anv_wsi.c. [found by Tapani] v5: - Really fix the Android-IA build by ensuring that Android.vulkan.mk uses Mesa' vulkan.h and not Android's. Insert -I$(MESA_TOP)/include before -Iframeworks/native/vulkan/include. [for Tapani] - In vkAcquireImageANDROID, submit signal operations to the VkSemaphore and VkFence. [for zhou] v6: - Drop copy-paste duplication in vkGetSwapchainGrallocUsageANDROID(). [found by zhou] - Improve comments in vkGetSwapchainGrallocUsageANDROID(). v7: - Fix vkGetSwapchainGrallocUsageANDROID() to inspect its VkImageUsageFlags parameter. [for tfiga] - This fix regresses dEQP-VK.api.wsi.android.swapchain.*.image_usage because dEQP wants to create swapchains with VK_IMAGE_USAGE_STORAGE_BIT. v8: - Drop unneeded goto in vkAcquireImageANDROID. [for tfiga] v8.1: (minor changes) - Drop errant hunks added by rerere in anv_device.c. - Drop explicit mention of VK_ANDROID_native_buffer in anv_entrypoints_gen.py. [for jekstrand] v9: - Isolate as much Android code as possible, moving it from anv_image.c to anv_android.c. Connect the files with anv_image_from_gralloc(). Remove VkNativeBufferANDROID params from all anv_image.c funcs. [for krh] - Replace some intel_loge() with vk_errorf() in anv_android.c. - Use © in copyright line. [for krh] Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v5) Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> (v9) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v9) Cc: zhoucm1 <david1.zhou@amd.com> Cc: Tomasz Figa <tfiga@chromium.org>
2017-10-17anv/android: Link to libsync, liblog in Android.mkTapani Pälli1-1/+1
chadv: I made this patch by extracting the hunk from Tapani's patch in https://lists.freedesktop.org/archives/mesa-dev/2017-September/169602.html. Signed-off-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-09-18anv: Feed vk_android_native_buffer.xml to generators (v2)Chad Versace1-1/+4
Feed the XML to anv_extensions.py and anv_entrypoints_gen.py. Do it on all platforms, not just Android. Tested on Android and Fedora. We always parse the Android XML, regardless of target platform, to help reduce the chance that people working on non-Android break the Android build. v2: - Squash in Tapani's changes to Android.*.mk. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v1)
2017-08-03android: anv_extensions.c is generated to libmesa_vulkan_commonTapani Pälli1-1/+1
Fixes build error with anv_extensions.c not found for libmesa_anv_entrypoints. Fixes: d62063c "anv: Autogenerate extension query and lookup" Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-08-01anv: Autogenerate extension query and lookupJason Ekstrand1-0/+9
As time goes on, extension advertising is going to get more complex. Today, we either implement an extension or we don't. However, in the future, whether or not we advertise an extension will depend on kernel or hardware features. This commit introduces a python codegen framework that generates the anv_EnumerateFooExtensionProperties functions as well as a pair of anv_foo_extension_supported functions for querying for the support of a given extension string. Each extension has an "enable" predicate that is any valid C expression. For device extensions, the physical device is available as "device" so the expression could be something such as "device->has_kernel_feature". For instance extensions, the only option is VK_USE_PLATFORM defines. This mechanism also means that we have a single one-line-per-entry table for all extension declarations instead of the two tables we had in anv_device.c and the one we had in anv_entrypoints_gen.py. The Python code is smart and uses the XML to determine whether an extension is an instance extension or device extension. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-12intel: Move the DRM uapi headers to a non-Intel location.Eric Anholt1-1/+1
I want to remove vc4's dependency on headers from libdrm as well, but storing multiple copies of drm_fourcc.h in our tree would be silly. v2: Update Android.mk as well, move distcheck drm*.h references to top-level noinst_HEADERS. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1) Reviewed-by: Daniel Stone <daniels@collabora.com> (v1) Reviewed-by: Rob Herring <robh@kernel.org>
2017-06-29android: anv: drop libdrm_intel dependencyMauro Rossi1-1/+2
In addition to Rob Herring "Android: i965: remove libdrm_intel dependency", we can drop libdrm_intel dependency in anv for Android. Please check if libdrm has to stay as shared dependency and drop this comment line. Fixes: 7dd20bc ("anv/i965: drop libdrm_intel dependency completely") Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-09i965/cnl: Wire up android Mesa build files for gen10Anuj Phogat1-0/+21
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2017-06-06util/vulkan: Move Vulkan utilities to src/vulkan/utilAlex Smith1-0/+1
We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. v2: Android build system changes (from Tapani Pälli) Signed-off-by: Alex Smith <asmith@feralinteractive.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-05-20android: add -Wl,--build-id=sha1 to LDFLAGS for libvulkan_intelTapani Pälli1-0/+2
Just like is done on desktop and what is expected by the build-id code. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-05-17Android: correct libz dependencyChih-Wei Huang1-1/+1
Commit 6facb0c0 ("android: fix libz dynamic library dependencies") unconditionally adds libz as a dependency to all shared libraries. That is unnecessary. Commit 85a9b1b5 introduced libz as a dependency to libmesa_util. So only the shared libraries that use libmesa_util need libz. Fix Android Lollipop build by adding the include path of zlib to libmesa_util explicitly instead of getting the path implicitly from zlib since it doesn't export the include path in Lollipop. Fixes: 6facb0c0 "android: fix libz dynamic library dependencies" Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Rob Herring <robh@kernel.org>
2017-03-30intel: android: remove libdrm_intel requirementEmil Velikov1-7/+6
The only part which requires libdrm_intel tools/aubinator is not built on Android. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-03-23android: fix vulkan build issues with anv_entrypointsTapani Pälli1-6/+12
Patch fixes entrypoint generation for libmesa_anv_entrypoints that still used old style of calling generator script. Also small fixes to libmesa_vulkan_common where there was a typo in target name (vulknan) and files were generated to wrong folder. Fixes: 8211e3e6 ("anv: Generate anv_entrypoints header and code in one command") Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-03-23android: rename Intel Vulkan library to match desktop oneTapani Pälli1-2/+2
Original naming was following Vulkan HAL naming scheme for no good purpose and we need same binary name for build-id code. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-03-22anv: Generate anv_entrypoints header and code in one commandDylan Baker1-2/+5
This produces the header and the code in one command, saving the need to call the same script twice, which parses the same XML file. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2017-03-22anv: anv_entrypoints_gen.py: directly write files instead of pipingDylan Baker1-2/+3
This changes the output to be written as a file rather than being piped. This had one critical advantage, it encapsulates the encoding. This prevents bugs where a symbol (generally unicode like © [copyright]) is printed and the system being built on doesn't have a unicode locale. v2: - Update Android.mk v3: - Don't generate both files at once - Fix Android.mk - drop --outdir, since the filename is passed in as an argument Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2017-03-22anv: don't pass xmlfile via stdin anv_entrypoints_gen.pyDylan Baker1-4/+2
It's slow, and has the potential for encoding issues. v2: - pass xml file location via argument - update Android.mk Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2017-03-22anv: android: remove unused include/vulkan includeEmil Velikov1-1/+0
Spotted while skimming through similar hunks for the Autotools build. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2017-03-14android: add '/vulkan' to libmesa_anv_entrypoints pathTapani Pälli1-2/+2
otherwise generated entrypoint headers are not found during build Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-03-13intel/vulkan: Get rid of recursive makeJason Ekstrand1-0/+231
v2 [Emil Velikov] - Various fixes and initial stab at the Android build. - Keep the generation rules/EXTRA_DIST outside the conditional Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>