Re: [Mesa-dev] [RFC mesa 1/3] egl: deduplicate swap interval clamping logic

2017-07-31 Thread Daniel Stone
drv->API.SwapInterval(drv, disp, surf, interval); Should probably do what the X11 code did and only call into drv->API.SwapInterval() if the interval actually changed. That aside, for the series: Reviewed-by: Daniel Stone Cheers, Daniel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports

2017-07-31 Thread Daniel Stone
When using dmabuf import, make sure that the modifier is actually allowed to add planes to the base format, as implied by the comment. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2

Re: [Mesa-dev] [PATCH 3/3] specs: Add EGL_MESA_platform_device

2017-08-07 Thread Daniel Stone
s like something other people will want to support, we should definitely make this EXT. Acked-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] egl/dri2: Allow modifiers to add FDs to imports

2017-08-07 Thread Daniel Stone
On 31 July 2017 at 18:35, Daniel Stone wrote: > When using dmabuf import, make sure that the modifier is actually > allowed to add planes to the base format, as implied by the comment. Anyone? ___ mesa-dev mailing list mesa-dev@lists.freedeskt

[Mesa-dev] [PATCH v2] egl/dri2: Allow modifiers to add FDs to imports

2017-08-09 Thread Daniel Stone
When using dmabuf import, make sure that the modifier is actually allowed to add planes to the base format, as implied by the comment. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions

Re: [Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports

2017-08-09 Thread Daniel Stone
On 8 August 2017 at 09:48, Tapani Pälli wrote: > On 08/08/2017 10:37 AM, Philipp Zabel wrote: >> On Tue, 2017-08-08 at 07:29 +0300, Tapani Pälli wrote: Since this increments plane_n, Should a check be added that the corresponding DMABufPlanFds[i] is present? >>> >>> Check for the fd is r

Re: [Mesa-dev] [PATCH v2] egl/dri2: Allow modifiers to add FDs to imports

2017-08-11 Thread Daniel Stone
Hi, On 11 August 2017 at 08:39, Philipp Zabel wrote: > Nice, this makes sure that all planes up to the last modifier have fds > present. And since all fds are guaranteed to be present, the modifier > equality check in dri2_check_dma_buf_attribs also makes sure that there > are no missing modifier

Re: [Mesa-dev] [PATCH 2/2] egl: Add dma_buf_import_modifiers for glvnd

2017-08-11 Thread Daniel Stone
On 31 July 2017 at 15:15, Daniel Stone wrote: > Make sure we advertise the new entrypoints to libglvnd's EGL dispatch. Anyone? Cheers, Daniel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listi

Re: [Mesa-dev] [PATCH] configure.ac: Refuse to build Vulkan without DRI3

2017-04-21 Thread Daniel Stone
Hi Ville, On 20 April 2017 at 16:20, wrote: > Trying to build the Vulkan WSI code results in a failure without DRI3. > Make configure check that DRI3 is available before trying to build > the Vulkan drivers. It shouldn't. Could you please try this - fixing the existing conditional - instead? ht

Re: [Mesa-dev] [PATCH] configure.ac: Refuse to build Vulkan without DRI3

2017-04-21 Thread Daniel Stone
Hi Emil, On 21 April 2017 at 14:43, Emil Velikov wrote: > On 21 April 2017 at 13:26, Daniel Stone wrote: >> On 20 April 2017 at 16:20, wrote: >>> Trying to build the Vulkan WSI code results in a failure without DRI3. >>> Make configure check that DRI3 is avail

Re: [Mesa-dev] [PATCH 1/2] egl_dri2: Add support for Tizen

2017-04-25 Thread Daniel Stone
Hi, On 25 April 2017 at 17:03, Emil Velikov wrote: > From a quick look most of this code is copy/pasted from platform_wayland.c. > > At the same time, large portions of the android, gbm and wayland (not > sure about x11) platforms are almost identical. > With the biggest differences due to featur

Re: [Mesa-dev] [PATCH] radv/wsi: report presentation error per image request

2017-05-02 Thread Daniel Stone
On 2 May 2017 at 04:41, Dave Airlie wrote: > This ports > 0fcb92c17dee681bd39c08ddf0abc358a27337c7 > anv: wsi: report presentation error per image request > > This fixes: > dEQP-VK.wsi.xlib.incremental_present.scale_none.* Reviewe

[Mesa-dev] [PATCH 1/4] common: Check for extensions before resolving symbols

2017-05-02 Thread Daniel Stone
walk through the extension list is taken from libepoxy. Signed-off-by: Daniel Stone --- common.c | 63 +++ 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/common.c b/common.c index 610ff87..bf2f78e 100644 --- a/common.c

[Mesa-dev] [PATCH 4/4] atomic: Initialise fence FD members

2017-05-02 Thread Daniel Stone
... Signed-off-by: Daniel Stone --- drm-atomic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drm-atomic.c b/drm-atomic.c index 25e04b1..6fb40fd 100644 --- a/drm-atomic.c +++ b/drm-atomic.c @@ -368,6 +368,9 @@ const struct drm * init_drm_atomic(const char *device) drm.crtc

[Mesa-dev] [PATCH 3/4] atomic: Duplicate fence before SwapBuffers

2017-05-02 Thread Daniel Stone
Duplicating the fence before we flush means that the implementation can know that the fence needs to be CPU-visible. After flush it may be too late. Signed-off-by: Daniel Stone --- drm-atomic.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drm-atomic.c b/drm

[Mesa-dev] [PATCH 2/4] atomic: Use CPU-side KMS fence synchronisation

2017-05-02 Thread Daniel Stone
-side wait before we call atomic commit, to make sure we'll never attempt to queue an atomic commit before the previous one has completed. Signed-off-by: Daniel Stone --- common.c | 1 + common.h | 1 + drm-atomic.c | 21 - 3 files changed, 22 insertions(+),

[Mesa-dev] [PATCH 0/4] kmscube atomic fixups

2017-05-02 Thread Daniel Stone
Hi, These four patches get kmscube -A working for me on Skylake. Probably the kicker is #4, though #2 does seem to be necessary. I'm not sure if #3 is perfectly correct for all drivers; I think Intel will still work duplicating after the fence, at the cost of creating an extra batch to fence on. #

Re: [Mesa-dev] [PATCH 0/4] kmscube atomic fixups

2017-05-02 Thread Daniel Stone
Hi, On 2 May 2017 at 11:52, Daniel Stone wrote: > These four patches get kmscube -A working for me on Skylake. Probably > the kicker is #4, though #2 does seem to be necessary. I'm not sure if > #3 is perfectly correct for all drivers; I think Intel will still work > duplicatin

Re: [Mesa-dev] [PATCH 2/4] atomic: Use CPU-side KMS fence synchronisation

2017-05-02 Thread Daniel Stone
Hi, On 2 May 2017 at 12:31, Chris Wilson wrote: > On Tue, May 02, 2017 at 11:52:07AM +0100, Daniel Stone wrote: >> + /* Wait on the CPU side for the _previous_ commit to >> + * complete before we post the flip

Re: [Mesa-dev] [PATCH kmscube 3/4] atomic: Duplicate fence before SwapBuffers

2017-05-02 Thread Daniel Stone
Hi, On 2 May 2017 at 14:49, Rob Clark wrote: > I think this is papering over an i965 bug.. in fact doing the > DupNativeFenceFD could trigger a flush which you don't actually want > on a tiler. Well, when it's immediately before SwapBuffers, I don't think it matters that much. :P > The correspo

Re: [Mesa-dev] [PATCH 4/4] atomic: Initialise fence FD members

2017-05-02 Thread Daniel Stone
Hey Emil, On 2 May 2017 at 14:24, Emil Velikov wrote: > Seems to be the correct place to handle here, despite that both are > already handled. Honestly, I wouldn't have written this patch if I knew that; Lucas's fix came in after the last time I'd pulled, and I didn't notice since I didn't hit a

[Mesa-dev] [PATCH kmscube] atomic: Use normal rendering loop for modeset

2017-05-02 Thread Daniel Stone
: Daniel Stone --- drm-atomic.c | 35 ++- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/drm-atomic.c b/drm-atomic.c index 65caacd..65a2b29 100644 --- a/drm-atomic.c +++ b/drm-atomic.c @@ -175,33 +175,14 @@ static EGLSyncKHR create_fence(const struct egl

Re: [Mesa-dev] [PATCH kmscube] drm-atomic: check for valid GBM BO

2017-05-02 Thread Daniel Stone
hat case, instead of crashing. Reviewed-by: Daniel Stone ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/4] common: Check for extensions before resolving symbols

2017-05-02 Thread Daniel Stone
Hi Eric, On 2 May 2017 at 16:05, Eric Engestrom wrote: > On Tuesday, 2017-05-02 11:52:06 +0100, Daniel Stone wrote: >> --- a/common.c >> +++ b/common.c >> @@ -1,5 +1,6 @@ >> /* >> * Copyright (c) 2017 Rob Clark >> + * Copyright © 2013 Intel Corpor

[Mesa-dev] [PATCH] gbm/dri: Fix sign-extension in modifier query

2017-05-02 Thread Daniel Stone
6) - 1), i.e. DRM_FORMAT_MOD_INVALID. Signed-off-by: Daniel Stone Cc: Ben Widawsky --- src/gbm/backends/dri/gbm_dri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 71590d7110..8cca35e0e0 100644 --- a/src/gbm/

[Mesa-dev] [PATCH] i965: Set modifier for imported and duplicated images

2017-05-03 Thread Daniel Stone
more thought. Signed-off-by: Daniel Stone Cc: Ben Widawsky --- src/mesa/drivers/dri/i965/intel_screen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 23a4bd6d6c..a729dd98c9 100644 --- a/src/mesa/driver

Re: [Mesa-dev] [PATCH] gbm/dri: Fix sign-extension in modifier query

2017-05-03 Thread Daniel Stone
On 3 May 2017 at 15:15, Emil Velikov wrote: > On 2 May 2017 at 19:49, Daniel Stone wrote: >> - ret |= mod; >> + ret |= (uint64_t)(mod & 0x); >> > I was itching to suggest the following from the start, but your patch > also works ;-) > Fixes: 8378c57

Re: [Mesa-dev] [PATCH] i965: Set modifier for imported and duplicated images

2017-05-03 Thread Daniel Stone
Hey Emil, On 3 May 2017 at 15:32, Emil Velikov wrote: > On 3 May 2017 at 09:43, Daniel Stone wrote: >> @@ -805,6 +807,7 @@ intel_create_image_from_fds(__DRIscreen *dri_screen, >> if (image == NULL) >>return NULL; >> >> + image->modifier = DRM_F

[Mesa-dev] [PATCH v2 1/2] i965: Use helper function for modifier -> tiling

2017-05-04 Thread Daniel Stone
Use a helper function and struct to convert between a modifier and tiling mode, so we can use it later for a tiling -> modifier lookup. Signed-off-by: Daniel Stone Cc: Ben Widawsky --- src/mesa/drivers/dri/i965/intel_screen.c | 49 +--- 1 file changed, 32 inserti

[Mesa-dev] [PATCH v2 2/2] i965: Set modifier for imported and duplicated images

2017-05-04 Thread Daniel Stone
from a wl_buffer. This doubly tripped up Wayland, as the images would first have been created (as wl_buffers) with a 0 modifier, and then lost what modifier they would've had when being duplicated into gbm_bos. Fixes: d78a36ea624 ("i965/dri: Handle the linear fb modifier") Signed

[Mesa-dev] [PATCH 3/4] vulkan/wsi/wayland: Use per-display event queue

2017-05-04 Thread Daniel Stone
Calling random callbacks on the display's event queue is hostile, as we may call into client code when it least expects it. Create our own event queue, one per wsi_wl_display, and use that for the registry. Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_wayland.c

[Mesa-dev] [PATCH 2/4] vulkan/wsi/wayland: Remove roundtrip when creating image

2017-05-04 Thread Daniel Stone
queue, is destructive anyway, so would need to be its own queue. Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_wayland.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 9c246b8d5c..014ea13d65 100644 --- a/src/

[Mesa-dev] [PATCH 4/4] vulkan/wsi/wayland: Use proxy wrappers for swapchain

2017-05-04 Thread Daniel Stone
created for the swapchain to the event queue. Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_wayland.c | 52 + 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c

[Mesa-dev] [PATCH 1/4] vulkan: Fix Wayland uninitialised registry

2017-05-04 Thread Daniel Stone
Untangle the exit cleanup paths so we don't try to use the registry variable before it's been initialised. Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_wayland.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_waylan

Re: [Mesa-dev] [PATCH v2 1/2] i965: Use helper function for modifier -> tiling

2017-05-04 Thread Daniel Stone
Hi Emil, On 4 May 2017 at 13:27, Emil Velikov wrote: >> @@ -581,21 +600,17 @@ intel_create_image_common(__DRIscreen *dri_screen, >> assert(!(use && count)); >> >> uint64_t modifier = select_best_modifier(&screen->devinfo, modifiers, >> count); >> - switch (modifier) { >> - case I915_

Re: [Mesa-dev] [PATCH v2 1/2] i965: Use helper function for modifier -> tiling

2017-05-05 Thread Daniel Stone
Hi Emil, On 4 May 2017 at 15:14, Emil Velikov wrote: > On 4 May 2017 at 14:43, Daniel Stone wrote: >> IOW, there is no change as far as I can see, but perhaps for the >> meantime, we could use an unreachable() at the bottom of >> modifier_to_tiling(). Would that help?

Re: [Mesa-dev] [PATCH 4/4] vulkan/wsi/wayland: Use proxy wrappers for swapchain

2017-05-05 Thread Daniel Stone
Hi Emil, On 4 May 2017 at 13:21, Emil Velikov wrote: >> + struct wl_drm * drm_wrapper; >> > Based on a quick skim 3/4 aligns with commit > 36b9976e1f99e8070c67cb8a255793939db77d02. > At the same time we don't seem to have a drm_wrapper in egl/wayland - > is that int

[Mesa-dev] [PATCH v2 1/6] vulkan: Fix Wayland uninitialised registry

2017-05-05 Thread Daniel Stone
Untangle the exit cleanup paths so we don't try to use the registry variable before it's been initialised. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_common_wayland.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff -

[Mesa-dev] [PATCH v2 4/6] vulkan/wsi/wayland: Use proxy wrappers for swapchain

2017-05-05 Thread Daniel Stone
created for the swapchain to the event queue. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_common_wayland.c | 52 + 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b

[Mesa-dev] [PATCH v2 2/6] vulkan/wsi/wayland: Remove roundtrip when creating image

2017-05-05 Thread Daniel Stone
queue, is destructive anyway, so would need to be its own queue. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_common_wayland.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index

[Mesa-dev] [PATCH v2 3/6] vulkan/wsi/wayland: Use per-display event queue

2017-05-05 Thread Daniel Stone
Calling random callbacks on the display's event queue is hostile, as we may call into client code when it least expects it. Create our own event queue, one per wsi_wl_display, and use that for the registry. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulka

[Mesa-dev] [PATCH v2 6/6] egl/wayland: Use per-surface event queues

2017-05-05 Thread Daniel Stone
cated proxy wrapper, as the wl_shm_pool used to create the wl_buffers, being transient, can itself be assigned to a queue. Signed-off-by: Daniel Stone Fixes: 36b9976e1f99 ("egl/wayland: Avoid race conditions when on non-main thread") Cc: Jonas Ådahl Cc: mesa-sta...@lists.freedesktop.o

[Mesa-dev] [PATCH v2 5/6] egl/wayland: Don't open-code roundtrip

2017-05-05 Thread Daniel Stone
wl_display_roundtrip_queue() exists and can replace roundtrip(). Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.lrg --- src/egl/drivers/dri2/platform_wayland.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/egl/drivers/dri2

[Mesa-dev] [PATCH v2 0/6] Wayland proxy wrapper fixes

2017-05-05 Thread Daniel Stone
Hi, This series uses proxy wrappers and separate event queues through the Wayland WSI and EGL implementations. EGL already had a partial fix in that it had a per-display event queue, but this was not enough to protect multiple surfaces on a single display being used simultaneously. WSI had a per-sw

Re: [Mesa-dev] [AppVeyor] mesa master #4271 failed

2017-05-05 Thread Daniel Stone
Hi, On 5 May 2017 at 17:38, AppVeyor wrote: > Build mesa 4271 failed > > Commit 8b8af19065 by Daniel Stone on 5/3/2017 8:38 AM: > i965: Set modifier for imported and duplicated images [...] I was worried I'd broken the build, but I'm going to claim this isn't my fault

Re: [Mesa-dev] Sampling DRM_FORMAT_YUYV in GLSL

2017-05-09 Thread Daniel Stone
Hi Volker, On 9 May 2017 at 12:32, Volker Vogelhuber wrote: > On 09.05.2017 12:59, Philipp Zabel wrote: >> You create two separate EGLImages, calling eglCreateImage once for each >> plane. See for example: >> >> https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstgluplo

Re: [Mesa-dev] [PATCH v2 3/6] vulkan/wsi/wayland: Use per-display event queue

2017-05-15 Thread Daniel Stone
Hi Lionel, On 12 May 2017 at 10:52, Lionel Landwerlin wrote: > On 05/05/17 17:47, Daniel Stone wrote: >> @@ -535,7 +555,7 @@ wsi_wl_swapchain_acquire_next_image(struct >> wsi_swapchain *wsi_chain, >> { >> struct wsi_wl_swapchain *chain = (struct wsi_

[Mesa-dev] [PATCH] egl/wayland: Ensure we get a back buffer

2017-05-16 Thread Daniel Stone
ore the correct behaviour such that get_back_bo() no longer fails. Signed-off-by: Daniel Stone Reported-by: Eero Tamminen Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98833 Fixes: 9ca6711faa03 ("Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffer

[Mesa-dev] [PATCH v2 1/6] vulkan: Fix Wayland uninitialised registry

2017-05-16 Thread Daniel Stone
Untangle the exit cleanup paths so we don't try to use the registry variable before it's been initialised. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_common_wayland.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff -

[Mesa-dev] [PATCH v2 2/6] vulkan/wsi/wayland: Remove roundtrip when creating image

2017-05-16 Thread Daniel Stone
queue, is destructive anyway, so would need to be its own queue. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_common_wayland.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index

[Mesa-dev] [PATCH v2 3/6] vulkan/wsi/wayland: Use per-display event queue

2017-05-16 Thread Daniel Stone
Calling random callbacks on the display's event queue is hostile, as we may call into client code when it least expects it. Create our own event queue, one per wsi_wl_display, and use that for the registry. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulka

[Mesa-dev] [PATCH v2 5/6] egl/wayland: Don't open-code roundtrip

2017-05-16 Thread Daniel Stone
wl_display_roundtrip_queue() exists and can replace roundtrip(). The API was introduced with wayland 1.6, while we currently require 1.11. Signed-off-by: Daniel Stone Reviewed-by: Emil Velikov Cc: mesa-sta...@lists.freedesktop.org --- src/egl/drivers/dri2/platform_wayland.c | 26

[Mesa-dev] [PATCH v2 6/6] egl/wayland: Use per-surface event queues

2017-05-16 Thread Daniel Stone
cated proxy wrapper, as the wl_shm_pool used to create the wl_buffers, being transient, can itself be assigned to a queue. Signed-off-by: Daniel Stone Fixes: 36b9976e1f99 ("egl/wayland: Avoid race conditions when on non-main thread") Cc: Jonas Ådahl Cc: mesa-sta...@lists.freedesktop.o

[Mesa-dev] [PATCH v2 4/6] vulkan/wsi/wayland: Use proxy wrappers for swapchain

2017-05-16 Thread Daniel Stone
created for the swapchain to the event queue. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_common_wayland.c | 52 + 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b

Re: [Mesa-dev] [PATCH] egl/wayland: Ensure we get a back buffer

2017-05-16 Thread Daniel Stone
Hi Pekka, On 16 May 2017 at 11:32, Pekka Paalanen wrote: > On Tue, 16 May 2017 11:02:22 +0100 > Daniel Stone wrote: >> This removed a guarantee that we would've processed all events inside >> get_back_bo(), and introduced a failure whereby the server could've sent &g

Re: [Mesa-dev] [PATCH 2/2] i965/miptree: Use the tiling from the modifier instead of the BO

2017-12-05 Thread Daniel Stone
ough the modifier expressly said to treat it as Y-tiled. For some reason I thought Ken had already reviewed this and it landed, until Kristian mentioned last night. Oops. Series is: Reviewed-by: Daniel Stone Cheers, Daniel ___ mesa-dev mail

Re: [Mesa-dev] [RFC 02/22] intel/isl: Add ISL <-> DRM modifier conversion

2017-06-15 Thread Daniel Stone
Hi Jason, On 14 June 2017 at 17:59, Jason Ekstrand wrote: > On Wed, Jun 14, 2017 at 1:06 AM, Daniel Stone wrote: >> Ah, missed this reply. I'll leave that in your hands then and wait for >> your patches, as well as Chad's ones to update the new protocol in a >>

Re: [Mesa-dev] [PATCH v1 4/7] gbm: add XBGR8888 support for dumb buffers

2017-06-16 Thread Daniel Stone
FORMAT_XRGB || format == GBM_FORMAT_XBGR); Funny, I've just been exactly here myself, cursing at the weird and asymmetric hardcoded list of formats. Good times. Reviewed-by: Daniel Stone Cheers, Daniel ___ mesa-dev mailing list mesa-d

[Mesa-dev] [PATCH 10/11] egl/wayland: Remove duplicate wl_buffer creation code

2017-06-16 Thread Daniel Stone
Now create_wl_buffer is generic enough, we can use it for the EGL_WL_create_wayland_buffer_from_image extension. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 71 + 1 file changed, 11 insertions(+), 60 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 01/11] util: Remove u_math from u_vector

2017-06-16 Thread Daniel Stone
u_vector.h doesn't actually use anything from u_math, but it does mean everyone has to pull in src/gallium/auxiliary/util includes. Just remove it, adding a include to u_vector.c to cover memcpy. Signed-off-by: Daniel Stone --- src/util/u_vector.c | 2 ++ src/util/u_vector.h | 1 - 2

[Mesa-dev] [PATCH 00/11] EGL/Wayland modifiers, format cleanup

2017-06-16 Thread Daniel Stone
Hi, This series adds support for multi-planar buffers, as well as buffers with modifiers, in the Wayland EGL client platform. Rather than extending wl_drm, we use the generic zwp_linux_dambuf_v1 protocol, which is implemented in Weston. This makes it a bit easier to, amongst other things, write co

[Mesa-dev] [PATCH 11/11] egl/wayland: Use linux-dmabuf interface for buffers

2017-06-16 Thread Daniel Stone
When available, use the zwp_linux_dambuf_v1 interface to create buffers, which allows multiple planes and buffer modifiers to be used. Signed-off-by: Daniel Stone --- configure.ac| 5 +- src/egl/Makefile.am | 22 +++- src/egl/drivers/dri2

[Mesa-dev] [PATCH 04/11] gbm: Axe buffer import format conversion table

2017-06-16 Thread Daniel Stone
Wayland buffers coming from wl_drm use the WL_DRM_FORMAT_* enums, which are identical to GBM_FORMAT_*. Similarly, FD imports do not need to convert between GBM and DRI FourCC, since they are (almost) completely compatible. Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 62

[Mesa-dev] [PATCH 02/11] egl/wayland: Fix whitespace damage

2017-06-16 Thread Daniel Stone
Convert tabs to spaces, fix misalignments. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 38 + 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2

[Mesa-dev] [PATCH 08/11] egl/wayland: Make create_wl_buffer more generic

2017-06-16 Thread Daniel Stone
Remove surface-specific code from create_wl_buffer, so it's now just a generic translation from DRIimage to wl_buffer. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 66 + 1 file changed, 34 insertions(+), 32 deletions(-) diff --

[Mesa-dev] [PATCH 09/11] egl/wayland: Remove more surface specifics from create_wl_buffer

2017-06-16 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 7a85cb1073..b7197d0a75 100644

[Mesa-dev] [PATCH 03/11] egl/wayland: Use MIN2 for wl_drm version

2017-06-16 Thread Daniel Stone
Use a slightly more explicit version cap for binding wl_drm, so we can add other interfaces with different versioning schemes later. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/egl/drivers

[Mesa-dev] [PATCH 07/11] gbm: Remove is_planar_format dead code

2017-06-16 Thread Daniel Stone
This was only used in create_dumb() to blacklist planar formats. However, the start of the function already whitelists ARGB (cursor) and XRGB (scanout), and nothing else. So this entire function can be removed. Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 32

[Mesa-dev] [PATCH 06/11] gbm: Check harder for supported formats

2017-06-16 Thread Daniel Stone
Luckily no-one really used the is_format_supported() call, because it only supported three formats. Also, since buffers with alpha can be displayed on planes, stop banning them from use. Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 40

[Mesa-dev] [PATCH 05/11] gbm: Pull out FourCC <-> DRIimage format table

2017-06-16 Thread Daniel Stone
Rather than duplicated (yet asymmetric) open-coded tables, pull them out to a common structure. Signed-off-by: Daniel Stone --- src/gbm/Makefile.am| 1 + src/gbm/backends/dri/gbm_dri.c | 105 ++--- 2 files changed, 46 insertions(+), 60 deletions

Re: [Mesa-dev] [RFC 01/22] RFC: egl/x11: Support DRI3 v1.1

2017-06-20 Thread Daniel Stone
Hey Emil, A few bits from me, since this is actually lfrb's code ... On 20 June 2017 at 15:19, Emil Velikov wrote: > Top-level comments > > Build POV: > - Having the XCB_DRI3_.*_VERSION compile guards is Ok for now. But > let's drop those as get a xcb release. > We dont want to be in cases where

Re: [Mesa-dev] [PATCH 01/11] util: Remove u_math from u_vector

2017-06-22 Thread Daniel Stone
Hey Lucas, On 22 June 2017 at 16:03, Lucas Stach wrote: > Am Freitag, den 16.06.2017, 18:14 +0100 schrieb Daniel Stone: >> u_vector.h doesn't actually use anything from u_math, but it does mean >> everyone has to pull in src/gallium/auxiliary/util includes. >> &

Re: [Mesa-dev] [PATCH] st/dri2: implement image offset query

2017-06-23 Thread Daniel Stone
On 23 June 2017 at 16:36, Lucas Stach wrote: > This trivially adds support for the image offset query, which is needed > for the zwp_linux_dmabuf based EGL platform wayland implementation. > > Signed-off-by: Lucas Stach So, whilst the patch is mostly good, it will break VC4 in the meantime, as i

Re: [Mesa-dev] [PATCH] st/dri2: implement image offset query

2017-06-23 Thread Daniel Stone
On 23 June 2017 at 16:58, Lucas Stach wrote: > Am Freitag, den 23.06.2017, 16:54 +0100 schrieb Daniel Stone: >> On 23 June 2017 at 16:36, Lucas Stach wrote: >> > This trivially adds support for the image offset query, which is needed >> > for the zwp_linux_dmabuf

Re: [Mesa-dev] [PATCH 13/30] i965/miptree: Add an explicit format parameter to create_for_dri_image

2017-06-28 Thread Daniel Stone
Hi, On 28 June 2017 at 02:05, Jason Ekstrand wrote: > On Tue, Jun 27, 2017 at 12:49 PM, Chad Versace > wrote: >> In patch "i965: Use create_for_dri_image in intel_update_image_buffer", >> I see that you pass intel_rb_format(rb) down as the 'format' parameter. >> Is that the only place the overri

Re: [Mesa-dev] [PATCH 13/30] i965/miptree: Add an explicit format parameter to create_for_dri_image

2017-06-28 Thread Daniel Stone
Hi, On 28 June 2017 at 02:05, Jason Ekstrand wrote: > The long answer is that the DRI formats do not specify a colorspace. Also, strictly speaking, the DRI_IMAGE_FORMAT_* tokens don't specify a colourspace, nor do the DRM FourCC tokens. DRI_IMAGE_FOURCC_* is equivalent to the latter, bar the add

Re: [Mesa-dev] [PATCH 09/11] egl/wayland: Remove more surface specifics from create_wl_buffer

2017-06-28 Thread Daniel Stone
Hi, On 28 June 2017 at 12:00, Lucas Stach wrote: > Am Freitag, den 16.06.2017, 18:14 +0100 schrieb Daniel Stone: >> @@ -738,7 +735,6 @@ dri2_wl_swap_buffers_with_damage(_EGLDriver *drv, >> >> dri2_surf->back->age = 1; >> dri2_surf->current = dri2_surf-

Re: [Mesa-dev] [PATCH 3/3] i965/dri: Support R8G8B8A8 and R8G8B8X8 configs

2017-06-28 Thread Daniel Stone
Hi Chad, On 28 June 2017 at 00:49, Chad Versace wrote: > On Tue 27 Jun 2017, Kenneth Graunke wrote: >> On Tuesday, June 27, 2017 11:00:48 AM PDT Chad Versace wrote: >> > On Wayland, this also creates no new configs, and therfore breaks no >> > existing apps. (I tested with mesa-demos' eglinfo and

Re: [Mesa-dev] [PATCH 13/30] i965/miptree: Add an explicit format parameter to create_for_dri_image

2017-06-28 Thread Daniel Stone
Hi, On 28 June 2017 at 16:35, Jason Ekstrand wrote: > On Wed, Jun 28, 2017 at 4:06 AM, Daniel Stone wrote: >> On 28 June 2017 at 02:05, Jason Ekstrand wrote: >> > The long answer is that the DRI formats do not specify a colorspace. >> >> Also, strictly speaking,

Re: [Mesa-dev] [PATCH 5/5] vc4: Set shareable BOs as T tiled if possible

2017-06-29 Thread Daniel Stone
Hi, On 29 June 2017 at 02:15, Eric Anholt wrote: > X11 and GL compositor performance on VC4 has been terrible because of our > SHARED-usage buffers all being forced to linear. This swaps SHARED && > !LINEAR buffers over to being tiled. Series is: Reviewed-by: Daniel Stone

Re: [Mesa-dev] [PATCH 01/10] egl: move eglCreateDRMImageMESA's malloc later

2017-06-30 Thread Daniel Stone
Hi Emil, On 30 June 2017 at 12:15, Emil Velikov wrote: > Kristian can you shed some light? The extension seems quite sparse. > > Weston used the extension back in 2011. While the Glamor bit were > dropped somewhat recently in May 2017. > > Other than those I cannot find any users of the extension

Re: [Mesa-dev] [PATCH 11/11] egl/wayland: Use linux-dmabuf interface for buffers

2017-07-03 Thread Daniel Stone
Hey Emil, On 3 July 2017 at 13:36, Emil Velikov wrote: > Not familiar with the linux-dmabuf protocol - Dan, any ideas if we can > "get away" w/o using u_vector? What would you suggest instead of u_vector? When the client connects, for each format, it will receive a series of 'modifier' events,

Re: [Mesa-dev] [PATCH 04/11] gbm: Axe buffer import format conversion table

2017-07-03 Thread Daniel Stone
Hi Emil, On 3 July 2017 at 12:06, Emil Velikov wrote: > On 16 June 2017 at 18:14, Daniel Stone wrote: >> + /* GBM_FORMAT_* is identical to WL_DRM_FORMAT_*, so no conversion >> + * required. */ >> + gbm_format = wb->format; > AFACIT not all the WL_DRM_

Re: [Mesa-dev] [PATCH 13/30] i965/miptree: Add an explicit format parameter to create_for_dri_image

2017-07-07 Thread Daniel Stone
Hi, On 28 June 2017 at 19:09, Jason Ekstrand wrote: > On Wed, Jun 28, 2017 at 10:59 AM, Daniel Stone wrote: >> i965 tries pretty hard to allocate sRGB images in the pre-DRIImage, >> DRI2 (as in the X11 protocol named 'DRI2') codepath, but this isn't >> used

Re: [Mesa-dev] [PATCH 10/11] egl/wayland: Remove duplicate wl_buffer creation code

2017-07-07 Thread Daniel Stone
Hi, On 28 June 2017 at 16:35, Lucas Stach wrote: > Am Freitag, den 16.06.2017, 18:14 +0100 schrieb Daniel Stone: >> if (dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) { >> + struct wl_drm *wl_drm = >> + dri2_surf ? dri2_surf->wl_drm_wrapper :

Re: [Mesa-dev] [PATCH 11/11] egl/wayland: Use linux-dmabuf interface for buffers

2017-07-12 Thread Daniel Stone
Hey Emil, On 12 July 2017 at 16:10, Emil Velikov wrote: > There's one small bug that I've missed previously. Other than that the > patch looks great Thanks for taking a look! > On 16 June 2017 at 18:14, Daniel Stone wrote: >> + if (num_modifiers && dr

Re: [Mesa-dev] [PATCH] egl: remove unused err variable

2017-07-13 Thread Daniel Stone
On 13 July 2017 at 10:42, Alejandro Piñeiro wrote: > Seems a missed removal on this commit: > 81e95924ea1411edc5cc82b284e28c56bd236c4a Seems we've just hit the same thing. Please feel free to push with this added: Fixes: 81e95924ea1 ("egl: call _eglError within _eglParseImageAttribList") Cheers,

[Mesa-dev] [PATCH v2 09/11] egl/wayland: Remove more surface specifics from create_wl_buffer

2017-07-13 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) v2: Don't remove surf->back assignment. Oops. diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/driv

[Mesa-dev] [PATCH v2 08/11] egl/wayland: Make create_wl_buffer more generic

2017-07-13 Thread Daniel Stone
Remove surface-specific code from create_wl_buffer, so it's now just a generic translation from DRIimage to wl_buffer. Reviewed-by: Lucas Stach Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 66 + 1 file changed, 34 insertions(+

[Mesa-dev] [PATCH v2 07/11] gbm: Remove is_planar_format dead code

2017-07-13 Thread Daniel Stone
This was only used in create_dumb() to blacklist planar formats. However, the start of the function already whitelists ARGB (cursor) and XRGB (scanout), and nothing else. So this entire function can be removed. Reviewed-by: Lucas Stach Signed-off-by: Daniel Stone --- src/gbm/backends

[Mesa-dev] [PATCH v2 05/11] gbm: Pull out FourCC <-> DRIimage format table

2017-07-13 Thread Daniel Stone
Rather than duplicated (yet asymmetric) open-coded tables, pull them out to a common structure. Signed-off-by: Daniel Stone --- src/gbm/Makefile.am| 1 + src/gbm/backends/dri/gbm_dri.c | 113 +++-- 2 files changed, 54 insertions(+), 60 deletions

[Mesa-dev] [PATCH v2 02/11] egl/wayland: Fix whitespace damage

2017-07-13 Thread Daniel Stone
Convert tabs to spaces, fix misalignments. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 38 + 1 file changed, 20 insertions(+), 18 deletions(-) v2: No changes. diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers

[Mesa-dev] [PATCH v2 04/11] gbm: Axe buffer import format conversion table

2017-07-13 Thread Daniel Stone
wl_buffers; previously, only XRGB, ARGB, RGB565 and YUYV were supported. Signed-off-by: Daniel Stone --- src/egl/wayland/wayland-drm/wayland-drm.xml | 3 +- src/gbm/backends/dri/gbm_dri.c | 62 ++--- src/gbm/main/gbm.h | 6 +++ 3

[Mesa-dev] [PATCH v2 06/11] gbm: Check harder for supported formats

2017-07-13 Thread Daniel Stone
Luckily no-one really used the is_format_supported() call, because it only supported three formats. Also, since buffers with alpha can be displayed on planes, stop banning them from use. Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 39

[Mesa-dev] [PATCH v2 03/11] egl/wayland: Use MIN2 for wl_drm version

2017-07-13 Thread Daniel Stone
Use a slightly more explicit version cap for binding wl_drm, so we can add other interfaces with different versioning schemes later. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) v2: No changes. diff --git a

[Mesa-dev] [PATCH v2 01/11] util: Remove u_math from u_vector

2017-07-13 Thread Daniel Stone
u_vector.h doesn't actually use anything from u_math, but it does mean everyone has to pull in src/gallium/auxiliary/util includes. Just remove it, adding a include to u_vector.c to cover memcpy. Signed-off-by: Daniel Stone --- src/util/u_vector.c | 3 +++ src/util/u_vector.h | 1 - 2

[Mesa-dev] [PATCH v2 10/11] egl/wayland: Remove duplicate wl_buffer creation code

2017-07-13 Thread Daniel Stone
Now create_wl_buffer is generic enough, we can use it for the EGL_WL_create_wayland_buffer_from_image extension. Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 71 + 1 file changed, 11 insertions(+), 60 deletions(-) v2: No changes

[Mesa-dev] [PATCH v2 11/11] egl/wayland: Use linux-dmabuf interface for buffers

2017-07-13 Thread Daniel Stone
When available, use the zwp_linux_dambuf_v1 interface to create buffers, which allows multiple planes and buffer modifiers to be used. Signed-off-by: Daniel Stone --- configure.ac| 5 +- src/egl/Makefile.am | 23 +++- src/egl/drivers/dri2

Re: [Mesa-dev] [PATCH] egl/android: Provide an option for the backend to expose KHR_image

2017-12-08 Thread Daniel Stone
Hi Emil, On 7 December 2017 at 18:45, Emil Velikov wrote: > The KHR_image_pixmap extension lists the following as dependency: > > The EGL implementation must define an EGLNativePixmapType (although it > is not required either to export any EGLConfigs supporting rendering to > native p

Re: [Mesa-dev] Allocator Nouveau driver, Mesa EXT_external_objects, and DRM metadata import interfaces

2017-12-20 Thread Daniel Stone
Hi Miguel, On 20 December 2017 at 16:51, Miguel Angel Vico wrote: > In the meantime, I've been working on putting together an open source > implementation of the allocator mechanisms using the Nouveau driver for > all to be able to play with. Thanks for taking a look at this! I'm still winding o

<    1   2   3   4   5   6   7   8   9   >