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

2017-11-29 Thread Chad Versace
On Tue 28 Nov 2017, Jason Ekstrand wrote: > > > On Tue, Nov 21, 2017 at 3:05 PM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > @@ -442,7 +443,6 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint > target, > >     struct gl_texture_o

Re: [Mesa-dev] [PATCH v2 09/32] anv: Require a dedicated allocation for modified images

2017-11-29 Thread Chad Versace
On Tue 28 Nov 2017, Jason Ekstrand wrote: > This lets us set the BO tiling when we allocate the memory. This is > required for GL to work properly. > --- > src/intel/vulkan/anv_device.c | 53 > +++ > 1 file changed, 49 insertions(+), 4 deletions(-) > >

Re: [Mesa-dev] [PATCH v2 08/32] anv/image: Add a drm_format_mod field

2017-11-29 Thread Chad Versace
On Tue 28 Nov 2017, Jason Ekstrand wrote: > At the moment, this is always initialized to DRM_FORMAT_MOD_INVALID. > --- > src/intel/vulkan/anv_image.c | 2 ++ > src/intel/vulkan/anv_private.h | 5 + > 2 files changed, 7 insertions(+) This patch is Reviewed-by: Chad Ve

Re: [Mesa-dev] [PATCH v2 06/32] anv: Implement VK_EXT_external_memory_dma_buf

2017-11-29 Thread Chad Versace
On Tue 28 Nov 2017, Jason Ekstrand wrote: > This is a modified version of the patch originally sent by Chad Versace. > The primary difference is that this version claims that OPQAUE_FD and > DMA_BUF are compatible handle types. > --- > src/intel/vulkan/anv_device.c | 13 +

Re: [Mesa-dev] [PATCH v2 07/32] radv: Implement VK_EXT_external_memory_dma_buf

2017-11-29 Thread Chad Versace
On Tue 28 Nov 2017, Jason Ekstrand wrote: > --- > src/amd/vulkan/radv_device.c | 8 ++-- > src/amd/vulkan/radv_extensions.py | 1 + > src/amd/vulkan/radv_formats.c | 8 ++-- > 3 files changed, 13 insertions(+), 4 deletions(-) > > diff --git a/src/amd/vulkan/radv_device.c

Re: [Mesa-dev] [PATCH v2 06/32] anv: Implement VK_EXT_external_memory_dma_buf

2017-11-29 Thread Chad Versace
On Tue 28 Nov 2017, Jason Ekstrand wrote: > This is a modified version of the patch originally sent by Chad Versace. > The primary difference is that this version claims that OPQAUE_FD and > DMA_BUF are compatible handle types. > --- > src/intel/vulkan/anv_device.c | 13 +

[Mesa-dev] [PATCH] intel/isl: Declare private array as static const

2017-11-29 Thread Chad Versace
It's array isl_drm.c:modifier_info[] . --- src/intel/isl/isl_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/isl/isl_drm.c b/src/intel/isl/isl_drm.c index eb3c6f59138..31895e15e16 100644 --- a/src/intel/isl/isl_drm.c +++ b/src/intel/isl/isl_drm.c @@ -71,7 +71,7

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

2017-11-21 Thread Chad Versace
nctions. This > new helper gets called in intelSetTexBuffer2 instead of make_shareable. > We also add an intelReleaseTexBuffer (we passed NULL to releaseTexBuffer > before) and call intel_miptree_prepare_external in it. This probably > does nothing most of the time but it means that the

Re: [Mesa-dev] [PATCH 1/4] i965/miptree: Loosen the format check in miptree_match_image

2017-11-21 Thread Chad Versace
On Tue 21 Nov 2017, Jason Ekstrand wrote: > On Tue, Nov 21, 2017 at 10:56 AM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > On Wed 08 Nov 2017, Jason Ekstrand wrote: > > This function is used to determine when we need to re-allocate a > >

Re: [Mesa-dev] [PATCH 3/4] i965/tex_image: Pull the tex format from the renderbuffer in intelSetTexBuffer2

2017-11-21 Thread Chad Versace
_mesa_lock_texture(>ctx, texObj); I believe this patch preserves behavior whenever previous behavior was correct. And it might fix some corner case incorrect behavior where texFormat was inferred incorrectly. Patch 3/4 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 2/4] i965/tex_image: Reference the renderbuffer miptree in setTexBuffer2

2017-11-21 Thread Chad Versace
On Wed 08 Nov 2017, Jason Ekstrand wrote: > The old code made a new miptree that referenced the same BO as the > renderbuffer and just trusted in the memory aliasing to work. There are > only two ways in which the new miptree is liable to differ from the one > in the renderbuffer and neither of

Re: [Mesa-dev] [PATCH 1/4] i965/miptree: Loosen the format check in miptree_match_image

2017-11-21 Thread Chad Versace
On Wed 08 Nov 2017, Jason Ekstrand wrote: > This function is used to determine when we need to re-allocate a > miptree. Since we do nothing different in miptree allocation for > sRGB vs. linear, loosening this should be safe and may lead to less > copying and reallocating in some odd cases. > >

Re: [Mesa-dev] [PATCH] anv: don't crash when creating a huge image

2017-11-10 Thread Chad Versace
On Thu 09 Nov 2017, Jason Ekstrand wrote: > On Thu, Nov 9, 2017 at 4:23 PM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > On Wed 08 Nov 2017, Jason Ekstrand wrote: > > On Wed, Nov 8, 2017 at 1:34 AM, Samuel Iglesias Gonsálvez <[1] > &g

Re: [Mesa-dev] [PATCH 1/4] i965/miptree: Loosen the format check in miptree_match_image

2017-11-09 Thread Chad Versace
On Wed 08 Nov 2017, Jason Ekstrand wrote: > This function is used to determine when we need to re-allocate a > miptree. Since we do nothing different in miptree allocation for > sRGB vs. linear, loosening this should be safe and may lead to less > copying and reallocating in some odd cases. > >

Re: [Mesa-dev] [PATCH] anv: don't crash when creating a huge image

2017-11-09 Thread Chad Versace
On Wed 08 Nov 2017, Jason Ekstrand wrote: > On Wed, Nov 8, 2017 at 1:34 AM, Samuel Iglesias Gonsálvez <[1] > sigles...@igalia.com> wrote: > > The HW has some limits but, according to the spec, we can create > the image as it has not yet any memory backing it. When we allocate > that

Re: [Mesa-dev] [RFC PATCH v1 03/30] anv: Refactor get_buffer_format_properties()

2017-11-09 Thread Chad Versace
On Tue 07 Nov 2017, Lionel Landwerlin wrote: > On 07/11/17 14:47, Chad Versace wrote: > > Make it a stand-alone function. Pre-patch, for some formats the function > > returned incorrect VkFormatFeatureFlags which were cleaned up by the > > caller. > > >

Re: [Mesa-dev] [RFC PATCH v1 05/30] anv: Fix get_image_format_properties() - depthstencil (v2)

2017-11-09 Thread Chad Versace
On Tue 07 Nov 2017, Jason Ekstrand wrote: > I think I'd prefer we not make "Fix" the first word in the title unless it > fixes an actual bug.  How about "Refactor"?  Same for the ASTC patch. Sure, I'll s/Fix/Refactor/ in those patches. ___ mesa-dev

[Mesa-dev] [PATCH 2/3] anv: Fix architecture in intel_icd.{arch}.json

2017-11-09 Thread Chad Versace
Use the host arch, not the target arch. In Meson and in recent Autotools, the host arch is where the binary will be used. The target arch is useful only when compiling a compiler. See: http://mesonbuild.com/Cross-compilation.html See:

[Mesa-dev] [PATCH 3/3] anv/meson: Generate dev_icd.json

2017-11-09 Thread Chad Versace
I tested this in a setup where the builddir was outside of the srcdir. Reviewed-by: Eric Engestrom Acked-by: Dylan Baker --- src/intel/vulkan/meson.build | 12 1 file changed, 12 insertions(+) diff --git

[Mesa-dev] [PATCH 1/3] radv: Fix architecture in radeon_icd.{arch}.json

2017-11-09 Thread Chad Versace
Use the host arch, not the target arch. In Meson and in recent Autotools, the host arch is where the binary will be used. The target arch is useful only when compiling a compiler. See: http://mesonbuild.com/Cross-compilation.html See:

Re: [Mesa-dev] [PATCH] anv/meson: Generate dev_icd.json

2017-11-09 Thread Chad Versace
On Thu 09 Nov 2017, Eric Engestrom wrote: > On Wednesday, 2017-11-08 13:40:13 -0800, Chad Versace wrote: > > On Tue 07 Nov 2017, Dylan Baker wrote: > > > Quoting Eric Engestrom (2017-11-07 07:25:53) > > > > On Wednesday, 2017-11-01 13:49:03 -0700, Chad Ver

Re: [Mesa-dev] [PATCH] anv/meson: Generate dev_icd.json

2017-11-08 Thread Chad Versace
On Wed 08 Nov 2017, Jason Ekstrand wrote: > On Wed, Nov 8, 2017 at 1:40 PM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > On Tue 07 Nov 2017, Dylan Baker wrote: > > Quoting Eric Engestrom (2017-11-07 07:25:53) > > > On Wednesday, 2017-11-01 1

Re: [Mesa-dev] [RFC PATCH v1 00/30] anv: dma-buf and DRM format modifiers

2017-11-08 Thread Chad Versace
On Tue 07 Nov 2017, Jason Ekstrand wrote: > All of the pre-work patches have been reviewed by myself and Lionel.  I've > also > read through the rest of the series and things look pretty good to me.  I did > make some scattered comments but they shouldn't be a big deal. > > My primary concern

Re: [Mesa-dev] [PATCH] anv/meson: Generate dev_icd.json

2017-11-08 Thread Chad Versace
On Tue 07 Nov 2017, Dylan Baker wrote: > Quoting Eric Engestrom (2017-11-07 07:25:53) > > On Wednesday, 2017-11-01 13:49:03 -0700, Chad Versace wrote: > > > I tested this in a setup where the builddir was outside of the srcdir. > > > --- > > >

Re: [Mesa-dev] [RFC PATCH v1 00/30] anv: dma-buf and DRM format modifiers

2017-11-07 Thread Chad Versace
On Tue 07 Nov 2017, Jason Ekstrand wrote: > On Tue, Nov 7, 2017 at 8:11 AM, Jason Ekstrand <[1]ja...@jlekstrand.net> > wrote: > > On Tue, Nov 7, 2017 at 6:47 AM, Chad Versace <[2]chadvers...@chromium.org> > wrote: > >     - crucible > >

[Mesa-dev] [RFC PATCH v1 30/30] anv/TODO: Updates for VK_EXT_image_drm_format_modifier

2017-11-07 Thread Chad Versace
--- src/intel/vulkan/TODO | 16 1 file changed, 16 insertions(+) diff --git a/src/intel/vulkan/TODO b/src/intel/vulkan/TODO index b4da05de2b1..cbba600a34e 100644 --- a/src/intel/vulkan/TODO +++ b/src/intel/vulkan/TODO @@ -11,3 +11,19 @@ Performance: - Pushing pieces of UBOs?

[Mesa-dev] [RFC PATCH v1 27/30] RFC: anv: Support VkImageExplicitDrmFormatModifierCreateInfoEXT

2017-11-07 Thread Chad Versace
Incremental implementation of VK_EXT_image_drm_format_modifier. --- src/intel/vulkan/anv_image.c | 84 +++- 1 file changed, 75 insertions(+), 9 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index

[Mesa-dev] [RFC PATCH v1 29/30] RFC: anv: Kill vkCreateDmaBufImageINTEL()

2017-11-07 Thread Chad Versace
Replaced by VK_EXT_external_memory_dma_buf and VK_EXT_image_drm_format_modifier. --- include/meson.build | 1 - include/vulkan/vulkan_intel.h | 62 - src/amd/vulkan/radv_private.h | 1 - src/intel/Makefile.sources | 1 -

[Mesa-dev] [RFC PATCH v1 28/30] RFC: anv: Enable VK_EXT_image_drm_format_modifier

2017-11-07 Thread Chad Versace
The draft spec lives at http://kiwitree.net/~chadv/vulkan/#1.0-VK_EXT_image_drm_format_modifier. This extension spec has a complete, working API. I'm happy with the API, and believe it's good enough. But the spec language has some outstanding issues that prevent it from being submitted as-is to

[Mesa-dev] [RFC PATCH v1 26/30] RFC: anv: Support vkGetImageSubresourceLayout with modifiers

2017-11-07 Thread Chad Versace
Incremental implementation of VK_EXT_image_drm_format_modifier. --- src/intel/vulkan/anv_image.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 8d434293124..ec6cdbc6168 100644 ---

[Mesa-dev] [RFC PATCH v1 24/30] RFC: anv: Support VkPhysicalDeviceImageDrmFormatModifierInfoEXT

2017-11-07 Thread Chad Versace
Incremental implementation of VK_EXT_image_drm_format_modifier. --- src/intel/vulkan/anv_formats.c | 45 +- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index

[Mesa-dev] [RFC PATCH v1 25/30] RFC: anv: Support VkImageDrmFormatModifierListCreateInfoEXT

2017-11-07 Thread Chad Versace
Incremental implementation of VK_EXT_image_drm_format_modifier. --- src/intel/vulkan/anv_image.c | 72 ++ src/intel/vulkan/anv_private.h | 6 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/src/intel/vulkan/anv_image.c

[Mesa-dev] [RFC PATCH v1 23/30] RFC: anv: Support VkDrmFormatModifierPropertiesListEXT

2017-11-07 Thread Chad Versace
Incremental implementation of VK_EXT_image_drm_format_modifier. --- src/intel/vulkan/anv_formats.c | 144 + 1 file changed, 132 insertions(+), 12 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index

[Mesa-dev] [RFC PATCH v1 20/30] HACK: vulkan: Install Vulkan headers

2017-11-07 Thread Chad Versace
This allows me to build apps against new extensions without installing an updated loader. --- include/meson.build | 12 1 file changed, 12 insertions(+) diff --git a/include/meson.build b/include/meson.build index b5f533bd185..3cf582a4b12 100644 --- a/include/meson.build +++

[Mesa-dev] [RFC PATCH v1 22/30] RFC: anv: Implement VK_EXT_queue_family_foreign

2017-11-07 Thread Chad Versace
The draft spec lives at http://kiwitree.net/~chadv/vulkan/#1.0-VK_EXT_queue_family_foreign. I plan to ask Khronos to merge the spec this week. By itself, this extension does nothing. It's only useful in its interaction with other external memory extensions. In the short term, at least, anvil

[Mesa-dev] [RFC PATCH v1 19/30] HACK: vulkan: Update headers and registry to chadv/1.0-dma-buf@a79a0ab

2017-11-07 Thread Chad Versace
--- include/vulkan/vulkan.h| 70 - src/vulkan/registry/vk.xml | 77 -- 2 files changed, 136 insertions(+), 11 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index

[Mesa-dev] [RFC PATCH v1 21/30] RFC: anv: Implement VK_EXT_external_memory_dma_buf

2017-11-07 Thread Chad Versace
The draft spec lives at http://kiwitree.net/~chadv/vulkan/#1.0-VK_EXT_external_memory_dma_buf. I plan to ask Khronos to merge the spec this week. --- src/intel/vulkan/anv_device.c | 13 ++--- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_formats.c | 23

[Mesa-dev] [RFC PATCH v1 17/30] anv/image: Refactor choice of isl_tiling_flags_t

2017-11-07 Thread Chad Versace
Instead of choosing the tiling flags inside make_surface(), which is called once per aspect in a loop, and which chooses the same tiling for each aspect, choose the tiling flags exactly once before entering the aspect loop. --- src/intel/vulkan/anv_image.c | 44

[Mesa-dev] [RFC PATCH v1 15/30] anv: Remove anv_physical_device_get_format_properties()

2017-11-07 Thread Chad Versace
Fold its body into its sole caller, anv_GetPhysicalDeviceFormatProperties(). --- src/intel/vulkan/anv_formats.c | 36 +--- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index

[Mesa-dev] [RFC PATCH v1 16/30] anv: Refactor anv_get_format_plane() - explicit unsupported

2017-11-07 Thread Chad Versace
The same local variable, 'plane_format', was returned on success *and* failure. Be more explicit in distinguishing the two cases: return 'plane_format' on success and return 'unsupported' on failure. This simplifies the diff in upcoming patches for VK_EXT_image_drm_format_modifier. ---

[Mesa-dev] [RFC PATCH v1 18/30] anv: Refactor anv_GetImageSubresourceLayout()

2017-11-07 Thread Chad Versace
Its helper function, anv_surface_get_subresource_layout(), was not very helpful. So fold it into the main function. --- src/intel/vulkan/anv_image.c | 32 +++- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/intel/vulkan/anv_image.c

[Mesa-dev] [RFC PATCH v1 14/30] anv: Simplify anv_physical_device_get_format_properties()

2017-11-07 Thread Chad Versace
Now that get_image_format_properties() returns the correct VkFormatFeatureFlags, we can remove the unneeded if-branch and some local variables. --- src/intel/vulkan/anv_formats.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git

[Mesa-dev] [RFC PATCH v1 12/30] anv: Rename get_image_format_properties()

2017-11-07 Thread Chad Versace
The name is misleading. It looks like vkGetPhysicalDeviceImageFormatProperties(), but it actually implement vkGetPhysicalDeviceFormatProperties. Let's rename it to what it actually does, get_image_format_features(), because it returns VkFormatFeatureFlags. For consistency, also rename

[Mesa-dev] [RFC PATCH v1 13/30] anv: Simplify anv_get_image_format_properties()

2017-11-07 Thread Chad Versace
Now that get_image_format_features() has a VkImageTiling parameter, we can bypass anv_physical_device_get_format_properties() and call get_image_format_features() directly. --- src/intel/vulkan/anv_formats.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git

[Mesa-dev] [RFC PATCH v1 10/30] anv: Fix get_image_format_properties() - 3-channel formats

2017-11-07 Thread Chad Versace
Teach it to calculate the format features for 3-channel formats. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up. --- src/intel/vulkan/anv_formats.c | 34

[Mesa-dev] [RFC PATCH v1 11/30] anv: Fix get_image_format_properties() - YCbCr

2017-11-07 Thread Chad Versace
Teach it to calculate the format features for YCbCr. The goal (which is completed in this patch) is to incrementally fix get_image_format_properties() to return a correct result. Previously, it returned incorrect VkFormatFeatureFlags which the caller needed clean up. ---

[Mesa-dev] [RFC PATCH v1 09/30] anv: Refactor get_image_format_properties() - Reduce params

2017-11-07 Thread Chad Versace
Replace parameters 'enum isl_format' and 'struct anv_format_plane' with new parameter 'const struct anv_format *'. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up. ---

[Mesa-dev] [RFC PATCH v1 08/30] anv: Refactor get_image_format_properties() - base_isl_format

2017-11-07 Thread Chad Versace
Rename parameter 'base' to 'base_isl_format'. --- src/intel/vulkan/anv_formats.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index a296378a68e..3cc0673cbaf 100644 --- a/src/intel/vulkan/anv_formats.c

[Mesa-dev] [RFC PATCH v1 07/30] anv: Refactor get_image_format_properties() - plane_format

2017-11-07 Thread Chad Versace
Rename parameter 'format' to 'plane_format'. Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_formats.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index

[Mesa-dev] [RFC PATCH v1 03/30] anv: Refactor get_buffer_format_properties()

2017-11-07 Thread Chad Versace
Make it a stand-alone function. Pre-patch, for some formats the function returned incorrect VkFormatFeatureFlags which were cleaned up by the caller. This prepares for a cleaner implementation of VK_EXT_image_drm_format_modifier. Reviewed-by: Jason Ekstrand ---

[Mesa-dev] [RFC PATCH v1 00/30] anv: dma-buf and DRM format modifiers

2017-11-07 Thread Chad Versace
of dEQP-VK.*. I'm still waiting. - crucible We really need to write crucible tests to hammer some tricky corner cases. I haven't written them yet. Volunteers? Chad Versace (30): anv: Remove unused variable 'gen' anv: Suffix anv-private 'VK' tokens with 'ANV' anv: Refactor

[Mesa-dev] [RFC PATCH v1 04/30] anv: Better types for 'aspect' function params

2017-11-07 Thread Chad Versace
Some functions have a comment that says "Exactly one bit must be in 'aspect'". So change the type of their 'aspect' parameter from VkImageAspectFlags to VkImageAspectFlagBits. --- src/intel/vulkan/anv_formats.c | 2 +- src/intel/vulkan/anv_image.c | 14 +++---

[Mesa-dev] [RFC PATCH v1 06/30] anv: Fix get_image_format_properties() - ASTC

2017-11-07 Thread Chad Versace
Teach it to calculate the format features for ASTC. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up. v2: New commit message Reviewed-by: Jason Ekstrand

[Mesa-dev] [RFC PATCH v1 02/30] anv: Suffix anv-private 'VK' tokens with 'ANV'

2017-11-07 Thread Chad Versace
I saw VK_IMAGE_ASPECT_ANY_COLOR_BIT while hacking anv_formats.c and got confused. "Huh? What extension added that?". No extension defines it; anv_private.h defines it. To remove confusion, rename the anv-private VK tokens as if they were extension tokens with the ANV vendor suffix. I found only

[Mesa-dev] [RFC PATCH v1 01/30] anv: Remove unused variable 'gen'

2017-11-07 Thread Chad Versace
In anv_physical_device_get_format_properties(). Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_formats.c | 4 1 file changed, 4 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index cece065398e..cfff0991bef 100644 ---

[Mesa-dev] [RFC PATCH v1 05/30] anv: Fix get_image_format_properties() - depthstencil (v2)

2017-11-07 Thread Chad Versace
Teach it to calculate the features of depthstencil formats. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up. v2: New commit message Reviewed-by: Jason Ekstrand

Re: [Mesa-dev] [PATCH] anv/meson: Generate dev_icd.json

2017-11-07 Thread Chad Versace
Bump On Wed 01 Nov 2017, Chad Versace wrote: > I tested this in a setup where the builddir was outside of the srcdir. > --- > src/intel/vulkan/meson.build | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/m

Re: [Mesa-dev] [PATCH 00/12] anv: Add support for the variablePointers feature

2017-11-06 Thread Chad Versace
On Mon 06 Nov 2017, Jason Ekstrand wrote: > On Mon, Nov 6, 2017 at 12:18 PM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > Jason, I tested this series against the khronos-internal vk-gl-cts and > found an assertion failure in src/compiler/spirv. Any thought

Re: [Mesa-dev] [PATCH 00/12] anv: Add support for the variablePointers feature

2017-11-06 Thread Chad Versace
Jason, I tested this series against the khronos-internal vk-gl-cts and found an assertion failure in src/compiler/spirv. Any thoughts? I haven't debugged yet because I don't grok these parts of Mesa. vk-gl-cts commit a24448cdd72ffdbd8f7f571886625b8a53100979 mesa

Re: [Mesa-dev] [PATCH mesa 1/2] meson: switch default build type to debugoptimized

2017-11-06 Thread Chad Versace
For both patches, Reviewed-by: Chad Versace <chadvers...@chromium.org> Tested-by: Chad Versace <chadvers...@chromium.org> On Mon 06 Nov 2017, Eric Engestrom wrote: > Cc: Dylan Baker <dy...@pnwbakers.com> > Cc: Chad Versace <chadvers...@chromium.org> > Cc: Emil

Re: [Mesa-dev] Meson's default build type

2017-11-06 Thread Chad Versace
On Mon 06 Nov 2017, Eric Engestrom wrote: > On Monday, 2017-11-06 08:07:21 -0800, Chad Versace wrote: > > On Thu 02 Nov 2017, Dylan Baker wrote: > > > Quoting Matt Turner (2017-11-02 10:06:43) > > > > On Thu, Nov 2, 2017 at 9:51 AM, Michel Dänzer <mic...@daenzer.ne

Re: [Mesa-dev] Meson's default build type

2017-11-06 Thread Chad Versace
On Thu 02 Nov 2017, Dylan Baker wrote: > Quoting Matt Turner (2017-11-02 10:06:43) > > On Thu, Nov 2, 2017 at 9:51 AM, Michel Dänzer wrote: > > > FWIW, my vote is for debugoptimized: Assertions are enabled and there's > > > debugging information useful for bug reports, but

Re: [Mesa-dev] Meson's default build type

2017-11-06 Thread Chad Versace
On Thu 02 Nov 2017, Eric Engestrom wrote: > On Thursday, 2017-11-02 09:46:05 -0700, Chad Versace wrote: > > On Wed 01 Nov 2017, Dylan Baker wrote: > > > I'm not dead set on debug as the default buildtype, it's what we have ATM > > > though. I asked around here and th

[Mesa-dev] Meson's default build type

2017-11-02 Thread Chad Versace
On Wed 01 Nov 2017, Dylan Baker wrote: > Quoting Ilia Mirkin (2017-11-01 16:05:17) > > On Wed, Nov 1, 2017 at 7:03 PM, Dylan Baker <dy...@pnwbakers.com> wrote: > > > Quoting Ilia Mirkin (2017-11-01 15:52:56) > > >> On Wed, Nov 1, 2017 at 6:49 PM, Ch

Re: [Mesa-dev] More gratitude for Meson

2017-11-01 Thread Chad Versace
On Wed 01 Nov 2017, Dylan Baker wrote: > Quoting Chad Versace (2017-11-01 14:43:28) > > Wow. 10 seconds from a clean checkout to an installed Vulkan driver. > Glad that it's working out for you guys! > > Can I convince you to wire the anvil and i965 android/arc++ bits? ;) &g

[Mesa-dev] More gratitude for Meson

2017-11-01 Thread Chad Versace
Wow. 10 seconds from a clean checkout to an installed Vulkan driver. I don't know how qualify my surprise... Wow. The Intel Vulkan driver is often all I need, so I was tempted to investigate whether Meson allowed building and installing just anvil and nothing else. No OpenGL, no OpenGL ES, no

[Mesa-dev] [PATCH] anv/meson: Generate dev_icd.json

2017-11-01 Thread Chad Versace
I tested this in a setup where the builddir was outside of the srcdir. --- src/intel/vulkan/meson.build | 12 1 file changed, 12 insertions(+) diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index ff24e304ef5..e8b7f407507 100644 ---

Re: [Mesa-dev] [PATCH] anv: Move size check from anv_bo_cache_import() to caller (v2)

2017-10-18 Thread Chad Versace
On Tue 17 Oct 2017, Jason Ekstrand wrote: > On October 17, 2017 10:41:32 PM Chad Versace <chadvers...@chromium.org> wrote: > > > This change prepares for VK_ANDROID_native_buffer. When the user imports > > a gralloc hande into a VkImage using VK_ANDROID_native_buffe

[Mesa-dev] [PATCH] anv: Move size check from anv_bo_cache_import() to caller (v2)

2017-10-17 Thread Chad Versace
This change prepares for VK_ANDROID_native_buffer. When the user imports a gralloc hande into a VkImage using VK_ANDROID_native_buffer, the user provides no size. The driver must infer the size from the internals of the gralloc buffer. The patch is essentially a refactor patch. It should change

[Mesa-dev] [PATCH 07/10] anv: Move size check from anv_bo_cache_import() to caller

2017-10-17 Thread Chad Versace
This change prepares for VK_ANDROID_native_buffer. When the user imports a gralloc hande into a VkImage using VK_ANDROID_native_buffer, the user provides no size. The driver must infer the size from the internals of the gralloc buffer. The patch is essentially a refactor patch. It should change

Re: [Mesa-dev] [PATCH 07/10] anv: Add sizeless anv_bo_cache_import()

2017-10-17 Thread Chad Versace
On Mon 16 Oct 2017, Jason Ekstrand wrote: > On Mon, Oct 16, 2017 at 11:55 AM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > The patch renames anv_bo_cache_import() to > anv_bo_cache_import_with_size(); and adds a new variant, > anv_bo_cache_import

Re: [Mesa-dev] [PATCH] squash! anv: Move close(fd) from anv_bo_cache_import to its callers

2017-10-17 Thread Chad Versace
On Mon 16 Oct 2017, Jason Ekstrand wrote: > On October 16, 2017 4:18:45 PM Chad Versace <chadvers...@chromium.org> wrote: > > > > > Add missing close(fd) for case > > VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, > > subcase ANV_SEMAPHORE_TYPE_BO. >

[Mesa-dev] [PATCH] squash! anv: Move close(fd) from anv_bo_cache_import to its callers

2017-10-16 Thread Chad Versace
Add missing close(fd) for case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, subcase ANV_SEMAPHORE_TYPE_BO. --- src/intel/vulkan/anv_queue.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/intel/vulkan/anv_queue.c

Re: [Mesa-dev] [PATCH 09/10] anv: Implement VK_ANDROID_native_buffer (v9)

2017-10-16 Thread Chad Versace
On Mon 16 Oct 2017, Kristian Høgsberg wrote: > On Mon, Oct 16, 2017 at 11:55 AM, Chad Versace <chadvers...@chromium.org> > wrote: > > v9: > > - Isolate as much Android code as possible, moving it from anv_image.c > > to anv_android.c. Connect the fil

[Mesa-dev] [PATCH 07/10] anv: Add sizeless anv_bo_cache_import()

2017-10-16 Thread Chad Versace
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 imported size. The patch is essentially a refactor patch. It

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

2017-10-16 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

[Mesa-dev] [PATCH 09/10] anv: Implement VK_ANDROID_native_buffer (v9)

2017-10-16 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 04/10] anv: Better support for Android logging (v2)

2017-10-16 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

[Mesa-dev] [PATCH 08/10] anv: Add func anv_gem_get_tiling()

2017-10-16 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 3994c6b66c..34c0989108 100644 ---

[Mesa-dev] [PATCH 03/10] intel: Add simple logging façade for Android (v2)

2017-10-16 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 00/10] anv: Implement VK_ANDROID_native_buffer (v4)

2017-10-16 Thread Chad Versace
ler_ycbcr_conversion and VK_KHR_bind_memory2. - Omit all refactoring patches. They were not strictly needed, and the ongoing rebasing of the refactor patches made me grumpy. - Omit v3 patches already upstreamed. Chad Versace (8): anv/android: Link to Android libraries in the autotool

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

2017-10-16 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 01/10] anv/android: Link to Android libraries in the autotools build

2017-10-16 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 05/10] anv: Add field anv_image::planes[]::bo_is_owned (v2)

2017-10-16 Thread Chad Versace
If this flag is set, then the image and the 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 during the same call, vkCreateImage. v2: Rebase onto VK_KHR_bind_memory2. ---

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

2017-10-16 Thread Chad Versace
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/intel/vulkan/anv_device.c| 11 +++

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

2017-10-09 Thread Chad Versace
On Mon 09 Oct 2017, Tapani Pälli wrote: > > > On 09/28/2017 03:11 AM, Chad Versace wrote: > > This patch prevents compilation failures in upcoming Android Vulkan > > patches, failures due to redefinition of LOG_TAG in Android system > > headers. > > > &g

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

2017-10-09 Thread Chad Versace
On Mon 25 Sep 2017, Tapani Pälli wrote: > > > On 09/22/2017 03:09 AM, Chad Versace wrote: > > 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 > > > 'ex

Re: [Mesa-dev] [PATCH v2 01/11] vulkan: util: add macros to extract extension/offset number from enums

2017-10-03 Thread Chad Versace
On Tue 03 Oct 2017, Jason Ekstrand wrote: > > On Tue, Oct 3, 2017 at 3:18 PM, Lionel Landwerlin <[1] > lionel.g.landwer...@intel.com> wrote: > > On 03/10/17 21:21, Chad Versace wrote: > > On Tue 03 Oct 2017, Lionel Landwerlin wrote: > >

Re: [Mesa-dev] [PATCH v2 01/11] vulkan: util: add macros to extract extension/offset number from enums

2017-10-03 Thread Chad Versace
On Tue 03 Oct 2017, Lionel Landwerlin wrote: > On 03/10/17 19:13, Jason Ekstrand wrote: > > On Tue, Oct 3, 2017 at 9:43 AM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > On Tue 03 Oct 2017, Lionel Landwerlin wrote: > > v2: Simplify

Re: [Mesa-dev] [PATCH v2 04/11] anv: prepare formats to handle disjoints sets

2017-10-03 Thread Chad Versace
On Tue 03 Oct 2017, Lionel Landwerlin wrote: > Newer format enums start at offset 10, making it impossible to > have them all in one table. This change splits the formats into sets > that we then access through indirection. > > Signed-off-by: Lionel Landwerlin

Re: [Mesa-dev] [PATCH v2 03/11] isl: fill out layout descriptions for yuv formats

2017-10-03 Thread Chad Versace
On Tue 03 Oct 2017, Lionel Landwerlin wrote: > Some description was missing. > > Signed-off-by: Lionel Landwerlin > --- > src/intel/isl/isl_format_layout.csv | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git

Re: [Mesa-dev] [PATCH v2 02/11] isl: make format layout channels accessible by index

2017-10-03 Thread Chad Versace
On Tue 03 Oct 2017, Lionel Landwerlin wrote: > Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com> > --- > src/intel/isl/isl.h | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-) Patch 2 is Reviewed-by: Chad Versace <cha

Re: [Mesa-dev] [PATCH v2 01/11] vulkan: util: add macros to extract extension/offset number from enums

2017-10-03 Thread Chad Versace
On Tue 03 Oct 2017, Lionel Landwerlin wrote: > v2: Simplify offset enum computation (Jason) > > Signed-off-by: Lionel Landwerlin > --- > src/vulkan/util/vk_util.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/vulkan/util/vk_util.h

[Mesa-dev] [PATCH] anv: Implement VK_ANDROID_native_buffer (v8.1)

2017-09-29 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 14/14] anv: Implement VK_ANDROID_native_buffer (v8)

2017-09-27 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] anv: Implement VK_ANDROID_native_buffer (v7)

2017-09-27 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 10/14] anv: Move close(fd) from anv_bo_cache_import to its callers

2017-09-27 Thread Chad Versace
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/intel/vulkan/anv_device.c| 11 +++

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

2017-09-27 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

[Mesa-dev] [PATCH 13/14] anv: Implement VK_ANDROID_native_buffer (v6)

2017-09-27 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 11/14] anv: Add sizeless anv_bo_cache_import()

2017-09-27 Thread Chad Versace
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 imported size. The patch is essentially a refactor patch. It

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