[Mesa-dev] [PATCH 09/14] anv: Add field anv_image::bo_is_owned

2017-09-27 Thread Chad Versace
If this flag is set, then the image and it's bo have the same lifetime. vkDestroyImage will release the bo. We need this for VK_ANDROID_native_buffer, because that extension creates the VkImage and imports its memory in the same call, vkCreateImage. --- src/intel/vulkan/anv_image.c | 9

[Mesa-dev] [PATCH 07/14] anv/image: Refactor how tiling is chosen (v2)

2017-09-27 Thread Chad Versace
The code that restricts the VkImage's tiling flags, extract it into a new function named choose_isl_tiling_flags(). This reduces the diff in upcoming patches for VK_ANDROID_native_buffer. v2: - Rebase onto 'needs_shadow' changes on master. - Assert that choose_isl_tiling_flags() chooses at

[Mesa-dev] [PATCH 12/14] anv: Add func anv_gem_get_tiling()

2017-09-27 Thread Chad Versace
Will use in VK_ANDROID_native_buffer. --- src/intel/vulkan/anv_gem.c | 16 src/intel/vulkan/anv_private.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index 3994c6b66c2..34c09891086 100644 ---

[Mesa-dev] [PATCH 06/14] anv/image: Better var names for image-create-info structs

2017-09-27 Thread Chad Versace
Upcoming patches teach vkCreateImage to understand VkNativeBufferANDROID. And much later patches will do the same for whatever VkImageCreateInfo-chained struct imports dma-bufs. And then again for the struct that will be introduced by the inevitable extension VK_ANDROID_external_memory_whatever.

[Mesa-dev] [PATCH 04/14] intel: Add simple logging façade for Android

2017-09-27 Thread Chad Versace
I'm bringing up Vulkan in the Android container of Chrome OS (ARC++). On Android, stdio goes to /dev/null. On Android, remote gdb is even more painful than the usual remote gdb. On Android, nothing works like you expect and debugging is hell. I need logging. This patch introduces a small, simple

[Mesa-dev] [PATCH 03/14] intel: Move definition of LOG_TAG from header into Makefiles

2017-09-27 Thread Chad Versace
This patch prevents compilation failures in upcoming Android Vulkan patches, failures due to redefinition of LOG_TAG in Android system headers. This patch does not change the value of LOG_TAG. It remains "INTEL-MESA". (I don't like it, though. The all-caps smells like FORTRAN). Only one Intel

[Mesa-dev] [PATCH 01/14] anv/android: Link to Android libraries in the autotools build

2017-09-27 Thread Chad Versace
A first step to supporting Vulkan on ARC++. Mesa on ARC++ uses Autotools, not Android.mk. Doing this now, even before VK_ANDROID_native_buffer is implemented, allows us to incrementally add Android support to the Autotools build. --- src/intel/Makefile.vulkan.am | 5 + 1 file changed, 5

[Mesa-dev] [PATCH 00/14] anv: Implement VK_ANDROID_native_buffer (v3)

2017-09-27 Thread Chad Versace
on't break the Android.mk buildsystem used by Android-IA. - Rebase onto the anv_image.c:needs_shadow changes in master. Chad Versace (12): anv/android: Link to Android libraries in the autotools build intel: Move definition of LOG_TAG from header into Makefiles intel: Add simple logg

[Mesa-dev] [PATCH 02/14] anv/android: Link to libsync, liblog in Android.mk

2017-09-27 Thread Chad Versace
From: Tapani Pälli <tapani.pa...@intel.com> 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 <chadvers...@chromium.org> --- src/intel/Android.vulkan.mk |

[Mesa-dev] [PATCH 08/14] anv/image: Refactor creation of aux surfaces (v2)

2017-09-27 Thread Chad Versace
Creation of hiz, ccs, and mcs surfaces was encoded in a large, deep 'if' tree at the tail of make_surface(). This patch extracts that 'if' tree into one function per aux type: try_make_hiz_surface() try_make_ccs_surface() try_make_mcs_surface() For clarity, also rename make_surface()

[Mesa-dev] [PATCH 05/14] anv: Better support for Android logging (v2)

2017-09-27 Thread Chad Versace
In src/intel/vulkan/*, redirect all instances of printf, vk_error, anv_loge, anv_debug, anv_finishme, anv_perf_warn, anv_assert, and their many variants to the new intel_log functions. I believe I caught them all. The other subdirs of src/intel are left for a future exercise. v2: - Rebase onto

Re: [Mesa-dev] [PATCH] glsl: Allow precision mismatch on dead data with GLSL ES 1.00

2017-09-26 Thread Chad Versace
.00 spec, convinces me that this patch takes the right approach. (Even though the next sentence contradicts the "should be warned" suggestion... Oh well, the GLSL spec is embarassingly imprecise elsewhere too). Reviewed-by: Chad Versace <chadvers...@chromium.org> Though my rb has less

Re: [Mesa-dev] [PATCH v3 3/6] vulkan: enum generator: make registry more flexible

2017-09-21 Thread Chad Versace
bda e: e.name) ----^ No spaces around the = > > for template, file_ in [(C_TEMPLATE, os.path.join(args.outdir, > 'vk_enum_to_str.c')), > (H_TEMPLATE, os.path.join(args.outdir, > 'vk_enum_to_str.h'))]: > -- With those minor things fixed, Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v3 2/6] vulkan: enum generator: sort enums by names

2017-09-21 Thread Chad Versace
tr.py > @@ -185,13 +185,14 @@ def main(): > efactory = EnumFactory(VkEnum) > for filename in args.xml_files: > parse_xml(efactory, filename) > +enums=sorted(efactory.registry.values(), key=lambda e: e.name) Minor nit. The above = should have spaces around it. Review

Re: [Mesa-dev] [PATCH v3 1/6] vulkan: enum generator: align function declarations/prototypes

2017-09-21 Thread Chad Versace
/vulkan/util/gen_enum_to_str.py | 42 > +++--- > 1 file changed, 21 insertions(+), 21 deletions(-) Patch 1 is Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] anv: Implement VK_ANDROID_native_buffer (v5)

2017-09-21 Thread Chad Versace
On Thu 21 Sep 2017, Tapani Pälli wrote: > Hi Chad; > > The build works ok now on Android-IA. There is still something wrong with > 'exec async' though. It behaves differently with small/big apps but > eventually I think it just starts to block .. somewhere. I still need the > big hammer to set

[Mesa-dev] [PATCH] anv: Implement VK_ANDROID_native_buffer (v5)

2017-09-18 Thread Chad Versace
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

Re: [Mesa-dev] [PATCH 20/20 v4]] anv: Implement VK_ANDROID_native_buffer (v4)

2017-09-18 Thread Chad Versace
On Fri 15 Sep 2017, Tapani Pälli wrote: > > > On 09/15/2017 01:06 AM, Chad Versace wrote: > > v3: > >- Delete duplicate #include "anv_private.h". [per Tapani] > >- Try to fix the Android-IA build in Android.vulkan.mk by following > >

Re: [Mesa-dev] [PATCH 20/20] anv: Implement VK_ANDROID_native_buffer (v2)

2017-09-18 Thread Chad Versace
On Fri 15 Sep 2017, zhoucm1 wrote: > > > On 2017年09月14日 07:03, Chad Versace wrote: > > From: Chad Versace <chadvers...@chromium.org> > > > > This implementation is correct (afaict), but takes two shortcuts > > regarding the import/export of Android sync fd

Re: [Mesa-dev] [PATCH 4/4] i965: Use prepare_external instead of make_shareable in setTexBuffer2

2017-09-18 Thread Chad Versace
f X11 does render to CCS-enabled surfaces, then we have more invasive problems that need fixing. Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/4] i965: Reset miptree aux state on update_image_buffer

2017-09-18 Thread Chad Versace
+++ > src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 3 +++ > 3 files changed, 25 insertions(+), 1 deletion(-) Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https:/

Re: [Mesa-dev] [PATCH 3/4] i965/tex_image: Reference the renderbuffer miptree in setTexBuffer2

2017-09-18 Thread Chad Versace
gt;ctx, texObj); The above hunk looks like the logical conclusion of consecutive commits 40e9be4 and 8ceb7c7. In fact, it seems like this was commit's 8ceb7c7 actual intention. Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/4] intel/isl: Add a drm_modifier_get_default_aux_state helper

2017-09-18 Thread Chad Versace
not really a "default" state, it's more a "lowest-common-denomiator" state that the surface enters when during transfer. Hmmm... maybe we could call it a "transfer" state or "lcd" state. Whatever... the code looks good, and the name is, though imprecise, at least not misl

Re: [Mesa-dev] [PATCH 2/2] anv: set has_exec_async to false on Android

2017-09-14 Thread Chad Versace
On Thu 14 Sep 2017, Emil Velikov wrote: > On 14 September 2017 at 07:57, Tapani Pälli wrote: > > Other WSI implementations set has_exec_async false for WSI buffers, > > so far haven't found a place to do it so we just claim to not have > > async exec. > > > What's the

[Mesa-dev] [PATCH 20/20 v4]] anv: Implement VK_ANDROID_native_buffer (v4)

2017-09-14 Thread Chad Versace
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

[Mesa-dev] [PATCH 21/20] anv: Install as Vulkan HAL module in Android.mk build

2017-09-14 Thread Chad Versace
nstall under vendor path. Tested by running different Sascha Williams demos on Android-IA. Signed-off-by: Tapani Pälli <tapani.pa...@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 Versa

Re: [Mesa-dev] [PATCH 1/2] anv: android build system changes

2017-09-14 Thread Chad Versace
On Thu 14 Sep 2017, Tapani Pälli wrote: > Following changes are made to support VK_ANDROID_native_buffer: > >- bring in vk_android_native_buffer.xml >- rename target as vulkan.$(TARGET_BOARD_PLATFORM) >- use LOCAL_PROPRIETARY_MODULE to install under vendor path >- link with

[Mesa-dev] [PATCH 20/20 v3] anv: Implement VK_ANDROID_native_buffer (v3)

2017-09-14 Thread Chad Versace
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

Re: [Mesa-dev] [PATCH 20/20] anv: Implement VK_ANDROID_native_buffer (v2)

2017-09-14 Thread Chad Versace
On Thu 14 Sep 2017, Tapani Pälli wrote: > > > On 09/14/2017 08:51 AM, Tapani Pälli wrote: > > > > > > On 09/14/2017 02:03 AM, Chad Versace wrote: > > > From: Chad Versace <chadvers...@chromium.org> > > > > > > This implementation

[Mesa-dev] [PATCH 9.5/20] anv/android: Link to libsync, liblog in Android.mk

2017-09-14 Thread Chad Versace
From: Tapani Pälli <tapani.pa...@intel.com> 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 <chadvers...@chromium.org> --- src/intel/Android.vulkan.mk |

Re: [Mesa-dev] [PATCH] anv: Feed vk_android_native_buffer.xml to generators (v2)

2017-09-14 Thread Chad Versace
OOPS. Ignore this. This message has the wrong In-Reply-To. On Thu 14 Sep 2017, Chad Versace wrote: > 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, regardle

[Mesa-dev] [PATCH] anv: Feed vk_android_native_buffer.xml to generators (v2)

2017-09-14 Thread Chad Versace
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: -

[Mesa-dev] [PATCH] anv: Feed vk_android_native_buffer.xml to generators (v2)

2017-09-14 Thread Chad Versace
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: -

Re: [Mesa-dev] [PATCH 3/3] i965: Disable stencil cache optimization combining two 4x2 blocks

2017-09-14 Thread Chad Versace
s.h | 5 - > src/mesa/drivers/dri/i965/brw_state_upload.c | 1 + > 2 files changed, 5 insertions(+), 1 deletion(-) Acked-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/3] intel/blorp/hiz: Always set sample number

2017-09-14 Thread Chad Versace
ches 2-3 (because I don't know a lot about this code) are > > Acked-by: Matt Turner <matts...@gmail.com> Patch 2 is Reviewed-by: Chad Versace <chadvers...@chromium.org> Please reference Chromium commit https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay

Re: [Mesa-dev] [PATCH 1/3] i965/gen8: Remove unused gen8_emit_3dstate_multisample()

2017-09-14 Thread Chad Versace
eletions(-) Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 15/20] anv/image: Refactor creation of aux surfaces (v2)

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> Creation of hiz, ccs, and mcs surfaces was encoded in a large, deep 'if' tree at the tail of make_surface(). This patch extracts that 'if' tree into one function per aux type: try_make_hiz_surface() try_make_ccs_s

[Mesa-dev] [PATCH 20/20] anv: Implement VK_ANDROID_native_buffer (v2)

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> 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

[Mesa-dev] [PATCH 11/20] intel: Add simple logging façade for Android

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> I'm bringing up Vulkan in the Android container of Chrome OS (ARC++). On Android, stdio goes to /dev/null. On Android, remote gdb is even more painful than the usual remote gdb. On Android, nothing works like you expect and debugging is hell.

[Mesa-dev] [PATCH 18/20] anv: Add sizeless anv_bo_cache_import()

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> The patch renames anv_bo_cache_import() to anv_bo_cache_import_with_size(); and adds a new variant, anv_bo_cache_import(), that lacks the 'size' parameter. Same as pre-patch, anv_bo_cache_import_with_size() continues to validate the importe

[Mesa-dev] [PATCH 19/20] anv: Add func anv_gem_get_tiling()

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> Will use in VK_ANDROID_native_buffer. --- src/intel/vulkan/anv_gem.c | 16 src/intel/vulkan/anv_private.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c

[Mesa-dev] [PATCH 17/20] anv: Move close(fd) from anv_bo_cache_import to its callers

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> This will allow us to implement VK_ANDROID_native_buffer without dup'ing the fd. We must close the fd in VK_KHR_external_memory_fd, but we should not in VK_ANDROID_native_buffer. --- src/intel/vulkan/anv_allocator.c | 12 src

[Mesa-dev] [PATCH 16/20] anv: Add field anv_image::bo_is_owned

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> If this flag is set, then the image and it's bo have the same lifetime. vkDestroyImage will release the bo. We need this for VK_ANDROID_native_buffer, because that extension creates the VkImage and imports its memory in the same call, vkCreat

[Mesa-dev] [PATCH 10/20] intel: Move definition of LOG_TAG from header into Makefiles

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> This patch prevents compilation failures in upcoming Android Vulkan patches, failures due to redefinition of LOG_TAG in Android system headers. This patch does not change the value of LOG_TAG. It remains "INTEL-MESA". (I don't

[Mesa-dev] [PATCH 13/20] anv/image: Better var names for image-create-info structs

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> Upcoming patches teach vkCreateImage to understand VkNativeBufferANDROID. And much later patches will do the same for whatever VkImageCreateInfo-chained struct imports dma-bufs. And then again for the struct that will be introduced by the inev

[Mesa-dev] [PATCH 07/20] anv: Feed vk_android_native_buffer.xml to generators

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> 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

[Mesa-dev] [PATCH 14/20] anv/image: Refactor how tiling is chosen

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> The code that restricts the VkImage's tiling flags, extract it into a new function named choose_isl_tiling_flags(). This reduces the diff in upcoming patches for VK_ANDROID_native_buffer. --- src/intel/vulkan/anv_image.

[Mesa-dev] [PATCH 12/20] anv: Better support for Android logging (v2)

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> In src/intel/vulkan/*, redirect all instances of printf, vk_error, anv_loge, anv_debug, anv_finishme, anv_perf_warn, anv_assert, and their many variants to the new intel_log functions. I believe I caught them all. The other subdirs of src

[Mesa-dev] [PATCH 08/20] anv/android: Disable surface and swapchain extensions (v2)

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> Android's Vulkan loader implements VK_KHR_surface and VK_KHR_swapchain, and applications cannot access the driver's implementation. Moreoever, if the driver exposes the those extension strings, then tests dEQP-VK.api.info.instance.extensions an

[Mesa-dev] [PATCH 09/20] anv: Link to Android libraries in the autotools build

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> A first step to supporting Vulkan on ARC++. Mesa on ARC++ uses Autotools, not Android.mk. Doing this now, even before VK_ANDROID_native_buffer is implemented, allows us to incrementally add Android support to the Autotools build. --- src

[Mesa-dev] [PATCH 04/20] vulkan/util: Teach gen_enum_to_str.py to parse mutliple XML files

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> To give the script multiple XML files, call it like so: gen_enum_to_str.py --xml a.xml --xml b.xml --xml c.xml ... The script parses the XML files in the given order. This will allow us to feed the script XML files for exte

[Mesa-dev] [PATCH 05/20] vulkan/registry: Feed vk_android_native_buffer.xml to gen_enum_to_str.py

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> Tested on Android and Fedora. --- src/vulkan/Android.mk | 9 +++-- src/vulkan/Makefile.am | 9 +++-- src/vulkan/util/gen_enum_to_str.py | 20 +++- 3 files changed, 33 insertions(+), 5 del

[Mesa-dev] [PATCH 03/20] vulkan/registry: Add VK_ANDROID_native_buffer

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> The VK_ANDROID_native_buffer extension is missing from the official vk.xml. This patch defines the extension in a separate, minimal XML file: vk_android_native_buffer.xml. I chose to add the extension to a new XML file instead of

[Mesa-dev] [PATCH 02/20] vulkan: Add #ifdef hack to vk_android_native_buffer.h

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> This patch consolidates many potential `#ifdef ANDROID` messes throughout src/vulkan and src/intel/vulkan into a simple, localized hack. The hack is an `#ifdef ANDROID` in vk_android_native_buffer.h that, on non-Android platorms, avoids inc

[Mesa-dev] [PATCH 01/20] vulkan: Import vk_android_native_buffer.h

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> Just as Mesa imports the Khronos Vulkan headers, it should import this Android-private Vulkan header too. This guarantees that Mesa will continue to build even when upstream Android breaks header compatibility. This header is only for *implem

[Mesa-dev] [PATCH 06/20] anv: Teach generator scripts how to parse mutliple XML files

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> The taught scripts are anv_extensions.py and anv_entrypoints_gen.py. To give a script multiple XML files, call it like so: anv_extensions.py --xml a.xml --xml b.xml --xml c.xml ... The scripts parse the XML files in the given

[Mesa-dev] [PATCH 00/23] anv: Implement VK_ANDROID_native_buffer (v2)

2017-09-13 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> This series adds Android support to Anvil. And Android requires VK_ANDROID_native_buffer. I tested the series on 64-bit ARC++ on a Skylake Chromebook with a 3.18 kernel. (ARC++ is the Android container in Chrome OS). (Yes, I said 3.18.

Re: [Mesa-dev] [PATCH 23/23] anv: Implement VK_ANDROID_native_buffer

2017-09-13 Thread Chad Versace
ol and one could make more optimal > decisions. > > On 2 September 2017 at 09:17, Chad Versace <chadvers...@chromium.org> wrote: > > > diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources > > index f6a69f65455..e4a371cbe3f 100644 > > --- a/src/in

Re: [Mesa-dev] [PATCH 01/23] vulkan: Import vk_android_native_buffer.h

2017-09-13 Thread Chad Versace
On Wed 13 Sep 2017, Emil Velikov wrote: > On 2 September 2017 at 09:17, Chad Versace <chadvers...@chromium.org> wrote: > > Just as Mesa imports the Khronos Vulkan headers, it should import this > > Android-private Vulkan header too. This guarantees that Mesa will > >

[Mesa-dev] [PATCH] util/build_id: Include

2017-09-13 Thread Chad Versace
Fix the build for Android Nougat. The dladdr(3) manpage says that is required. On Linux, the build succeeded without it because build_id.c includes which includes . On Android, we must include directly. Fixes: 5c98d382 "util: Query build-id by symbol address, not library name" Cc: Matt Turner

Re: [Mesa-dev] [PATCH] util: Query build-id by symbol address, not library name

2017-09-13 Thread Chad Versace
On Tue 12 Sep 2017, Matt Turner wrote: > On Tue, Sep 12, 2017 at 5:05 PM, Chad Versace <c...@kiwitree.net> wrote: > > This patch renames build_id_find_nhdr() to > > build_id_find_nhdr_for_addr(), and changes it to never examine the > > library name. > > &

[Mesa-dev] [PATCH] util: Query build-id by symbol address, not library name

2017-09-12 Thread Chad Versace
This patch renames build_id_find_nhdr() to build_id_find_nhdr_for_addr(), and changes it to never examine the library name. Tested on Fedora by confirming that build_id_get_data() returns the same build-id as the file(1) tool. For BSD, I confirmed that the API used (dladdr() and struct Dl_info)

Re: [Mesa-dev] [PATCH 22/23] HACK: anv: Fix query of ELF build-id on ARC++

2017-09-12 Thread Chad Versace
On Mon 04 Sep 2017, Tapani Pälli wrote: > > > On 09/04/2017 08:37 AM, Tapani Pälli wrote: > > > > > > On 09/02/2017 11:17 AM, Chad Versace wrote: > > > NOT FOR UPSTREAM. > > > > > > To get the driver's build-id, anv_physical_device_init

Re: [Mesa-dev] [PATCH 19/23] anv: Add flag NO_CLOSE_FD for anv_bo_cache_import()

2017-09-11 Thread Chad Versace
On Sat 02 Sep 2017, Jason Ekstrand wrote: > On Sat, Sep 2, 2017 at 1:17 AM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > This patch adds a flag param to anv_bo_cache_import() and defines > exactly one flag, ANV_BO_CACHE_IMPORT_NO_CLOSE_FD.

Re: [Mesa-dev] [PATCH 18/23] anv: Add field anv_image::mem_is_owned

2017-09-11 Thread Chad Versace
On Sat 02 Sep 2017, Jason Ekstrand wrote: > On Sat, Sep 2, 2017 at 1:17 AM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > If this flag is set, then the image and it's device memory have the same > lifetime.  vkDestroyImage will free its anv_device_mem

Re: [Mesa-dev] [PATCH 13/23] anv: Better support for Android logging

2017-09-06 Thread Chad Versace
On Sat 02 Sep 2017, Jason Ekstrand wrote: > This is going to conflict badly with tapani's work to implement > VK_EXT_debug_report (which I need to finish reviewing). Understood. It probably conflicts with other in-flight patches too. ___ mesa-dev

Re: [Mesa-dev] [PATCH 12/23] intel: Add simple logging façade for Android

2017-09-06 Thread Chad Versace
On Mon 04 Sep 2017, Eero Tamminen wrote: > Hi, > > On 02.09.2017 11:17, Chad Versace wrote: > > I'm bringing up Vulkan in the Android container of Chrome OS (ARC++). > > > > On Android, stdio goes to /dev/null. On Android, remote gdb is even more > > painful than

Re: [Mesa-dev] [PATCH 12/23] intel: Add simple logging façade for Android

2017-09-06 Thread Chad Versace
On Tue 05 Sep 2017, Rob Herring wrote: > On Sat, Sep 2, 2017 at 3:17 AM, Chad Versace <chadvers...@chromium.org> wrote: > > I'm bringing up Vulkan in the Android container of Chrome OS (ARC++). > > > > On Android, stdio goes to /dev/null. On Android, remote gdb is

Re: [Mesa-dev] [PATCH 12/23] intel: Add simple logging façade for Android

2017-09-06 Thread Chad Versace
On Sat 02 Sep 2017, Jason Ekstrand wrote: > n Sat, Sep 2, 2017 at 1:17 AM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > My goal here is not perfection. My goal is to make a minimal, clean API, > that people hate merely a little instead of a lot, and that's

[Mesa-dev] [PATCH] fixup! anv/android: Disable surface and swapchain extensions

2017-09-06 Thread Chad Versace
--- Jason, did you envision a cleanup like this? src/intel/vulkan/anv_extensions.py | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py index 18062359d31..747b36b71f5 100644 ---

Re: [Mesa-dev] [PATCH 00/23] anv: Implement VK_ANDROID_native_buffer

2017-09-02 Thread Chad Versace
Adding back people that got accidentally dropped from the CC list. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 0/1] VK_ANDROID_native_buffer RFC

2017-09-02 Thread Chad Versace
On Thu 31 Aug 2017, Tapani Pälli wrote: > Hi; Hi Tapani, I just sent my implementation to mesa-dev too. I see a few major differences in our approaches: - I'm using Autotools. You used Android.mk. I probably broke the Android.mk build... sorry. I haven't found the time yet to test that

[Mesa-dev] [PATCH 22/23] HACK: anv: Fix query of ELF build-id on ARC++

2017-09-02 Thread Chad Versace
NOT FOR UPSTREAM. To get the driver's build-id, anv_physical_device_init_uuids() searches the current process for an ELF phdr for filename "libvulkan_intel.so". However, Android requires that the library be named "vulkan.${board}.so". Fix it with a quick #ifdef hack. I have a plan to properly

[Mesa-dev] [PATCH 19/23] anv: Add flag NO_CLOSE_FD for anv_bo_cache_import()

2017-09-02 Thread Chad Versace
This patch adds a flag param to anv_bo_cache_import() and defines exactly one flag, ANV_BO_CACHE_IMPORT_NO_CLOSE_FD. If set, the function will not close the fd. This prepares for implementing VK_ANDROID_native_buffer, which must not close the imported fd. --- src/intel/vulkan/anv_allocator.c |

[Mesa-dev] [PATCH 20/23] anv: Add flag IGNORE_SIZE_PARAM for anv_bo_cache_import()

2017-09-02 Thread Chad Versace
If ANV_BO_CACHE_IMPORT_IGNORE_SIZE_PARAM is set, then the function ignores the 'size' parameter. Instead, on a cache hit, it uses the cached bo's size; on a cache miss, it queries the fd's size. This prepares for implementing VK_ANDROID_native_buffer, in which the API provides no explicit size

[Mesa-dev] [PATCH 21/23] anv: Add func anv_gem_get_tiling()

2017-09-02 Thread Chad Versace
Will use in VK_ANDROID_native_buffer. --- src/intel/vulkan/anv_gem.c | 16 src/intel/vulkan/anv_private.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index 3994c6b66c2..34c09891086 100644 ---

[Mesa-dev] [PATCH 23/23] anv: Implement VK_ANDROID_native_buffer

2017-09-02 Thread Chad Versace
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

[Mesa-dev] [PATCH 09/23] anv: Annotate entrypoint table with index and func name

2017-09-02 Thread Chad Versace
This helps when debugging a broken entrypoint table. --- src/intel/vulkan/anv_entrypoints_gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py index 82221ef94bd..983be09a39b 100644 ---

[Mesa-dev] [PATCH 12/23] intel: Add simple logging façade for Android

2017-09-02 Thread Chad Versace
I'm bringing up Vulkan in the Android container of Chrome OS (ARC++). On Android, stdio goes to /dev/null. On Android, remote gdb is even more painful than the usual remote gdb. On Android, nothing works like you expect and debugging is hell. I need logging. This patch introduces a small, simple

[Mesa-dev] [PATCH 10/23] anv: Link to Android libraries in the autotools build

2017-09-02 Thread Chad Versace
A first step to supporting Vulkan on ARC++. Mesa on ARC++ uses Autotools, not Android.mk. --- src/intel/Makefile.vulkan.am | 5 + 1 file changed, 5 insertions(+) diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am index 8a19f96096a..d1b1132ed2e 100644 ---

[Mesa-dev] [PATCH 13/23] anv: Better support for Android logging

2017-09-02 Thread Chad Versace
In src/intel/vulkan/*, redirect all instances of printf, vk_error, anv_loge, anv_debug, anv_finishme, anv_perf_warn, anv_assert, and their many variants to the new intel_log functions. I believe I caught them all. The other subdirs of src/intel are left for a future exercise. ---

[Mesa-dev] [PATCH 11/23] intel: Move definition of LOG_TAG from header into Makefiles

2017-09-02 Thread Chad Versace
This patch prevents compilation failures in upcoming Android Vulkan patches, failures due to redefinition of LOG_TAG in Android system headers. This patch does not change the value of LOG_TAG. It remains "INTEL-MESA". (I don't like it, though. The all-caps smells like FORTRAN). Only one Intel

[Mesa-dev] [PATCH 17/23] anv: In anv_image, track anv_device_memory* instead of anv_bo*

2017-09-02 Thread Chad Versace
This will reduce fragility in the implementation of VK_ANDROID_native_buffer, which must do the equivalent of vkAllocateMemory inside of vkCreateImage. No behavioral change. --- src/intel/vulkan/anv_blorp.c | 12 ++-- src/intel/vulkan/anv_image.c | 12 ++--

[Mesa-dev] [PATCH 08/23] anv/android: Disable surface and swapchain extensions

2017-09-02 Thread Chad Versace
Android's Vulkan loader implements VK_KHR_surface and VK_KHR_swapchain, and applications cannot access the driver's implementation. Moreoever, if the driver exposes the those extension strings, then tests dEQP-VK.api.info.instance.extensions and dEQP-VK.api.info.device fail due to the duplicated

[Mesa-dev] [PATCH 15/23] anv/image: Refactor how tiling is chosen

2017-09-02 Thread Chad Versace
The code that restricts the VkImage's tiling flags, extract it into a new function named choose_isl_tiling_flags(). This reduces the diff in upcoming patches for VK_ANDROID_native_buffer. --- src/intel/vulkan/anv_image.c | 31 --- 1 file changed, 20 insertions(+), 11

[Mesa-dev] [PATCH 18/23] anv: Add field anv_image::mem_is_owned

2017-09-02 Thread Chad Versace
If this flag is set, then the image and it's device memory have the same lifetime. vkDestroyImage will free its anv_device_memory. We need this for VK_ANDROID_native_buffer, because that extension creates the VkImage and imports its memory in the same call, vkCreateImage. ---

[Mesa-dev] [PATCH 14/23] anv/image: Better var names for image-create-info structs

2017-09-02 Thread Chad Versace
Upcoming patches teach vkCreateImage to understand VkNativeBufferANDROID. And much later patches will do the same for whatever VkImageCreateInfo-chained struct imports dma-bufs. And then again for the struct that will be introduced by the inevitable extension VK_ANDROID_external_memory_whatever.

[Mesa-dev] [PATCH 16/23] anv/image: Refactor creation of aux surfaces

2017-09-02 Thread Chad Versace
Creation of hiz, ccs, and mcs surfaces was encoded in a large, deep 'if' tree at the tail of make_surface(). This patch extracts that 'if' tree into one function per aux type: try_make_hiz_surface() try_make_ccs_surface() try_make_mcs_surface() For clarity, also rename make_surface()

[Mesa-dev] [PATCH 07/23] anv: Feed vk_android_native_buffer.xml to generators

2017-09-02 Thread Chad Versace
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. ---

[Mesa-dev] [PATCH 05/23] vulkan/registry: Feed vk_android_native_buffer.xml to gen_enum_to_str.py

2017-09-02 Thread Chad Versace
Tested on Android and Fedora. --- src/vulkan/Android.mk | 9 +++-- src/vulkan/Makefile.am | 9 +++-- src/vulkan/util/gen_enum_to_str.py | 20 +++- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/vulkan/Android.mk

[Mesa-dev] [PATCH 06/23] anv: Teach generator scripts how to parse mutliple XML files

2017-09-02 Thread Chad Versace
The taught scripts are anv_extensions.py and anv_entrypoints_gen.py. To give a script multiple XML files, call it like so: anv_extensions.py --xml a.xml --xml b.xml --xml c.xml ... The scripts parse the XML files in the given order. This will allow us to feed the scripts XML files for

[Mesa-dev] [PATCH 03/23] vulkan/registry: Add VK_ANDROID_native_buffer

2017-09-02 Thread Chad Versace
The VK_ANDROID_native_buffer extension is missing from the official vk.xml. This patch defines the extension in a separate, minimal XML file: vk_android_native_buffer.xml. I chose to add the extension to a new XML file instead of adding it to the official vk.xml in order to avoid conflicts each

[Mesa-dev] [PATCH 04/23] vulkan/util: Teach gen_enum_to_str.py to parse mutliple XML files

2017-09-02 Thread Chad Versace
To give the script multiple XML files, call it like so: gen_enum_to_str.py --xml a.xml --xml b.xml --xml c.xml ... The script parses the XML files in the given order. This will allow us to feed the script XML files for extensions that are missing from the official vk.xml, such as

[Mesa-dev] [PATCH 00/23] anv: Implement VK_ANDROID_native_buffer

2017-09-02 Thread Chad Versace
patch but the last is just prep. You should read the last patch first to better understand the goal, then afterwards review the series linearly from the beginning. Chad Versace (23): vulkan: Import vk_android_native_buffer.h vulkan: Add #ifdef hack to vk_android_native_buffer.h vulkan

[Mesa-dev] [PATCH 01/23] vulkan: Import vk_android_native_buffer.h

2017-09-02 Thread Chad Versace
Just as Mesa imports the Khronos Vulkan headers, it should import this Android-private Vulkan header too. This guarantees that Mesa will continue to build even when upstream Android breaks header compatibility. This header is only for *implementers* of Vulkan, not for consumers of Vulkan.

[Mesa-dev] [PATCH 02/23] vulkan: Add #ifdef hack to vk_android_native_buffer.h

2017-09-02 Thread Chad Versace
This patch consolidates many potential `#ifdef ANDROID` messes throughout src/vulkan and src/intel/vulkan into a simple, localized hack. The hack is an `#ifdef ANDROID` in vk_android_native_buffer.h that, on non-Android platorms, avoids including the Android platform headers and typedefs any

Re: [Mesa-dev] [PATCH] egl/dri2: Implement swapInterval fallback in a conformant way (v2)

2017-08-10 Thread Chad Versace
7 --- > src/egl/drivers/dri2/platform_android.c | 1 - > src/egl/drivers/dri2/platform_drm.c | 1 - > src/egl/drivers/dri2/platform_surfaceless.c | 1 - > src/egl/drivers/dri2/platform_x11.c | 2 +- > 6 files changed, 13 insertions(+), 11 deletions(-) Rev

Re: [Mesa-dev] [PATCH 01/11] intel/isl: Stop padding surfaces

2017-08-07 Thread Chad Versace
hat the surface size be padded to 64B, for cache alignment? I don't know exactly why, but that makes me feel a little safer. With or without that padding to cache-alignment, this is Reviewed-by: Chad Versace <chadvers...@chromium.org> I don't like it, but you convinced me that it's safe... un

Re: [Mesa-dev] [PATCH v3 06/14] i965/miptree: Use BO_ALLOC_ZEROED for CCS_E buffers

2017-07-19 Thread Chad Versace
On Fri 14 Jul 2017, Jason Ekstrand wrote: > Chad, you missed this one. Oops. Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] anv/image: Fix VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT

2017-07-17 Thread Chad Versace
On Tue 18 Jul 2017, Lionel Landwerlin wrote: > Oh dear :/ > > Reviewed-by: Lionel Landwerlin <lionel.g.landwer...@intel.com> > > On 17/07/17 23:32, Chad Versace wrote: > > We incorrectly detected VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT. We looked > > for th

<    1   2   3   4   5   6   7   8   9   10   >