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

2017-06-08 Thread Daniel Stone
es for upcoming extensions, because the extensions define yet more "create info" structs. Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_image.c | 72 ++-- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/intel/vulkan

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

2017-06-08 Thread Daniel Stone
of anv_image_create() + struct anv_image_create_info with anv_CreateImage() + VkExportImageDmaBufInfoMESAX No intended change in behavior. Signed-off-by: Daniel Stone --- src/intel/Makefile.vulkan.am | 3 --- src/intel/vulkan/anv_formats.c | 6 -- src/intel/vulkan/anv_image.c | 5

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

2017-06-08 Thread Daniel Stone
al dma_buf extension, VK_MESAX_external_image_dma_buf, that can replace this function. Signed-off-by: Daniel Stone --- include/vulkan/vulkan_intel.h | 62 -- src/intel/Makefile.sources | 1 - src/intel/vulkan/Makefile.am| 210 src/intel/vul

[Mesa-dev] [RFC 15/22] RFC: anv: Implement VK_MESAX_external_memory_dma_buf

2017-06-08 Thread Daniel Stone
From: Chad Versace For now, we support dma_bufs only for VkBuffers. The VK_MESAX_external_memory_dma_buf spec allows us to support dma_buf VkImages, but we choose to defer that support until VK_MESAX_external_image_dma_buf. Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_device.c

[Mesa-dev] [RFC 20/22] RFC: anv: Drop unneeded struct anv_image_create_info

2017-06-08 Thread Daniel Stone
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. Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_image.c | 38 +++--- src/intel/vulkan

[Mesa-dev] [RFC 14/22] RFC: anv: Implement VK_EXT_get_image_properties

2017-06-08 Thread Daniel Stone
From: Chad Versace Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_entrypoints_gen.py | 1 + src/intel/vulkan/anv_image.c| 13 + 2 files changed, 14 insertions(+) diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py

[Mesa-dev] [RFC 10/22] anv/image: Refactor creation of aux surfaces

2017-06-08 Thread Daniel Stone
clarity, also rename make_surface() to make_main_surface(). Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_image.c | 178 ++- 1 file changed, 110 insertions(+), 68 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_imag

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

2017-06-08 Thread Daniel Stone
driver which is not modifier-aware. Currently none of the AMD tiling modes have modifier tokens defined, and forcing to linear would be an unacceptable performance penalty. For now, just stick our head in the sand. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 9

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

2017-06-08 Thread Daniel Stone
From: Chad Versace Signed-off-by: Daniel Stone --- 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

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

2017-06-08 Thread Daniel Stone
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. Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_image.c | 15 ++- 1 file

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

2017-06-08 Thread Daniel Stone
]: https://github.com/chadversary/vulkan-spec/commits/wip/1.0-VK_MESAX_external Signed-off-by: Daniel Stone --- include/vulkan/vulkan.h| 104 src/vulkan/registry/vk.xml | 117 - 2 files changed, 209 insertions

[Mesa-dev] [RFC 12/22] anv: Set anv_surface::offset earlier

2017-06-08 Thread Daniel Stone
From: Chad Versace Set anv_surface::offset *before* calling add_surface(). No intended change in behavior. This patch prepares for supporting user-provided surface offsets, a feature required for VK_MESAX_external_image_dma_buf. Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_image.c

[Mesa-dev] [RFC 06/22] anv: Annotate anv_get_*format() as pure

2017-06-08 Thread Daniel Stone
From: Chad Versace Signed-off-by: Daniel Stone --- 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 c4a897d061..f121b55d91 100644 --- a/src/intel/vulkan/anv_private.h

Re: [Mesa-dev] [PATCH 1/2] gbm: add API to to import FD with modifier

2017-06-12 Thread Daniel Stone
I would prefer to reuse that directly but the API is slightly worse (missing num_fds). So, this series is: 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] [RFC 00/22] DRI3 v1.1, ANV dmabuf

2017-06-14 Thread Daniel Stone
Hi, On 14 June 2017 at 07:45, Chad Versace wrote: > On Thu 08 Jun 2017, Jason Ekstrand wrote: >> I'm just getting started looking at these. The first thing to say is that >> I'm pretty sure I made a bunch of comments the first time they were sent >> out and I don't see anything different. It's

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

2017-06-14 Thread Daniel Stone
Hi, On 14 June 2017 at 07:46, Jason Ekstrand wrote: > On June 13, 2017 23:19:28 Chad Versace wrote: >> This function looks good to me. >> >> Alternatively, we could define two orthogonal functions: >> >> bool >> isl_tiling_from_drm_format_mod(uint64_t mod, enum isl_tiling *tiling); >> >>

Re: [Mesa-dev] [PATCH 3/4] meson: build libEGL

2017-10-19 Thread Daniel Stone
wayland_egl = shared_library( > + 'wayland-egl', > + 'wayland-egl.c', > + c_args : [c_vis_args], > + link_args : ld_args_gc_sections, > + version : '1.0.0', > + install : true, > ) As a drive-by musing, is there a reason c_vis_args isn'

Re: [Mesa-dev] [PATCH 3/4] meson: build libEGL

2017-10-20 Thread Daniel Stone
Hi Dylan, On 19 October 2017 at 19:14, Dylan Baker wrote: > Quoting Daniel Stone (2017-10-19 07:34:28) >> Could you please move these into src/egl/wayland/wayland-drm? They're >> not actually wl_drm of course, but I have patches out to use >> linux-dmabuf inside Vulkan

Re: [Mesa-dev] [PATCH 3/3] Move src/eg/wayland/wayland-drm into src/wsi

2017-10-23 Thread Daniel Stone
Hi Dylan, I'm not 100% sure how autotools deals with cross-directory dependencies for generated files, but assuming this works, the series is: Reviewed-by: Daniel Stone Thanks for doing this! Cheers, Daniel ___ mesa-dev mailing list mes

Re: [Mesa-dev] [PATCH 7/9] wayland-drm: static inline wayland_drm_buffer_get

2017-10-23 Thread Daniel Stone
Hi Emil, On 28 September 2017 at 13:36, Emil Velikov wrote: > On 20 September 2017 at 15:06, Daniel Stone wrote: >> On 19 September 2017 at 11:25, Emil Velikov wrote: >>> It looks a bit icky and my Wayland knowledge is limited to actually review >>> it. >>>

Re: [Mesa-dev] [PATCH 7/9] wayland-drm: static inline wayland_drm_buffer_get

2017-10-24 Thread Daniel Stone
Hi, On 24 October 2017 at 07:01, Pekka Paalanen wrote: > On Mon, 23 Oct 2017 16:41:14 +0100 > Daniel Stone wrote: >> When a compositor wants to import a buffer into GBM, it calls >> gbm_bo_import(), which will call wl_drm_buffer_get(). >> wl_drm_buffer_get will t

Re: [Mesa-dev] [PATCH 7/9] wayland-drm: static inline wayland_drm_buffer_get

2017-10-24 Thread Daniel Stone
Hi Emil, On 7 September 2017 at 19:05, Emil Velikov wrote: > diff --git a/src/egl/wayland/wayland-drm/wayland-drm.h > b/src/egl/wayland/wayland-drm/wayland-drm.h > index 77e8d273042..8dc7f6089ae 100644 > --- a/src/egl/wayland/wayland-drm/wayland-drm.h > +++ b/src/egl/wayland/wayland-drm/wayland-

Re: [Mesa-dev] [PATCH] wayland-egl: forward declare wl_egl_window* functions

2017-10-26 Thread Daniel Stone
On 3 October 2017 at 14:34, Tobias Klausmann wrote: > Starting with commit ab0589c6ed ("wayland-egl: remove no longer needed > wayland-client dependency") the wayland-egl.h include was missing leading to a > build failure: > > CC wayland-egl.lo > wayland-egl.c:33:10: fatal error: wayland-e

[Mesa-dev] [PATCH] meson: wayland-egl depends on wayland-client

2017-10-26 Thread Daniel Stone
Since wayland-egl.h is currently provided by the core Wayland package, depend on wayland-client to make sure we get it in our include path. Signed-off-by: Daniel Stone Fixes: 108d257a16 ("meson: build libEGL") Cc: Tobias Klausmann Cc: Dylan Baker Cc: Emil Velikov Cc: Gert Wollny --

Re: [Mesa-dev] [PATCH] meson: wayland-egl depends on wayland-client

2017-10-26 Thread Daniel Stone
Hi Emil, On 26 October 2017 at 13:17, Emil Velikov wrote: > On 26 October 2017 at 12:00, Daniel Stone wrote: >> Since wayland-egl.h is currently provided by the core Wayland package, >> depend on wayland-client to make sure we get it in our include path. > > Thanks Dan. P

Re: [Mesa-dev] [PATCH] meson: wayland-egl depends on wayland-client

2017-10-26 Thread Daniel Stone
Hi Eric, On 26 October 2017 at 14:10, Eric Engestrom wrote: > On Thursday, 2017-10-26 12:00:14 +0100, Daniel Stone wrote: >>'wayland-egl.c', >>c_args : [c_vis_args], >>link_args : ld_args_gc_sections, >> + dependencies : dep_wayland_client, >

Re: [Mesa-dev] [PATCH mesa] wayland-egl: fix wayland cflags

2017-10-26 Thread Daniel Stone
On 26 October 2017 at 17:25, Eric Engestrom wrote: > Fixes: 80bfff5c4f1d4d8c842a0 "wayland-egl: adds CFLAGS for wayland.egl.h > include" > Suggested-by: Daniel Stone Acked-by: Daniel Stone ___ mesa-dev mailing list mesa-dev@li

Re: [Mesa-dev] create src/wsi

2017-11-03 Thread Daniel Stone
Hi, On 1 November 2017 at 17:33, Emil Velikov wrote: > On 31 October 2017 at 21:07, Dylan Baker wrote: >> My intention is to pull some of the generated files that are shared >> between vulkan/wsi/wayland and egl/wayland/wayland-drm. Daniel has said that >> he >> has more generated files that wi

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

2017-07-13 Thread Daniel Stone
Hi, On 13 July 2017 at 16:59, Jason Ekstrand wrote: > On July 13, 2017 4:13:17 AM Daniel Stone wrote: >> + /* The two GBM_BO_FORMAT_[XA]RGB formats alias the GBM_FORMAT_* >> +* formats of the same name. We want to accept them whenever someone >> +* has a

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

2017-07-13 Thread Daniel Stone
Hi, Apologies if the mobile client mangles formatting. I've heard this new version is better, so let's see if it's really true. On Thu, 13 Jul 2017 at 5:20 pm, Jason Ekstrand wrote: > On July 13, 2017 4:13:53 AM Daniel Stone wrote: > > @@ -650,21 +650,23 @@

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

2017-07-14 Thread Daniel Stone
Hi, On 13 July 2017 at 17:39, Jason Ekstrand wrote: > On July 13, 2017 4:13:04 AM Daniel Stone wrote: >> @@ -643,17 +695,68 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy, >> + if (dri2_dpy->wl_dmabuf && dri2_dpy->image->base.version >= 15) { >>

[Mesa-dev] [PATCH v3 4/8] gbm: Remove is_planar_format dead code

2017-07-14 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 Reviewed-by: Emil Velikov Signed-off-by: Daniel

[Mesa-dev] [PATCH v3 1/8] gbm: Axe buffer import format conversion table

2017-07-14 Thread Daniel Stone
wl_buffers; previously, only XRGB, ARGB, RGB565 and YUYV were supported. Reviewed-by: Emil Velikov 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

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

2017-07-14 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. Reviewed-by: Emil Velikov Signed-off-by: Daniel Stone --- configure.ac| 5 +- src/egl/Makefile.am | 23

[Mesa-dev] [PATCH v3 7/8] egl/wayland: Remove duplicate wl_buffer creation code

2017-07-14 Thread Daniel Stone
Now create_wl_buffer is generic enough, we can use it for the EGL_WL_create_wayland_buffer_from_image extension. Reviewed-by: Emil Velikov Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 54 - 1 file changed, 12 insertions(+), 42

[Mesa-dev] [PATCH v3 3/8] gbm: Check harder for supported formats

2017-07-14 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. Reviewed-by: Emil Velikov Signed-off-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 41

[Mesa-dev] [PATCH v3 2/8] gbm: Pull out FourCC <-> DRIimage format table

2017-07-14 Thread Daniel Stone
Rather than duplicated (yet asymmetric) open-coded tables, pull them out to a common structure. Reviewed-by: Emil Velikov Signed-off-by: Daniel Stone --- src/gbm/Makefile.am| 1 + src/gbm/backends/dri/gbm_dri.c | 154 ++--- 2 files changed, 70

[Mesa-dev] [PATCH v3 5/8] egl/wayland: Make create_wl_buffer more generic

2017-07-14 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 Reviewed-by: Emil Velikov Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 66 + 1

[Mesa-dev] [PATCH v3 6/8] egl/wayland: Remove more surface specifics from create_wl_buffer

2017-07-14 Thread Daniel Stone
Reviewed-by: Emil Velikov Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/platform_wayland.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) v3: Reorder a couple of lines. diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2

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

2017-07-14 Thread Daniel Stone
Hi, On 14 July 2017 at 12:01, Emil Velikov wrote: > On 13 July 2017 at 17:07, Jason Ekstrand wrote: >> What happened to the ARGB formats? >> > I think you meant the "BO_FORMAT" formats. And yes, those seems to > have disappeared and we'd want them back. Indeed I guess so. I ultimately added a h

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

2017-07-14 Thread Daniel Stone
Hi Eric, On 13 July 2017 at 17:20, Eric Engestrom wrote: >> *out_count = j; >> if (j == 0) >> -return NULL; >> + return NULL; > > This line is getting way too much indentation :P > > I don't know enough about formats, so I'm only r-b'ing the first > 3 patches: > Reviewed

Re: [Mesa-dev] [PATCH 1/2] i965: Rework the modifier info map

2017-07-17 Thread Daniel Stone
RMAT_MOD_Y_TILED , 6 }, > }; Losing named initialisation makes me very sad. Is there any buildsys/compiler reason to do this? The rest LGTM, so with or without ISL: 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 2/2] i965: Check if the modifier is supported in select_best_modifier

2017-07-17 Thread Daniel Stone
On 17 July 2017 at 01:48, Jason Ekstrand wrote: > Otherwise, if a client gave us a list of modifiers that contained a > modifier we understand but which is not supported on the hardware, we > might return that one and then fail to create the image. Reviewed-by: Dan

[Mesa-dev] [PATCH 1/2] eglut_wayland: Drive event loop by frame events

2017-07-17 Thread Daniel Stone
quested whilst we do not have a pending frame event, redraw instantly Reported-by: Daniel van Vugt Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101814 Signed-off-by: Daniel Stone --- src/egl/eglut/eglut_wayland.c | 83 +-- 1 file changed,

[Mesa-dev] [PATCH 2/2] egl: Build some OpenGL demos for Wayland

2017-07-17 Thread Daniel Stone
Signed-off-by: Daniel Stone --- src/egl/opengl/.gitignore| 4 src/egl/opengl/Makefile.am | 18 +- src/egl/opengles2/.gitignore | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/egl/opengl/.gitignore b/src/egl/opengl/.gitignore index 930504c0

Re: [Mesa-dev] [PATCH 1/2] eglut_wayland: Drive event loop by frame events

2017-07-17 Thread Daniel Stone
Hi, Sorry, I have no idea why --subject-prefix didn't actually work. These two patches are for the demos repo. Cheers, Daniel On 17 July 2017 at 12:00, Daniel Stone wrote: > The eglut_wayland event loop attempted to use frame events to drive the > redraw loop. However, the frame

Re: [Mesa-dev] [PATCH] gbm: avoid null pointer dereference

2017-07-17 Thread Daniel Stone
Hi, On 17 July 2017 at 15:02, Gwan-gyeong Mun wrote: > gbm_dri_surface_create() might create gbm_surface without modifiers. > therefore, gbm_dri_surface_destroy() needs to check modifiers is null or not > prior to free it. This is not true. The code here does not perform a dereference of surf->b

Re: [Mesa-dev] [PATCH 1/2] i965: Rework the modifier info map

2017-07-17 Thread Daniel Stone
Hi, On 17 July 2017 at 15:39, Jason Ekstrand wrote: > On Mon, Jul 17, 2017 at 2:24 AM, Daniel Stone wrote: >> On 17 July 2017 at 01:48, Jason Ekstrand wrote: >> > This commit splits the mapping in half. The modifier_infos table now >> > only contains the modifier an

Re: [Mesa-dev] [PATCH 03/22] i965/miptree: Switch to isl_surf::tiling

2017-07-18 Thread Daniel Stone
Hi, On 18 July 2017 at 21:30, Kenneth Graunke wrote: > On Tuesday, July 18, 2017 1:46:13 AM PDT Topi Pohjolainen wrote: > [snip] >> diff --git a/src/mesa/drivers/dri/i965/intel_blit.h >> b/src/mesa/drivers/dri/i965/intel_blit.h >> index 5e4d1f5eb4..90514dc893 100644 >> --- a/src/mesa/drivers/dri

[Mesa-dev] [PATCH] egl: Add MKDIR_GEN definition

2017-07-19 Thread Daniel Stone
7;t actually have it. As unset variables expand to NULL, it was silently being skipped. Copy & paste the defintion to make sure drivers/dri2/ exists before we try to generate files into it. Signed-off-by: Daniel Stone Reported-by: Nick Sarnie Reported-by: Mike Lothian Fixes: 02cc35937277

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

2017-07-19 Thread Daniel Stone
Hi Mike, On 18 July 2017 at 23:49, Mike Lothian wrote: > I'm currently getting a build failure with this patch in an out of tree > build > > Making all in egl > /usr/bin/wayland-scanner code < > /usr/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml >> drivers/dri2/linux-

Re: [Mesa-dev] [PATCH v2 01/10] renderonly/etnaviv: stop importing resource from renderonly

2017-07-19 Thread Daniel Stone
sing 'if (out_handle) *out_handle = handle'? Aside from that, it looks fine to me, but my knowledge of renderonly (and Gallium winsys bits in general) is weak enough that I can only really offer: Acked-by: Daniel Stone Cheers, Daniel ___ mesa-dev

Re: [Mesa-dev] [PATCH v2 09/10] etnaviv: implement resource creation with modifier

2017-07-19 Thread Daniel Stone
>> >> - trans->rsc = etna_resource_alloc(pctx->screen, ETNA_LAYOUT_LINEAR, >> &templ); >> + trans->rsc = etna_resource_alloc(pctx->screen, ETNA_LAYOUT_LINEAR, 0, >> &templ); >>if (!trans->rsc) { >> sla

Re: [Mesa-dev] [PATCH v2 1/2] egl/drm: Fix misused x and y offsets on swrast_put_image2() (v2)

2017-07-19 Thread Daniel Stone
Hi, On 19 July 2017 at 11:25, Gwan-gyeong Mun wrote: > [...] > And it adds limits of the height and the width on the copy region. > > [...] > @@ -534,14 +560,32 @@ swrast_put_image2(__DRIdrawable *driDrawable, > + if (height > dri2_surf->base.Height - y) > + height = dri2_surf->base.Height

Re: [Mesa-dev] [PATCH] egl: Add MKDIR_GEN definition

2017-07-19 Thread Daniel Stone
Hi, On 19 July 2017 at 13:00, Emil Velikov wrote: > This is way off. One can AC_SUBST() it in configure.ac - simply nobody > bothered. > Can you please reword or drop this hunk? I didn't realise this; I just saw that it was separately defined in nine separate Makefiles, so assumed that was the

Re: [Mesa-dev] [PATCH v2 1/2] egl/drm: Fix misused x and y offsets on swrast_put_image2() (v2)

2017-07-19 Thread Daniel Stone
Hi Eric, On 19 July 2017 at 14:41, Eric Engestrom wrote: > On Wednesday, 2017-07-19 12:00:20 +0100, Daniel Stone wrote: >> We can also check (x+width) against >> bo->base.width, and (y+height) against bo->base.height, rather than >> using bytes as a unit. But it would

Re: [Mesa-dev] [PATCH mesa 3/4] egl/drm: Fix misused x and y offsets in swrast_get_image()

2017-07-19 Thread Daniel Stone
Hi Eric, On 19 July 2017 at 15:05, Eric Engestrom wrote: > + dst += stride; > + src += internal_stride; Aren't these two lines the wrong way around? Cheers, Daniel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freede

Re: [Mesa-dev] [PATCH mesa 3/4] egl/drm: Fix misused x and y offsets in swrast_get_image()

2017-07-19 Thread Daniel Stone
On 19 July 2017 at 15:07, Daniel Stone wrote: > On 19 July 2017 at 15:05, Eric Engestrom wrote: >> + dst += stride; >> + src += internal_stride; > > Aren't these two lines the wrong way around? No, they aren't. Please ignore me. _

Re: [Mesa-dev] [2.2/22] intel/isl: Add i915 to isl_tiling converter

2017-07-19 Thread Daniel Stone
On 19 July 2017 at 21:24, Jason Ekstrand wrote: > I don't really like the lack of isl_ prefix. We could call it > isl_tiling_from_i915_tiling(). I don't care all that much though. That works for me, but equally I don't really mind, so either way: Reviewed-by: Daniel S

Re: [Mesa-dev] [PATCH 2/2] egl: add linux-dmabuf-unstable-v1-protocol.c to "nodist"

2017-07-20 Thread Daniel Stone
/home/local/mesa/src/egl' >> make[3]: Leaving directory '/home/local/mesa/src/egl' >> make[2]: *** [distdir] Error 1 >> make[1]: *** [distdir] Error 1 >> make: *** [dist] Error 2 Reviewed-by: Daniel Stone Mark - could you please insert a 'distcheck' run

Re: [Mesa-dev] [PATCH 2/2] egl: add linux-dmabuf-unstable-v1-protocol.c to "nodist"

2017-07-20 Thread Daniel Stone
Hi Emil, On 20 July 2017 at 13:51, Emil Velikov wrote: > On 19 July 2017 at 23:44, Andres Gomez wrote: >> -dri2_backend_FILES += drivers/dri2/platform_wayland.c \ >> - drivers/dri2/linux-dmabuf-unstable-v1-protocol.c >> +dri2_backend_FILES += drivers/dri2/platform_wayland.c >> +nodist_dri

Re: [Mesa-dev] [PATCH] configure.ac: rework wayland-protocols handling

2017-07-21 Thread Daniel Stone
Hi Emil, On 21 July 2017 at 13:02, Emil Velikov wrote: > At dist/distcheck time we need to ensure that all the files and their > respective dependencies are handled. > > At the moment we'll bail out as the linux-dmabuf rules are guarded in a > conditional. Move them outside of it and drop the sou

Re: [Mesa-dev] [PATCH] configure.ac: rework wayland-protocols handling

2017-07-21 Thread Daniel Stone
Hi Emil, On 21 July 2017 at 14:13, Emil Velikov wrote: > On 21 July 2017 at 13:28, Daniel Stone wrote: >> Why do we need to dist these files? We enforce that wayland (providing >> wayland-scanner) and wayland-protocols (providing the XML) are present >> at configure time

[Mesa-dev] [PATCH 3/3] dri3: Move up fourcc utility function

2017-07-21 Thread Daniel Stone
From: Louis-Francis Ratté-Boulianne It will be needed in next patches. Signed-off-by: Louis-Francis Ratté-Boulianne --- src/loader/loader_dri3_helper.c | 42 - 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/loader/loader_dri3_helper.

[Mesa-dev] [PATCH 1/3] egl/wayland: Ignore invalid modifiers

2017-07-21 Thread Daniel Stone
If the underlying driver does not support modifiers, dmabuf will still advertise formats through the 'modifier' event, but send them with an invalid modifier. Ignore them if this is the case, rather than passing them through to the driver. Signed-off-by: Daniel Stone Fixes: 02cc3593

[Mesa-dev] [PATCH 2/3] st/dri2: Return invalid modifier when no driver support

2017-07-21 Thread Daniel Stone
Always initialise whandle.modifier for DRIImage modifier queries, so if the driver doesn't support it then we return DRM_FORMAT_MOD_INVALID. Signed-off-by: Daniel Stone Cc: Varad Gautam Fixes: d33fe8b84e45 ("st/dri: enable DRIimage modifier queries") --- src/gallium/state_trac

Re: [Mesa-dev] [PATCH mesa 0/5] egl/wayland: Make wl_egl_window a versioned struct

2017-07-21 Thread Daniel Stone
Hi Miguel, On 18 July 2017 at 21:49, Miguel A. Vico wrote: > Although we've always made backwards compatible changes to wl_egl_window, we > are lacking of a versioning mechanism for EGL drivers that take a native > wl_egl_window to check what set of features are exposed/available by the given > s

[Mesa-dev] [PATCH 00/14] Modifiers for EGL X11, Vulkan X11/Wayland

2017-07-21 Thread Daniel Stone
Hi, This supersedes Louis-Francis's DRI3 v1.1 patchset for Mesa. I've rebased this on top of current master, with only very minor fixes inside the EGL/X11 bits. The Vulkan bits are completely reimplemented, to avoid VK_EXT_external_*, as that isn't finished. I've tested this on Skylake, Apollo La

[Mesa-dev] [PATCH 11/14] vulkan/wsi: Rename needs_linear_copy to different_gpu

2017-07-21 Thread 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 | 4 ++-- src/vulka

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

2017-07-21 Thread Daniel Stone
From: 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-Fra

[Mesa-dev] [PATCH 13/14] RFC: vulkan/wsi/x11: Add support for DRI3 v1.1

2017-07-21 Thread Daniel Stone
Adds support for multiple planes and buffer modifiers. Signed-off-by: Daniel Stone --- src/vulkan/wsi/wsi_common_x11.c | 158 +++- 1 file changed, 141 insertions(+), 17 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11

[Mesa-dev] [PATCH 02/14] vulkan/wsi: Add wsi_image_base structure

2017-07-21 Thread 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 | 25 +++--- src/intel/vulkan/anv_wsi.c | 25 +++--- src/vulkan/wsi/wsi_common.h

[Mesa-dev] [PATCH 04/14] vulkan/wsi: Add multiple planes to wsi_image_base

2017-07-21 Thread Daniel Stone
Not currently used. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 11 ++- src/intel/vulkan/anv_wsi.c | 9 + src/vulkan/wsi/wsi_common.h | 9 + src/vulkan/wsi/wsi_common_wayland.c | 11 +++ src/vulkan/wsi/wsi_common_x11.c

[Mesa-dev] [PATCH 12/14] vulkan/wsi: Add modifiers to wsi_image_create

2017-07-21 Thread 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 | 28 src/intel/vulkan/anv_wsi.c | 31 ++- src/vulkan/wsi

[Mesa-dev] [PATCH 06/14] vulkan/wsi: Move linear alloc into radv

2017-07-21 Thread 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 | 18 +- src/vulkan/wsi/wsi_common.h | 4 ++- src/vulkan/wsi/wsi_common_wayland.c

[Mesa-dev] [PATCH 08/14] anv/wsi: Small code motion to prepare for modifiers

2017-07-21 Thread 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 8a40627a15..5023f3445b 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/intel/vulkan

[Mesa-dev] [PATCH 07/14] radv/wsi: Use image_free for alloc cleanup

2017-07-21 Thread 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/amd/vulkan/radv_wsi.c

[Mesa-dev] [PATCH 05/14] radv/wsi: Move image allocation into helper function

2017-07-21 Thread 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_wsi.c | 83

[Mesa-dev] [PATCH 10/14] vulkan/wsi: Add drm_modifier member to wsi_image

2017-07-21 Thread Daniel Stone
Not yet used anywhere. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 6 ++ src/intel/vulkan/anv_wsi.c | 9 + src/vulkan/wsi/wsi_common.h | 1 + 3 files changed, 16 insertions(+) diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c index be6f341ef8

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

2017-07-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/wsi_common_wayland.c | 139 3 files changed

[Mesa-dev] [PATCH 09/14] intel/isl: Add ISL tiling -> modifier conversion

2017-07-21 Thread 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/isl/isl.h index

[Mesa-dev] [PATCH 03/14] vulkan/wsi: Rename needs_linear_copy to should_export

2017-07-21 Thread 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 | 19 --- src/vulkan/wsi

Re: [Mesa-dev] [PATCH] configure.ac: rework wayland-protocols handling

2017-07-21 Thread Daniel Stone
Hi, On 21 July 2017 at 15:00, Emil Velikov wrote: > On 21 July 2017 at 14:19, Daniel Stone wrote: >> I don't mind relaxing it, but OTOH wayland-scanner is already there >> when you install libwayland, and wayland-protocols is just a pile of >> XML. So it doesn't r

Re: [Mesa-dev] [PATCH 2/3] st/dri2: Return invalid modifier when no driver support

2017-07-22 Thread Daniel Stone
Hi Emil, On 21 July 2017 at 15:23, Emil Velikov wrote: > I think the key issue is that the resource_get_handle() calls lack > proper error handling. > > There's a single case, that was fixed not too long ago, yet everywhere > else we consider that resource_get_handle() can fail. > Can we address

Re: [Mesa-dev] [PATCH dri3proto v2] Add modifier/multi-plane requests, bump to v1.1

2017-07-22 Thread Daniel Stone
Hi Michel, On 21 July 2017 at 18:32, Michel Dänzer wrote: > On 20/07/17 01:08 PM, Daniel Stone wrote: >> DRI3 version 1.1 adds support for explicit format modifiers, including >> multi-planar buffers. > > Adding mesa-dev, Nicolai and Marek. > > We just ran into an

Re: [Mesa-dev] [PATCH 1/2] eglut_wayland: Drive event loop by frame events

2017-07-24 Thread Daniel Stone
Hi, On 17 July 2017 at 12:01, Daniel Stone wrote: > Sorry, I have no idea why --subject-prefix didn't actually work. These > two patches are for the demos repo. I'm minded to push these two in the next day or two, unless anyone objects.

Re: [Mesa-dev] [PATCH 1/3] egl/wayland: Ignore invalid modifiers

2017-07-24 Thread Daniel Stone
Hi Emil, On 24 July 2017 at 12:18, Emil Velikov wrote: > On 21 July 2017 at 14:34, Daniel Stone wrote: >> @@ -370,6 +370,9 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) >>return -1; >> } >> >> + if (num_modifiers == 0) >> + modif

Re: [Mesa-dev] [PATCH 2/3] st/dri2: Return invalid modifier when no driver support

2017-07-24 Thread Daniel Stone
Hi, On 24 July 2017 at 12:30, Emil Velikov wrote: > On 22 July 2017 at 09:00, Daniel Stone wrote: >> We can address that as well, but not instead. Drivers which aren't >> aware of modifiers will return success (as they know how to export >> KMS-type handles), but n

Re: [Mesa-dev] [PATCH 1/3] egl/wayland: Ignore invalid modifiers

2017-07-24 Thread Daniel Stone
On 24 July 2017 at 12:46, Emil Velikov wrote: > On 24 July 2017 at 12:22, Daniel Stone wrote: >> It's divergent inside Gallium, where resource_create_with_modifiers >> will be called rather than resource_create if modifiers != NULL. >> > Excuse my ignorance, I m

Re: [Mesa-dev] [PATCH 2/3] st/dri2: Return invalid modifier when no driver support

2017-07-24 Thread Daniel Stone
On 24 July 2017 at 13:09, Emil Velikov wrote: > On 24 July 2017 at 12:44, Daniel Stone wrote: >>> AFAICT that will make the check in 1/3 unreachable, yet still nice to have. >> >> I don't really see how? 1/3 is for when we have zwp_linux_dmabuf_v1 >> suppor

Re: [Mesa-dev] 10bit output via KMS

2017-07-24 Thread Daniel Stone
Hi Volker, On 24 July 2017 at 14:56, Volker Vogelhuber wrote: > thanks for the feedback. The patch was not meant to be submitted > officially. I'm aware that extending official > EGL extensions is not allowed. It was just for showing what I have > changed to get 10bit FBOs exported from Mesa, oth

[Mesa-dev] [PATCH v2 1/2] st/dri: Check get-handle return value in queryImage

2017-07-24 Thread Daniel Stone
In the DRIImage queryImage hook, check if resource_get_handle() failed and return FALSE if so. Signed-off-by: Daniel Stone --- src/gallium/state_trackers/dri/dri2.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/gallium/state_trackers/dri

[Mesa-dev] [PATCH v2 2/2] st/dri2: Return invalid modifier when no driver support

2017-07-24 Thread Daniel Stone
Always initialise whandle.modifier for DRIImage modifier queries, so if the driver doesn't support it then we return false for the query. Signed-off-by: Daniel Stone Cc: Varad Gautam Fixes: d33fe8b84e45 ("st/dri: enable DRIimage modifier queries") --- src/gallium/state_trackers

Re: [Mesa-dev] [PATCH v2 2/2] st/dri2: Return invalid modifier when no driver support

2017-07-25 Thread Daniel Stone
On 25 July 2017 at 17:43, Marek Olšák wrote: > For the series: > > Reviewed-by: Marek Olšák Thanks Marek! I've fixed the idiotic dropping of the 'return GL_FALSE' for the modifiers path in 1/2 (bad rebase) and pushed now. Cheers, Daniel ___ mesa-dev m

Re: [Mesa-dev] [PATCH v2 1/2] st/dri: Check get-handle return value in queryImage

2017-07-25 Thread Daniel Stone
On 25 July 2017 at 19:08, Emil Velikov wrote: > On 24 July 2017 at 16:46, Daniel Stone wrote: >> In the DRIImage queryImage hook, check if resource_get_handle() failed >> and return FALSE if so. >> > Wanted to say huge thank you for sorting these out (sorry for being >

Re: [Mesa-dev] [PATCH dri3proto v2] Add modifier/multi-plane requests, bump to v1.1

2017-07-28 Thread Daniel Stone
Hi Nicolai, Trying to tackle the stride subthread in one go ... On 25 July 2017 at 09:28, Nicolai Hähnle wrote: > On 22.07.2017 14:00, Daniel Stone wrote: >> On 21 July 2017 at 18:32, Michel Dänzer wrote: >>> We just ran into an issue which might mean that there's still s

Re: [Mesa-dev] [PATCH dri3proto v2] Add modifier/multi-plane requests, bump to v1.1

2017-07-28 Thread Daniel Stone
Hi, On 28 July 2017 at 10:24, Nicolai Hähnle wrote: > On 28.07.2017 09:44, Daniel Stone wrote: >> No, I don't think it is. Tiled layouts still have a stride: if you >> look at i915 X/Y/Yf/Y_CCS/Yf_CCS (the latter two containing an >> auxiliary compression/fast-clear buf

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

2017-07-31 Thread Daniel Stone
Make sure we advertise the new entrypoints to libglvnd's EGL dispatch. Signed-off-by: Daniel Stone Reported-by: Emmanuel Gil Peyrot Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101982 Fixes: 4c412293d0e ("egl: advertise EGL_EXT_image_dma_buf_import_modifiers") --- s

[Mesa-dev] [PATCH 1/2] egl: Update headers from Khronos

2017-07-31 Thread Daniel Stone
Taken from egl-registry 7d68647c4dab. Signed-off-by: Daniel Stone --- include/EGL/egl.h | 6 +- include/EGL/eglext.h | 73 +- include/KHR/khrplatform.h | 10 +- src/egl/generate/egl.xml | 626 +++--- 4 files changed, 673 insertions

Re: [Mesa-dev] [PATCH 1/3] dri_interface: drop loaderPrivate from loader::getCapability()

2017-07-31 Thread Daniel Stone
Hi Emil, On 31 July 2017 at 14:19, Emil Velikov wrote: > Unused and I cannot see any case where we'll need it This is also an ABI break, right? IOW, anyone having shipped v2 image loader or v4 DRI2 loader is going to need to rebuild the module. In order to do this backwards compatibly, we'd need

<    1   2   3   4   5   6   7   8   9   >