Re: [Mesa-dev] [PATCH v2] etnaviv: Allow clearing constant buffer using buffer==NULL user_buffer==NULL

2017-11-01 Thread Lucas Stach
Am Montag, den 30.10.2017, 17:14 +0100 schrieb Wladimir J. van der Laan: > On Mon, Oct 30, 2017 at 02:21:07PM +0100, Lucas Stach wrote: > > I would prefer the shorter expression (!cb->buffer && !cb->user_buffer)  > > here, which seems more consistent with the rest

Re: [Mesa-dev] [PATCH] etnaviv: bugfix: Don't do resolve-in-place without valid TS

2017-11-02 Thread Lucas Stach
Am Mittwoch, den 01.11.2017, 11:21 -0700 schrieb Chris Healy: > Tested-by: Chris Healy > > I tested this with i.MX6qp (and i.MX6q) and found that the rendering > issues I experienced with Wayland/Weston and the i.MX6qp went away > with this patch applied. > > Also, I ran glmark2-es2-drm and saw

Re: [Mesa-dev] [PATCH] etnaviv: bugfix: Don't do resolve-in-place without valid TS

2017-11-03 Thread Lucas Stach
Hi Andres, Am Freitag, den 03.11.2017, 14:39 +0200 schrieb Andres Gomez: > On Wed, 2017-11-01 at 12:47 +0100, Lucas Stach wrote: > > Am Mittwoch, den 01.11.2017, 12:34 +0100 schrieb Wladimir J. van > > der Laan: > > > On Wed, Nov 01, 2017 at 11:52:55AM +0100, Lucas

Re: [Mesa-dev] [RFC v2] etnaviv: flush color cache and depth cache together before resolves

2017-07-13 Thread Lucas Stach
Am Freitag, den 23.06.2017, 11:17 +0200 schrieb Philipp Zabel: > Before resolving a rendertarget or a depth/stencil resource into a > texture, flush both the color cache and the depth cache together. > > It is unclear whether this is necessary for the following stall to > work properly, or whether

[Mesa-dev] [PATCH] st/mesa: handle stfbi being NULL on entry of st_framebuffer_reuse_or_create

2017-07-13 Thread Lucas Stach
Apparently this can happen. Just bail out early in that case, as all the called functions return NULL in that case. Fixes weston-terminal for me. Fixes: 147d7fb772a7 ("st/mesa: add a winsys buffers list in st_context") Signed-off-by: Lucas Stach --- src/mesa/state_tracker/st_man

Re: [Mesa-dev] [PATCH] etnaviv: Reset indexed rendering information when not rendering indexed

2017-07-14 Thread Lucas Stach
Am Freitag, den 14.07.2017, 13:26 +0200 schrieb Wladimir J. van der Laan: > A dangling bo object would result in memory corruption while > loading a level in ioquake3_opengl2. > > Fixes a problem introduced in 330d0607ed60fd3edca192e54b4246310f06652f. > Fix suggested by Lucas Sta

Re: [Mesa-dev] [PATCH] etnaviv: Use the correct LOG instruction on GC3000

2017-07-14 Thread Lucas Stach
Am Dienstag, den 11.07.2017, 15:07 +0200 schrieb Wladimir J. van der Laan: > GC3000 has a new LOG instruction, similar to the new SIN and COS instructions. > > Generate the new instruction sequence when appropriate; there are > two occasions, as part of LIT and the generator for the LG2 > instruct

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

2017-07-19 Thread Lucas Stach
Am Mittwoch, den 19.07.2017, 10:57 +0200 schrieb Christian Gmeiner: > 2017-07-04 17:45 GMT+02:00 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 > > or

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

2017-07-19 Thread Lucas Stach
Hi Daniel, Am Mittwoch, den 19.07.2017, 10:33 +0100 schrieb Daniel Stone: > Hi Lucas, > > On 4 July 2017 at 16:45, Lucas Stach wrote: > > @@ -146,7 +121,8 @@ free_scanout: > > > > struct renderonly_scanout * > > renderonly_create_gpu_import_for_r

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

2017-07-19 Thread Lucas Stach
Hi Emil, Am Mittwoch, den 19.07.2017, 14:05 +0100 schrieb Emil Velikov: > Hi Lucas, > > On 23 June 2017 at 17:48, Lucas Stach wrote: > > Push this format to the pipe driver unchanged. > > > > Signed-off-by: Lucas Stach > I'm assuming you checked that thi

Re: [Mesa-dev] [PATCH] etnaviv: Avoid duplicates in formats table

2017-07-21 Thread Lucas Stach
Am Freitag, den 21.07.2017, 12:49 +0200 schrieb Wladimir J. van der Laan: > Remove the following duplicates from the formats table: > > - R8G8B8A8_UNORM (V_,_T) > - R8G8B8X8_UNORM (_T,_T) > - DXT3_RGBA (_T,_T) > > Only the first has an effect because the _T overrides the V_ initializer, > the lat

Re: [Mesa-dev] [PATCH] etnaviv: Avoid duplicates in formats table

2017-07-21 Thread Lucas Stach
Am Freitag, den 21.07.2017, 15:14 +0200 schrieb Wladimir J. van der Laan: > On Fri, Jul 21, 2017 at 02:43:11PM +0200, Lucas Stach wrote: > > Am Freitag, den 21.07.2017, 12:49 +0200 schrieb Wladimir J. van der > > Laan: > > > Remove the following duplicate

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. > > v2

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. > > v2

[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 Signed-off-by: Lucas Stach --- drm-atomic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drm

[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 --- drm-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm-common.c b/drm-common.c index 2f2c918596a4..fb4ec7f4389e 100644 --- a

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

2017-04-29 Thread Lucas Stach
ently 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 > wrote: > > Use long long format when printing the format modifier, as a simple > > long is only 4 bytes on 32bit

[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 --- include/drm/drm_fourcc.h | 81 1 file changed, 81 insertions(+) diff --git a/include/drm/drm_fourcc.h b/include/drm

[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 --- drm-ato

[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 --- common.c | 29 ++-- com

[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 --- src/gallium/drivers/etnaviv/etnaviv_texture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers

[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 --- 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 100644 --- a/src/gallium

[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 --- 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_resource.c index 0e37345c0c0a

[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 --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 6 ++ src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 +- src/gallium/dr

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

2017-05-10 Thread Lucas Stach
From: Philipp Zabel 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 Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 6 +- 1 file changed, 1 insertion(+), 5

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 : > > Use the proper pipe_resource_reference function instead of > > rolling our own. > > Would it make sense to convert all

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 add

Re: [Mesa-dev] [PATCH 3/3] etnaviv: Add sampler TS support

2017-11-09 Thread Lucas Stach
Hi Wladimir! Am Mittwoch, den 08.11.2017, 03:41 +0100 schrieb Wladimir: > > +/* Return true if a resource has a TS, and it is valid for at least one > > level */ > > +static bool > > +etna_resource_has_valid_ts(struct pipe_resource *prsc) > > +{ > > +   struct etna_resource *rsc = etna_resource(p

Re: [Mesa-dev] [PATCH v2 4/5] etnaviv: Flush TS cache before changing TS configuration

2017-11-15 Thread Lucas Stach
27;t able to spot missing shadow tiles anymore with sampler TS enabled. Reviewed-by: Lucas Stach > --- >  src/gallium/drivers/etnaviv/etnaviv_emit.c | 5 + >  1 file changed, 5 insertions(+) > > diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c > b/src/gallium/drivers/etn

Re: [Mesa-dev] [PATCH v2 2/5] etnaviv: Check that resource has a valid TS in etna_resource_needs_flush

2017-11-15 Thread Lucas Stach
Am Dienstag, den 14.11.2017, 10:21 +0100 schrieb Wladimir J. van der Laan: > Resources only need a resolve-to-itself if their TS is valid for any > level, not just if it happens to be allocated. > > Signed-off-by: Wladimir J. van der Laan Reviewed-by: Lucas Stach > --- >  s

Re: [Mesa-dev] [PATCH v2 3/5] etnaviv: Add TS_SAMPLER formats to etnaviv_format

2017-11-15 Thread Lucas Stach
Am Dienstag, den 14.11.2017, 10:21 +0100 schrieb Wladimir J. van der Laan: > Sampler TS introduces yet another format enumeration for > renderable+textureable formats. Introduce it into the etnaviv_format > table as another column. > > Signed-off-by: Wladimir J. van der Laan Rev

[Mesa-dev] [PATCH] etnaviv: enable full overwrite when no color buffer is present

2017-11-15 Thread Lucas Stach
The OVERWRITE bit disables destination fetches, which is exactly what we want when there is no valid color buffer bound. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_blend.c | 4 ++-- src/gallium/drivers/etnaviv/etnaviv_state.c | 2 +- 2 files changed, 3 insertions(+), 3

Re: [Mesa-dev] [PATCH] etnaviv: Fix point sprite issue on HALTI0

2017-11-15 Thread Lucas Stach
Hi Wladimir, Am Mittwoch, den 15.11.2017, 18:03 +0100 schrieb Wladimir J. van der Laan: > A recent commit (see below) fixed flat shading but at the same time > broke the use of point sprites with multiple varyings. This resulted in > particle systems rendering wrongly. > > The reason for this is

Re: [Mesa-dev] [PATCH] etnaviv: Fix point sprite issue on HALTI0

2017-11-16 Thread Lucas Stach
Am Mittwoch, den 15.11.2017, 19:55 +0100 schrieb Wladimir J. van der Laan: > > Sorry for noticing before, but this breaks glmark2 texture. I > > didn't > > yet dig into the issue but it's definitely caused by this commit. > > > > To reproduce, simply run > > glmark2-es2-drm -b texture:texture-filt

Re: [Mesa-dev] [PATCH] etnaviv: Fix point sprite issue on HALTI0

2017-11-16 Thread Lucas Stach
Am Donnerstag, den 16.11.2017, 11:36 +0100 schrieb Wladimir: > On Thu, Nov 16, 2017 at 11:29 AM, Lucas Stach > wrote: > > > Or maybe we can just scan the input > > varyings and if we find a PCOORD varying assume that we are going > > to > > render points, bu

Re: [Mesa-dev] [PATCH v2 04/17] etnaviv: Use only DRAW_INSTANCED on GC3000+

2017-11-22 Thread Lucas Stach
Hi Wladimir, Am Samstag, den 18.11.2017, 10:44 +0100 schrieb Wladimir J. van der Laan: > The blob does this, as DRAW_INSTANCED can replace fully all the other > draw commands. It is also required to handle integer vertex formats. > The other path is only there for compatibility and might go away (

Re: [Mesa-dev] [PATCH v2 02/17] etnaviv: Put HALTI level in specs

2017-11-22 Thread Lucas Stach
I've pushed the first 2 patches of this series to upstream, as they look fine, have seen enough review and I want to have them out of the way should we need another rev of the series. Regards, Lucas Am Samstag, den 18.11.2017, 10:44 +0100 schrieb Wladimir J. van der Laan: > The HALTI level is an

Re: [Mesa-dev] [PATCH v2 04/17] etnaviv: Use only DRAW_INSTANCED on GC3000+

2017-11-22 Thread Lucas Stach
Am Mittwoch, den 22.11.2017, 18:16 +0100 schrieb Wladimir J. van der Laan: > Hello Lucas, > > On Wed, Nov 22, 2017 at 02:29:33PM +0100, Lucas Stach wrote: > > Hi Wladimir, > > > > Am Samstag, den 18.11.2017, 10:44 +0100 schrieb Wladimir J. van der Laan: &

Re: [Mesa-dev] [PATCH] etnaviv: Emit vertex buffers consecutively

2017-11-23 Thread Lucas Stach
e compact state emission as well, on all > vivantes. > > This needs to go in before "etnaviv: Use only DRAW_INSTANCED on > GC3000+" > (and thus before the GC7000 patch series). Missing Sign-off, otherwise looks good to me: Reviewed-by: Lucas Stach > --- >  

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 needs to

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 i

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 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| 5 +- > src

[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 --- src/gallium/state_trackers/dri/dri2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/state_trackers

[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 --- s

[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 --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src

[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 --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 97

[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 --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff

[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 --- src/gallium/drivers/etnaviv/etnaviv_texture.c | 23

[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 --- 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/drivers/etnaviv

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

2017-06-23 Thread Lucas Stach
: Lucas Stach --- 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 100644 --- a/src/gallium/drivers

[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 --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 14 -- src/gallium/drivers/etnaviv/etnaviv_screen.c | 19 --- src/gallium/drivers/etnaviv

[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 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 --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 ++ 1 file changed

[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 --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-)

[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 --- src

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 wrote: > > This trivially adds support for the image offset query, which is needed > > for the zwp_linux_dmabuf based EGL platform wayland implementation. > > > >

[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 --- 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/include/GL/internal/dri_interface.h

[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 --- 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/gallium/drivers/etnaviv

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 : > > Currently a resource flush may trigger a self resolve, even if a > > scanout buffer > > exists, but is up to date. If a scanout buffer exists we only ever >

[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 --- src

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 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 Reviewed-by: Christian Gmeiner --- v2: Only fill in labels after checking instruction limit. Fixes out of bounds array access. --- src/gallium/drivers/etnaviv/etnaviv_compiler.c | 60

[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 --- This is on top of "etnaviv: flush color cache and depth cache together b

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

2017-06-27 Thread Lucas Stach
Am Dienstag, den 27.06.2017, 17:10 +0200 schrieb Wladimir J. van der Laan: > On Fri, Jun 23, 2017 at 05:50:28PM +0200, Lucas Stach wrote: > > Simply advertise all supported modifiers, independent of the format. > > Special formats, like compressed, which don't support all tho

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

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

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

2017-06-28 Thread Lucas Stach
Am Mittwoch, den 28.06.2017, 16:07 +0200 schrieb Wladimir J. van der Laan: > On Fri, Jun 23, 2017 at 05:50:23PM +0200, Lucas Stach wrote: > > This reworks the logic in etna_update_sampler_source to select the > > newest resource view for updating the texture view. This should mak

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

2017-06-28 Thread Lucas Stach
Am Mittwoch, den 28.06.2017, 16:10 +0200 schrieb Lucas Stach: > Am Mittwoch, den 28.06.2017, 16:07 +0200 schrieb Wladimir J. van der > Laan: > > On Fri, Jun 23, 2017 at 05:50:23PM +0200, Lucas Stach wrote: > > > This reworks the logic in etna_update_sampler_source to se

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

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

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

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

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

2017-06-28 Thread Lucas Stach
G) > + if ((usage & GBM_BO_USE_CURSOR) && (usage & GBM_BO_USE_RENDERING)) This hunk need to be squashed into the previous patch. With that fixed: Reviewed-by: Lucas Stach >return 0; > > if (gbm_format_to_dri_format(format) == 0) > @@ -1047

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

2017-06-28 Thread Lucas Stach
Am Freitag, den 16.06.2017, 18:14 +0100 schrieb 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 Reviewed-by: Lucas Stach > --- > src/egl/drivers/

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

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

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

2017-06-29 Thread Lucas Stach
Am Dienstag, den 27.06.2017, 14:09 +0200 schrieb Wladimir J. van der Laan: > On Fri, Jun 23, 2017 at 05:50:18PM +0200, Lucas Stach wrote: > > The layer stride information is used in various parts of the driver, > > so it needs to be present regardless if the driver allocated the &g

Re: [Mesa-dev] [PATCH] st/mesa: release EGLImage on EGLImageTarget* error

2017-07-04 Thread Lucas Stach
Am Montag, den 03.07.2017, 17:18 +0200 schrieb Marek Olšák: > Reviewed-by: Marek Olšák Thanks, pushed. > On Fri, Jun 30, 2017 at 11:03 AM, Philipp Zabel > wrote: > > The smapi->get_egl_image() call in st_egl_image_get_surface() stores a > > reference to the EGLImage's texture in stimg.texture.

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

2017-07-04 Thread Lucas Stach
Am Montag, den 26.06.2017, 12:37 +0200 schrieb Philipp Zabel: > On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > > 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 > &g

[Mesa-dev] [PATCH v2 05/10] etnaviv: also update textures from external resources

2017-07-04 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 Reviewed-by: Wladimir J. van der Laan --- src/gallium

[Mesa-dev] [PATCH v2 06/10] etnaviv: implement resource import with modifier

2017-07-04 Thread Lucas Stach
handling of those buffers. Signed-off-by: Lucas Stach Reviewed-by: Wladimir J. van der Laan --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 109 + 1 file changed, 77 insertions(+), 32 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src

[Mesa-dev] [PATCH v2 02/10] etnaviv: add helper to work out RS alignment

2017-07-04 Thread Lucas Stach
The minimum RS alignment calculation is needed in various places. Extract a helper to avoid open-coding the calcuation at every site. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 14 +- src/gallium/drivers/etnaviv/etnaviv_translate.h | 13

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

2017-07-04 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 --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 95

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

2017-07-04 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 --- src

[Mesa-dev] [PATCH v2 04/10] etnaviv: increment correct seqno for external resources

2017-07-04 Thread Lucas Stach
: Lucas Stach Reviewed-by: Wladimir J. van der Laan --- 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 be63b9c42172

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

2017-07-04 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 ---

[Mesa-dev] [PATCH v2 08/10] etnaviv: fill in modifier in etna_resource_get_handle

2017-07-04 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 Reviewed-by: Wladimir J. van der Laan --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 19 +++ 1 file changed, 19

[Mesa-dev] [PATCH v2 03/10] etnaviv: pad scanout buffer size to RS alignment

2017-07-04 Thread Lucas Stach
This fixes failures to import the scanout buffer with screen resolutions that don't satisfy the RS alignment restrictions, like 1680x1050. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Reviewed-by: Philipp Zabel Reviewed-by: Wladimir J. van der Laan --- src/gallium/dr

[Mesa-dev] [PATCH v2 07/10] etnaviv: fold etna_screen_bo_get_handle into etna_resource_get_handle

2017-07-04 Thread Lucas Stach
There is no point in keeping this indirection. Makes the code easier to follow. Signed-off-by: Lucas Stach Reviewed-by: Wladimir J. van der Laan (v1) --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 21 - src/gallium/drivers/etnaviv/etnaviv_screen.c | 19

Re: [Mesa-dev] [PATCH] etnaviv: fix refcnt initialization in etna_screen

2017-07-07 Thread Lucas Stach
Am Donnerstag, den 06.07.2017, 23:18 +0200 schrieb Aleksander Morgado: > Despite being a member of the etna_screen struct, 'refcnt' is used by > the winsys-specific logic to track the reference count of the object > managed in a hash table. When the count reaches zero, the pipe screen > is removed

Re: [Mesa-dev] [PATCH] etnaviv: Use the correct LOG instruction on GC3000

2017-07-11 Thread Lucas Stach
for the LG2 > instruction itself. > > Signed-off-by: Wladimir J. van der Laan In a quick test this fixes all the misrendering I was observing in the various glmark2 benchmarks on GC3000. Tested-by: Lucas Stach > --- > src/gallium/drivers/etnaviv/etnaviv_compiler.c | 63 > +++

Re: [Mesa-dev] Mesa 17.2.0 release plan

2017-07-12 Thread Lucas Stach
Hi Emil, Am Freitag, den 07.07.2017, 19:07 +0100 schrieb Emil Velikov: > Hi all, > > As you may have noticed, for a little while now we've had the release > plan on the mesa3d.org website [1]. > > Here is the current tentative schedule. > > Jul 21 2017 - Feature freeze/Release candidate 1 > J

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

2017-07-12 Thread Lucas Stach
Am Freitag, den 07.07.2017, 16:34 +0100 schrieb 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) { &g

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

2017-07-12 Thread Lucas Stach
Hi Christian, if possible I would really like to get some feedback/review on this patch, as it is changing quite some bits of renderonly, but is probably the last patch blocking this series from going into mainline. Regards, Lucas Am Dienstag, den 04.07.2017, 17:45 +0200 schrieb Lucas Stach

[Mesa-dev] [PATCH] etnaviv: don't enable RT full-overwrite when logicop is enabled

2017-07-13 Thread Lucas Stach
Logicop is a form of blending with the framebuffer, so we must allow framebuffer reads when logicop is enabled. Fixes: piglit gl-1.0-logicop on GC3000, which has logicop support Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_blend.c | 18 +- src/gallium

Re: [Mesa-dev] [PATCH 4/4] etnaviv: add support for snorm textures

2017-07-13 Thread Lucas Stach
Am Mittwoch, den 21.06.2017, 22:36 +0200 schrieb Christian Gmeiner: > Based on a patch from Wladimir J. van der Laan and untested due > to lack of hardware. Binary blob emits those formats if GPU supports > HALTI1 (faked with ibvivhook). This patch causes piglit regressions on i.MX6QP. For example

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

2017-07-13 Thread Lucas Stach
Am Donnerstag, den 13.07.2017, 12:12 +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. > > Signed-off-by: Daniel

[Mesa-dev] [PATCH] etnaviv: disable in-place resolve for non-supertiled surfaces

2017-12-19 Thread Lucas Stach
The in-place resolve probably has some additional restrictions when not operating on a super tiled surface. Disable it on non-supertiled surfaces for now to work around a GPU hang. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_rs.c | 1 + 1 file changed, 1 insertion

[Mesa-dev] [PATCH] etnaviv: dirty TS state when framebuffer has changed

2018-01-11 Thread Lucas Stach
When switching between framebuffers with and without TS, the TS state needs to be flushed to the command stream even if the derived state isn't changed. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 1/3] etnaviv: support tile aligned RS blits

2017-09-15 Thread Lucas Stach
The RS can blit abitrary tile aligned subregions of a resource by adjusting the buffer offset. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 75 +--- 1 file changed, 67 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers

[Mesa-dev] [PATCH 3/3] etnaviv: optimize RS transfers

2017-09-15 Thread Lucas Stach
subregion of the resource, which the transfer is going to change. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 29 ++ 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_transfer.c b/src/gallium

[Mesa-dev] [PATCH 0/3] Etnaviv partial transfer optimization

2017-09-15 Thread Lucas Stach
is an application uploading small textures to a large texture atlas by using glTexSubImage2D, where I have seen reductions in transfer time from 90ms before to 3ms with this series applied. No regressions with the piglit "gpu" profile. Regards, Lucas Lucas Stach (3): etnaviv: su

[Mesa-dev] [PATCH 2/3] etnaviv: add resource subregion copy

2017-09-15 Thread Lucas Stach
This is useful if we only need to copy part of a larger resource, mostly when using the RS engine to de-/tile on pipe transfers. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 27 src/gallium/drivers/etnaviv/etnaviv_clear_blit.h | 5

<    1   2   3   4   >