[Mesa-dev] [PATCH 3/3] build: Move wayland-scanner check into platform

2018-02-23 Thread Daniel Stone
Also only check for wayland-scanner if building for the Wayland platform. Signed-off-by: Daniel Stone Fixes: bfa22266cd4d ("vulkan/wsi/wayland: Add support for zwp_dmabuf") Cc: Emil Velikov Reported-by: Dieter Nützel Bugzilla: https://bugs.freedesktop.org/show_bug.cgi

[Mesa-dev] [PATCH 1/3] vulkan/wsi/wayland: Move Wayland protocol from BUILT_SOURCES

2018-02-23 Thread Daniel Stone
same thing as EGL and manually encode the dependencies in the Makefile. Signed-off-by: Daniel Stone Fixes: bfa22266cd4d ("vulkan/wsi/wayland: Add support for zwp_dmabuf") Cc: Emil Velikov Reported-by: Dieter Nützel Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105211 ---

[Mesa-dev] [PATCH 2/3] build: Move wayland-protocols check into platform

2018-02-23 Thread Daniel Stone
In line with wayland-client and wayland-server, move the check for wayland-protocols into the wayland platform branch. Signed-off-by: Daniel Stone Fixes: bfa22266cd4d ("vulkan/wsi/wayland: Add support for zwp_dmabuf") Cc: Emil Velikov Reported-by: Dieter Nützel Bugzi

Re: [Mesa-dev] vulkan/wsi/wayland: Add support for zwp_dmabuf

2018-02-22 Thread Daniel Stone
Hi Dieter, 2018-02-22 0:57 GMT+00:00 Dieter Nützel : > Making all in vulkan > make[3]: Verzeichnis „/opt/mesa/src/vulkan“ wird betreten > make[3]: *** Keine Regel vorhanden, um das Ziel > „/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml“, > benötigt von „wsi/linux-dmabuf-unstable-v1-protocol

Re: [Mesa-dev] [PATCH v11 10/15] vulkan/wsi/x11: Add support for DRI3 v1.1

2018-02-21 Thread Daniel Stone
Hi, On 21 February 2018 at 21:24, Jason Ekstrand wrote: > On Wed, Feb 21, 2018 at 1:22 PM, Jason Ekstrand > wrote: >>> + uint32_t n = 0; >>> + uint32_t counts[2]; >>> + uint64_t *modifiers[2]; >>> + >>> + if (mod_reply->num_drawable_modifiers) { >>> + counts[n] = mod_reply->num_draw

Re: [Mesa-dev] [PATCH v11 09/15] vulkan/wsi/x11: Cleanly handle shutdowns in FIFO thread

2018-02-21 Thread Daniel Stone
Hi, On 21 February 2018 at 20:50, Jason Ekstrand wrote: > On Wed, Feb 21, 2018 at 6:05 AM, Daniel Stone wrote: >> @@ -832,7 +832,7 @@ x11_acquire_next_image_from_queue(struct x11_swapchain >> *chain, >> VkResult result = wsi_queue_pull(

Re: [Mesa-dev] [PATCH v11 07/15] vulkan/wsi/x11: Expand set of swapchain statuses

2018-02-21 Thread Daniel Stone
On 21 February 2018 at 14:05, Daniel Stone wrote: > @@ -781,7 +781,7 @@ x11_acquire_next_image_from_queue(struct x11_swapchain > *chain, > uint32_t image_index; > VkResult result = wsi_queue_pull(&chain->acquire_queue, >

[Mesa-dev] [PATCH v11 09/15] vulkan/wsi/x11: Cleanly handle shutdowns in FIFO thread

2018-02-21 Thread Daniel Stone
The FIFO thread signals shutdown by pushing UINT32_MAX into the acquire queue, and shutdown is signaled to it by pushing UINT32_MAX into the present queue. Explicitly catch a push of UINT32_MAX in either direction and treat this as error. Signed-off-by: Daniel Stone --- src/vulkan/wsi

[Mesa-dev] [PATCH v11 12/15] x11/dri3: Don't open-code ARRAY_SIZE

2018-02-21 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/loader/loader_dri3_helper.c | 5 +++-- src/loader/meson.build | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 30ea133f7e5..cb947c58728 100644 --- a/src

[Mesa-dev] [PATCH v11 00/15] Modifiers for X11 EGL/Vulkan, WL/VK

2018-02-21 Thread Daniel Stone
Hi, This series adds support for buffer modifiers through ANV and the common WSI infrastructure (AMD has no defined modifiers), as well as specifically for X11 and Wayland. It also adds support for the X11 DRI3 v1.1 and Present v1.2 protocols to EGL and GLX, which does not require changes to the DR

[Mesa-dev] [PATCH v11 05/15] anv/image: Add support for modifiers for WSI

2018-02-21 Thread Daniel Stone
From: Jason Ekstrand This adds support for the modifiers portion of the WSI "extension". Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_formats.c | 38 ++ src/intel/vulkan/anv_imag

[Mesa-dev] [PATCH v11 04/15] anv/image: Separate modifiers from legacy scanout

2018-02-21 Thread Daniel Stone
#x27;s clear in the driver when we're using modifiers and when we're using legacy paths. v2 (Jason Ekstrand): - Rename legacy_scanout to needs_set_tiling Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_device.c | 22 ++ src/intel/

[Mesa-dev] [PATCH v11 11/15] vulkan/wsi/x11: Return VK_SUBOPTIMAL_KHR for X11

2018-02-21 Thread Daniel Stone
From: 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 Reviewed-by: Daniel Stone Signed-off-by

[Mesa-dev] [PATCH v11 03/15] vulkan/wsi: Add modifiers support to wsi_create_native_image

2018-02-21 Thread Daniel Stone
ition all of the structs used in wsi_common to the real extension structs. Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common.c | 164 src/vulkan/wsi/wsi_common.h | 23 + src/vulkan/wsi/wsi_common_private.h

[Mesa-dev] [PATCH v11 14/15] egl/x11: Support DRI3 v1.1

2018-02-21 Thread Daniel Stone
-Francis Ratté-Boulianne Reviewed-by: Eric Engestrom Reviewed-by: Emil Velikov Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 7 + src/egl/drivers/dri2/egl_dri2.h | 3 + src/egl/drivers/dri2/platform_x11_dri3.c | 105

[Mesa-dev] [PATCH v11 10/15] vulkan/wsi/x11: Add support for DRI3 v1.1

2018-02-21 Thread Daniel Stone
Adds support for multiple planes and buffer modifiers. v4: Rename "has_dri3_v1_1" to "has_dri3_modifiers" Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_x11.c | 185 1 file changed, 168 insertions(+), 17 deletions(-) dif

[Mesa-dev] [PATCH v11 02/15] vulkan/wsi: Add drm_modifier member to wsi_image

2018-02-21 Thread Daniel Stone
Not yet used anywhere. Signed-off-by: Daniel Stone Reviewed-by: Jason Ekstrand --- src/vulkan/Makefile.am | 1 + src/vulkan/wsi/meson.build | 2 +- src/vulkan/wsi/wsi_common.c | 3 +++ src/vulkan/wsi/wsi_common_private.h | 1 + 4 files changed, 6 insertions(+), 1

[Mesa-dev] [PATCH v11 08/15] vulkan/wsi/x11: Consistently update swapchain status

2018-02-21 Thread Daniel Stone
Use a helper function for updating the swapchain status. This will be used later to handle VK_SUBOPTIMAL_KHR, where we need to make a non-error status stick to the swapchain until recreation. Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_x11.c | 90

[Mesa-dev] [PATCH v11 07/15] vulkan/wsi/x11: Expand set of swapchain statuses

2018-02-21 Thread Daniel Stone
Instead of direct comparisons to VK_SUCCESS, test for negative numbers meaning an error status, and positive numbers indicating non-error statuses. Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_x11.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[Mesa-dev] [PATCH v11 15/15] egl/x11: Re-allocate buffers if format is suboptimal

2018-02-21 Thread Daniel Stone
Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ src/egl/drivers/dri2/egl_dri2.h | 2 ++ src/egl/drivers/dri2/platform_x11_dri3.c | 3 +++ src/glx/dri3_glx.c | 4 ++- src/loader/loader_dri3_helper.c

[Mesa-dev] [PATCH v11 06/15] vulkan/wsi/wayland: Add support for zwp_dmabuf

2018-02-21 Thread 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/meson.build | 2 + src/vulkan/wsi/wsi_common_wayland.c | 141

[Mesa-dev] [PATCH v11 13/15] x11/dri3: Store raw present completion mode

2018-02-21 Thread Daniel Stone
The DRI3 drawable info struct currently stores a boolean for whether the last completed operation was a flip or not. As we need to track the full completion mode for handling suboptimal returns, change the 'flipping' field to the raw present completion mode from the server. Signed-off-

[Mesa-dev] [PATCH v11 01/15] vulkan/wsi: Add multiple planes to wsi_image

2018-02-21 Thread Daniel Stone
Not currently used. Signed-off-by: Daniel Stone Reviewed-by: Jason Ekstrand --- src/vulkan/wsi/wsi_common.c | 20 src/vulkan/wsi/wsi_common_private.h | 9 + src/vulkan/wsi/wsi_common_wayland.c | 11 +++ src/vulkan/wsi/wsi_common_x11.c | 11

Re: [Mesa-dev] [PATCH 0/6] i965: Fix TFP for CCS modifiers

2018-02-21 Thread Daniel Stone
On 21 February 2018 at 10:49, Daniel Stone wrote: > On 24 January 2018 at 23:46, Jason Ekstrand wrote: >> This patch series provides fixes for the texture_from_pixmap path when >> modifiers are used. All but the first and last patches are reviewed. I >> haven't p

Re: [Mesa-dev] [PATCH 0/6] i965: Fix TFP for CCS modifiers

2018-02-21 Thread Daniel Stone
The only new patch is 6 which is required because patch 3 starts making the > intel_texture_object contain the GL format for texture views and not the > hacked up format we used to use. We have to do the format hacks for depth > and ETC2 in texture upload now. This series is:

Re: [Mesa-dev] [Mesa-stable] [PATCH] egl/wayland: Always use in-tree wayland-egl-backend.h

2018-02-16 Thread Daniel Stone
On 16 February 2018 at 13:56, Emil Velikov wrote: > On 15 February 2018 at 13:13, Emil Velikov wrote: >> On 15 February 2018 at 09:23, Daniel Stone wrote: >>> A recent patchset to Wayland[0] migrated Mesa's libwayland-egl backend >>> into Wayland itself,

Re: [Mesa-dev] [PATCH kmscube v3] formats: use weston's egl config matching logic, centralize format

2018-02-16 Thread Daniel Stone
Hi Ilia, On 10 February 2018 at 01:49, Ilia Mirkin wrote: > The GBM surface format has to match the DRM mode. Both are used in a > couple of places, so unify it so that it's only set in one place. Note > that the GBM and DRM formats are identical. Pushed this one to master with review, thanks fo

Re: [Mesa-dev] [PATCH 10/11] egl/x11: Support DRI3 v1.1

2018-02-16 Thread Daniel Stone
Hi, On 15 February 2018 at 22:44, Jason Ekstrand wrote: > On Thu, Feb 15, 2018 at 7:57 AM, Daniel Stone wrote: >> + draw->ext->image->queryDmaBufModifiers(draw->dri_screen, format, >> +

Re: [Mesa-dev] [PATCH 09/11] vulkan/wsi: Return VK_SUBOPTIMAL_KHR for X11

2018-02-16 Thread Daniel Stone
On 15 February 2018 at 21:38, Jason Ekstrand wrote: > On Thu, Feb 15, 2018 at 7:57 AM, Daniel Stone wrote: >> @@ -138,7 +140,7 @@ wsi_x11_connection_create(const VkAllocationCallbacks >> *alloc, >>return NULL; >> >> dri3_cookie = x

Re: [Mesa-dev] [PATCH 03/11] vulkan/wsi: Add modifiers support to wsi_create_native_image

2018-02-16 Thread Daniel Stone
Hi, On 15 February 2018 at 19:46, Jason Ekstrand wrote: > On Thu, Feb 15, 2018 at 7:57 AM, Daniel Stone wrote: >> + image_modifier_count = 0; >> + for (uint32_t l = 0; l < num_modifier_lists; l++) { >> + /* Walk the modifier lists and const

[Mesa-dev] [PATCH v2] i965: Fix aux-surface size check

2018-02-16 Thread Daniel Stone
height (!). As the ISL aux surface is not recorded in the DRIimage, we cannot easily access it to check. Instead, store the aux size from when we do have the ISL surface to hand, and check against that later when we go to access the aux surface. Signed-off-by: Daniel Stone Fixes: c2c4e5bae3ba

Re: [Mesa-dev] [PATCH 11/11] egl/x11: Re-allocate buffers if format is suboptimal

2018-02-15 Thread Daniel Stone
Hi Michel, On 15 February 2018 at 16:14, Michel Dänzer wrote: > On 2018-02-15 04:57 PM, Daniel Stone wrote: >> @@ -885,6 +901,11 @@ loader_dri3_swap_buffers_msc(struct >> loader_dri3_drawable *draw, >>if (!loader_dri3_have_image_blit(draw) &&

[Mesa-dev] [PATCH 09/11] vulkan/wsi: Return VK_SUBOPTIMAL_KHR for X11

2018-02-15 Thread Daniel Stone
From: 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 Reviewed-by: Daniel Stone Signed-off-by

[Mesa-dev] [PATCH 01/11] vulkan/wsi: Add multiple planes to wsi_image

2018-02-15 Thread Daniel Stone
Not currently used. Signed-off-by: Daniel Stone Reviewed-by: Jason Ekstrand --- src/vulkan/wsi/wsi_common.c | 20 src/vulkan/wsi/wsi_common_private.h | 9 + src/vulkan/wsi/wsi_common_wayland.c | 11 +++ src/vulkan/wsi/wsi_common_x11.c | 11

[Mesa-dev] [PATCH 07/11] vulkan/wsi/wayland: Add support for zwp_dmabuf

2018-02-15 Thread 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/meson.build | 2 + src/vulkan/wsi/wsi_common_wayland.c | 138

[Mesa-dev] [PATCH 02/11] vulkan/wsi: Add drm_modifier member to wsi_image

2018-02-15 Thread Daniel Stone
Not yet used anywhere. Signed-off-by: Daniel Stone Reviewed-by: Jason Ekstrand --- src/vulkan/Makefile.am | 1 + src/vulkan/wsi/meson.build | 2 +- src/vulkan/wsi/wsi_common.c | 3 +++ src/vulkan/wsi/wsi_common_private.h | 1 + 4 files changed, 6 insertions(+), 1

[Mesa-dev] [PATCH 06/11] meson: Move Wayland dmabuf to wayland-drm

2018-02-15 Thread Daniel Stone
As the comment notes: linux-dmabuf has nothing to do with wayland-drm, but we need a single place to build these files we can use from both EGL and Vulkan, which is guaranteed to be included before both EGL and Vulkan WSI. Signed-off-by: Daniel Stone Cc: Emil Velikov --- src/egl/meson.build

[Mesa-dev] [PATCH 03/11] vulkan/wsi: Add modifiers support to wsi_create_native_image

2018-02-15 Thread Daniel Stone
ition all of the structs used in wsi_common to the real extension structs. Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common.c | 164 src/vulkan/wsi/wsi_common.h | 23 + src/vulkan/wsi/wsi_common_private.h

[Mesa-dev] [PATCH 08/11] vulkan/wsi: Add support for DRI3 v1.1

2018-02-15 Thread Daniel Stone
Adds support for multiple planes and buffer modifiers. v4: Rename "has_dri3_v1_1" to "has_dri3_modifiers" Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_x11.c | 183 1 file changed, 166 insertions(+), 17 deletions(-) dif

[Mesa-dev] [PATCH 10/11] egl/x11: Support DRI3 v1.1

2018-02-15 Thread Daniel Stone
-Francis Ratté-Boulianne Reviewed-by: Eric Engestrom Reviewed-by: Emil Velikov Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 7 + src/egl/drivers/dri2/egl_dri2.h | 3 + src/egl/drivers/dri2/platform_x11_dri3.c | 105

[Mesa-dev] [PATCH 11/11] egl/x11: Re-allocate buffers if format is suboptimal

2018-02-15 Thread Daniel Stone
Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ src/egl/drivers/dri2/egl_dri2.h | 2 ++ src/egl/drivers/dri2/platform_x11_dri3.c | 3 +++ src/loader/loader_dri3_helper.c | 37 src

[Mesa-dev] [PATCH 05/11] anv/image: Add support for modifiers for WSI

2018-02-15 Thread Daniel Stone
From: Jason Ekstrand This adds support for the modifiers portion of the WSI "extension". Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_formats.c | 38 ++ src/intel/vulkan/anv_imag

[Mesa-dev] [PATCH 04/11] anv/image: Separate modifiers from legacy scanout

2018-02-15 Thread Daniel Stone
#x27;s clear in the driver when we're using modifiers and when we're using legacy paths. v2 (Jason Ekstrand): - Rename legacy_scanout to needs_set_tiling Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_device.c | 22 ++ src/intel/

[Mesa-dev] [PATCH v10 00/11] Modifiers for X11 EGL/Vulkan, WL/VK

2018-02-15 Thread Daniel Stone
Hi, I don't actually know which revision we're up to by now, so I decided to rebase at v10. This is a slight evolution of Jason's 16-patch series posted on Feb 9th. It adds: - support for multi-plane buffers and modifiers to the Vulkan WSI - support for zwp_linux_dmabuf_v1 to the Vulkan Waylan

Re: [Mesa-dev] [PATCH mesa v2] egl/wayland: check for invalid format index

2018-02-15 Thread Daniel Stone
Hi Eric, On 15 February 2018 at 15:11, Eric Engestrom wrote: > v2: just tell the compiler to assume the format will always be found, as > it comes from the table itself to begin with. Thanks, assume() is a new one on me! Cheers, Daniel ___ mesa-dev ma

[Mesa-dev] [PATCH] i965: Fix aux-surface size check

2018-02-15 Thread Daniel Stone
height (!). As the ISL aux surface is not recorded in the DRIimage, we cannot easily access it to check. Instead, store the aux size from when we do have the ISL surface to hand, and check against that later when we go to access the aux surface. Signed-off-by: Daniel Stone Fixes: c2c4e5bae3ba

Re: [Mesa-dev] [PATCH mesa] egl/wayland: check for invalid format index

2018-02-15 Thread Daniel Stone
Hi Eric, On 15 February 2018 at 11:17, Eric Engestrom wrote: > Daniel, `w` seemed like the "least bad" thing to return in this case; > would you prefer `0`? I guess Coverity doesn't know it can never be invalid. We look up a visual in the table using dri2_surf->format, whcih is only ever set fro

[Mesa-dev] [PATCH] egl/wayland: Always use in-tree wayland-egl-backend.h

2018-02-15 Thread Daniel Stone
/series/31663/ [1]: https://cgit.freedesktop.org/wayland/wayland/commit/?id=9fa60983b579 Signed-off-by: Daniel Stone Cc: Emil Velikov Cc: mesa-sta...@lists.freedesktop.org Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105103 --- src/egl/drivers/dri2/egl_dri2.h | 2 +- 1 file changed, 1 insertio

Re: [Mesa-dev] [PATCH 13/16] anv/image: Add support for modifiers for WSI

2018-02-14 Thread Daniel Stone
On 14 February 2018 at 17:58, Jason Ekstrand wrote: > I've added the following to the top of wsi_create_native_image: > > + /* If we don't support modifiers, the winsys code shouldn't be asking > for > +* an image with modifiers. > +*/ > + assert(wsi->supports_modifiers || num_modifier

Re: [Mesa-dev] [PATCH 12/16] anv/image: Separate modifiers from legacy scanout

2018-02-14 Thread Daniel Stone
On 14 February 2018 at 17:23, Jason Ekstrand wrote: > On Wed, Feb 14, 2018 at 8:43 AM, Daniel Stone wrote: >> Linear is unchanged as it's implicit. X tiling has to take the >> workaround, in case anyone wants to display it. > > I'm not sure I buy that. Fr

Re: [Mesa-dev] [PATCH 12/16] anv/image: Separate modifiers from legacy scanout

2018-02-14 Thread Daniel Stone
On 14 February 2018 at 16:27, Jason Ekstrand wrote: > On Wed, Feb 14, 2018 at 3:39 AM, Daniel Stone wrote: >> > On Tue, Feb 13, 2018 at 10:48 AM, Daniel Stone >> > wrote: >> >> For actual scanout, the kernel very specifically demands that if the >> >

Re: [Mesa-dev] [PATCH 13/16] anv/image: Add support for modifiers for WSI

2018-02-14 Thread Daniel Stone
On 14 February 2018 at 16:21, Jason Ekstrand wrote: > On Wed, Feb 14, 2018 at 4:13 AM, Daniel Stone wrote: >> Suggested fixup: https://hastebin.com/zaheyoriwa >> >> This makes sure we only try to allocate with modifiers when _both_ >> winsys and driver support

Re: [Mesa-dev] [PATCH 12/16] anv/image: Separate modifiers from legacy scanout

2018-02-14 Thread Daniel Stone
On 14 February 2018 at 11:39, Daniel Stone wrote: > On 13 February 2018 at 22:15, Jason Ekstrand wrote: >> On Tue, Feb 13, 2018 at 10:48 AM, Daniel Stone wrote: >>> On 9 February 2018 at 23:43, Jason Ekstrand wrote: >>> For actual scanout, the kernel very speci

Re: [Mesa-dev] [PATCH 13/16] anv/image: Add support for modifiers for WSI

2018-02-14 Thread Daniel Stone
Hi, On 13 February 2018 at 22:29, Jason Ekstrand wrote: > On Tue, Feb 13, 2018 at 10:55 AM, Daniel Stone wrote: >> > + uint64_t modifiers[] = { >> > + DRM_FORMAT_MOD_LINEAR, >> > + I915_FORMAT_MOD_X_TILED, >> > + I915_FORMAT_MOD_Y_TILED,

Re: [Mesa-dev] [PATCH 12/16] anv/image: Separate modifiers from legacy scanout

2018-02-14 Thread Daniel Stone
Hi, On 13 February 2018 at 22:15, Jason Ekstrand wrote: > On Tue, Feb 13, 2018 at 10:48 AM, Daniel Stone wrote: >> On 9 February 2018 at 23:43, Jason Ekstrand wrote: >> For actual scanout, the kernel very specifically demands that if the >> BO is X-tiled, then set_

Re: [Mesa-dev] [PATCH 13/16] anv/image: Add support for modifiers for WSI

2018-02-13 Thread Daniel Stone
Hi Jason, On 9 February 2018 at 23:43, Jason Ekstrand wrote: > +static void > +get_wsi_format_modifier_properties_list(const struct anv_physical_device > *physical_device, > +VkFormat vk_format, > +struct > wsi_form

Re: [Mesa-dev] [PATCH 12/16] anv/image: Separate modifiers from legacy scanout

2018-02-13 Thread Daniel Stone
Hi Jason, On 9 February 2018 at 23:43, Jason Ekstrand wrote: > - /* For images using modifiers, we require a dedicated allocation > - * and we set the BO tiling to match the tiling of the underlying > - * modifier. This is a bit unfortunate as this is completely > -

Re: [Mesa-dev] [PATCH 11/16] vulkan/wsi: Add modifiers support to wsi_create_native_image

2018-02-13 Thread Daniel Stone
ge_subresource, &image_layout); > + > + image->num_planes = 1; > + image->sizes[0] = reqs.size; > + image->row_pitches[0] = image_layout.rowPitch; > + image->offsets[0] = 0; assert(image_layout.offset == 0) Unlikely since it's a dedicated-alloc image, but ... (or is this already guaranteed and I can't read?) The rest looks good to me though. Thanks very much for taking this on! Reviewed-by: Daniel Stone Cheers, Daniel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 09/16] vulkan/wsi: Add multiple planes to wsi_image_base

2018-02-13 Thread Daniel Stone
Hi Jason, This should be titled '... wsi_image', not '... wsi_image_base'. On 9 February 2018 at 23:43, Jason Ekstrand wrote: > diff --git a/src/vulkan/wsi/wsi_common_private.h > b/src/vulkan/wsi/wsi_common_private.h > index 503b2a0..c5002ec 100644 > --- a/src/vulkan/wsi/wsi_common_private.h > +

[Mesa-dev] [PATCH] i965: Fix bugs in intel_from_planar

2018-02-12 Thread Daniel Stone
up in the planar_format == NULL case and the modifier was DRM_FORMAT_MOD_INVALID, we would end up segfaulting in isl_drm_modifier_has_aux. Cc: mesa-sta...@lists.freedesktop.org Fixes: 8f6e54c92966bb94a3f05f2cc7ea804273e125ad Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH] i965: Fix bugs in intel_from_planar

2018-02-12 Thread Daniel Stone
Hi, On 12 February 2018 at 17:16, Jason Ekstrand wrote: > On Mon, Feb 12, 2018 at 6:36 AM, Daniel Stone wrote: >> On further thought, I don't see how this could work at all. If we call >> fromPlanar on plane 0 of a non-planar image with an aux plane, we need >> to lan

Re: [Mesa-dev] [PATCH] i965: Fix bugs in intel_from_planar

2018-02-12 Thread Daniel Stone
Hi, On 10 February 2018 at 06:50, Jason Ekstrand wrote: > -} else if (parent->planar_format == NULL) { > + > +const struct intel_image_format *f = parent->planar_format; > +const int nplanes = f ? f->nplanes : 1; > + > +if (plane > nplanes) { > + if (parent->modifier == DRM_

Re: [Mesa-dev] [PATCH 04/17] egl/gbm: Fix compiler warning about visual matching.

2018-02-12 Thread Daniel Stone
Hi Eric, On 10 February 2018 at 16:32, Eric Anholt wrote: > The compiler doesn't know that num_visuals > 0. Reviewed and pushed, thanks! Cheers, Daniel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/list

Re: [Mesa-dev] [PATCH] i965: Fix bugs in intel_from_planar

2018-02-12 Thread Daniel Stone
Hi Jason, On 10 February 2018 at 06:50, Jason Ekstrand wrote: > intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate) > { > int width, height, offset, stride, dri_format, index; > -const struct intel_image_format *f; > __DRIimage *image; > > -if (parent == NULL

Re: [Mesa-dev] GBM, KMS/DRM, triple buffering

2018-02-12 Thread Daniel Stone
Hi Carlos, On 9 February 2018 at 18:26, Carlos Rafael Giani wrote: > thanks, I got it to work - almost. I am running this on the i.MX6 with > etnaviv. I do get some flickering, however. Flickering shouldn't be seen. It's possible that you're calling things incorrectly, however. For example: /*

Re: [Mesa-dev] [PATCH 00/18] Wayland/GBM format cleanups and 10bpc BGR

2018-02-09 Thread Daniel Stone
Hi, On 8 February 2018 at 22:47, Emil Velikov wrote: > On 8 February 2018 at 14:05, Daniel Stone wrote: >> When Ilia asked for suggestions on where to look to add 10bpc BGR >> support to the GBM and Wayland EGL backends, I had a quick look; the >> number of places the fo

Re: [Mesa-dev] GBM, KMS/DRM, triple buffering

2018-02-09 Thread Daniel Stone
Hi Carlos, On 9 February 2018 at 08:33, Carlos Rafael Giani wrote: > I want to implement triple buffering instead of double buffering for a > program that uses EGL on GBM on a KMS-enabled platform. So far, I used > kmscube as an example. > > However, I do not see where I can specify that I want

Re: [Mesa-dev] [PATCH 05/18] egl/wayland: Add format enums to visual map

2018-02-09 Thread Daniel Stone
Hi Emil, On 8 February 2018 at 21:56, Emil Velikov wrote: > On 8 February 2018 at 14:05, Daniel Stone wrote: >> Extend the visual map from only containing names and bitmasks, to also >> carrying the three format enums we need. These are the DRIImage format >> tokens fo

Re: [Mesa-dev] [PATCH 01/18] egl/wayland: Fix ARGB/XRGB transposition in config map

2018-02-09 Thread Daniel Stone
Hi Eric, On 8 February 2018 at 18:40, Eric Engestrom wrote: > On February 8, 2018 2:06:23 PM UTC, Daniel Stone > wrote: >> When 0b2b7191214eb moved from an if tree to a struct to map between >> wl_drm formats and EGLConfigs, it transposed the mapping between XRGB >> and

[Mesa-dev] [PATCH 18/18] gbm: Add support for 10bpp BGR formats

2018-02-08 Thread Daniel Stone
Add support for XBGR2101010 and ABGR2101010 formats. Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 8 1 file changed, 8 insertions(+) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index ed64ad61bf0..b7da65be27b 100644 --- a/src/gbm

[Mesa-dev] [PATCH 14/18] gbm/dri: Expose visuals table through gbm_dri_device

2018-02-08 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c| 21 ++--- src/gbm/backends/dri/gbm_driint.h | 9 + 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 65f612e68b4

[Mesa-dev] [PATCH 09/18] egl/wayland: Use visual map for DRIImage<->FourCC map

2018-02-08 Thread Daniel Stone
When trying to translate between DRIImage format enums and FourCC codes, use our visual map rather than an open-coded subset. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a

[Mesa-dev] [PATCH 17/18] egl/wayland: Add 10bpc BGR configs

2018-02-08 Thread Daniel Stone
Add support for XBGR2101010 and ABGR2101010. Signed-off-by: Daniel Stone Cc: Ilia Mirkin --- src/egl/drivers/dri2/platform_wayland.c | 12 1 file changed, 12 insertions(+) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index

[Mesa-dev] [PATCH 15/18] egl/gbm: Remove duplicate format table

2018-02-08 Thread Daniel Stone
ind a suitable config. Without doing this, an XRGB EGLConfig would match on an R8 format. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_drm.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/egl/drivers/dri2/platform_

[Mesa-dev] [PATCH 16/18] egl/gbm: Ensure EGLConfigs match GBM surface format

2018-02-08 Thread Daniel Stone
this commit, please look at its EGLConfig selection (e.g. through eglChooseConfigs), and add an EGL_NATIVE_VISUAL_ID == gbm_surface format match to the attribs for config selection. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_drm.c | 52 ++--- 1

[Mesa-dev] [PATCH 01/18] egl/wayland: Fix ARGB/XRGB transposition in config map

2018-02-08 Thread Daniel Stone
When 0b2b7191214eb moved from an if tree to a struct to map between wl_drm formats and EGLConfigs, it transposed the mapping between XRGB and ARGB. Luckily, everyone exposes both formats, so this is harmless. Signed-off-by: Daniel Stone Fixes: 0b2b7191214eb ("egl/wayland: intr

[Mesa-dev] [PATCH 12/18] egl/wayland: Use an array for modifiers

2018-02-08 Thread Daniel Stone
Each Wayland EGLDisplay currently contains a struct with one vector of modifiers per format, hardcoded in the header. To allow easier support for more formats, turn this into an array of u_vectors which is opaque outside of platform_wayland.c. Signed-off-by: Daniel Stone --- src/egl/drivers

[Mesa-dev] [PATCH 05/18] egl/wayland: Add format enums to visual map

2018-02-08 Thread Daniel Stone
eliminate a bunch of open-coded conversions. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index fac66c8c2e2..d08664e87af

[Mesa-dev] [PATCH 06/18] egl/wayland: Use visual map for config->format lookup

2018-02-08 Thread Daniel Stone
Having hoisted the format -> config map into common code, we now use it for config -> format lookups. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 61 +++-- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/src/egl/d

[Mesa-dev] [PATCH 11/18] egl/wayland: Remove has_format enum

2018-02-08 Thread Daniel Stone
Instead of the has_format enum, use an index into the visual array. This makes adding new formats less typing. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/egl

[Mesa-dev] [PATCH 07/18] egl/wayland: Use visual map for buffer_from_image

2018-02-08 Thread Daniel Stone
When creating a wl_buffer on an upstream Wayland display from an existing EGLImage, use the dri2_wl_visual map rather than another hardcoded list of formats. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 38 - 1 file changed, 18

[Mesa-dev] [PATCH 08/18] egl/wayland: Use visual map for format advertisement

2018-02-08 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 75 - 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 0839f5e85a7..b5659b1 100644

[Mesa-dev] [PATCH 10/18] egl/wayland: Add bpp to visual map

2018-02-08 Thread Daniel Stone
Both the DRI2 GetBuffersWithFormat interface, and SHM buffer allocation, had their own format -> bpp lookup tables. Replace these with a lookup into the visual map. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 36 +++-- 1 file changed,

[Mesa-dev] [PATCH 13/18] gbm/dri: Add RGBA masks to GBM format table

2018-02-08 Thread Daniel Stone
Eventually, we can replace the visuals list inside GBM EGL driver with this one. Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 46 +- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src

[Mesa-dev] [PATCH 17/18] egl/wayland: Add 10bpc BGR configs

2018-02-08 Thread Daniel Stone
Add support for XBGR2101010 and ABGR2101010. Signed-off-by: Daniel Stone Cc: Ilia Mirkin --- src/egl/drivers/dri2/platform_wayland.c | 12 1 file changed, 12 insertions(+) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index

[Mesa-dev] [PATCH 02/18] egl/wayland: Hoist format <-> EGLConfig definition up

2018-02-08 Thread Daniel Stone
Pull the mapping between Wayland formats and EGLConfigs up to the top level, so we can reuse it elsewhere. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/egl

[Mesa-dev] [PATCH 04/18] egl/wayland: Use proper enum type in visual definition

2018-02-08 Thread Daniel Stone
No semantic change. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index a9f8b51d986..fac66c8c2e2 100644 --- a/src/egl

[Mesa-dev] [PATCH 03/18] egl/wayland: Widen channel masks to bpp

2018-02-08 Thread Daniel Stone
Widen the channel masks given in the visual table to the full width of the pixel format, i.e. as many leading zeros as required. No functional change. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 25 - 1 file changed, 20 insertions(+), 5

[Mesa-dev] [PATCH 00/18] Wayland/GBM format cleanups and 10bpc BGR

2018-02-08 Thread Daniel Stone
Hi, When Ilia asked for suggestions on where to look to add 10bpc BGR support to the GBM and Wayland EGL backends, I had a quick look; the number of places the formats were duplicated and lossily/inconsistently translated between rapidly annoyed me enough to just type this series up. This gives bo

[Mesa-dev] [PATCH 04/18] egl/wayland: Use proper enum type in visual definition

2018-02-08 Thread Daniel Stone
No semantic change. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index a9f8b51d986..fac66c8c2e2 100644 --- a/src/egl

[Mesa-dev] [PATCH 09/18] egl/wayland: Use visual map for DRIImage<->FourCC map

2018-02-08 Thread Daniel Stone
When trying to translate between DRIImage format enums and FourCC codes, use our visual map rather than an open-coded subset. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a

[Mesa-dev] [PATCH 08/18] egl/wayland: Use visual map for format advertisement

2018-02-08 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 75 - 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 0839f5e85a7..b5659b1 100644

[Mesa-dev] [PATCH 12/18] egl/wayland: Use an array for modifiers

2018-02-08 Thread Daniel Stone
Each Wayland EGLDisplay currently contains a struct with one vector of modifiers per format, hardcoded in the header. To allow easier support for more formats, turn this into an array of u_vectors which is opaque outside of platform_wayland.c. Signed-off-by: Daniel Stone --- src/egl/drivers

[Mesa-dev] [PATCH 02/18] egl/wayland: Hoist format <-> EGLConfig definition up

2018-02-08 Thread Daniel Stone
Pull the mapping between Wayland formats and EGLConfigs up to the top level, so we can reuse it elsewhere. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/egl

[Mesa-dev] [PATCH 15/18] egl/gbm: Remove duplicate format table

2018-02-08 Thread Daniel Stone
ind a suitable config. Without doing this, an XRGB EGLConfig would match on an R8 format. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_drm.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/egl/drivers/dri2/platform_

[Mesa-dev] [PATCH 16/18] egl/gbm: Ensure EGLConfigs match GBM surface format

2018-02-08 Thread Daniel Stone
this commit, please look at its EGLConfig selection (e.g. through eglChooseConfigs), and add an EGL_NATIVE_VISUAL_ID == gbm_surface format match to the attribs for config selection. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_drm.c | 52 ++--- 1

[Mesa-dev] [PATCH 11/18] egl/wayland: Remove has_format enum

2018-02-08 Thread Daniel Stone
Instead of the has_format enum, use an index into the visual array. This makes adding new formats less typing. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/egl

[Mesa-dev] [PATCH 14/18] gbm/dri: Expose visuals table through gbm_dri_device

2018-02-08 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c| 21 ++--- src/gbm/backends/dri/gbm_driint.h | 9 + 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 65f612e68b4

[Mesa-dev] [PATCH 05/18] egl/wayland: Add format enums to visual map

2018-02-08 Thread Daniel Stone
eliminate a bunch of open-coded conversions. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index fac66c8c2e2..d08664e87af

[Mesa-dev] [PATCH 03/18] egl/wayland: Widen channel masks to bpp

2018-02-08 Thread Daniel Stone
Widen the channel masks given in the visual table to the full width of the pixel format, i.e. as many leading zeros as required. No functional change. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 25 - 1 file changed, 20 insertions(+), 5

<    1   2   3   4   5   6   7   8   >