[Mesa-dev] [PATCH] etnaviv: flush source TS before resolve

2017-06-26 Thread Lucas Stach
If we blit from a rendertarget or a depthstencil buffer there might still be dirty data in the TS buffer which needs to be flushed out. Fixes missing shadow tiles in glmark2 shadow. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- This is on top of "etnaviv: flush color cach

[Mesa-dev] [PATCH v2] etnaviv: fix shader miscompilation with more than 16 labels

2017-06-26 Thread Lucas Stach
for Vivante GPUs) Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Lucas Stach <l.st...@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmei...@gmail.com> --- v2: Only fill in labels after checking instruction limit. Fixes out of bounds array access. --- src/gal

Re: [Mesa-dev] [PATCH] etnaviv: fix shader miscompilation with more than 16 labels

2017-06-26 Thread Lucas Stach
Am Montag, den 26.06.2017, 13:40 +0200 schrieb Lucas Stach: > The labels array may change its virtual address on a reallocation, so > it is invalid to cache pointers into the array. Rather than using the > pointer directly, remember the array index. > > Fixes miscompilation of sha

[Mesa-dev] [PATCH] etnaviv: fix shader miscompilation with more than 16 labels

2017-06-26 Thread Lucas Stach
The labels array may change its virtual address on a reallocation, so it is invalid to cache pointers into the array. Rather than using the pointer directly, remember the array index. Fixes miscompilation of shaders in glmark2 ideas, leading to GPU hangs. Signed-off-by: Lucas Stach <l

Re: [Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Lucas Stach
Am Montag, den 26.06.2017, 13:09 +0200 schrieb Christian Gmeiner: > 2017-06-26 12:25 GMT+02:00 Lucas Stach <l.st...@pengutronix.de>: > > Currently a resource flush may trigger a self resolve, even if a > > scanout buffer > > exists, but is up to date. If a scanout

[Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Lucas Stach
resource) Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/g

[Mesa-dev] [PATCH] st/dri: allow direct YUYV import

2017-06-23 Thread Lucas Stach
Push this format to the pipe driver unchanged. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- include/GL/internal/dri_interface.h | 1 + src/gallium/state_trackers/dri/dri2.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/GL/internal/dri_interface.h b/incl

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

2017-06-23 Thread Lucas Stach
Am Freitag, den 23.06.2017, 16:54 +0100 schrieb Daniel Stone: > On 23 June 2017 at 16:36, Lucas Stach <l.st...@pengutronix.de> wrote: > > This trivially adds support for the image offset query, which is needed > > for the zwp_linux_dmabuf based EGL platform wayland implement

[Mesa-dev] [PATCH 04/11] etnaviv: pad scanout buffer size to RS alignment

2017-06-23 Thread Lucas Stach
This fixes failures to import the scanout buffer with screen resolutions that don't satisfy teh RS alignment restrictions, like 1680x1050. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 13 +++-- 1 file changed, 11 inse

[Mesa-dev] [PATCH 03/11] renderonly/etnaviv: stop importing resource from renderonly

2017-06-23 Thread Lucas Stach
The current way of importing the resource from renderonly after allocation is opaque and is taking away control from the driver, which it needs in order to implement more advanced scenarios, than the simple linear scanout with matching stride alignments. Signed-off-by: Lucas Stach <l

[Mesa-dev] [PATCH 00/11] Etnaviv modifiers support

2017-06-23 Thread Lucas Stach
and series "EGL/Wayland modifiers, format cleanup" from Daniel Stone, providing proper handling of tiled buffers on the Wayland platform. So far things seem to look good. Feedback welcome. Regards, Lucas Lucas Stach (11): etnaviv: fill in layer_stride for imported resources et

[Mesa-dev] [PATCH 08/11] etnaviv: fold etna_screen_bo_get_handle into etna_resource_get_handle

2017-06-23 Thread Lucas Stach
There is no point in keeping this indirection. Makes the code easier to follow. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 14 -- src/gallium/drivers/etnaviv/etnaviv_screen.c | 19 --- src/gallium/d

[Mesa-dev] [PATCH 01/11] etnaviv: fill in layer_stride for imported resources

2017-06-23 Thread Lucas Stach
The layer stride information is used in various parts of the driver, so it needs to be present regardless if the driver allocated the buffer itself or merely imported it from an external source. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/e

[Mesa-dev] [PATCH 05/11] etnaviv: increment correct seqno for external resources

2017-06-23 Thread Lucas Stach
-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 5cd20fafba49..43f63f8908a0

[Mesa-dev] [PATCH 06/11] etnaviv: also update textures from external resources

2017-06-23 Thread Lucas Stach
This reworks the logic in etna_update_sampler_source to select the newest resource view for updating the texture view. This should make the logic easier to follow and fixes texture updates from imported dma-bufs. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/e

[Mesa-dev] [PATCH 07/11] etnaviv: implement resource import with modifier

2017-06-23 Thread Lucas Stach
handling of those buffers. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 112 + 1 file changed, 78 insertions(+), 34 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/d

[Mesa-dev] [PATCH 11/11] etnaviv: advertise supported dmabuf modifiers

2017-06-23 Thread Lucas Stach
Simply advertise all supported modifiers, independent of the format. Special formats, like compressed, which don't support all those modifiers are already culled from the dmabuf format list, as we don't support the render target binding for them. Signed-off-by: Lucas Stach <l.st...@pengutronix

[Mesa-dev] [PATCH 02/11] etnaviv: fix memory leak when BO allocation fails

2017-06-23 Thread Lucas Stach
The resource struct is already allocated at this point and should be free properly. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/e

[Mesa-dev] [PATCH 10/11] etnaviv: implement resource creation with modifier

2017-06-23 Thread Lucas Stach
This allows to create buffers with a specific tiling layout, which is primarily used by GBM to allocate the EGL back buffers with the correct tiling/modifier for use with the scanout engines. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_reso

[Mesa-dev] [PATCH 09/11] etnaviv: fill in modifier in etna_resource_get_handle

2017-06-23 Thread Lucas Stach
This allows the state trackers to know the tiling layout of the resource and pass this through the various userspace protocols. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 30 +- 1 file changed, 29 inse

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

2017-06-23 Thread Lucas Stach
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 <l.st...@pengutronix.de> --- src/gallium/state_trackers/dri/dri2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

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

2017-06-22 Thread Lucas Stach
Am Freitag, den 16.06.2017, 18:14 +0100 schrieb 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

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

2017-06-22 Thread Lucas Stach
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. > > Just remove it, adding a include to u_vector.c to cover > memcpy. This patch seems to cause:

Re: [Mesa-dev] [PATCH] etnaviv: fix blend color for RB swapped rendertargets

2017-06-20 Thread Lucas Stach
Am Dienstag, den 20.06.2017, 13:21 +0200 schrieb Christian Gmeiner: > Hi Lucas, > > > this one is a logical follow-up to my piglit fixes series. Since the > > other patches have landed, it would be nice if you could also land this > > one. > > > > thanks for the gentle ping :) Will 'process' it

Re: [Mesa-dev] [PATCH] etnaviv: fix blend color for RB swapped rendertargets

2017-06-20 Thread Lucas Stach
Hi Christian, this one is a logical follow-up to my piglit fixes series. Since the other patches have landed, it would be nice if you could also land this one. Regards, Lucas Am Montag, den 05.06.2017, 21:11 +0200 schrieb Lucas Stach: > Same as with the colormasks, the blend color ne

Re: [Mesa-dev] glmark2 segfault on imx6

2017-06-13 Thread Lucas Stach
> ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-devFrom: Lucas Stach <l.st...@pengutronix.de> Date: Wed, 31 May 2017 13:01:00 +0200 Subject: [PATCH] NativeStateDRM: us

Re: [Mesa-dev] [PATCH] etnaviv: add rs-operations sw query

2017-06-09 Thread Lucas Stach
Am Freitag, den 09.06.2017, 12:34 +0200 schrieb Christian Gmeiner: > It could be useful to get the number of emited resolve operations when > doing driver optimizations. > > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Reviewed-by: Lucas Stach <l

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

2017-06-08 Thread Lucas Stach
This allows to import an FD with an explicit modifier passed through userspace protocols. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gbm/main/gbm.h | 12 1 file changed, 12 insertions(+) diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index b52137

[Mesa-dev] [PATCH 2/2] gbm: implement FD import with modifier

2017-06-08 Thread Lucas Stach
This implements a way to import FDs with modifiers on plain GBM devices, without the need to go through EGL. This is mostly to the benefit of gbm_gralloc, which can keep its dependencies low. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gbm/backends/dri/gbm_dri.

Re: [Mesa-dev] [PATCH v14 14/36] st/dri: support format modifier queries

2017-06-08 Thread Lucas Stach
d by driver. > v4: purge PIPE_CAP_QUERY_DMABUF_ATTRIBS. > v5: > - move to __DRIimageExtension v15, pass external_only to the driver. > > Signed-off-by: Varad Gautam <varad.gau...@collabora.com> > Reviewed-by: Lucas Stach <l.st...@pengutronix.de> (v4) Still valid. > Cc:

Re: [Mesa-dev] [PATCH v14 13/36] gallium: introduce format modifier querying

2017-06-08 Thread Lucas Stach
> format modifiers for EGL_EXT_image_dma_buf_import_modifiers. > > v2: rebase to master. > v3: drivers must return false on query failure. > v4: use pscreen->is_format_supported instead of adding a separate > format query handle, remove PIPE_CAP_QUERY_DMABUF_ATTRIBS. > (Lucas Stach) >

Re: [Mesa-dev] [PATCH v14 10/36] st/dri: implement createImageWithModifiers in DRIimage

2017-06-08 Thread Lucas Stach
n't return selected modifier from resource_create_with_modifiers. we can > use the winsys_handle to get this. > > Signed-off-by: Varad Gautam <varad.gau...@collabora.com> > Reviewed-by: Lucas Stach <l.st...@pengutronix.de> (v1) > Cc: Lucas Stach <l.st...@pengutronix.de> Revie

Re: [Mesa-dev] [PATCH v14 09/36] st/dri: enable DRIimage modifier queries

2017-06-08 Thread Lucas Stach
DRIimage->modifier from v1. > use DRM_API_HANDLE_TYPE_KMS instead of DRM_API_HANDLE_TYPE_FD to avoid > ownership transfer. (Lucas) > > Suggested-by: Daniel Stone <dani...@collabora.com> > Signed-off-by: Varad Gautam <varad.gau...@collabora.com> > Cc: Lucas St

Re: [Mesa-dev] [PATCH v14 08/36] gallium/winsys/drm: introduce modifier field to winsys_handle

2017-06-08 Thread Lucas Stach
@collabora.com> > Cc: Lucas Stach <l.st...@pengutronix.de> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/include/state_tracker/drm_driver.h | 6 ++ > src/gallium/state_trackers/dri/dri2.c | 7 +++ > 2 files changed, 13 insertio

Re: [Mesa-dev] [PATCH 6/6] etnaviv: upgrade DISCARD_RANGE to DISCARD_WHOLE_RESOURCE if possible

2017-06-08 Thread Lucas Stach
Am Donnerstag, den 08.06.2017, 15:08 +0200 schrieb Wladimir J. van der Laan: > Hello Lucas, > > On Thu, Jun 08, 2017 at 10:26:04AM +0200, Lucas Stach wrote: > > Hi Wladimir, > > > > did you also review this patch? It's the last one of this series missing > >

[Mesa-dev] [PATCH 2/2] etnaviv: remove flat shading workaround

2017-06-08 Thread Lucas Stach
It turned out not to be a hardware bug, but the shader compiler emitting wrong varying component use information. With that fixed we can turn flat shading back on. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_rasterizer.c | 6 +- 1 file c

[Mesa-dev] [PATCH 1/2] etnaviv: fix varying interpolation

2017-06-08 Thread Lucas Stach
a better name I left it as-is. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_compiler.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.c b/src/g

Re: [Mesa-dev] [PATCH 6/6] etnaviv: upgrade DISCARD_RANGE to DISCARD_WHOLE_RESOURCE if possible

2017-06-08 Thread Lucas Stach
Hi Wladimir, did you also review this patch? It's the last one of this series missing review. Regards, Lucas Am Freitag, den 19.05.2017, 11:41 +0200 schrieb Lucas Stach: > Stolen from VC4. As we don't do any fancy reallocation tricks yet, it's > possible to upgrade also coherent ma

Re: [Mesa-dev] [PATCH 1/2] etnaviv: don't flush resource to self without TS

2017-06-06 Thread Lucas Stach
Am Dienstag, den 06.06.2017, 12:59 +0200 schrieb Wladimir J. van der Laan: > On Tue, Jun 06, 2017 at 12:38:23PM +0200, Lucas Stach wrote: > > From: Lucas Stach <d...@lynxeye.de> > > > > A resolve to self is only necessary if the resource is fast cleared, so > &g

Re: [Mesa-dev] [PATCH 3/6] etnaviv: honor PIPE_TRANSFER_UNSYNCHRONIZED flag

2017-06-06 Thread Lucas Stach
Am Dienstag, den 30.05.2017, 17:40 +0200 schrieb Philipp Zabel: > On Fri, 2017-05-19 at 11:41 +0200, Lucas Stach wrote: > > This gets rid of quite a bit of CPU/GPU sync on frequent vertex buffer > > uploads and I haven't seen any of the issues mentioned in the comment, > > so

[Mesa-dev] [PATCH 1/2] etnaviv: don't flush resource to self without TS

2017-06-06 Thread Lucas Stach
From: Lucas Stach <d...@lynxeye.de> A resolve to self is only necessary if the resource is fast cleared, so there is never a need to do so if there is no TS allocated. Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.h | 2 +- 1 fil

[Mesa-dev] [PATCH 2/2] etnaviv: flush resource when binding as sampler view

2017-06-06 Thread Lucas Stach
As TS is also allowed on sampler resources, we need to make sure to resolve to self when binding the resource as a texture, to avoid stale content being sampled. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_texture.c | 3 +++ 1 file chan

Re: [Mesa-dev] [PATCH 0/6] Shooting some piglits

2017-06-05 Thread Lucas Stach
Hi Fabio, Am Sonntag, den 04.06.2017, 18:26 -0300 schrieb Fabio Estevam: > Hi Lucas, > > On Sun, Jun 4, 2017 at 4:06 PM, Lucas Stach <d...@lynxeye.de> wrote: > > Hi all, > > > > I decided to take a look at our current piglit status and the > > foll

[Mesa-dev] [PATCH] etnaviv: fix blend color for RB swapped rendertargets

2017-06-05 Thread Lucas Stach
Same as with the colormasks, the blend color needs to be swizzled according to the rendertarget format. Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_blend.c| 35 ++ src/gallium/drivers/etnaviv/etnaviv_blend.h| 6

Re: [Mesa-dev] [PATCH 5/6] etnaviv: mask correct channel for RB swapped rendertargets

2017-06-05 Thread Lucas Stach
Am Sonntag, den 04.06.2017, 16:37 -0400 schrieb Ilia Mirkin: > On Sun, Jun 4, 2017 at 3:06 PM, Lucas Stach <d...@lynxeye.de> wrote: > > +   /* If the complete render target is written, set > > full_overwrite: > > +* - The color mask is >

[Mesa-dev] [PATCH 5/6] etnaviv: mask correct channel for RB swapped rendertargets

2017-06-04 Thread Lucas Stach
Now that we support RB swapped targets by using a shader variant, we must derive the color mask from both the blend state and the bound framebuffer. Fixes piglit: fbo-colormask-formats Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_blend.

[Mesa-dev] [PATCH 6/6] etnaviv: advertise correct max LOD bias

2017-06-04 Thread Lucas Stach
The maximum LOD bias supported is the same as the max texture level supported. Fixes piglit: ext_texture_lod_bias Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_screen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/g

[Mesa-dev] [PATCH 4/6] etnaviv: replace translate_clear_color with util_pack_color

2017-06-04 Thread Lucas Stach
This replaces the open coded etnaviv version of the color pack with the common util_pack_color. Fixes piglits: arb_color_buffer_float-clear fcc-front-buffer-distraction fbo-clearmipmap Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.

[Mesa-dev] [PATCH 2/6] etnaviv: use padded width/height for resource copies

2017-06-04 Thread Lucas Stach
copies. Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c index 6844943..2

[Mesa-dev] [PATCH 3/6] etnaviv: remove bogus assert

2017-06-04 Thread Lucas Stach
etna_resource_copy_region handles resources with multiple samples by falling back to the software path. There is no need to kill the application there. Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 2 -- 1 file changed, 2 deletions(-)

[Mesa-dev] [PATCH 1/6] etnaviv: don't try RS blit if blit region is unaligned

2017-06-04 Thread Lucas Stach
If the blit region is not aligned to the RS min alignment don't try to execute the blit, but fall back to the software path. Signed-off-by: Lucas Stach <d...@lynxeye.de> --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 1/6] etnaviv: always do cpu_fini in transfer_unmap

2017-05-30 Thread Lucas Stach
Can someone please take a look at this one patch at least? I'm fine with the rest of the series waiting a bit longer, but I would like to push this bugfix patch in the next few days. Thanks, Lucas Am Freitag, den 19.05.2017, 11:41 +0200 schrieb Lucas Stach: > The cpu_fini() call pus

Re: [Mesa-dev] [PATCH] etnaviv: Don't try to use the index buffer if size is zero

2017-05-29 Thread Lucas Stach
Hi Tomeu, Am Freitag, den 19.05.2017, 12:40 +0200 schrieb Tomeu Vizoso: > If info->index_size is zero, info->index will point to uninitialized > memory. > > Fatal signal 11 (SIGSEGV), code 2, fault addr 0xab5d07a3 in tid 20456 > (surfaceflinger) > > Signed-off-by: Tomeu Vizoso

Re: [Mesa-dev] [PATCH v3 01/15] st/dri: refactor multi-planar YUV import path

2017-05-23 Thread Lucas Stach
Hi Varad, Am Dienstag, den 23.05.2017, 14:40 +0530 schrieb Varad Gautam: > Hi Lucas, > > On Mon, May 22, 2017 at 11:16 PM, Lucas Stach <l.st...@pengutronix.de> wrote: > > Am Mittwoch, den 10.05.2017, 23:15 +0530 schrieb Varad Gautam: > >> From: Varad Gaut

Re: [Mesa-dev] [PATCH 1/3] etnaviv: Add support for extended texture formats

2017-05-22 Thread Lucas Stach
Am Dienstag, den 16.05.2017, 21:31 +0200 schrieb Christian Gmeiner: > Hi Wladimir. > > I started working on this topic last week and thought some time on how > to add those ext texture formats in a clean and nice way. I come up > with this patches: > >

Re: [Mesa-dev] [PATCH v3 01/15] st/dri: refactor multi-planar YUV import path

2017-05-22 Thread Lucas Stach
Am Mittwoch, den 10.05.2017, 23:15 +0530 schrieb Varad Gautam: > From: Varad Gautam > > we currently ignore the plane count when converting from > __DRI_IMAGE_FORMAT* tokens to __DRI_IMAGE_FOURCC* for multiplanar > images, and only return the first plane's simplified

Re: [Mesa-dev] [PATCH libdrm] header: update drm_fourcc.h

2017-05-22 Thread Lucas Stach
Am Dienstag, den 02.05.2017, 16:35 +0200 schrieb Lucas Stach: > Mostly to pull in the Vivante tiling format modifiers, but some other > little changes included. > > Signed-off-by: Lucas Stach <l.st...@pengutronix.de> If there are no objections to this patch, I'm going to push

Re: [Mesa-dev] [PATCH] etnaviv: Don't try to use the index buffer if size is zero

2017-05-22 Thread Lucas Stach
<tomeu.viz...@collabora.com> > Cc: etna...@lists.freedesktop.org > Cc: Marek Olšák <marek.ol...@amd.com> > Fixes: 330d0607ed60 ("gallium: remove pipe_index_buffer and set_index_buffer") Reviewed-by: Lucas Stach <l.st...@pengutronix.de> If no one objects, I'm

Re: [Mesa-dev] [PATCH v13 15/36] st/dri: support format modifier queries

2017-05-19 Thread Lucas Stach
fail if the supplied format is not supported by driver. > v4: purge PIPE_CAP_QUERY_DMABUF_ATTRIBS. > > Signed-off-by: Varad Gautam <varad.gau...@collabora.com> > Signed-off-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de

Re: [Mesa-dev] [PATCH v13 13/36] st/dri: support format queries

2017-05-19 Thread Lucas Stach
instead of adding a new query. > (Lucas Stach) > Signed-off-by: Varad Gautam <varad.gau...@collabora.com> > Signed-off-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/state_trackers/dri/dri2.c | 91 > ++

Re: [Mesa-dev] [PATCH v13 12/36] st/dri: implement DRIimage creation from dmabufs with modifiers

2017-05-19 Thread Lucas Stach
15. > > v2: initialize winsys modifier to DRM_FORMAT_MOD_INVALID (Daniel Stone) > > Signed-off-by: Varad Gautam <varad.gau...@collabora.com> > Signed-off-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- >

Re: [Mesa-dev] [PATCH v13 10/36] st/dri: enable DRIimage modifier queries

2017-05-19 Thread Lucas Stach
tone <dani...@collabora.com> > Signed-off-by: Varad Gautam <varad.gau...@collabora.com> > Signed-off-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/state_trackers/dri/dri2.c | 15 +++ &

Re: [Mesa-dev] [PATCH v13 11/36] st/dri: implement createImageWithModifiers in DRIimage

2017-05-19 Thread Lucas Stach
gt; > Signed-off-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/include/pipe/p_screen.h | 18 > src/gallium/state_trackers/dri/dri2.c | 79 > --- > 2 files c

[Mesa-dev] [PATCH 6/6] etnaviv: upgrade DISCARD_RANGE to DISCARD_WHOLE_RESOURCE if possible

2017-05-19 Thread Lucas Stach
Stolen from VC4. As we don't do any fancy reallocation tricks yet, it's possible to upgrade also coherent mappings and shared resources. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 14 ++ 1 file changed, 14 inse

[Mesa-dev] [PATCH 0/6] etnaviv transfer handling improvements

2017-05-19 Thread Lucas Stach
handling for the easy "make things faster" flags. Regards, Lucas Lucas Stach (6): etnaviv: always do cpu_fini in transfer_unmap etnaviv: slim down resource waiting etnaviv: honor PIPE_TRANSFER_UNSYNCHRONIZED flag etnaviv: don't read back resource if transfer discards contents

[Mesa-dev] [PATCH 2/6] etnaviv: slim down resource waiting

2017-05-19 Thread Lucas Stach
cpu_prep() already does all the required waiting, so the only thing that needs to be done is flushing the commandstream, if a GPU write is pending. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 5 +++-- src/gallium/drivers/e

[Mesa-dev] [PATCH 4/6] etnaviv: don't read back resource if transfer discards contents

2017-05-19 Thread Lucas Stach
Reduces bandwidth usage of transfers which discard the buffer contents, as well as skipping unnecessary command stream flushes and CPU/GPU synchronization. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 4 +++- 1 file chan

[Mesa-dev] [PATCH 5/6] etnaviv: simplify transfer tiling handling

2017-05-19 Thread Lucas Stach
There is no need to special case compressed resources, as they are already marked as linear on allocation. With that out of the way, there is room to cut down on the number of if clauses used. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_tran

[Mesa-dev] [PATCH 1/6] etnaviv: always do cpu_fini in transfer_unmap

2017-05-19 Thread Lucas Stach
Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_transfer.c b/src/gallium/drivers/etnaviv/etnaviv_transfer.c index 1a5aa7fc04

[Mesa-dev] [PATCH 3/6] etnaviv: honor PIPE_TRANSFER_UNSYNCHRONIZED flag

2017-05-19 Thread Lucas Stach
This gets rid of quite a bit of CPU/GPU sync on frequent vertex buffer uploads and I haven't seen any of the issues mentioned in the comment, so this one seems stale. Ignore the flag if there exists a temporary resource, as those ones are never busy. Signed-off-by: Lucas Stach <l

Re: [Mesa-dev] [RFC] st/dri: implement createImageWithModifiers

2017-05-12 Thread Lucas Stach
Hi Varad, Am Freitag, den 12.05.2017, 15:11 +0530 schrieb Varad Gautam: > gallium doesn't have a way to pass modifiers to the driver when creating > resources. we require this to support > dri2ImageExtension->createImageWithModifiers() to get > gbm_bo_create_with_modifiers() to work. > > this

Re: [Mesa-dev] [PATCH 4/5] etnaviv: clean up sampler view reference counting

2017-05-11 Thread Lucas Stach
Hi Christian, Am Mittwoch, den 10.05.2017, 21:44 +0200 schrieb Christian Gmeiner: > Hi Lucas, > > 2017-05-10 18:01 GMT+02:00 Lucas Stach <l.st...@pengutronix.de>: > > Use the proper pipe_resource_reference function instead of > > rolling our own. > > Would it

[Mesa-dev] [PATCH 5/5] etnaviv: increment the resource seqno in resource_changed

2017-05-10 Thread Lucas Stach
From: Philipp Zabel <p.za...@pengutronix.de> Just increment the resource seqno instead of setting the texture seqno to be lower by one than the resource seqno. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- s

[Mesa-dev] [PATCH 3/5] etnaviv: apply feature overrides in one central location

2017-05-10 Thread Lucas Stach
This way we can just test the feature bits and don't need to spread the debug overrides to all locations touching a feature. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 6 ++ src/gallium/drivers/etnaviv/etnaviv_resource.c

[Mesa-dev] [PATCH 1/5] etnaviv: stop oversizing buffer resources

2017-05-10 Thread Lucas Stach
result in 4 to 8MB big BOs. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_reso

[Mesa-dev] [PATCH 2/5] etnaviv: allow R/B swapped surfaces to be cleared

2017-05-10 Thread Lucas Stach
Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_translate.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_translate.h b/src/gallium/drivers/etnaviv/etnaviv_translate.h index d0623db1472d..e8466d63ff10

[Mesa-dev] [PATCH 4/5] etnaviv: clean up sampler view reference counting

2017-05-10 Thread Lucas Stach
Use the proper pipe_resource_reference function instead of rolling our own. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_texture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/e

[Mesa-dev] [PATCH kmscube] HACK: automatic modifier selection

2017-05-03 Thread Lucas Stach
This lacks proper abstractions and error checks, but sending out anyways, as it might be helpful for other people testing the whole modifier chain. This works on top of Ben's plane property blob patches. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- common.c

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

2017-05-02 Thread Lucas Stach
With the modifier support it is possible to force a modifier which isn't compatible with any of the GPU targets. In that case the EGL platform will be unable to allocate the back buffers. Provide an error message in that case, instead of crashing. Signed-off-by: Lucas Stach <l

[Mesa-dev] [PATCH libdrm] header: update drm_fourcc.h

2017-05-02 Thread Lucas Stach
Mostly to pull in the Vivante tiling format modifiers, but some other little changes included. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- include/drm/drm_fourcc.h | 81 1 file changed, 81 insertions(+) diff --git a/inclu

Re: [Mesa-dev] [PATCH kmscube 1/2] common: use %llx to print modifier

2017-04-29 Thread Lucas Stach
in FDO mesa/kmscube. It seems the modifier patchset has been merged there. Regards, Lucas > BR, > -R > > On Fri, Apr 28, 2017 at 12:18 PM, Lucas Stach <l.st...@pengutronix.de > > wrote: > > Use long long format when printing the format modifier, as a simple &g

[Mesa-dev] [PATCH kmscube 1/2] common: use %llx to print modifier

2017-04-28 Thread Lucas Stach
Use long long format when printing the format modifier, as a simple long is only 4 bytes on 32bit systems. Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- drm-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm-common.c b/drm-common.c index 2f2c91

[Mesa-dev] [PATCH kmscube 2/2] drm-atomic: init out_fence_fd to -1

2017-04-28 Thread Lucas Stach
The current initial value of 0 is a valid fd, so this will trip up the GPU submit on the first render, when used as an IN fence for rendering. Reported-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- drm-atomic.c | 5 +++-- 1 fil

Re: [Mesa-dev] [PATCH v3] gallium: introduce dmabuf format and modifier querying

2017-04-28 Thread Lucas Stach
Am Mittwoch, den 26.04.2017, 17:49 +0530 schrieb Varad Gautam: > allows drivers to be queried for supported formats and format > modifiers for EGL_EXT_image_dma_buf_import_modifiers. drivers that > implement format/modifier queries must advertise these under > PIPE_CAP_QUERY_DMABUF_ATTRIBS. > >

Re: [Mesa-dev] [PATCH v3] gallium: introduce dmabuf format and modifier querying

2017-04-28 Thread Lucas Stach
Am Mittwoch, den 26.04.2017, 17:49 +0530 schrieb Varad Gautam: > allows drivers to be queried for supported formats and format > modifiers for EGL_EXT_image_dma_buf_import_modifiers. drivers that > implement format/modifier queries must advertise these under > PIPE_CAP_QUERY_DMABUF_ATTRIBS. > >

[Mesa-dev] [PATCH 2/2] etnaviv: resolve tile status when flushing resource

2017-04-12 Thread Lucas Stach
s when sampling directly from a renderable resource. lst: Add seqno tracking, to skip flush when not needed. Fixes: aadcb5e94b35 ("etnaviv: enable TS, but disable autodisable") Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Lucas Stach <l.st...@pengutr

[Mesa-dev] [PATCH 1/2] etnaviv: stop repeatedly resolving an unchanged resource into its scanout prime buffer

2017-04-12 Thread Lucas Stach
From: Philipp Zabel Before resolving a resource into its scanout prime buffer, check that the prime resource is actually older. If it is not, the resolve is an expensive no-op, and we better skip it. Signed-off-by: Philipp Zabel ---

Re: [Mesa-dev] [PATCH 03/11] etnaviv: add basic shader variant support

2017-03-27 Thread Lucas Stach
m> Nitpick inline, othwerwise: Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/etnaviv_compiler.h | 3 ++ > src/gallium/drivers/etnaviv/etnaviv_shader.c | 49 > +++--- > src/gallium/drivers/etnaviv/etnaviv_shad

Re: [Mesa-dev] [PATCH 04/11] etnaviv: add struct etna_shader_state

2017-03-27 Thread Lucas Stach
Am Sonntag, den 26.03.2017, 16:13 +0200 schrieb Christian Gmeiner: > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 4 ++-- > src

Re: [Mesa-dev] [PATCH 06/11] etnaviv: pass a preallocated variant to compiler

2017-03-27 Thread Lucas Stach
> variant into etna_compile_shader(..). This saves us from passing > extra ptrs everywhere. > > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/etnaviv_compiler.c | 53 > +++

Re: [Mesa-dev] [PATCH 07/11] etnaviv: add etna_shader_key and generate variants if needed

2017-03-27 Thread Lucas Stach
Am Sonntag, den 26.03.2017, 16:13 +0200 schrieb Christian Gmeiner: > Signed-off-by: Christian Gmeiner > --- > src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 4 +- > src/gallium/drivers/etnaviv/etnaviv_compiler.c | 4 +- >

Re: [Mesa-dev] [PATCH 08/11] etnaviv: bring back shader-db traces

2017-03-27 Thread Lucas Stach
Am Sonntag, den 26.03.2017, 16:13 +0200 schrieb Christian Gmeiner: > If shader-db run, create a standard variant immediately > (as otherwise nothing will trigger the shader to be > actually compiled). > > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Rev

Re: [Mesa-dev] [PATCH 09/11] etnaviv: adopt shader-db output for variant support

2017-03-27 Thread Lucas Stach
Am Sonntag, den 26.03.2017, 16:13 +0200 schrieb Christian Gmeiner: > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> s/adopt/adapt in the subject Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/

Re: [Mesa-dev] [PATCH 10/11] etnaviv: add support for rb swap

2017-03-27 Thread Lucas Stach
Am Sonntag, den 26.03.2017, 16:13 +0200 schrieb Christian Gmeiner: > If we render to rb swapped format we will create a shader variant doing > the involved swizzing in the pixel shader. > > Signed-off-by: Christian Gmeiner > --- >

Re: [Mesa-dev] [PATCH 3/3] etnaviv: shader-db traces

2017-02-09 Thread Lucas Stach
Am Mittwoch, den 08.02.2017, 20:47 +0100 schrieb Christian Gmeiner: > Hi Lucas, > > 2017-02-08 12:36 GMT+01:00 Lucas Stach <l.st...@pengutronix.de>: > > Am Mittwoch, den 08.02.2017, 12:10 +0100 schrieb Christian Gmeiner: > >> Signed-off-by: Christian Gmeine

Re: [Mesa-dev] [PATCH 1/3] etnaviv: wire up core pipe_debug_callback

2017-02-08 Thread Lucas Stach
Am Mittwoch, den 08.02.2017, 12:10 +0100 schrieb Christian Gmeiner: > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/etnaviv_context.c | 13 + > src

Re: [Mesa-dev] [PATCH 3/3] etnaviv: shader-db traces

2017-02-08 Thread Lucas Stach
Am Mittwoch, den 08.02.2017, 12:10 +0100 schrieb Christian Gmeiner: > Signed-off-by: Christian Gmeiner > --- > src/gallium/drivers/etnaviv/etnaviv_compiler.h | 2 ++ > src/gallium/drivers/etnaviv/etnaviv_debug.h| 1 + >

Re: [Mesa-dev] [PATCH 2/3] etnaviv: keep track of emitted loops

2017-02-08 Thread Lucas Stach
Am Mittwoch, den 08.02.2017, 12:10 +0100 schrieb Christian Gmeiner: > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/etnaviv_compiler.c | 6 ++ > src

Re: [Mesa-dev] Question about handling RGBA/BGRA in etnaviv driver

2017-02-03 Thread Lucas Stach
Hi Wladimir, this is about the userspace component of the driver, so dri-devel isn't the correct list for this question, you should instead CC the MESA dev list, even if mostly the same people hang out on those lists. Done that for you now. Regards, Lucas Am Freitag, den 03.02.2017, 10:56

[Mesa-dev] [PATCH] gbm: request correct version of the DRI2_FENCE extension

2016-11-22 Thread Lucas Stach
There is no version 2 of the DRI2_FENCE extension. So only a request for version 1 has a chance to succeed. Fixes: 74b1969d717f (gbm: wire up fence extension) Cc: "13.0" <mesa-sta...@lists.freedesktop.org> Signed-off-by: Lucas Stach <l.st...@pengutronix.de> --- src/gbm/back

<    1   2   3   4   >