Re: [Mesa-dev] [PATCH] glcpp: fix #undef to match latest spec update and GLSLang implementation

2017-06-06 Thread Iago Toral
This didn't get any reviews, any takers? It fixes a couple of CTS tests so it would be good to have it merged. Iago On Tue, 2017-05-30 at 13:25 +0200, Iago Toral Quiroga wrote: > GLSL ES spec includes the following: > >    "It is an error to undefine or to redefine a built-in > (pre-defined)

Re: [Mesa-dev] [PATCH] dri3/GLX: Fix drawable invalidation

2017-06-06 Thread Michel Dänzer
On 01/06/17 07:13 PM, Thomas Hellstrom wrote: > A number of internal VMware apitrace traces image comparisons fail with > dri3 because the viewport transformation becomes incorrect after an X > drawable resize. The incorrect viewport transformation sometimes persist > until the second draw-call aft

Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-06 Thread Marek Olšák
On Tue, Jun 6, 2017 at 7:16 AM, Chih-Wei Huang wrote: > 2017-06-05 3:57 GMT+08:00 Marek Olšák : >> NAK. >> >> In C/C++, the initializer is used to clear the memory to 0s, thus, >> adding 0s to the initializer is redundant and unnecessary. Empty >> initializer {} is also commonly used instead of me

Re: [Mesa-dev] [PATCH] glcpp: fix #undef to match latest spec update and GLSLang implementation

2017-06-06 Thread Samuel Pitoiset
Looks good to me. Reviewed-by: Samuel Pitoiset On 05/30/2017 01:25 PM, Iago Toral Quiroga wrote: GLSL ES spec includes the following: "It is an error to undefine or to redefine a built-in (pre-defined) macro name." But desktop GLSL doesn't. This has sparked some discussion in Khrono

Re: [Mesa-dev] [PATCH 5/5] st/mesa: use texture_barrier before CopyPixels blits where src == dst

2017-06-06 Thread Marek Olšák
On Tue, Jun 6, 2017 at 4:28 AM, Michel Dänzer wrote: > On 06/06/17 01:50 AM, Marek Olšák wrote: >> From: Marek Olšák >> >> radeonsi won't flush caches if set_framebuffer_state doesn't change >> anything. >> --- >> src/mesa/state_tracker/st_cb_drawpixels.c | 7 +++ >> 1 file changed, 7 insert

Re: [Mesa-dev] [PATCH] i965: Don't try to resolve CCS with MESA_FORMAT_NONE.

2017-06-06 Thread Eero Tamminen
Hi, On 06.06.2017 02:58, Kenneth Graunke wrote: On Monday, June 5, 2017 2:03:45 AM PDT Tapani Pälli wrote: FWIW this change fixes also regression on Android wallpaper since that commit. I'm planning on dropping this patch, as it seems that commit 708664159e18487b6676fd5b4c33f52003f81d9e Auth

Re: [Mesa-dev] [PATCH] glthread: remove extra _mesa_glthread_finish() from generated code

2017-06-06 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Tue, Jun 6, 2017 at 7:08 AM, Timothy Arceri wrote: > The other user of print_sync_dispatch() was ending up with code that > looked like: > > _mesa_glthread_finish(ctx); > _mesa_glthread_restore_dispatch(ctx); > _mesa_glthread_finish(ctx); > --

[Mesa-dev] [PATCH 2/3] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Alex Smith
This means it can be reused for other Vulkan drivers. Also fix up a typo, need to search for '.' in the version string rather than ','. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c | 24 + src/vulkan/Makefile.sources | 1 + src/vulkan/util/vk_util.c| 50 ++

[Mesa-dev] [PATCH 1/3] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Alex Smith
We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c| 2 +- src/amd/vulkan/radv_formats.c | 3 ++- src/amd/vulkan/radv_priv

[Mesa-dev] [PATCH v2 3/3] anv: Set driver version to Mesa version

2017-06-06 Thread Alex Smith
As already done by RADV. v2: Move version calculation function to src/vulkan/util to share with RADV. Signed-off-by: Alex Smith --- src/intel/vulkan/anv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c

Re: [Mesa-dev] [PATCH 06/14] radv: add GFX9 to initialisation cmd buffer.

2017-06-06 Thread Marek Olšák
On Tue, Jun 6, 2017 at 1:14 AM, Dave Airlie wrote: > From: Dave Airlie > > This just adds support for initialising some GFX9 registers, > and handles the different init for the VGT reuse reg. > > Signed-off-by: Dave Airlie > --- > src/amd/vulkan/radv_cmd_buffer.c | 5 +-- > src/amd/vulkan/si_c

Re: [Mesa-dev] [PATCH 7/7] util: Add extern c to u_dynarray.h

2017-06-06 Thread Thomas Helland
2017-06-05 23:27 GMT+02:00 Marek Olšák : > For the series: > > Reviewed-by: Marek Olšák > > Marek > As-is? Or with Eric's suggestions of splitting patch 6? If it is OK as it is, do you mind pushing this for me? Thanks for the review =) Regards, Thomas > > On Sat, Jun 3, 2017 at 8:11 PM, Thomas

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

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

2017-06-06 Thread Lucas Stach
From: Lucas Stach 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 --- src/gallium/drivers/etnaviv/etnaviv_resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 7/7] util: Add extern c to u_dynarray.h

2017-06-06 Thread Marek Olšák
On Tue, Jun 6, 2017 at 12:07 PM, Thomas Helland wrote: > 2017-06-05 23:27 GMT+02:00 Marek Olšák : >> For the series: >> >> Reviewed-by: Marek Olšák >> >> Marek >> > > As-is? Or with Eric's suggestions of splitting patch 6? > If it is OK as it is, do you mind pushing this for me? > Thanks for the

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 this one seems stale.

Re: [Mesa-dev] [PATCH v2 02/23] mesa: add KHR_no_error support for glVertexArrayVertexBuffers()

2017-06-06 Thread Samuel Pitoiset
On 06/06/2017 01:04 AM, Fredrik Höglund wrote: On Monday 05 June 2017, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mesa/main/varray.c | 15 +++ src/me

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

2017-06-06 Thread Wladimir J. van der Laan
On Tue, Jun 06, 2017 at 12:38:23PM +0200, Lucas Stach wrote: > From: Lucas Stach > > 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 Does this take into account the case on GC20

[Mesa-dev] [PATCH] android: build system changes for Vulkan utilities move

2017-06-06 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- Android build system changes required for: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158027.html Android.common.mk | 1 + src/intel/Android.vulkan.mk | 1 + src/vulkan/Android.mk | 2 ++ 3 files changed, 4 insertions(+) diff --

Re: [Mesa-dev] [PATCH 1/3] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Tapani Pälli
Looks nice to me, I've sent required changes to Android build system for this change as addition. On 06/06/2017 12:42 PM, Alex Smith wrote: We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. S

Re: [Mesa-dev] [PATCH 1/3] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Alex Smith
Aha, sorry, I missed that. Do you want me to fold your patch into this one and send a v2? Alex On 6 June 2017 at 12:11, Tapani Pälli wrote: > Looks nice to me, I've sent required changes to Android build system for > this change as addition. > > > On 06/06/2017 12:42 PM, Alex Smith wrote: > >>

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

2017-06-06 Thread Wladimir J. van der Laan
On Fri, May 19, 2017 at 11:41:08AM +0200, Lucas Stach wrote: > 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. Looks good to me. Reviewed-By: Wladimir J. van der Laan > Signed-off-by: Lucas Sta

Re: [Mesa-dev] [PATCH 1/3] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Tapani Pälli
On 06/06/2017 02:13 PM, Alex Smith wrote: Aha, sorry, I missed that. Do you want me to fold your patch into this one and send a v2? That would be ideal as working build makes bisecting a lot less painful, thanks! Alex On 6 June 2017 at 12:11, Tapani Pälli >

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

2017-06-06 Thread Wladimir J. van der Laan
On Fri, May 19, 2017 at 11:41:09AM +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 this one seems stale. Interesting. I don't quite remember what prompted adding this, i

[Mesa-dev] [PATCH v2] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Alex Smith
We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. v2: Android build system changes (from Tapani Pälli) Signed-off-by: Alex Smith --- Android.common.mk | 1 + src/amd/vulkan/r

Re: [Mesa-dev] [PATCH] i965: Don't try to resolve CCS with MESA_FORMAT_NONE.

2017-06-06 Thread Tapani Pälli
On 06/06/2017 02:58 AM, Kenneth Graunke wrote: On Monday, June 5, 2017 2:03:45 AM PDT Tapani Pälli wrote: FWIW this change fixes also regression on Android wallpaper since that commit. I'm planning on dropping this patch, as it seems that commit 708664159e18487b6676fd5b4c33f52003f81d9e Auth

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

2017-06-06 Thread Wladimir J. van der Laan
On Fri, May 19, 2017 at 11:41:10AM +0200, Lucas Stach wrote: > Reduces bandwidth usage of transfers which discard the buffer contents, > as well as skipping unnecessary command stream flushes and CPU/GPU > synchronization. Looks obviously correct. The contents of the temporary resource don't matte

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 > > > > 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 allo

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

2017-06-06 Thread Wladimir J. van der Laan
On Fri, May 19, 2017 at 11:41:11AM +0200, Lucas Stach wrote: > 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. Code change looks good to me. Resource

Re: [Mesa-dev] [PATCH 2/3] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Emil Velikov
Hi Alex, On 6 June 2017 at 10:42, Alex Smith wrote: > This means it can be reused for other Vulkan drivers. Also fix up a > typo, need to search for '.' in the version string rather than ','. > > Signed-off-by: Alex Smith > --- > +uint32_t vk_get_driver_version(void) > +{ ... > + uint32_t ver

Re: [Mesa-dev] [PATCH v2 02/23] mesa: add KHR_no_error support for glVertexArrayVertexBuffers()

2017-06-06 Thread Samuel Pitoiset
On 06/06/2017 12:57 PM, Samuel Pitoiset wrote: On 06/06/2017 01:04 AM, Fredrik Höglund wrote: On Monday 05 June 2017, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mesa/main/varray.c

Re: [Mesa-dev] [PATCH 2/3] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Eric Engestrom
On Tuesday, 2017-06-06 10:42:40 +0100, Alex Smith wrote: > This means it can be reused for other Vulkan drivers. Also fix up a > typo, need to search for '.' in the version string rather than ','. > > Signed-off-by: Alex Smith > --- > src/amd/vulkan/radv_device.c | 24 + > sr

[Mesa-dev] [PATCH] mesa: wrap blit_framebuffer() into blit_framebuffer_err()

2017-06-06 Thread Samuel Pitoiset
Also add ALWAYS_INLINE to blit_framebuffer(). Signed-off-by: Samuel Pitoiset --- NOTE: Patch introduced between 9 and 10 in this series. Nothing changed except some rebase conflicts. src/mesa/main/blit.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-)

Re: [Mesa-dev] [PATCH 2/2] RFC: radeon/compute: Limit allocations for VRAM-based chips to 3/4 VRAM

2017-06-06 Thread Aaron Watry
On Mon, Jun 5, 2017, 3:08 PM Marek Olšák wrote: > Hi Aaron, > > Can you make the change in radeon_drm_winsys.c instead? > I'll give it a shot. --Aaron > Thanks, > Marek > > On Mon, Jun 5, 2017 at 2:32 AM, Aaron Watry wrote: > > The CL CTS queries the max allocation size, and then attempts to

[Mesa-dev] [Bug 101291] FAIL: glsl/tests/optimization-test

2017-06-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101291 Vedran Miletić changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

Re: [Mesa-dev] [PATCH v2 1/2] intel: gen-decoder: rework how we handle groups

2017-06-06 Thread Lionel Landwerlin
On 05/06/17 23:54, Rafael Antognolli wrote: realloc() does not initialize the newly added memory, unlike calloc(). So you can't depend on those new pointers to be zero. It doesn't look like you depend on that because you have the nfields variable anyways. But if you really don't care about initi

Re: [Mesa-dev] [PATCH] mesa: wrap blit_framebuffer() into blit_framebuffer_err()

2017-06-06 Thread Eric Engestrom
On Tuesday, 2017-06-06 14:40:28 +0200, Samuel Pitoiset wrote: > Also add ALWAYS_INLINE to blit_framebuffer(). > > Signed-off-by: Samuel Pitoiset > --- > > NOTE: Patch introduced between 9 and 10 in this series. Nothing changed > except some rebase conflicts. > > src/mesa/main/blit.c | 35 +

Re: [Mesa-dev] [PATCH 2/4] configure/r600: Only require libdrm_amdgpu if CL is enabled

2017-06-06 Thread Emil Velikov
On 5 June 2017 at 21:31, Aaron Watry wrote: > Otherwise r600g will fail to build when the amdgpu drm library is missing > And the code that pulls amdgpu is not used by r600g, which makes this misplaced duck tape. As you/Jan don't have the time to properly address this, I'll try to find some later

Re: [Mesa-dev] [PATCH v3] egl/android: support for EGL_KHR_partial_update

2017-06-06 Thread Eric Engestrom
On Monday, 2017-06-05 17:04:28 +0100, Emil Velikov wrote: > > + * If the width of the passed rect is greater than the surface's > > + * width then it is clamped to the width of the surface. Same with > > + * height. > > + */ > > + > > +static void > > +_eglSetDamageRegionKHRClampRects(_EGLDisplay*

[Mesa-dev] [PATCH v3] i965: Support dmabuf import with modifiers

2017-06-06 Thread Varad Gautam
Add support for createImageFromDmaBufs2, adding a modifier to the original, and allow importing CCS resources with auxiliary data from dmabufs. v2: avoid DRIimageExtension version bump, pass single modifier to createImageFromDmaBufs2. v3: rebase to 'i965: Improve same-buffer restriction for im

Re: [Mesa-dev] [PATCH v3] egl/android: support for EGL_KHR_partial_update

2017-06-06 Thread Emil Velikov
On 6 June 2017 at 14:54, Eric Engestrom wrote: > On Monday, 2017-06-05 17:04:28 +0100, Emil Velikov wrote: >> > + * If the width of the passed rect is greater than the surface's >> > + * width then it is clamped to the width of the surface. Same with >> > + * height. >> > + */ >> > + >> > +static

[Mesa-dev] [PATCH v2] i965: Add tiling mode to BO import

2017-06-06 Thread Varad Gautam
From: Daniel Stone When importing a dmabuf, verify that the tiling mode matches what was expected. v2: rebase to 'i965: Improve same-buffer restriction for imports' v2. Signed-off-by: Daniel Stone Signed-off-by: Varad Gautam --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 12 ++-- src

[Mesa-dev] [PATCH v2] i965: Improve same-buffer restriction for imports

2017-06-06 Thread Varad Gautam
From: Daniel Stone Intel hardware requires that all planes of an image come from the same buffer, which is currently implemented by testing that all FDs are numerically the same. However, when going through a winsys (e.g.) or anything which transits FDs individually, the FDs may be different eve

Re: [Mesa-dev] [PATCH v3] egl/android: support for EGL_KHR_partial_update

2017-06-06 Thread Eric Engestrom
On Monday, 2017-06-05 19:37:55 +0530, Harish Krupo wrote: > This patch adds support for the EGL_KHR_partial_update extension for > android platform. It passes 36/37 tests in dEQP for EGL_KHR_partial_update. > 1 test not supported. > > v2: add fallback for eglSetDamageRegionKHR (Tapani) > > v3: Th

[Mesa-dev] [PATCH 1/5] radeonsi: enable TC-compatible stencil compression on VI

2017-06-06 Thread Marek Olšák
From: Marek Olšák Most things are in place. Ideally we won't see decompress blits for stencil anymore. --- src/gallium/drivers/radeonsi/si_blit.c| 2 ++ src/gallium/drivers/radeonsi/si_descriptors.c | 8 src/gallium/drivers/radeonsi/si_state_draw.c | 3 ++- 3 files changed, 8 i

[Mesa-dev] [PATCH 3/5] radeonsi: disable the patch ID workaround on SI when the patch ID isn't used

2017-06-06 Thread Marek Olšák
From: Marek Olšák The workaround causes a massive performance decrease on 1-SE parts. (Cape Verde, Hainan, Oland) The performance regression is already part of 17.0 and 17.1. Cc: 17.0 17.1 --- src/gallium/drivers/radeonsi/si_state_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Mesa-dev] [PATCH 4/5] gallium/radeon: clean up a misleading statement from the old days

2017-06-06 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_texture.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index f0c1bec..663d6fc 100644 --- a/src/gallium/drivers/radeon/r600_textu

[Mesa-dev] [PATCH 5/5] radeonsi: clean up decompress blend state names

2017-06-06 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_blit.c | 4 ++-- src/gallium/drivers/radeonsi/si_pipe.c | 8 src/gallium/drivers/radeonsi/si_pipe.h | 4 ++-- src/gallium/drivers/radeonsi/si_state.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/g

[Mesa-dev] [PATCH 2/5] radeonsi: don't use 1D tiling for Z/S on VI to get TC-compatible HTILE

2017-06-06 Thread Marek Olšák
From: Marek Olšák It's always good to have fewer decompress blits. --- src/gallium/drivers/radeon/r600_texture.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 48ae

Re: [Mesa-dev] [PATCH v2] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Jason Ekstrand
Acked-by: Jason Ekstrand I haven't looked at the details, but it's a good idea. Thanks for doing it! On Tue, Jun 6, 2017 at 4:31 AM, Alex Smith wrote: > We have Vulkan utilities in both src/util and src/vulkan/util. The > latter seems a more appropriate place for Vulkan-specific things, so >

Re: [Mesa-dev] [PATCH 2/3] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Jason Ekstrand
On Tue, Jun 6, 2017 at 5:17 AM, Emil Velikov wrote: > Hi Alex, > > On 6 June 2017 at 10:42, Alex Smith wrote: > > This means it can be reused for other Vulkan drivers. Also fix up a > > typo, need to search for '.' in the version string rather than ','. > > > > Signed-off-by: Alex Smith > > ---

Re: [Mesa-dev] [PATCH v2 3/3] anv: Set driver version to Mesa version

2017-06-06 Thread Jason Ekstrand
Both patch 2 and 3 are Reviewed-by: Jason Ekstrand On Tue, Jun 6, 2017 at 2:42 AM, Alex Smith wrote: > As already done by RADV. > > v2: Move version calculation function to src/vulkan/util to share with > RADV. > > Signed-off-by: Alex Smith > --- > src/intel/vulkan/anv_device.c | 2 +- >

Re: [Mesa-dev] [PATCH 2/4] configure/r600: Only require libdrm_amdgpu if CL is enabled

2017-06-06 Thread Aaron Watry
On Tue, Jun 6, 2017 at 8:51 AM, Emil Velikov wrote: > > On 5 June 2017 at 21:31, Aaron Watry wrote: > > Otherwise r600g will fail to build when the amdgpu drm library is missing > > > And the code that pulls amdgpu is not used by r600g, which makes this > misplaced duck tape. > As you/Jan don't h

[Mesa-dev] [PATCH v2] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Alex Smith
This means it can be reused for other Vulkan drivers. Also fix up a typo, need to search for '.' in the version string rather than ','. v2: Remove unneeded temporary version variable (Emil, Eric) Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c | 24 +- src/vulkan/

Re: [Mesa-dev] [PATCH v2] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand Alex, do you need someone to push these for you? On Tue, Jun 6, 2017 at 8:09 AM, Alex Smith wrote: > This means it can be reused for other Vulkan drivers. Also fix up a > typo, need to search for '.' in the version string rather than ','. > > v2: Remove unneeded tem

Re: [Mesa-dev] [PATCH v2] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Alex Smith
Yes, please! On 6 June 2017 at 16:12, Jason Ekstrand wrote: > Reviewed-by: Jason Ekstrand > > Alex, do you need someone to push these for you? > > On Tue, Jun 6, 2017 at 8:09 AM, Alex Smith > wrote: > >> This means it can be reused for other Vulkan drivers. Also fix up a >> typo, need to searc

Re: [Mesa-dev] [PATCH] intel/blorp: Set needs_(dst|src)_offset for Gen4 cubemaps

2017-06-06 Thread Ian Romanick
On 06/05/2017 06:03 PM, Jason Ekstrand wrote: > On Mon, Jun 5, 2017 at 5:22 PM, Ian Romanick > wrote: > > From: Jason Ekstrand > > > We call convert_to_single_slice so they may end up with a non-trivial > offset that

[Mesa-dev] [PATCH 02/10] genxml: Rename SF_STATE field to match gen6+.

2017-06-06 Thread Rafael Antognolli
Rename "Use Point Width State" to "Point Width Source". It accepts the same values and has the same meaning as gen6+, so lets keep them with the same name to simplify the code. Signed-off-by: Rafael Antognolli --- src/intel/genxml/gen4.xml | 6 +++--- src/intel/genxml/gen45.xml | 6 +++--- src/

[Mesa-dev] [PATCH 00/10] Convert a couple more states to genxml.

2017-06-06 Thread Rafael Antognolli
This series converts SF_STATE, COLOR_CALC_STATE adn BLEND_CONSTANT_COLOR state to use genxml. It has to be applied on top of this series from Ken: https://patchwork.freedesktop.org/series/24245/ Kenneth Graunke (1): i965: Make a helper function for depth/stencil related state. Rafael Antognoll

[Mesa-dev] [PATCH 01/10] i965: aa_line_distance_mode should be before the padding.

2017-06-06 Thread Rafael Antognolli
It seems that it was never set correctly. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/brw_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 35db2f5..73641da 100

[Mesa-dev] [PATCH 04/10] genxml: The viewport state offset is actually an address.

2017-06-06 Thread Rafael Antognolli
This fixes code generation on gen45. Signed-off-by: Rafael Antognolli --- src/intel/genxml/gen45.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/genxml/gen45.xml b/src/intel/genxml/gen45.xml index 46d1949..59460fd 100644 --- a/src/intel/genxml/gen45.xml +++ b/sr

[Mesa-dev] [PATCH 09/10] i965: Convert CC state on gen4-5 to genxml.

2017-06-06 Thread Rafael Antognolli
Use set_blend_entry_bits and set_depth_stencil_bits to fill most of the color calc struct, and then manually update the rest. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/brw_cc.c| 174 -- src/mesa/drivers/dri/i965/brw_state.h | 1 -

[Mesa-dev] [PATCH 05/10] i965: Convert SF_STATE to genxml.

2017-06-06 Thread Rafael Antognolli
This patch finishes the work done by Ken of converting SF_STATE to genxml, and merges it with gen6+ code for emitting that state. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/Makefile.sources| 1 - src/mesa/drivers/dri/i965/brw_sf_state.c | 200 --

[Mesa-dev] [PATCH 08/10] i965: Check for alpha channel just like in gen6+.

2017-06-06 Thread Rafael Antognolli
gen6+ uses _mesa_base_format_has_channel() to check for the alpha channel, while gen4-5 use ctx->DrawBuffer->Visual.alphaBits. By using _mesa_base_format_has_channel() here we keep the same behavior accross all gen. While initially both ways of checking the alpha channel seemed correct to me, this

[Mesa-dev] [PATCH 10/10] i965: Convert BLEND_CONSTANT_COLOR state to genxml.

2017-06-06 Thread Rafael Antognolli
It's a very simple conversion, and it allows us to delete brw_cc.c. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/Makefile.sources| 1 - src/mesa/drivers/dri/i965/brw_cc.c| 62 --- src/mesa/drivers/dri/i965/genX_state_upload.c | 28 ++

[Mesa-dev] [PATCH 06/10] i965: Make a helper function for depth/stencil related state.

2017-06-06 Thread Rafael Antognolli
From: Kenneth Graunke Gen4-5 basically glue DEPTH_STENCIL_STATE, COLOR_CALC_STATE, and BLEND_STATE together into a single COLOR_CALC_STATE structure. By making a helper function, we'll be able to reuse it when filling out Gen4-5 COLOR_CALC_STATE without replicating any actual logic. We use gene

[Mesa-dev] [PATCH 07/10] i965: Make a helper function for blend entry related state.

2017-06-06 Thread Rafael Antognolli
Add a helper function to reuse code that fills blend entry related state, and make genX(upload_blend_state) use it. This function can later be used by gen4-5 color calc state to set the blend related bits. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/genX_state_upload.c | 155 +

[Mesa-dev] [PATCH 03/10] genxml: Rename fields to match gen6+.

2017-06-06 Thread Rafael Antognolli
"Anti-aliasing Enable" to "Anti-Aliasing Enable". Signed-off-by: Rafael Antognolli --- src/intel/genxml/gen4.xml | 2 +- src/intel/genxml/gen45.xml | 2 +- src/intel/genxml/gen5.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/genxml/gen4.xml b/src/intel/gen

Re: [Mesa-dev] [PATCH] intel/blorp: Set needs_(dst|src)_offset for Gen4 cubemaps

2017-06-06 Thread Jason Ekstrand
On Tue, Jun 6, 2017 at 9:10 AM, Ian Romanick wrote: > On 06/05/2017 06:03 PM, Jason Ekstrand wrote: > > On Mon, Jun 5, 2017 at 5:22 PM, Ian Romanick > > wrote: > > > > From: Jason Ekstrand > > > > > > We call convert_to_s

Re: [Mesa-dev] [PATCH v2] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Jason Ekstrand
On Tue, Jun 6, 2017 at 8:14 AM, Alex Smith wrote: > Yes, please! > These three as well as the anv limits patch have now landed. Thanks! --Jason > On 6 June 2017 at 16:12, Jason Ekstrand wrote: > >> Reviewed-by: Jason Ekstrand >> >> Alex, do you need someone to push these for you? >> >> On

[Mesa-dev] [PATCH 5/7] i965: Improve same-buffer restriction for imports

2017-06-06 Thread Daniel Stone
Intel hardware requires that all planes of an image come from the same buffer, which is currently implemented by testing that all FDs are numerically the same. However, when going through a winsys (e.g.) or anything which transits FDs individually, the FDs may be different even if the underlying b

[Mesa-dev] [PATCH 7/7] i965: Add format/modifier advertising

2017-06-06 Thread Daniel Stone
From: Varad Gautam v2: Rebase and reuse tiling/modifier map. (Daniel Stone) v3: bump DRIimageExtension to version 15, fill external_only array. Signed-off-by: Varad Gautam Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_screen.c | 76 ++-- 1 file ch

[Mesa-dev] [PATCH 4/7] i965: Allocate tile aligned height

2017-06-06 Thread Daniel Stone
From: Ben Widawsky This patch shouldn't actually do anything because the libdrm function should already do this alignment. However, it preps us for a future patch where we add in the CCS AUX size, and in the process it serves as a good place to find bisectable issues if libdrm or kernel does some

[Mesa-dev] [PATCH 1/7] egl/dri2: Avoid sign extension when building modifier

2017-06-06 Thread Daniel Stone
Since the EGL attributes are signed integers, a straight OR would also perform sign extension, Fixes: 6f10e7c37a ("egl/dri2: Create EGLImages with dmabuf modifiers") Cc: Varad Gautam Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 de

[Mesa-dev] [PATCH 2/7] i965: Invert image modifier/tiling inference

2017-06-06 Thread Daniel Stone
When allocating images, we record a tiling mode and then work backwards to infer the modifier. Unfortunately this is the wrong way around, since it is a one:many mapping (e.g. TILING_Y can be plain Y-tiling, or Y-tiling with CCS). Invert the mapping, so we record a modifier first and then map this

[Mesa-dev] [PATCH 6/7] i965: Support dmabuf import with modifiers

2017-06-06 Thread Daniel Stone
From: Varad Gautam Add support for createImageFromDmaBufs2, adding a modifier to the original, and allow importing CCS resources with auxiliary data from dmabufs. v2: avoid DRIimageExtension version bump, pass single modifier to createImageFromDmaBufs2. Signed-off-by: Varad Gautam Signed-o

[Mesa-dev] [PATCH v15 0/7] i965 modifier import and advertisement

2017-06-06 Thread Daniel Stone
Hi, With the initial modifier enablement patches being merged, and Jason's comments about doing a lot of work in the vicinity of CCS with blorp/ISL, I'm cleaving this patch series into 3. Varad is taking over the Gallium/Freedreno parts as an independent series, since there are no longer any share

[Mesa-dev] [PATCH 3/7] i965: Move fallback size assignment out of bufmgr

2017-06-06 Thread Daniel Stone
The bufmgr took a mandatory size argument, which would only be used if the kernel size query failed, i.e. an older kernel. It didn't actually check that the BO size was sufficient for use. Pull the check out of the bufmgr, and actually check that the BO is sufficiently-sized for our import one lev

[Mesa-dev] [PATCH v15 00/16] i965: CCS support

2017-06-06 Thread Daniel Stone
Hi, Building on top of the previous v15 to add support for buffers with modifiers to i965, this adds CCS support. I'm parking this until Jason has finished his blorp/etc work, so this should be purely informational until then. It also depends on a kernel series which hasn't got any review yet. Ch

[Mesa-dev] [PATCH v15 04/16] i965: Restructure CCS disabling

2017-06-06 Thread Daniel Stone
From: Ben Widawsky Make the code only disable CCS when it has to, unlike before where it disabled CCS and enabled it when it could. This is much more inline with how it should work in a few patches, where we have fewer restrictions as to when we disable CCS. v2: Change CCS disabling to an assert

[Mesa-dev] [PATCH v15 02/16] i965/miptree: Add a helper function for image creation

2017-06-06 Thread Daniel Stone
From: Ben Widawsky This provides a common function or creating miptrees when there is an existing DRIimage to use. That provides an easy way to add CCS allocation. v2: Make the new function assume there are always no layout flags. This will be adjusted later. Signed-off-by: Ben Widawsky Acked-

[Mesa-dev] [PATCH v15 13/16] i965: Use partial resolves for CCS buffers being scanned out

2017-06-06 Thread Daniel Stone
From: Ben Widawsky On Gen9 hardware, the display engine is able to scanout a compressed framebuffer by providing an offset to auxiliary compression information. Unfortunately, the hardware is incapable of doing the same thing for the fast clear color. To mitigate this, the hardware introduced a

[Mesa-dev] [PATCH v15 01/16] i965: Support images with offset aux buffers

2017-06-06 Thread Daniel Stone
From: Ben Widawsky Previously our aux buffers (MCS, and HiZ) never had an offset because they were in their own buffer object. When using the CCS lossless compression feature, it's desirable to store the data at an offset from the main framebuffer, ie. share a buffer object. This patch just makes

[Mesa-dev] [PATCH v15 11/16] i965: Plumb resolve hints from miptrees to blorp

2017-06-06 Thread Daniel Stone
From: Ben Widawsky Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Reviewed-by: Topi Pohjolainen Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965/brw_blorp.c | 3 ++- src/mesa/drivers/dri/i965/brw_blorp.h | 3 ++- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4

[Mesa-dev] [PATCH v15 03/16] i965/miptree: Allocate mcs_buf for an image's CCS_E

2017-06-06 Thread Daniel Stone
From: Ben Widawsky This code will disable actually creating these buffers for the scanout, but it puts the allocation in place. Primarily this patch is split out for review, it can be squashed in later if preferred. v2: assert(mt->offset == 0) in ccs creation (as requested by Topi) Remove bogus

[Mesa-dev] [PATCH v15 12/16] i965: Add new resolve hints full and partial

2017-06-06 Thread Daniel Stone
From: Ben Widawsky Upper layers of the code will have the need to specify full or partial resolves (more on this in the next patch). This code simply adds the new enums and plumbs it in as minimally as necessary. Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Reviewed-by: Topi Pohjolainen

[Mesa-dev] [PATCH v15 08/16] i965/miptree: Allocate mt earlier in update winsys

2017-06-06 Thread Daniel Stone
From: Ben Widawsky Allows us to continue utilizing common miptree creation using __DRIimage without creating a new DRIimage (for the intel_process_dri2_buffer() case). This is a bit ugly, but I think it's the best one can do. v2: This patch let's us remove the temporary no_aux variable since mt

[Mesa-dev] [PATCH v15 16/16] i965: Handle compression modifier

2017-06-06 Thread Daniel Stone
From: Ben Widawsky v2: Rename modifier to be more smart (Jason) FINISHME: Use the kernel's final choice for the fb modifier bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.sh ./kmscube none Read bandwidth: 603.91 MiB/s Write bandwidth: 615.28 MiB/s bwidawsk@norri

[Mesa-dev] [PATCH v15 05/16] i965: add a no_aux field to identify buffers without aux data

2017-06-06 Thread Daniel Stone
From: Varad Gautam v2: split this into a separate patch (Jason) Signed-off-by: Ben Widawsky Signed-off-by: Daniel Stone Cc: Jason Ekstrand --- src/mesa/drivers/dri/i965/brw_context.c | 3 +++ src/mesa/drivers/dri/i965/intel_fbo.h | 7 +++ src/mesa/drivers/dri/i965/intel_mip

[Mesa-dev] [PATCH v15 09/16] i965: Pretend that CCS modified images are two planes

2017-06-06 Thread Daniel Stone
From: Ben Widawsky v2: move is_aux into if block. (Jason) Use else block instead of goto (Jason) v3: Fix up logic for is_aux (Ben) Fix up size calculations and add FIXME (Ben) Cc: Jason Ekstrand Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Signed-off-by: Daniel Stone --- src/mesa/dri

[Mesa-dev] [PATCH v15 10/16] i965: Change resolve flags to enum

2017-06-06 Thread Daniel Stone
From: Ben Widawsky In the foreseeable future it doesn't seem to make sense to have multiple resolve flags. What does make sense is to have the caller give an indication to the lower layers what it things should be done for resolve. The enum change distinguishes this binary selection. v2: Make se

[Mesa-dev] [PATCH v15 15/16] i965: Remove scanout restriction from lossless compression

2017-06-06 Thread Daniel Stone
From: Ben Widawsky v2: Try to keep the assert as recommended by Topi. This requires modifying the num_samples check to be <= 1 because internally created buffers set num_samples = 0. v3: Buffers are proactively marked as scanout, often, and so checking is_scanout in whether or not the buffer sup

[Mesa-dev] [PATCH v15 14/16] i965/miptree: Remove dead code assertion

2017-06-06 Thread Daniel Stone
From: Ben Widawsky We no longer allocate a miptree for the mcs_buf, so this is not a useful assertion. Recommended-by: Topi Pohjolainen Signed-off-by: Ben Widawsky Reviewed-by: Topi Pohjolainen Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 1 fil

[Mesa-dev] [PATCH v15 07/16] i965/miptree: Add a return for updating of winsys

2017-06-06 Thread Daniel Stone
From: Ben Widawsky There is nothing particularly useful to do currently if the update fails, but there is no point carrying on either. As a result, this has a behavior change. v2: Make the return type a bool (Topi) v3: Don't leak the bo if update_winsys_renderbuffer fails. (Jason) Signed-off-b

[Mesa-dev] [PATCH v15 06/16] i965: Add logic for allocating BO with CCS

2017-06-06 Thread Daniel Stone
From: Ben Widawsky This patch provides the support (and comments) for allocating the BO with space for the CCS buffer just underneath it. This patch was originally titled: "i965: Create correctly sized mcs for an image" In order to make things more bisectable, reviewable, and to have the CCS_MO

Re: [Mesa-dev] [PATCH 1/7] egl/dri2: Avoid sign extension when building modifier

2017-06-06 Thread Eric Engestrom
On Tuesday, 2017-06-06 18:18:31 +0100, Daniel Stone wrote: > Since the EGL attributes are signed integers, a straight OR would > also perform sign extension, > > Fixes: 6f10e7c37a ("egl/dri2: Create EGLImages with dmabuf modifiers") > Cc: Varad Gautam > Signed-off-by: Daniel Stone > --- > src/e

Re: [Mesa-dev] [PATCH 1/7] egl/dri2: Avoid sign extension when building modifier

2017-06-06 Thread Daniel Stone
Hi Eric, On 6 June 2017 at 18:27, Eric Engestrom wrote: > On Tuesday, 2017-06-06 18:18:31 +0100, Daniel Stone wrote: >> diff --git a/src/egl/drivers/dri2/egl_dri2.c >> b/src/egl/drivers/dri2/egl_dri2.c >> index d31a0bf8e0..7175e827c9 100644 >> --- a/src/egl/drivers/dri2/egl_dri2.c >> +++ b/src/e

Re: [Mesa-dev] [PATCH 04/10] i965/blorp: Inline gen6_blorp_exec

2017-06-06 Thread Pohjolainen, Topi
On Mon, Jun 05, 2017 at 05:55:39PM -0700, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_blorp.c | 29 +++-- > 1 file changed, 11 insertions(+), 18 deletions(-) Patches 1-4: Reviewed-by: Topi Pohjolainen > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp

Re: [Mesa-dev] [PATCH 04/10] i965/blorp: Inline gen6_blorp_exec

2017-06-06 Thread Pohjolainen, Topi
On Tue, Jun 06, 2017 at 08:35:06PM +0300, Pohjolainen, Topi wrote: > On Mon, Jun 05, 2017 at 05:55:39PM -0700, Jason Ekstrand wrote: > > --- > > src/mesa/drivers/dri/i965/brw_blorp.c | 29 +++-- > > 1 file changed, 11 insertions(+), 18 deletions(-) > > Patches 1-4: > > Re

Re: [Mesa-dev] [PATCH 8/8] radeonsi: don't update dependent states if it has no effect

2017-06-06 Thread Samuel Pitoiset
I really like the idea. :-) Though, I have two general comments: 1) I think it would be better to introduce some sort of compare helper functions for the different state changes. Also, for correctness it might be safer to do the opposite checks (if someone introduce a new field and forget to

  1   2   3   >