Re: [Mesa-dev] [RFC v5 11/19] vulkan/wsi: Add multiple planes to wsi_image_base

2017-11-20 Thread Louis-Francis Ratté-Boulianne
Hi, On Mon, 2017-11-13 at 14:20 -0800, Jason Ekstrand wrote: > On Mon, Nov 6, 2017 at 2:02 PM, Louis-Francis Ratté-Boulianne ollabora.com> wrote: > > From: Daniel Stone > > > > Not currently used. > > > > Signed-off-by: Daniel Stone > > --- >

[Mesa-dev] [RFC v5 16/19] vulkan/wsi: Add wsi_image_create_with_modifiers

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Allow the winsys to provide a set of acceptable modifiers to the driver when creating WSI images. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 3 ++ src/intel/vulkan/anv_image.c | 9 +++- src/intel/vulkan/anv_private.h | 3 ++ src/intel/vulkan/anv_wsi.c | 101

[Mesa-dev] [RFC v5 19/19] vulkan/wsi: Return VK_SUBOPTIMAL_KHR for X11

2017-11-06 Thread Louis-Francis Ratté-Boulianne
When it is detected that a window could have been flipped but has been copied because of suboptimal format/modifier. The Vulkan client should then re-create the swapchain. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/vulkan/wsi/wsi_common_x11.c | 53

[Mesa-dev] [RFC v5 18/19] RFC: vulkan/wsi: Add support for DRI3 v1.1

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Adds support for multiple planes and buffer modifiers. v4: Rename "has_dri3_v1_1" to "has_dri3_modifiers" --- src/vulkan/wsi/wsi_common_x11.c | 238 +--- 1 file changed, 199 insertions(+), 39 deletions(-) diff --git a/src/vulkan/wsi/wsi_co

[Mesa-dev] [RFC v5 15/19] vulkan/wsi: Rename needs_linear_copy to different_gpu

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone That's what it actually means; the fact it generally means a linear copy is requires is incidental. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 6 +++--- src/intel/vulkan/anv_wsi.c | 2 +- src/vulkan/wsi/wsi_common.h | 2 +- 3 files changed, 5 insertions(+

[Mesa-dev] [RFC v5 17/19] vulkan/wsi/wayland: Add support for zwp_dmabuf

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone zwp_linux_dmabuf_v1 lets us use multi-planar images and buffer modifiers. Signed-off-by: Daniel Stone --- src/vulkan/Makefile.am | 10 +++ src/vulkan/Makefile.sources | 4 +- src/vulkan/wsi/wsi_common_wayland.c | 157 +++---

[Mesa-dev] [RFC v5 12/19] intel/isl: Add ISL tiling -> modifier conversion

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Given a tiling mode and an aux usage, return the DRM modifier. Signed-off-by: Daniel Stone --- src/intel/isl/isl.h | 6 +- src/intel/isl/isl_drm.c | 17 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/intel/isl/isl.h b/src/intel/

[Mesa-dev] [RFC v5 10/19] vulkan/wsi: Rename needs_linear_copy to should_export

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone The only use for this boolean was to decide whether or not it should export a dmabuf FD. Simplify things a bit by giving that directly. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 6 -- src/intel/vulkan/anv_wsi.c | 21 +

[Mesa-dev] [RFC v5 13/19] intel/isl: Add field for suboptimal tiling flags

2017-11-06 Thread Louis-Francis Ratté-Boulianne
The caller might want to discriminate between two possible sets of tiling flags. For example, some tiling modes might allow direct scanout, and so should be preferred even if GPU operations are a little less performant. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/intel/isl/isl.c | 33

[Mesa-dev] [RFC v5 07/19] RFC: egl/x11: Support DRI3 v1.1

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Add support for DRI3 v1.1, which allows pixmaps to be backed by multi-planar buffers, or those with format modifiers. This is both for allocating render buffers, as well as EGLImage imports from a native pixmap (EGL_NATIVE_PIXMAP_KHR). Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by

[Mesa-dev] [RFC v5 14/19] vulkan/wsi: Add drm_modifier member to wsi_image

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not yet used anywhere. Signed-off-by: Daniel Stone --- src/amd/vulkan/Makefile.am | 1 + src/amd/vulkan/radv_wsi.c | 2 ++ src/intel/vulkan/anv_wsi.c | 9 + src/vulkan/wsi/wsi_common.h | 2 ++ 4 files changed, 14 insertions(+) diff --git a/src/amd/vulkan/Makefil

[Mesa-dev] [RFC v5 11/19] vulkan/wsi: Add multiple planes to wsi_image_base

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not currently used. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 13 +++-- src/intel/vulkan/anv_wsi.c | 9 + src/vulkan/wsi/wsi_common.h | 9 + src/vulkan/wsi/wsi_common_wayland.c | 11 +++ src/vulka

[Mesa-dev] [RFC v5 08/19] egl/x11: Re-allocate buffers if format is suboptimal

2017-11-06 Thread Louis-Francis Ratté-Boulianne
If PresentCompleteNotify event says the pixmap was presented with mode PresentCompleteModeSuboptimalCopy, it means the pixmap could possibly have been flipped instead if allocated with a different format/modifier. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/egl/drivers/dri2/egl_dri2.c

[Mesa-dev] [RFC v5 06/19] dri: Add createImageWithModifiers2 to DRIimageExtension

2017-11-06 Thread Louis-Francis Ratté-Boulianne
It does the same as createImagewithModifiers but allow multiple modifiers set to be given. The modifier used to create the image should be selected from the first tranche if possible. If not, then the subsequent tranches should be used. Signed-off-by: Louis-Francis Ratté-Boulianne --- include

[Mesa-dev] [RFC v5 04/19] dri: Add suppressImplicitSync to DRIimageExtension

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Provide a hook to inform the driver that implicit synchronization should be suppressed. --- include/GL/internal/dri_interface.h | 10 +- src/egl/drivers/dri2/egl_dri2.c | 27 +++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a

[Mesa-dev] [RFC v5 09/19] vulkan/wsi: Add wsi_image_base structure

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone This is used to hold information about the allocated image, rather than an ever-growing function argument list. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 31 ++ src/intel/vulkan/anv_wsi.c | 25 +++--- src/v

[Mesa-dev] [RFC v5 05/19] i965: Implement EGL_EXT_image_implicit_sync_control

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone --- src/mesa/drivers/dri/i965/brw_bufmgr.h | 3 +++ src/mesa/drivers/dri/i965/intel_screen.c | 17 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h index ee9132

[Mesa-dev] [RFC v5 01/19] dri: fromPlanar() can return NULL as a valid result

2017-11-06 Thread Louis-Francis Ratté-Boulianne
It was assumed that fromPlanar() could return NULL to mean that the planar image is the same as the parent DRI image. That assumption wasn't made everywhere though. Let's fix things and make sure that all callers understand a NULL result Signed-off-by: Louis-Francis Ratté-Boulianne --

[Mesa-dev] [RFC v5 03/19] egl: Add EGL_EXT_image_implicit_sync_control

2017-11-06 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/main/eglapi.c | 1 + src/egl/main/egldisplay.h | 1 + src/egl/main/eglimage.c | 26 ++ src/egl/main/eglimage.h | 3 +++ 4 files changed, 31 insertions(+) diff --git a/src/egl/main/eglapi.c b/src/egl/m

[Mesa-dev] [RFC v5 02/19] i965: Only set planar_format if it's actually one

2017-11-06 Thread Louis-Francis Ratté-Boulianne
The planar_format image property was always set even for non-planar formats. This was breaking CCS support as intel_from_planar is now making sure we can't have both a modifier and an planar format. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone --- src/mesa/driver

[Mesa-dev] [RFC v5 00/19] DRI3 v1.1, ANV dmabuf

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Hi, With full support for modifiers in DRIimage, this patch series adds support for fully plumbing them through X11. This is the fifth revision, more context can be found here: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158457.html https://lists.freedesktop.org/archives/mesa-dev/20

[Mesa-dev] [RFC v4 15/23] anv/wsi: Small code motion to prepare for modifiers

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_wsi.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index 97f8e10afc..607d2aa49d 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/i

[Mesa-dev] [RFC v4 22/23] RFC: vulkan/wsi: Add support for DRI3 v1.1

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Adds support for multiple planes and buffer modifiers. v4: Rename "has_dri3_v1_1" to "has_dri3_modifiers" --- src/vulkan/wsi/wsi_common_x11.c | 180 1 file changed, 162 insertions(+), 18 deletions(-) diff --git a/src/vulkan/wsi/wsi_co

[Mesa-dev] [RFC v4 18/23] vulkan/wsi: Add drm_modifier member to wsi_image

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not yet used anywhere. Signed-off-by: Daniel Stone --- src/amd/vulkan/Makefile.am | 1 + src/amd/vulkan/radv_wsi.c | 2 ++ src/intel/vulkan/anv_wsi.c | 8 src/vulkan/wsi/wsi_common.h | 1 + 4 files changed, 12 insertions(+) diff --git a/src/amd/vulkan/Makefile.

[Mesa-dev] [RFC v4 23/23] vulkan/wsi: Return VK_SUBOPTIMAL_KHR for X11

2017-10-16 Thread Louis-Francis Ratté-Boulianne
When it is detected that a window could have been flipped but has been copied because of suboptimal format/modifier. The Vulkan client should then re-create the swapchain. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/vulkan/wsi/wsi_common_x11.c | 30 +- 1

[Mesa-dev] [RFC v4 17/23] intel/isl: Add field for suboptimal tiling flags

2017-10-16 Thread Louis-Francis Ratté-Boulianne
The caller might want to discriminate between two possible sets of tiling flags. For example, some tiling modes might allow direct scanout, and so should be preferred even if GPU operations are a little less performant. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/intel/isl/isl.c | 33

[Mesa-dev] [RFC v4 21/23] vulkan/wsi/wayland: Add support for zwp_dmabuf

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone zwp_linux_dmabuf_v1 lets us use multi-planar images and buffer modifiers. Signed-off-by: Daniel Stone --- src/vulkan/Makefile.am | 10 +++ src/vulkan/Makefile.sources | 4 +- src/vulkan/wsi/wsi_common_wayland.c | 139 +++---

[Mesa-dev] [RFC v4 20/23] vulkan/wsi: Add modifiers to wsi_image_create

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Allow the winsys to provide a set of acceptable modifiers to the driver when creating WSI images. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 36 +-- src/intel/vulkan/anv_image.c| 9 ++-- src/intel/vulkan/anv

[Mesa-dev] [RFC v4 04/23] dri: Add suppressImplicitSync to DRIimageExtension

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Provide a hook to inform the driver that implicit synchronization should be suppressed. --- include/GL/internal/dri_interface.h | 10 +- src/egl/drivers/dri2/egl_dri2.c | 27 +++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a

[Mesa-dev] [RFC v4 14/23] radv/wsi: Use image_free for alloc cleanup

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone If we fail in the alloc, just use the (mostly) identical radv_wsi_image_free() to clean up after us. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 39 --- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/src/am

[Mesa-dev] [RFC v4 08/23] egl/x11: Re-allocate buffers if format is suboptimal

2017-10-16 Thread Louis-Francis Ratté-Boulianne
If PresentCompleteNotify event says the pixmap was presented with mode PresentCompleteModeSuboptimalCopy, it means the pixmap could possibly have been flipped instead if allocated with a different format/modifier. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/loader/loader_dri3_helper.c

[Mesa-dev] [RFC v4 10/23] vulkan/wsi: Rename needs_linear_copy to should_export

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone The only use for this boolean was to decide whether or not it should export a dmabuf FD. Simplify things a bit by giving that directly. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 6 -- src/intel/vulkan/anv_wsi.c | 21 +

[Mesa-dev] [RFC v4 12/23] radv/wsi: Move image allocation into helper function

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Create a new helper function which handles the actual image/memory allocations for a swapchain image, removing the bulk of radv_wsi_image_create. This will make it easier to move linear handling into radv in the next patch. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv

[Mesa-dev] [RFC v4 13/23] vulkan/wsi: Move linear alloc into radv

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone This is pretty much radv-specific anyway. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 49 +++-- src/intel/vulkan/anv_wsi.c | 23 - src/vulkan/wsi/wsi_common.h | 4 ++- src/vulkan/wsi/

[Mesa-dev] [RFC v4 11/23] vulkan/wsi: Add multiple planes to wsi_image_base

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not currently used. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 13 +++-- src/intel/vulkan/anv_wsi.c | 9 + src/vulkan/wsi/wsi_common.h | 9 + src/vulkan/wsi/wsi_common_wayland.c | 11 +++ src/vulka

[Mesa-dev] [RFC v4 19/23] vulkan/wsi: Rename needs_linear_copy to different_gpu

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone That's what it actually means; the fact it generally means a linear copy is requires is incidental. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 10 +- src/intel/vulkan/anv_wsi.c | 2 +- src/vulkan/wsi/wsi_common.h | 2 +- 3 files changed, 7 inser

[Mesa-dev] [RFC v4 16/23] intel/isl: Add ISL tiling -> modifier conversion

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Given a tiling mode and an aux usage, return the DRM modifier. Signed-off-by: Daniel Stone --- src/intel/isl/isl.h | 6 +- src/intel/isl/isl_drm.c | 17 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/intel/isl/isl.h b/src/intel/

[Mesa-dev] [RFC v4 07/23] RFC: egl/x11: Support DRI3 v1.1

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Add support for DRI3 v1.1, which allows pixmaps to be backed by multi-planar buffers, or those with format modifiers. This is both for allocating render buffers, as well as EGLImage imports from a native pixmap (EGL_NATIVE_PIXMAP_KHR). Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by

[Mesa-dev] [RFC v4 09/23] vulkan/wsi: Add wsi_image_base structure

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone This is used to hold information about the allocated image, rather than an ever-growing function argument list. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 31 ++ src/intel/vulkan/anv_wsi.c | 25 +++--- src/v

[Mesa-dev] [RFC v4 01/23] dri: fromPlanar() should never return NULL as a valid result

2017-10-16 Thread Louis-Francis Ratté-Boulianne
-by: Louis-Francis Ratté-Boulianne --- src/gbm/backends/dri/gbm_dri.c | 12 ++-- src/mesa/drivers/dri/i965/intel_screen.c | 11 --- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index

[Mesa-dev] [RFC v4 06/23] dri: Add createImageWithModifiers2 to DRIimageExtension

2017-10-16 Thread Louis-Francis Ratté-Boulianne
It does the same as createImagewithModifiers but allow multiple modifiers set to be given. The modifier used to create the image should be selected from the first tranche if possible. If not, then the subsequent tranches should be used. Signed-off-by: Louis-Francis Ratté-Boulianne --- include

[Mesa-dev] [RFC v4 00/23] DRI3 v1.1, ANV dmabuf

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Hi, With full support for modifiers in DRIimage, this patch series adds support for fully plumbing them through X11. This is the fourth revision, more context can be found here: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158457.html https://lists.freedesktop.org/archives/mesa-dev/20

[Mesa-dev] [RFC v4 05/23] i965: Implement EGL_EXT_image_implicit_sync_control

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone --- src/mesa/drivers/dri/i965/brw_bufmgr.h | 3 +++ src/mesa/drivers/dri/i965/intel_screen.c | 17 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h index de0ba1

[Mesa-dev] [RFC v4 02/23] i965: Only set planar_format if it's actually one

2017-10-16 Thread Louis-Francis Ratté-Boulianne
The planar_format image property was always set even for non-planar formats. This was breaking CCS support as intel_from_planar is now making sure we can't have both a modifier and an planar format. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone --- src/mesa/driver

[Mesa-dev] [RFC v4 03/23] egl: Add EGL_EXT_image_implicit_sync_control

2017-10-16 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/main/eglapi.c | 1 + src/egl/main/egldisplay.h | 1 + src/egl/main/eglimage.c | 26 ++ src/egl/main/eglimage.h | 3 +++ 4 files changed, 31 insertions(+) diff --git a/src/egl/main/eglapi.c b/src/egl/m

Re: [Mesa-dev] [RFC v2 0/5] DRI3 v1.2, ANV X11 explicit fences

2017-10-15 Thread Louis-Francis Ratté-Boulianne
Hi, On Thu, 2017-09-28 at 17:00 +0100, Emil Velikov wrote: > Hi Louis-Francis, > > On 28 September 2017 at 09:25, Louis-Francis Ratté-Boulianne > wrote: > > This patchset makes use of Jason Ekstrand's recent work on SYNC_FD > > semaphores and DRI3 v1.2 supp

[Mesa-dev] [RFC v2 4/5] vulkan: Add support for out-fences in vkAcquireNextImage

2017-09-28 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne --- src/vulkan/wsi/wsi_common.h | 3 + src/vulkan/wsi/wsi_common_x11.c | 152 +++- 2 files changed, 121 insertions(+), 34 deletions(-) diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h

[Mesa-dev] [RFC v2 2/5] vulkan: Check whether X server supports DMA fences

2017-09-28 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne --- src/vulkan/wsi/wsi_common_x11.c | 46 + 1 file changed, 46 insertions(+) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 4569c928c8..d9467092d2 100644 --- a/src/vulkan

[Mesa-dev] [RFC v2 1/5] egl: Support EGL sync objects with OpenGL API

2017-09-28 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne --- src/egl/main/eglapi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 41a2a1a9d8..ca2e90cdf0 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1769,9

[Mesa-dev] [RFC v2 3/5] vulkan: Add support for in-fences for vkQueuePresent

2017-09-28 Thread Louis-Francis Ratté-Boulianne
Allow drivers to add a list of semaphores to wait on when queuing a image to present. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/amd/vulkan/radv_wsi.c | 2 +- src/intel/vulkan/anv_wsi.c | 2 ++ src/vulkan/wsi/wsi_common.h | 6 + src/vulkan/wsi

[Mesa-dev] [RFC v2 5/5] anv: Implement wsi get_semaphores_fd and import_semaphore

2017-09-28 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne --- src/intel/vulkan/anv_wsi.c | 121 - 1 file changed, 119 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index 2e05c3b07b..1e8e507d99 100644 --- a/src

[Mesa-dev] [RFC v2 0/5] DRI3 v1.2, ANV X11 explicit fences

2017-09-28 Thread Louis-Francis Ratté-Boulianne
This patchset makes use of Jason Ekstrand's recent work on SYNC_FD semaphores and DRI3 v1.2 support for DMA fences: https://lists.x.org/archives/xorg-devel/2017-September/054770.html This is the second version of this patchset. For more context, see: https://lists.freedesktop.org/archives/mesa-dev

[Mesa-dev] [RFC v3 14/23] radv/wsi: Use image_free for alloc cleanup

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone If we fail in the alloc, just use the (mostly) identical radv_wsi_image_free() to clean up after us. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 39 --- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/src/am

[Mesa-dev] [RFC v3 15/23] anv/wsi: Small code motion to prepare for modifiers

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_wsi.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index f59d349b50..d8ffdfbab2 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/i

[Mesa-dev] [RFC v3 23/23] vulkan/wsi: Return VK_SUBOPTIMAL_KHR when X11 window is moved

2017-09-28 Thread Louis-Francis Ratté-Boulianne
optimal modifiers instead of just assuming they have changed. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/vulkan/wsi/wsi_common_x11.c | 57 - 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan

[Mesa-dev] [RFC v3 11/23] vulkan/wsi: Add multiple planes to wsi_image_base

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not currently used. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 13 +++-- src/intel/vulkan/anv_wsi.c | 9 + src/vulkan/wsi/wsi_common.h | 9 + src/vulkan/wsi/wsi_common_wayland.c | 11 +++ src/vulka

[Mesa-dev] [RFC v3 09/23] vulkan/wsi: Add wsi_image_base structure

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone This is used to hold information about the allocated image, rather than an ever-growing function argument list. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 31 ++ src/intel/vulkan/anv_wsi.c | 25 +++--- src/v

[Mesa-dev] [RFC v3 19/23] vulkan/wsi: Rename needs_linear_copy to different_gpu

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone That's what it actually means; the fact it generally means a linear copy is requires is incidental. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 10 +- src/intel/vulkan/anv_wsi.c | 2 +- src/vulkan/wsi/wsi_common.h | 2 +- 3 files changed, 7 inser

[Mesa-dev] [RFC v3 12/23] radv/wsi: Move image allocation into helper function

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Create a new helper function which handles the actual image/memory allocations for a swapchain image, removing the bulk of radv_wsi_image_create. This will make it easier to move linear handling into radv in the next patch. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv

[Mesa-dev] [RFC v3 21/23] vulkan/wsi/wayland: Add support for zwp_dmabuf

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone zwp_linux_dmabuf_v1 lets us use multi-planar images and buffer modifiers. Signed-off-by: Daniel Stone --- src/vulkan/Makefile.am | 10 +++ src/vulkan/Makefile.sources | 4 +- src/vulkan/wsi/wsi_common_wayland.c | 139 +++---

[Mesa-dev] [RFC v3 08/23] egl/x11: Reallocate buffer when the window moves to a different CRTC

2017-09-28 Thread Louis-Francis Ratté-Boulianne
The optimal modifier depends on the current CRTC as some modifiers might not allow direct scanout. When the window is moved to a different CRTC, available modifiers should be re-fetched and the buffers re-allocated. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/egl/drivers/dri2/egl_dri2

[Mesa-dev] [RFC v3 10/23] vulkan/wsi: Rename needs_linear_copy to should_export

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone The only use for this boolean was to decide whether or not it should export a dmabuf FD. Simplify things a bit by giving that directly. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 6 -- src/intel/vulkan/anv_wsi.c | 21 +

[Mesa-dev] [RFC v3 22/23] RFC: vulkan/wsi: Add support for DRI3 v1.1

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Adds support for multiple planes and buffer modifiers. --- src/vulkan/wsi/wsi_common_x11.c | 179 1 file changed, 161 insertions(+), 18 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 8

[Mesa-dev] [RFC v3 16/23] intel/isl: Add ISL tiling -> modifier conversion

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Given a tiling mode and an aux usage, return the DRM modifier. Signed-off-by: Daniel Stone --- src/intel/isl/isl.h | 6 +- src/intel/isl/isl_drm.c | 17 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/intel/isl/isl.h b/src/intel/

[Mesa-dev] [RFC v3 20/23] vulkan/wsi: Add modifiers to wsi_image_create

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Allow the winsys to provide a set of acceptable modifiers to the driver when creating WSI images. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 36 +-- src/intel/vulkan/anv_image.c| 9 ++-- src/intel/vulkan/anv

[Mesa-dev] [RFC v3 18/23] vulkan/wsi: Add drm_modifier member to wsi_image

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not yet used anywhere. Signed-off-by: Daniel Stone --- src/amd/vulkan/Makefile.am | 1 + src/amd/vulkan/radv_wsi.c | 2 ++ src/intel/vulkan/anv_wsi.c | 8 src/vulkan/wsi/wsi_common.h | 1 + 4 files changed, 12 insertions(+) diff --git a/src/amd/vulkan/Makefile.

[Mesa-dev] [RFC v3 05/23] i965: Implement EGL_EXT_image_implicit_sync_control

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone --- src/mesa/drivers/dri/i965/brw_bufmgr.h | 3 +++ src/mesa/drivers/dri/i965/intel_screen.c | 16 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h index de0ba1d

[Mesa-dev] [RFC v3 06/23] dri: Add createImageWithModifiers2 to DRIimageExtension

2017-09-28 Thread Louis-Francis Ratté-Boulianne
It does the same as createImagewithModifiers but allow multiple modifiers set to be given. The modifier used to create the image should be selected from the first tranche if possible. If not, then the subsequent tranches should be used. Signed-off-by: Louis-Francis Ratté-Boulianne --- include

[Mesa-dev] [RFC v3 07/23] RFC: egl/x11: Support DRI3 v1.1

2017-09-28 Thread Louis-Francis Ratté-Boulianne
Add support for DRI3 v1.1, which allows pixmaps to be backed by multi-planar buffers, or those with format modifiers. This is both for allocating render buffers, as well as EGLImage imports from a native pixmap (EGL_NATIVE_PIXMAP_KHR). Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by

[Mesa-dev] [RFC v3 04/23] dri: Add suppressImplicitSync to DRIimageExtension

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Provide a hook to inform the driver that implicit synchronization should be suppressed. --- include/GL/internal/dri_interface.h | 10 +- src/egl/drivers/dri2/egl_dri2.c | 27 +++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a

[Mesa-dev] [RFC v3 01/23] dri: fromPlanar() should never return NULL as a valid result

2017-09-28 Thread Louis-Francis Ratté-Boulianne
-by: Louis-Francis Ratté-Boulianne --- src/gbm/backends/dri/gbm_dri.c | 12 ++-- src/mesa/drivers/dri/i965/intel_screen.c | 11 --- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index

[Mesa-dev] [RFC v3 03/23] egl: Add EGL_EXT_image_implicit_sync_control

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/main/eglapi.c | 1 + src/egl/main/egldisplay.h | 1 + src/egl/main/eglimage.c | 26 ++ src/egl/main/eglimage.h | 3 +++ 4 files changed, 31 insertions(+) diff --git a/src/egl/main/eglapi.c b/src/egl/m

[Mesa-dev] [RFC v3 17/23] intel/isl: Add field for suboptimal tiling flags

2017-09-28 Thread Louis-Francis Ratté-Boulianne
The caller might want to discriminate between two possible sets of tiling flags. For example, some tiling modes might allow direct scanout, and so should be preferred even if GPU operations are a little less performant. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/intel/isl/isl.c | 33

[Mesa-dev] [RFC v3 13/23] vulkan/wsi: Move linear alloc into radv

2017-09-28 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone This is pretty much radv-specific anyway. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 49 +++-- src/intel/vulkan/anv_wsi.c | 23 - src/vulkan/wsi/wsi_common.h | 4 ++- src/vulkan/wsi/

[Mesa-dev] [RFC v3 02/23] i965: Only set planar_format if it's actually one

2017-09-28 Thread Louis-Francis Ratté-Boulianne
The planar_format image property was always set even for non-planar formats. This was breaking CCS support as intel_from_planar is now making sure we can't have both a modifier and an planar format. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone --- src/mesa/driver

[Mesa-dev] [RFC v3 00/23] DRI3 v1.1, ANV dmabuf

2017-09-28 Thread Louis-Francis Ratté-Boulianne
Hi, With full support for modifiers in DRIimage, this patch series adds support for fully plumbing them through X11. This is the third revision, more context can be found here: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158457.html https://lists.freedesktop.org/archives/mesa-dev/201

[Mesa-dev] [RFC 4/5] vulkan: Add support for out-fences in vkAcquireNextImage

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne --- src/vulkan/wsi/wsi_common.h | 3 + src/vulkan/wsi/wsi_common_x11.c | 143 ++-- 2 files changed, 113 insertions(+), 33 deletions(-) diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h

[Mesa-dev] [RFC 1/5] egl: Support EGL sync objects with OpenGL API

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Xorg server uses the OpenGL API by default and we still want to support fencing in that situation. Fences seem to work properly even is not using the OpenGL ES API. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/egl/main/eglapi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[Mesa-dev] [RFC 3/5] vulkan: Add support for in-fences for vkQueuePresent

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Allow drivers to add a list of semaphores to wait on when queuing a image to present. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/amd/vulkan/radv_wsi.c | 2 +- src/intel/vulkan/anv_wsi.c | 2 ++ src/vulkan/wsi/wsi_common.h | 6 ++ src/vulkan/wsi

[Mesa-dev] [RFC 0/5] DRI3 v1.1, ANV X11 explicit fences

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Hi, This patchset makes use of Jason Ekstrand's recent work on SYNC_FD semaphores and DRI3 v1.1 support for DMA fences: https://lists.freedesktop.org/archives/mesa-dev/2017-August/168154.html It allows Vulkan WSI clients (X11 only for now) to use explicit fencing. That means vkQueuePresent can ha

[Mesa-dev] [RFC 5/5] anv: Implement wsi get_semaphores_fd and import_semaphore

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne --- src/intel/vulkan/anv_wsi.c | 121 - 1 file changed, 119 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index 2c6c4db4eb..38eec76a97 100644 --- a/src

[Mesa-dev] [RFC 2/5] vulkan: Check whether X server supports DMA fences

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne --- src/vulkan/wsi/wsi_common_x11.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index ecdaf91434..d132541156 100644 --- a/src/vulkan/wsi

[Mesa-dev] [RFC v2 13/22] RFC: vulkan: Update registry for MESAX dma_buf extensions

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace Update vulkan.h and vk.xml from [1]: git://github.com/chadversary/vulkan-spec refs/tags/chadv/test/2017-03-06-VK_MESAX_external This pulls in the following extensions: - VK_EXT_get_image_properties - VK_MESAX_external_memory_dma_buf - VK_MESAX_external_image_dma_buf

[Mesa-dev] [RFC v2 19/23] RFC: anv/wsi: Use VK_MESAX_external_image_dma_buf

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace When creating a VkSurface for X11, we created the underlying VkImage by calling anv_image_create() and passing driver-private info to it. We can now accomplish the same thing without driver-private info, using VK_MESAX_external_image_dma_buf. In anv_wsi.c, replace the combo o

[Mesa-dev] [RFC v2 18/22] RFC: anv/wsi: Use VK_MESAX_external_image_dma_buf

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace When creating a VkSurface for X11, we created the underlying VkImage by calling anv_image_create() and passing driver-private info to it. We can now accomplish the same thing without driver-private info, using VK_MESAX_external_image_dma_buf. In anv_wsi.c, replace the combo o

[Mesa-dev] [RFC v2 21/22] RFC: vulkan/wsi: Add modifiers to WSI image creation

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Allow the WSI to provide a set of modifiers to be used along with the format. For now, no winsys provides any modifier support. Add a fallback to the previous default (X-tiling) inside ANV. RADV remains somewhat broken in the presence of a winsys which will suggest modifiers,

[Mesa-dev] [RFC v2 18/23] RFC: anv: Drop vkCreateDmaBufImageINTEL()

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace This "extension" function predates Vulkan 1.0 and Vulkan WSI. We created it during the early days of bringing up the Vulkan driver. We used it for testing the early driver because, in those early days, there was no other way to import/export a tiled VkImage and examine it. No V

[Mesa-dev] [RFC v2 19/22] RFC: anv: Drop unused anv_image_create()

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace --- src/intel/vulkan/anv_image.c | 26 ++ src/intel/vulkan/anv_private.h | 5 - 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 241b7c9fe0..a99f0e4b29 100644 --- a/

[Mesa-dev] [RFC v2 20/23] RFC: anv: Drop unused anv_image_create()

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace --- src/intel/vulkan/anv_image.c | 26 ++ src/intel/vulkan/anv_private.h | 5 - 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 241b7c9fe0..a99f0e4b29 100644 --- a/

[Mesa-dev] [RFC v2 07/22] anv/image: Better var names in vkCreateImage

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace - Rename the anv_image_create_info vars from 'create_info' to 'anv_info'. - Rename the VkImageCreateInfo vars from 'pCreateInfo' and 'vk_info' to 'base_info'. This reduces the diff and eliminates ambiguity in follow-up patches for upcoming extensions, because the extensions

[Mesa-dev] [RFC v2 23/23] RFC: vulkan/wsi: Add support for DRI3 v1.1

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Adds support for multiple planes and buffer modifiers. --- src/intel/vulkan/anv_wsi.c | 7 ++- src/vulkan/wsi/wsi_common_x11.c | 118 2 files changed, 112 insertions(+), 13 deletions(-) diff --git a/src/intel/vulkan/anv_wsi.c b/

[Mesa-dev] [RFC v2 03/22] intel/isl: Add ISL <-> GEM tiling conversion

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Add a simple conversion from ISL tiling to GEM BO tiling flags, and use that instead of hardcoding I915_TILING_X in the ANV WSI. Signed-off-by: Daniel Stone --- src/intel/isl/isl.c| 28 src/intel/isl/isl.h| 8 src/intel/

[Mesa-dev] [RFC v2 17/23] RFC: anv: Implement VK_MESAX_external_image_dma_buf

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace For now, we support dma_buf images for only a single format, VK_FORMAT_R8G8B8A8_UNORM. And the image must be a "simple" image: 2D, single-sample, non-mipmappped, non-array, non-cube. --- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_formats.c | 144

[Mesa-dev] [RFC v2 17/22] RFC: anv: Drop vkCreateDmaBufImageINTEL()

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace This "extension" function predates Vulkan 1.0 and Vulkan WSI. We created it during the early days of bringing up the Vulkan driver. We used it for testing the early driver because, in those early days, there was no other way to import/export a tiled VkImage and examine it. No V

[Mesa-dev] [RFC v2 06/23] anv: Add func anv_get_raw_format()

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace Like anv_get_format(), but the returned format is not adjusted, not even for the aspect. Add anv_get_raw_isl_format() too, to match anv_get_isl_format(). --- src/intel/vulkan/anv_formats.c | 7 +++ src/intel/vulkan/anv_private.h | 8 2 files changed, 15 insertion

[Mesa-dev] [RFC v2 22/22] RFC: vulkan/wsi: Add support for DRI3 v1.1

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Adds support for multiple planes and buffer modifiers. --- src/intel/vulkan/anv_wsi.c | 7 ++- src/vulkan/wsi/wsi_common_x11.c | 118 2 files changed, 112 insertions(+), 13 deletions(-) diff --git a/src/intel/vulkan/anv_wsi.c b/

[Mesa-dev] [RFC v2 21/23] RFC: anv: Drop unneeded struct anv_image_create_info

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace Now that anv_image_create() is gone, there is no need for struct anv_image_create_info. The struct just adds an unused layer of indirection. --- src/intel/vulkan/anv_image.c | 38 +++--- src/intel/vulkan/anv_private.h | 9 - 2 files c

[Mesa-dev] [RFC v2 22/23] RFC: vulkan/wsi: Add modifiers to WSI image creation

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Allow the WSI to provide a set of modifiers to be used along with the format. For now, no winsys provides any modifier support. Add a fallback to the previous default (X-tiling) inside ANV. RADV remains somewhat broken in the presence of a winsys which will suggest modifiers,

[Mesa-dev] [RFC v2 07/23] anv: Annotate anv_get_*format() as pure

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace --- src/intel/vulkan/anv_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 7b4e9dfbe0..55840d5325 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_privat

[Mesa-dev] [RFC v2 09/22] anv/image: Fix return type of make_surface()

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Chad Versace make_surface() always returns VK_SUCCESS, so change its return type to 'void'. This simplifies the return-code handling in anv_image_create_info() and removes a goto. --- src/intel/vulkan/anv_image.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff

  1   2   >