Re: [Mesa-dev] [PATCH] i965: Set "Subslice Hashing Mode" to 16x16 on Apollolake.

2017-09-04 Thread Andres Gomez
Thanks Eero!

On Tue, 2017-08-29 at 12:26 +0300, Eero Tamminen wrote:
> Hi,
> 
> On 28.08.2017 17:33, Andres Gomez wrote:
> > Kenneth, would we want this patch in 17.1 or we shouldn't bother ?
> 
> See this for more extensive info on its impact:
>   https://bugs.freedesktop.org/show_bug.cgi?id=102272
> 
> (It's just performance.  While it improves some cases, it regresses others.)
> 
> 
>   - Eero
> 
> > On Tue, 2017-05-30 at 16:28 -0700, Kenneth Graunke wrote:
> > > As of 4.11, the kernel isn't bothering to set the subslice hashing mode
> > > on Apollolake, leaving it at the default of 8x8.  (It initializes it to
> > > 16x4 on most platforms.)
> > > 
> > > Performance data for GPUTest Triangle on Apollolake at 1024x640:
> > > 
> > > X-tiled RT:
> > > ---
> > > 8x8 -> 16x4:   2.4325%  +/- 0.383683% (n=107)
> > > 8x8 -> 8x4:   -3.75105% +/- 0.592491% (n=40)
> > > 8x8 -> 16x16:  6.17238% +/- 0.67157%  (n=30)
> > > 
> > > Y-tiled RT:
> > > ---
> > > 8x8 -> 16x4:   1.30307%  +/- 0.297292% (n=205)
> > > 8x8 -> 8x4:   -0.769282% +/- 0.729557% (n=35)
> > > 8x8 -> 16x16:  3.00254%  +/- 0.715503% (n=40)
> > > 
> > > 8x MSAA RT (INTEL_FORCE_MSAA=8):
> > > 
> > > 8x8 -> 16x4:   1.38889% +/- 0.93729%  (n=7)
> > > 8x8 -> 8x4:   -2.10643% +/- 1.15153%  (n=3)
> > > 8x8 -> 16x16:  3.87183% +/- 1.08851%  (n=5)
> > > 
> > > Based on this, we choose 16x16 for Apollolake.
> > > 
> > > Skylake GT2 with X-tiled buffers appears to be a toss-up between 16x4
> > > and 16x16, and with Y-tiled buffers it doesn't seem to really matter.
> > > So we'll leave Skylake alone for now.
> > > 
> > > The hashing mode doesn't seem to make a measurable impact on more
> > > complex benchmarks.
> > > ---
> > >   src/mesa/drivers/dri/i965/brw_defines.h  | 7 +++
> > >   src/mesa/drivers/dri/i965/brw_state_upload.c | 9 +
> > >   2 files changed, 16 insertions(+)
> > > 
> > > diff --git a/src/mesa/drivers/dri/i965/brw_defines.h 
> > > b/src/mesa/drivers/dri/i965/brw_defines.h
> > > index 312dddafd77..1278634269a 100644
> > > --- a/src/mesa/drivers/dri/i965/brw_defines.h
> > > +++ b/src/mesa/drivers/dri/i965/brw_defines.h
> > > @@ -1616,6 +1616,13 @@ enum brw_pixel_shader_coverage_mask_mode {
> > >   # define GEN8_HIZ_PMA_MASK_BITS \
> > >  REG_MASK(GEN8_HIZ_NP_PMA_FIX_ENABLE | 
> > > GEN8_HIZ_NP_EARLY_Z_FAILS_DISABLE)
> > >   
> > > +#define GEN7_GT_MODE0x7008
> > > +# define GEN9_SUBSLICE_HASHING_8x8  (0 << 8)
> > > +# define GEN9_SUBSLICE_HASHING_16x4 (1 << 8)
> > > +# define GEN9_SUBSLICE_HASHING_8x4  (2 << 8)
> > > +# define GEN9_SUBSLICE_HASHING_16x16(3 << 8)
> > > +# define GEN9_SUBSLICE_HASHING_MASK_BITS REG_MASK(3 << 8)
> > > +
> > >   /* Predicate registers */
> > >   #define MI_PREDICATE_SRC0   0x2400
> > >   #define MI_PREDICATE_SRC1   0x2408
> > > diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c 
> > > b/src/mesa/drivers/dri/i965/brw_state_upload.c
> > > index 4647f1c41e0..6a8547c4ede 100644
> > > --- a/src/mesa/drivers/dri/i965/brw_state_upload.c
> > > +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
> > > @@ -70,6 +70,15 @@ brw_upload_initial_gpu_state(struct brw_context *brw)
> > >   GEN9_FLOAT_BLEND_OPTIMIZATION_ENABLE |
> > >   GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC);
> > > ADVANCE_BATCH();
> > > +
> > > +  if (brw->is_broxton) {
> > > + BEGIN_BATCH(3);
> > > + OUT_BATCH(MI_LOAD_REGISTER_IMM | (3 - 2));
> > > + OUT_BATCH(GEN7_GT_MODE);
> > > + OUT_BATCH(GEN9_SUBSLICE_HASHING_MASK_BITS |
> > > +   GEN9_SUBSLICE_HASHING_16x16);
> > > + ADVANCE_BATCH();
> > > +  }
> > >  }
> > >   
> > >  if (brw->gen >= 8) {
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-- 
Br,

Andres

signature.asc
Description: This is a digitally signed message part
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] i965: Set "Subslice Hashing Mode" to 16x16 on Apollolake.

2017-08-28 Thread Andres Gomez
Kenneth, would we want this patch in 17.1 or we shouldn't bother ?

On Tue, 2017-05-30 at 16:28 -0700, Kenneth Graunke wrote:
> As of 4.11, the kernel isn't bothering to set the subslice hashing mode
> on Apollolake, leaving it at the default of 8x8.  (It initializes it to
> 16x4 on most platforms.)
> 
> Performance data for GPUTest Triangle on Apollolake at 1024x640:
> 
>X-tiled RT:
>---
>8x8 -> 16x4:   2.4325%  +/- 0.383683% (n=107)
>8x8 -> 8x4:   -3.75105% +/- 0.592491% (n=40)
>8x8 -> 16x16:  6.17238% +/- 0.67157%  (n=30)
> 
>Y-tiled RT:
>---
>8x8 -> 16x4:   1.30307%  +/- 0.297292% (n=205)
>8x8 -> 8x4:   -0.769282% +/- 0.729557% (n=35)
>8x8 -> 16x16:  3.00254%  +/- 0.715503% (n=40)
> 
>8x MSAA RT (INTEL_FORCE_MSAA=8):
>
>8x8 -> 16x4:   1.38889% +/- 0.93729%  (n=7)
>8x8 -> 8x4:   -2.10643% +/- 1.15153%  (n=3)
>8x8 -> 16x16:  3.87183% +/- 1.08851%  (n=5)
> 
> Based on this, we choose 16x16 for Apollolake.
> 
> Skylake GT2 with X-tiled buffers appears to be a toss-up between 16x4
> and 16x16, and with Y-tiled buffers it doesn't seem to really matter.
> So we'll leave Skylake alone for now.
> 
> The hashing mode doesn't seem to make a measurable impact on more
> complex benchmarks.
> ---
>  src/mesa/drivers/dri/i965/brw_defines.h  | 7 +++
>  src/mesa/drivers/dri/i965/brw_state_upload.c | 9 +
>  2 files changed, 16 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_defines.h 
> b/src/mesa/drivers/dri/i965/brw_defines.h
> index 312dddafd77..1278634269a 100644
> --- a/src/mesa/drivers/dri/i965/brw_defines.h
> +++ b/src/mesa/drivers/dri/i965/brw_defines.h
> @@ -1616,6 +1616,13 @@ enum brw_pixel_shader_coverage_mask_mode {
>  # define GEN8_HIZ_PMA_MASK_BITS \
> REG_MASK(GEN8_HIZ_NP_PMA_FIX_ENABLE | GEN8_HIZ_NP_EARLY_Z_FAILS_DISABLE)
>  
> +#define GEN7_GT_MODE0x7008
> +# define GEN9_SUBSLICE_HASHING_8x8  (0 << 8)
> +# define GEN9_SUBSLICE_HASHING_16x4 (1 << 8)
> +# define GEN9_SUBSLICE_HASHING_8x4  (2 << 8)
> +# define GEN9_SUBSLICE_HASHING_16x16(3 << 8)
> +# define GEN9_SUBSLICE_HASHING_MASK_BITS REG_MASK(3 << 8)
> +
>  /* Predicate registers */
>  #define MI_PREDICATE_SRC0   0x2400
>  #define MI_PREDICATE_SRC1   0x2408
> diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c 
> b/src/mesa/drivers/dri/i965/brw_state_upload.c
> index 4647f1c41e0..6a8547c4ede 100644
> --- a/src/mesa/drivers/dri/i965/brw_state_upload.c
> +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
> @@ -70,6 +70,15 @@ brw_upload_initial_gpu_state(struct brw_context *brw)
>  GEN9_FLOAT_BLEND_OPTIMIZATION_ENABLE |
>  GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC);
>ADVANCE_BATCH();
> +
> +  if (brw->is_broxton) {
> + BEGIN_BATCH(3);
> + OUT_BATCH(MI_LOAD_REGISTER_IMM | (3 - 2));
> + OUT_BATCH(GEN7_GT_MODE);
> + OUT_BATCH(GEN9_SUBSLICE_HASHING_MASK_BITS |
> +   GEN9_SUBSLICE_HASHING_16x16);
> + ADVANCE_BATCH();
> +  }
> }
>  
> if (brw->gen >= 8) {
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [ANNOUNCE] mesa 17.1.8

2017-08-28 Thread Andres Gomez
Mesa 17.1.8 is now available.

In this release we have:

In Mesa Core we include a fix to prevent a crash in
glCompressedTextureSubImage3D.

The GLSL compiler now includes a fix to add some int64 constant
propagation cases.

Intel drivers have received several patches. Among those, i965 has
gotten a fix for performance queries and another one for a problem that
could have caused rendering corruption or possibly hangs in programs
which use compute shaders.

AMD's drivers have also seen some improvements. radeonsi has gotten a
temporary workaround for a tessellation driver bug while radv includes
a patch to prevent a potential crash.

nouveau's has gotten a fix to properly set the sType for TXF ops to
U32.

For EGL, the Wayland platform of the the DRI2 drivers has received a
fix to prevent a possible indefinite block.


Andres Gomez (7):
  docs: add sha256 checksums for 17.1.7
  cherry-ignore: cherry-ignore: added 17.2 nominations.
  cherry-ignore: add "i965/tex: Don't pass samples to 
miptree_create_for_teximage"
  cherry-ignore: add "i965: Make a BRW_NEW_FAST_CLEAR_COLOR dirty bit."
  cherry-ignore: add "egl/drm: Fix misused x and y offsets in 
swrast_*_image*"
  Update version to 17.1.8
  docs: add release notes for 17.1.8

Christoph Haag (1):
  mesa: only copy requested compressed teximage cubemap faces

Dave Airlie (1):
  radv: don't crash if we have no framebuffer

Ilia Mirkin (2):
  glsl: add a few missing int64 constant propagation cases
  nv50/ir: properly set sType for TXF ops to U32

Jason Ekstrand (1):
  i965: Stop looking at NewDriverState when emitting 3DSTATE_URB

Kai Chen (1):
  egl/wayland: Use roundtrips when awaiting buffer release

Lionel Landwerlin (1):
  i965: perf: minimize the chances to spread queries across batchbuffers

Marek Olšák (1):
  radeonsi/gfx9: add a temporary workaround for a tessellation driver bug

Tim Rowley (1):
  swr/rast: switch gen_knobs.cpp license

Topi Pohjolainen (1):
  intel/blorp: Adjust intra-tile x when faking rgb with red-only

git tag: mesa-17.1.8

https://mesa.freedesktop.org/archive/mesa-17.1.8.tar.gz
MD5:  d251286dce8de85dfa43d6ce36ed1c8d  mesa-17.1.8.tar.gz
SHA1: c7d7a836a49aa8efa56cb98db777cd6dc5ec241a  mesa-17.1.8.tar.gz
SHA256: faa59a677e88fd5224cdfebcdb6ca9ad3e3c64bd562baa8d5c3c1faeef1066b6  
mesa-17.1.8.tar.gz
SHA512: 
a4fdceef8dbaffd871fe329c8e601c7186288b7a294424044ed15031a7f651aaa7b68b15c4b6e6c1b288d5e4dfd80a7cdba08a2647786809f6dcfc9547a545b5
  mesa-17.1.8.tar.gz
PGP:  https://mesa.freedesktop.org/archive/mesa-17.1.8.tar.gz.sig

https://mesa.freedesktop.org/archive/mesa-17.1.8.tar.xz
MD5:  829777b6a95090e8ea58be93f00e75c7  mesa-17.1.8.tar.xz
SHA1: dee665bfc495c992967e439463f25f5061c9be16  mesa-17.1.8.tar.xz
SHA256: 75ed2eaeae26ddd536150f294386468ae2e1a7717948c41cd14b7875be5269db  
mesa-17.1.8.tar.xz
SHA512: 
d29fd999d75967683f5aa836cf0b701705f54de428ebbbac059c3e335e94552c0b455aa67fa2870464a086dc58994f2f320710a1abc265dea363241aede71c5b
  mesa-17.1.8.tar.xz
PGP:  https://mesa.freedesktop.org/archive/mesa-17.1.8.tar.xz.sig

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Mesa 17.1.8 release candidate

2017-08-25 Thread Andres Gomez
Hello list,

The candidate for the Mesa 17.1.8 is now available. Currently we have:
 - 15 queued
 - 0 nominated (outstanding)
 - and 2 rejected patches


In the current queue we have:

In Mesa Core we include a fix to prevent a crash in
glCompressedTextureSubImage3D.

The GLSL compiler now includes a fix to add some int64 constant
propagation cases.

Intel drivers have received several patches. Among those, i965 has
gotten a fix for performance queries and another one for a problem that
could have caused rendering corruption or possibly hangs in programs
which use compute shaders.

AMD's drivers have also seen some improvements. radeonsi has gotten a
temporary workaround for a tessellation driver bug while radv includes
a patch to prevent a potential crash.

nouveau's has gotten a fix to properly set the sType for TXF ops to
U32.

For EGL, the Wayland platform of the the DRI2 drivers has received a
fix to prevent a possible indefinite block.

Take a look at section "Mesa stable queue" for more information.


Testing reports/general approval


Any testing reports (or general approval of the state of the branch)
will be greatly appreciated.

The plan is to have 17.1.8 next Monday (28th of August), around or
shortly after 13:00 GMT.

If you have any questions or suggestions - be that about the current
patch queue or otherwise, please go ahead.


Trivial merge conflicts
---

3f3e925d404c8524c342b72c32e4c151e293b2c9
Author: Dave Airlie <airl...@redhat.com>

radv: don't crash if we have no framebuffer

(cherry picked from commit 4a091b0788664f73bbb35c14d04c00cebf37e17a)

54bb87c25a73a9c0d4c8c65b6df586dc144db361
Author: Marek Olšák <marek.ol...@amd.com>

radeonsi/gfx9: add a temporary workaround for a tessellation driver bug

(cherry picked from commit 166823bfd26ff7e9b88099598305967336525716)

4fce4ce271b42357df50ef6d62a1481e41655f00
Author: Christoph Haag <haa...@frickel.club>

mesa: only copy requested compressed teximage cubemap faces

(cherry picked from commit 87556a650ad363b41d86f4e25d5c4696f9af4550)


Cheers,
Andres


Mesa stable queue
-

Nominated (0)
=


Queued (15)
===

Andres Gomez (5):
  docs: add sha256 checksums for 17.1.7
  cherry-ignore: cherry-ignore: added 17.2 nominations.
  cherry-ignore: add "i965/tex: Don't pass samples to 
miptree_create_for_teximage"
  cherry-ignore: add "i965: Make a BRW_NEW_FAST_CLEAR_COLOR dirty bit."
  cherry-ignore: add "egl/drm: Fix misused x and y offsets in 
swrast_*_image*"

Christoph Haag (1):
  mesa: only copy requested compressed teximage cubemap faces

Dave Airlie (1):
  radv: don't crash if we have no framebuffer

Ilia Mirkin (2):
  glsl: add a few missing int64 constant propagation cases
  nv50/ir: properly set sType for TXF ops to U32

Jason Ekstrand (1):
  i965: Stop looking at NewDriverState when emitting 3DSTATE_URB

Kai Chen (1):
  egl/wayland: Use roundtrips when awaiting buffer release

Lionel Landwerlin (1):
  i965: perf: minimize the chances to spread queries across batchbuffers

Marek Olšák (1):
  radeonsi/gfx9: add a temporary workaround for a tessellation driver bug

Tim Rowley (1):
  swr/rast: switch gen_knobs.cpp license

Topi Pohjolainen (1):
  intel/blorp: Adjust intra-tile x when faking rgb with red-only


Rejected (2)


Jason Ekstrand (1):
  i965/tex: Don't pass samples to miptree_create_for_teximage

Depends on earlier commit 76e2f390f98 which did not land in branch.

Kenneth Graunke (1):
  i965: Make a BRW_NEW_FAST_CLEAR_COLOR dirty bit.

Depends on earlier commit f296c22989ff which did not land in branch.

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] docs: add an additional final cycle for 17.1

2017-08-25 Thread Andres Gomez
Cc: Emil Velikov <emil.veli...@collabora.com>
Cc: Juan A. Suarez Romero <jasua...@igalia.com>
Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 docs/release-calendar.html | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/release-calendar.html b/docs/release-calendar.html
index 1ed3ae14a97..011e37a6765 100644
--- a/docs/release-calendar.html
+++ b/docs/release-calendar.html
@@ -39,10 +39,16 @@ if you'd like to nominate a patch in the next stable 
release.
 Notes
 
 
-17.1
+17.1
 2017-08-25
 17.1.8
 Andres Gomez
+
+
+
+2017-09-08
+17.1.9
+Andres Gomez
 Final planned release for the 17.1 series
 
 
-- 
2.14.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/2] docs: remove released and extend the calendar until the end of 2017

2017-08-25 Thread Andres Gomez
Completed the 17.2 cycle and added the beginning of the 17.3 one.

Cc: Emil Velikov <emil.veli...@collabora.com>
Cc: Juan A. Suarez Romero <jasua...@igalia.com>
Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 docs/release-calendar.html | 86 ++
 1 file changed, 80 insertions(+), 6 deletions(-)

diff --git a/docs/release-calendar.html b/docs/release-calendar.html
index 93c02dafe94..1ed3ae14a97 100644
--- a/docs/release-calendar.html
+++ b/docs/release-calendar.html
@@ -46,17 +46,91 @@ if you'd like to nominate a patch in the next stable 
release.
 Final planned release for the 17.1 series
 
 
-17.2
-2017-08-11
-17.2.0-rc4
+17.2
+2017-09-08
+17.2.1
 Emil Velikov
-May be promoted to 17.2.0 final
+
 
 
-2017-08-25
-17.2.1
+2017-09-22
+17.2.2
+Juan A. Suarez Romero
+
+
+
+2017-10-06
+17.2.3
+Emil Velikov
+
+
+
+2017-10-20
+17.2.4
+Juan A. Suarez Romero
+
+
+
+2017-11-03
+17.2.5
+Andres Gomez
+
+
+
+2017-11-17
+17.2.6
+Andres Gomez
+
+
+
+2017-12-01
+17.2.7
+Andres Gomez
+Final planned release for the 17.2 series
+
+
+17.3
+2017-10-20
+17.3.0-rc1
 Emil Velikov
 
+
+
+2017-10-27
+17.3.0-rc2
+Emil Velikov
+
+
+
+2017-11-03
+17.3.0-rc3
+Emil Velikov
+
+
+
+2017-11-10
+17.3.0-rc4
+Emil Velikov
+May be promoted to 17.3.0 final
+
+
+2017-11-24
+17.3.1
+Andres Gomez
+
+
+
+2017-12-08
+17.3.2
+Emil Velikov
+
+
+
+2017-12-22
+17.3.3
+Emil Velikov
+
+
 
 
 
-- 
2.14.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 0/2] docs: update the release calendar until the end of 2017

2017-08-25 Thread Andres Gomez
The first email updates the calendar with a proposal for the future
releases until the end of 2017. It also removes versions that have
already been released.

The second patch is a proposal to add yet another final iteration to
the 17.1 cycle.

Andres Gomez (2):
  docs: remove released and extend the calendar until the end of 2017
  docs: add an additional final cycle for 17.1

 docs/release-calendar.html | 94 ++
 1 file changed, 87 insertions(+), 7 deletions(-)

-- 
2.14.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] i965: Make a BRW_NEW_FAST_CLEAR_COLOR dirty bit.

2017-08-24 Thread Andres Gomez
Kenneth, for 17.1, this patch depends on f9fd976e8adb and others.

If you still want to add it for 17.1, I think we would need a backport.

Br.

On Thu, 2017-08-17 at 15:16 -0700, Kenneth Graunke wrote:
> When changing fast clear colors, we need to emit new SURFACE_STATE
> with the updated color at the next draw call.
> 
> Most things work today because the atoms that handle SURFACE_STATE
> for images (mutable images, textures, render targets) also listen to
> BRW_NEW_BLORP, causing us to re-emit these on every BLORP operation.
> However, this is overkill - most BLORP operations don't require us
> to re-emit SURFACE_STATE.
> 
> One case where this is broken today is a fast clear to a different
> color followed by a non-coherent framebuffer fetch.  The renderbuffer
> read atom doesn't listen to BRW_NEW_BLORP, and would not get the new
> fast clear color.
> 
> Cc: mesa-sta...@lists.freedesktop.org
> ---
>  src/mesa/drivers/dri/i965/brw_blorp.c | 13 ++---
>  src/mesa/drivers/dri/i965/brw_context.h   |  2 ++
>  src/mesa/drivers/dri/i965/brw_gs_surface_state.c  |  1 +
>  src/mesa/drivers/dri/i965/brw_state_upload.c  |  1 +
>  src/mesa/drivers/dri/i965/brw_tcs_surface_state.c |  1 +
>  src/mesa/drivers/dri/i965/brw_tes_surface_state.c |  1 +
>  src/mesa/drivers/dri/i965/brw_vs_surface_state.c  |  1 +
>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c  | 10 --
>  8 files changed, 25 insertions(+), 5 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c 
> b/src/mesa/drivers/dri/i965/brw_blorp.c
> index d8e48064e3a..3ea396d726e 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> @@ -819,16 +819,23 @@ do_single_blorp_clear(struct brw_context *brw, struct 
> gl_framebuffer *fb,
>   brw_meta_convert_fast_clear_color(brw, irb->mt,
> >Color.ClearColor);
>  
> +  bool same_clear_color = memcmp(>mt->fast_clear_color,
> + _color, sizeof(clear_color)) == 0;
> +
>/* If the buffer is already in INTEL_FAST_CLEAR_STATE_CLEAR, the clear
> * is redundant and can be skipped.
> */
> -  if (aux_state == ISL_AUX_STATE_CLEAR &&
> -  memcmp(>mt->fast_clear_color,
> - _color, sizeof(clear_color)) == 0)
> +  if (aux_state == ISL_AUX_STATE_CLEAR && same_clear_color)
>   return;
>  
>irb->mt->fast_clear_color = clear_color;
>  
> +  /* If the clear color has changed, we need to emit a new SURFACE_STATE
> +   * on the next draw call.
> +   */
> +  if (!same_clear_color)
> + ctx->NewDriverState |= BRW_NEW_FAST_CLEAR_COLOR;
> +
>DBG("%s (fast) to mt %p level %d layers %d+%d\n", __FUNCTION__,
>irb->mt, irb->mt_level, irb->mt_layer, num_layers);
>  
> diff --git a/src/mesa/drivers/dri/i965/brw_context.h 
> b/src/mesa/drivers/dri/i965/brw_context.h
> index d41e6aa7bde..9061dc19936 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.h
> +++ b/src/mesa/drivers/dri/i965/brw_context.h
> @@ -215,6 +215,7 @@ enum brw_state_id {
> BRW_STATE_VIEWPORT_COUNT,
> BRW_STATE_CONSERVATIVE_RASTERIZATION,
> BRW_STATE_DRAW_CALL,
> +   BRW_STATE_FAST_CLEAR_COLOR,
> BRW_NUM_STATE_BITS
>  };
>  
> @@ -306,6 +307,7 @@ enum brw_state_id {
>  #define BRW_NEW_BLORP   (1ull << BRW_STATE_BLORP)
>  #define BRW_NEW_CONSERVATIVE_RASTERIZATION (1ull << 
> BRW_STATE_CONSERVATIVE_RASTERIZATION)
>  #define BRW_NEW_DRAW_CALL   (1ull << BRW_STATE_DRAW_CALL)
> +#define BRW_NEW_FAST_CLEAR_COLOR(1ull << BRW_STATE_FAST_CLEAR_COLOR)
>  
>  struct brw_state_flags {
> /** State update flags signalled by mesa internals */
> diff --git a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c 
> b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
> index d5a106d6bec..bcf39a88522 100644
> --- a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
> @@ -133,6 +133,7 @@ const struct brw_tracked_state brw_gs_image_surfaces = {
>.mesa = _NEW_TEXTURE,
>.brw = BRW_NEW_BATCH |
>   BRW_NEW_BLORP |
> + BRW_NEW_FAST_CLEAR_COLOR |
>   BRW_NEW_GEOMETRY_PROGRAM |
>   BRW_NEW_GS_PROG_DATA |
>   BRW_NEW_IMAGE_UNITS,
> diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c 
> b/src/mesa/drivers/dri/i965/brw_state_upload.c
> index 1ae45ba2ac1..9add4515b92 100644
> --- a/src/mesa/drivers/dri/i965/brw_state_upload.c
> +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
> @@ -350,6 +350,7 @@ static struct dirty_bit_map brw_bits[] = {
> DEFINE_BIT(BRW_NEW_VIEWPORT_COUNT),
> DEFINE_BIT(BRW_NEW_CONSERVATIVE_RASTERIZATION),
> DEFINE_BIT(BRW_NEW_DRAW_CALL),
> +   DEFINE_BIT(BRW_NEW_FAST_CLEAR_COLOR),
> {0, 0, 0}
>  };
>  
> diff --git a/src/mesa/drivers/dri/i965/brw_tcs_surface_state.c 
> 

Re: [Mesa-dev] [PATCH] ac/nir: fixup layer/viewport export for GFX9.

2017-08-23 Thread Andres Gomez
Hi Dave,

This patch landed tagged for 17.2 only. Was it, then, not nominated for
17.1 intentionally ?

Br.

On Thu, 2017-08-17 at 14:27 +1000, Dave Airlie wrote:
> From: Dave Airlie 
> 
> GFX9 moved where the viewport index export goes.
> 
> Signed-off-by: Dave Airlie 
> ---
>  src/amd/common/ac_nir_to_llvm.c | 32 +---
>  1 file changed, 25 insertions(+), 7 deletions(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 7aa7567..a17a232 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -5518,11 +5518,11 @@ handle_vs_outputs_post(struct nir_to_llvm_context 
> *ctx,
>
> ctx->nir->outputs[radeon_llvm_reg_index_soa(VARYING_SLOT_VIEWPORT, 0)], "");
>   }
>  
> - uint32_t mask = ((outinfo->writes_pointsize == true ? 1 : 0) |
> -  (outinfo->writes_layer == true ? 4 : 0) |
> -  (outinfo->writes_viewport_index == true ? 8 : 0));
> - if (mask) {
> - pos_args[1].enabled_channels = mask;
> + if (outinfo->writes_pointsize ||
> + outinfo->writes_layer ||
> + outinfo->writes_viewport_index) {
> + pos_args[1].enabled_channels = ((outinfo->writes_pointsize == 
> true ? 1 : 0) |
> + (outinfo->writes_layer == true 
> ? 4 : 0));
>   pos_args[1].valid_mask = 0;
>   pos_args[1].done = 0;
>   pos_args[1].target = V_008DFC_SQ_EXP_POS + 1;
> @@ -5536,8 +5536,26 @@ handle_vs_outputs_post(struct nir_to_llvm_context *ctx,
>   pos_args[1].out[0] = psize_value;
>   if (outinfo->writes_layer == true)
>   pos_args[1].out[2] = layer_value;
> - if (outinfo->writes_viewport_index == true)
> - pos_args[1].out[3] = viewport_index_value;
> + if (outinfo->writes_viewport_index == true) {
> + if (ctx->options->chip_class >= GFX9) {
> + /* GFX9 has the layer in out.z[10:0] and the 
> viewport
> +  * index in out.z[19:16].
> +  */
> + LLVMValueRef v = viewport_index_value;
> + v = to_integer(>ac, v);
> + v = LLVMBuildShl(ctx->builder, v,
> +  LLVMConstInt(ctx->i32, 16, 
> false),
> +  "");
> + v = LLVMBuildOr(ctx->builder, v,
> + to_integer(>ac, 
> pos_args[1].out[2]), "");
> +
> + pos_args[1].out[2] = to_float(>ac, v);
> + pos_args[1].enabled_channels |= 1 << 2;
> + } else {
> + pos_args[1].out[3] = viewport_index_value;
> + pos_args[1].enabled_channels |= 1 << 3;
> + }
> + }
>   }
>   for (i = 0; i < 4; i++) {
>   if (pos_args[i].out[0])
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH] i965/tex: Don't pass samples to miptree_create_for_teximage

2017-08-22 Thread Andres Gomez
Jason, 76e2f390f9863a35 didn't land in 17.1 so I understand this is not
really needed there and we only need it for 17.2.

WDYT? 

On Sat, 2017-08-19 at 11:07 -0700, Jason Ekstrand wrote:
> In 76e2f390f9863a35, when Topi switched num_samples from 0 to 1 for
> single-sampled, he accidentally switched the last parameter in the call
> to miptree_create_for_teximage from 0 to 1 thinking it was num_samples
> when it was actually layout_flags.  Switching from 0 to 1 added the
> MIPTREE_LAYOUT_ACCELERATED_UPLOAD flag which causes us to allocate a
> busy BO instead of an idle one.  This caused the subsequent CPU upload
> to consistently stall.  The end result was a 15% performance drop in the
> SynMark v7 DrvRes microbenchmark.  This restores the old behavior and
> fixes the performance regression.
> 
> Cc: Kenneth Graunke 
> Cc: Topi Pohjolainen 
> Fixes: 76e2f390f9863a356d1419982dec705260d67eff
> Bugzilla: https://bugs.freedesktop.org/102260
> Cc: mesa-sta...@lists.freedesktop.org
> ---
>  src/mesa/drivers/dri/i965/intel_tex.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_tex.c 
> b/src/mesa/drivers/dri/i965/intel_tex.c
> index 890c82d..94a7ad3 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex.c
> @@ -94,7 +94,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
> } else {
>intel_image->mt = intel_miptree_create_for_teximage(brw, intel_texobj,
>intel_image,
> -  1 /* samples */);
> +  
> MIPTREE_CREATE_DEFAULT);
>if (!intel_image->mt)
>   return false;
>  
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] isl: Validate row pitch of stencil surfaces.

2017-08-22 Thread Andres Gomez
On Thu, 2017-08-10 at 12:51 -0700, Jason Ekstrand wrote:
> On August 10, 2017 12:45:43 PM Ilia Mirkin  wrote:
> 
> > On Wed, Aug 9, 2017 at 4:09 PM, Kenneth Graunke  
> > wrote:
> > > Also, silence an obnoxious finishme that started occurring for all
> > > GL applications which use stencil after the i965 ISL conversion.
> > 
> > Without commenting on the correctness of the patch, either this or
> > something like it should really end up in 17.2.
> > 
> > Cheers,
> 
> Agreed

Would we want it also in 17.1 ?

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [ANNOUNCE] mesa 17.1.7

2017-08-21 Thread Andres Gomez
Mesa 17.1.7 is now available.

In this release we have:

The state tracker received a fix to avoid a crash accessing a null
pointer exposed using llvmpipe on Windows.

The GLSL compiler has received a fix that prevents an assertion in an
error code path with invalid types.

Intel drivers have a received a fix to reset the pull params when a
dual object compile fails. i965 has gotten a fix for an improper
assertion when using primus and a correction to include miptree buffer
offset to the start of the buffer in the relocation. Meanwhile, the anv
Vulkan driver includes a patch to allow sampling on depth-only formats
on gen7.

Gallium has gotten a patch to compute seconds and nanoseconds parts
separately to reduce severity of precision loss and roll over less.

The AMD drivers has seen corrected problems in the NIR to LLVM
translation with the lsb emission and the f16->f32 denorm handling for
SI/CIK. Additionally, a hang when libelf is replaced by an incompatible
version and shader compilation failed is now prevented. radeonsi has
now CE disabled by default. The radv Vulkan driver includes now a patch
to avoid a GPU hang on bogus applications that would resolve with non-
multisample src, another one that fixes MSAA on SI GPUs and has fixed
some freezes by forcing cs/ps/l2 flush at end of command stream.

nouveau's codegen has gotten a fix for a problem involving
ConstantFolding with saturation that was visible in Hitman Absolution
and, possibly, in some other games. Also, it has gotten fixes for the
srcMask computation, for TG4, TXF and TXQ.

The swr driver has received a patch to fix invalid castings for calls
to Interlocked* functions.

The WGL state tracker has received a fix to avoid regular freezes due
to negative time stamp differences if swap interval is enabled.

EGL has gotten a fix to avoid a crash if an invalid display is used. In
the DRI2 drivers, the X11 platform received a fix to prevent leaking
xfixes_query in the error path.

From build and integration point of view, we have added a fix to solve
building on old glibc.


Andres Gomez (9):
  cherry-ignore: add "swr: use the correct variable for no undefined 
symbols"
  cherry-ignore: add "radeon/ac: use ds_swizzle for derivs on si/cik."
  cherry-ignore: add "configure: remove trailing "-a" in swr architecture 
teststable: 17.2 nomination only."
  cherry-ignore: added 17.2 nominations.
  cherry-ignore: add "radv: Handle VK_ATTACHMENT_UNUSED in color 
attachments."
  cherry-ignore: add "virgl: drop precise modifier."
  cherry-ignore: add "radv: handle 10-bit format clamping workaround."
  Update version to 17.1.7
  docs: add release notes for 17.1.7

Chris Wilson (1):
  i965/blit: Remember to include miptree buffer offset in relocs

Connor Abbott (1):
  ac/nir: fix lsb emission

Dave Airlie (5):
  intel/vec4/gs: reset nr_pull_param if DUAL_INSTANCED compile failed.
  radv: avoid GPU hangs if someone does a resolve with non-multisample src 
(v2)
  radv: fix f16->f32 denorm handling for SI/CIK. (v2)
  radv: fix MSAA on SI gpus.
  radv: force cs/ps/l2 flush at end of command stream. (v2)

Emil Velikov (3):
  docs: add sha256 checksums for 17.1.6
  egl/x11: don't leak xfixes_query in the error path
  egl: avoid eglCreatePlatform*Surface{EXT,} crash with invalid dpy

Eric Anholt (1):
  util: Fix build on old glibc.

Frank Richter (3):
  st/mesa: fix a null pointer access
  st/wgl: check for negative delta in wait_swap_interval()
  gallium/os: fix os_time_get_nano() to roll over less

Ilia Mirkin (3):
  glsl/ast: update rhs in addition to the var's constant_value
  nv50/ir: fix srcMask computation for TG4 and TXF
  nv50/ir: fix TXQ srcMask

Jason Ekstrand (1):
  anv/formats: Allow sampling on depth-only formats on gen7

Karol Herbst (1):
  nv50/ir: fix ConstantFolding with saturation

Kenneth Graunke (1):
  i965: Delete pitch alignment assertion in get_blit_intratile_offset_el.

Marek Olšák (2):
  ac: fail shader compilation if libelf is replaced by an incompatible 
version
  radeonsi: disable CE by default

Tim Rowley (1):
  swr/rast: Fix invalid casting for calls to Interlocked* functions

git tag: mesa-17.1.7

https://mesa.freedesktop.org/archive/mesa-17.1.7.tar.gz
MD5:  634b7e5f5e44149a9cf6bff848e54c3f  mesa-17.1.7.tar.gz
SHA1: 6d43b2bcf48aca155805345dbd30cf487b76945a  mesa-17.1.7.tar.gz
SHA256: 7ca484fe3194e8185d9a20261845bfd284cc40d0f3fda690d317f85ac7b91af5  
mesa-17.1.7.tar.gz
SHA512: 
0894e74d3abf196464df53aa40dcd110980dc008635a451db39886ff587df14b3cbbab50e62164bbac0b5e9a3cb7669f8fbec3550f18519b0fb52a84aeebfb20
  mesa-17.1.7.tar.gz
PGP:  https://mesa.freedesktop.org/archive/mesa-17.1.7.tar.gz.sig

https://mesa.freedesktop.org/archive/mesa-17.1.7.tar.xz
MD5:  e40bb428a263bd28cbf6478dae45b207  mesa-17.1.7.tar.

Re: [Mesa-dev] Mesa 17.1.7 release candidate

2017-08-20 Thread Andres Gomez
On Sun, 2017-08-20 at 07:19 -0700, Jason Ekstrand wrote:
> On August 19, 2017 8:38:04 AM Andres Gomez <ago...@igalia.com> wrote:
> 

[...]

> > 
> > Mesa stable queue
> > -
> > 
> > Nominated (3)
> > =
> > 
> > Ilia Mirkin (1):
> >   glsl: add a few missing int64 constant propagation cases
> > 
> > Lionel Landwerlin (1):
> >   i965: perf: minimize the chances to spread queries across batchbuffers
> > 
> > Jason Ekstrand (1):
> >   i965: Stop looking at NewDriverState when emitting 3DSTATE_URB
> 
> This one has landed in master and it fixed a pretty nasty compute bug.

I can include it already in 17.1.7 if you really want to but I'd rather
 leave it for 17.1.8 which will come already next week so we have a bit
more time for testing.

WDYT?

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Mesa 17.1.7 release candidate

2017-08-20 Thread Andres Gomez
On Sat, 2017-08-19 at 17:56 -0400, Ilia Mirkin wrote:
> On Sat, Aug 19, 2017 at 11:37 AM, Andres Gomez <ago...@igalia.com> wrote:
> > nouveau's nv50 has gotten a fix for a problem involving ConstantFolding
> > with saturation that was visible in Hitman Absolution and, possibly, in
> > some other games. Also, it has gotten fixes for the srcMask
> > computation, for TG4, TXF and TXQ.
> 
> When you see commits like "nv50/ir", this is in reference to the
> codegen compiler, which is used for all nv50+ GPUs. You could say
> "nouveau's codegen" or just plain "nouveau". nv30/nv40 gpu's don't use
> those, but having perfect precision in these notes is next to
> impossible. If an issue is strictly for e.g. nvc0+, despite being in
> the compiler, I'll mark it as nvc0/ir or even gk110/ir or whatever.
> 
> Having better release notes is a double-edged sword... they're more
> informative, but you're also on the hook for getting all the details
> right, and it's hard to be an expert on every driver.

Note taken. Thanks for the comments ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Mesa 17.1.7 release candidate

2017-08-19 Thread Andres Gomez
On Sat, 2017-08-19 at 21:40 +0100, Emil Velikov wrote:
> [Slimming down the CC list]
> 
> Hi Andres,
> 
> On 19 August 2017 at 16:37, Andres Gomez <ago...@igalia.com> wrote:
> 
> > 4c09f648929fbde25e4be44fa2983c0f3ac2fd11
> 
> commit 774e77ab64de05d437939110dd11c35a300d47f6
> Seems like the remaining shas are also off.
> 

Oh, damn! I messed up because of doing a rebase after listing here the
trivial merge conflicts ☹

> > Author: Emil Velikov <emil.veli...@collabora.com>
> > 
> > egl: avoid eglCreatePlatform*Surface{EXT,} crash with invalid dpy
> > 
> > (cherry picked from commit 26fbb9eacddb1b809739cb12477bde13501d6d5a)
> > 
> 
> Conflict resolution looks good.
> 
> > Eric Engestrom (1):
> >   gbm: add gbm_bo_get_bpp()
> > 
> 
> This adds new API to libgbm. Something stable release should _not_ be doing.
> Although, yes, it is required for the egl/drm fixes below.
> 
> > Gwan-gyeong Mun (2):
> >   egl/drm: Fix misused x and y offsets in swrast_put_image2()
> >   egl/drm: Fix misused x and y offsets in swrast_get_image()
> > 
> 
> The issues exist since the code was introduced back in 2014.
> Hence I doubt there's a warrant to breaking existing assumptions and
> principles as mentioned above.
> 
> If the issue is quite severe we could keep the patches, although
> gbm_bo_get_bpp() should be internal.

You are right.

I think at this point is just better to drop those 3 patches.

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Mesa 17.1.7 release candidate

2017-08-19 Thread Andres Gomez
m>

radv: fix MSAA on SI gpus.

(cherry picked from commit 8bf39307517a04263532e3c5a49b5be1f4a99032)


Cheers,
Andres


Mesa stable queue
-

Nominated (3)
=

Ilia Mirkin (1):
  glsl: add a few missing int64 constant propagation cases

Lionel Landwerlin (1):
  i965: perf: minimize the chances to spread queries across batchbuffers

Jason Ekstrand (1):
  i965: Stop looking at NewDriverState when emitting 3DSTATE_URB


Queued (33)
===

Andres Gomez (7):
  cherry-ignore: add "swr: use the correct variable for no undefined 
symbols"
  cherry-ignore: add "radeon/ac: use ds_swizzle for derivs on si/cik."
  cherry-ignore: add "configure: remove trailing "-a" in swr architecture 
teststable: 17.2 nomination only."
  cherry-ignore: added 17.2 nominations.
  cherry-ignore: add "radv: Handle VK_ATTACHMENT_UNUSED in color 
attachments."
  cherry-ignore: add "virgl: drop precise modifier."
  cherry-ignore: add "radv: handle 10-bit format clamping workaround."

Chris Wilson (1):
  i965/blit: Remember to include miptree buffer offset in relocs

Connor Abbott (1):
  ac/nir: fix lsb emission

Dave Airlie (5):
  intel/vec4/gs: reset nr_pull_param if DUAL_INSTANCED compile failed.
  radv: avoid GPU hangs if someone does a resolve with non-multisample src 
(v2)
  radv: fix f16->f32 denorm handling for SI/CIK. (v2)
  radv: fix MSAA on SI gpus.
  radv: force cs/ps/l2 flush at end of command stream. (v2)

Emil Velikov (3):
  docs: add sha256 checksums for 17.1.6
  egl/x11: don't leak xfixes_query in the error path
  egl: avoid eglCreatePlatform*Surface{EXT,} crash with invalid dpy

Eric Anholt (1):
  util: Fix build on old glibc.

Eric Engestrom (1):
  gbm: add gbm_bo_get_bpp()

Frank Richter (3):
  st/mesa: fix a null pointer access
  st/wgl: check for negative delta in wait_swap_interval()
  gallium/os: fix os_time_get_nano() to roll over less

Gwan-gyeong Mun (2):
  egl/drm: Fix misused x and y offsets in swrast_put_image2()
  egl/drm: Fix misused x and y offsets in swrast_get_image()

Ilia Mirkin (3):
  glsl/ast: update rhs in addition to the var's constant_value
  nv50/ir: fix srcMask computation for TG4 and TXF
  nv50/ir: fix TXQ srcMask

Jason Ekstrand (1):
  anv/formats: Allow sampling on depth-only formats on gen7

Karol Herbst (1):
  nv50/ir: fix ConstantFolding with saturation

Kenneth Graunke (1):
  i965: Delete pitch alignment assertion in get_blit_intratile_offset_el.

Marek Olšák (2):
  ac: fail shader compilation if libelf is replaced by an incompatible 
version
  radeonsi: disable CE by default

Tim Rowley (1):
  swr/rast: Fix invalid casting for calls to Interlocked* functions


Rejected (3)


Emil Velikov (1):
  swr: use the correct variable for no undefined symbols

Breaks SWR compilation due to earlier commit f50aa21456 which did not
land in branch.

Dave Airlie (1):
  radeon/ac: use ds_swizzle for derivs on si/cik.

Depends on earlier commit 28634ff7d3 which did not land in branch.

Tim Rowley (1):
  configure: remove trailing "-a" in swr architecture test

Depends on earlier commit 1cb5a6061c which did not land in branch.

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeonsi/gfx9: use the VI codepath for clamping Z

2017-08-18 Thread Andres Gomez
Hi Marek,

This patch landed tagged for 17.2 stable and has been collected for
17.2.0-rc4.

However, it seems like it could be also interesting for 17.1.x (?)

WDYT?

Br.

On Thu, 2017-08-10 at 22:33 +0200, Marek Olšák wrote:
> From: Marek Olšák 
> 
> This fixes corrupted shadows in Unigine Valley.
> The corruption disappeared when I stopped setting IMG_DATA_FORMAT_24_8
> for depth.
> 
> Cc: 17.2 
> ---
>  src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c |  2 +-
>  src/gallium/drivers/radeonsi/si_state.c   | 12 +---
>  2 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c 
> b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
> index 42f977d..f8c99ff 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
> @@ -1385,21 +1385,21 @@ static void tex_fetch_args(
>   z = coords[ref_pos];
>   }
>  
>   /* TC-compatible HTILE promotes Z16 and Z24 to Z32_FLOAT,
>* so the depth comparison value isn't clamped for Z16 and
>* Z24 anymore. Do it manually here.
>*
>* It's unnecessary if the original texture format was
>* Z32_FLOAT, but we don't know that here.
>*/
> - if (ctx->screen->b.chip_class == VI)
> + if (ctx->screen->b.chip_class >= VI)
>   z = ac_build_clamp(>ac, z);
>  
>   address[count++] = z;
>   }
>  
>   /* Pack user derivatives */
>   if (opcode == TGSI_OPCODE_TXD) {
>   int param, num_src_deriv_channels, num_dst_deriv_channels;
>  
>   switch (target) {
> diff --git a/src/gallium/drivers/radeonsi/si_state.c 
> b/src/gallium/drivers/radeonsi/si_state.c
> index 11dee49..2c413a4 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -3170,28 +3170,27 @@ si_make_texture_descriptor(struct si_screen *screen,
>  enum pipe_texture_target target,
>  enum pipe_format pipe_format,
>  const unsigned char state_swizzle[4],
>  unsigned first_level, unsigned last_level,
>  unsigned first_layer, unsigned last_layer,
>  unsigned width, unsigned height, unsigned depth,
>  uint32_t *state,
>  uint32_t *fmask_state)
>  {
>   struct pipe_resource *res = >resource.b.b;
> - const struct util_format_description *base_desc, *desc;
> + const struct util_format_description *desc;
>   unsigned char swizzle[4];
>   int first_non_void;
>   unsigned num_format, data_format, type;
>   uint64_t va;
>  
>   desc = util_format_description(pipe_format);
> - base_desc = util_format_description(res->format);
>  
>   if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) {
>   const unsigned char swizzle_[4] = {0, 0, 0, 0};
>   const unsigned char swizzle_[4] = {1, 1, 1, 1};
>   const unsigned char swizzle_[4] = {3, 3, 3, 3};
>  
>   switch (pipe_format) {
>   case PIPE_FORMAT_S8_UINT_Z24_UNORM:
>   case PIPE_FORMAT_X32_S8X24_UINT:
>   case PIPE_FORMAT_X8Z24_UNORM:
> @@ -3278,29 +3277,20 @@ si_make_texture_descriptor(struct si_screen *screen,
>   num_format = 
> V_008F14_IMG_NUM_FORMAT_USCALED;
>   }
>   }
>   }
>  
>   data_format = si_translate_texformat(>b.b, pipe_format, desc, 
> first_non_void);
>   if (data_format == ~0) {
>   data_format = 0;
>   }
>  
> - /* Enable clamping for UNORM depth formats promoted to Z32F. */
> - if (screen->b.chip_class >= GFX9 &&
> - util_format_has_depth(desc) &&
> - num_format == V_008F14_IMG_NUM_FORMAT_FLOAT &&
> - util_get_depth_format_type(base_desc) != UTIL_FORMAT_TYPE_FLOAT) {
> - /* NUM_FORMAT=FLOAT and DATA_FORMAT=24_8 means "clamp to 
> [0,1]". */
> - data_format = V_008F14_IMG_DATA_FORMAT_24_8;
> - }
> -
>   /* S8 with Z32 HTILE needs a special format. */
>   if (screen->b.chip_class >= GFX9 &&
>   pipe_format == PIPE_FORMAT_S8_UINT &&
>   tex->tc_compatible_htile)
>   data_format = V_008F14_IMG_DATA_FORMAT_S8_32;
>  
>   if (!sampler &&
>   (res->target == PIPE_TEXTURE_CUBE ||
>res->target == PIPE_TEXTURE_CUBE_ARRAY ||
>(screen->b.chip_class <= VI &&
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeon/ac: use ds_swizzle for derivs on si/cik.

2017-08-17 Thread Andres Gomez
Hi Dave,

this patch has been collected for 17.2.0-rc3 but, for 17.1.x, the
conflicts are not so trivial and the landed commit was tagged for
stable without specifying the actual branch.

Therefore, unless you intended this also for 17.1.x and would like to
provide a backport, I'm more keen on dropping it for that branch.

WDYT?

Br.

On Tue, 2017-08-01 at 14:14 +1000, Dave Airlie wrote:
> From: Dave Airlie 
> 
> This looks like it's supported since llvm 3.9 at least,
> so switch over radeonsi and radv to using it, -pro also
> uses this. We can now drop creating lds for these operations
> as the ds_swizzle operation doesn't actually write to lds at all.
> 
> Signed-off-by: Dave Airlie 
> ---
>  src/amd/common/ac_llvm_build.c   | 57 
> +++-
>  src/amd/common/ac_llvm_build.h   |  1 -
>  src/amd/common/ac_nir_to_llvm.c  |  9 +
>  src/gallium/drivers/radeonsi/si_shader.c | 16 +
>  4 files changed, 44 insertions(+), 39 deletions(-)
> 
> diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
> index 9b939c1..a38aad6 100644
> --- a/src/amd/common/ac_llvm_build.c
> +++ b/src/amd/common/ac_llvm_build.c
> @@ -796,21 +796,21 @@ ac_build_ddxy(struct ac_llvm_context *ctx,
> bool has_ds_bpermute,
> uint32_t mask,
> int idx,
> -   LLVMValueRef lds,
> LLVMValueRef val)
>  {
> - LLVMValueRef thread_id, tl, trbl, tl_tid, trbl_tid, args[2];
> + LLVMValueRef tl, trbl, args[2];
>   LLVMValueRef result;
>  
> - thread_id = ac_get_thread_id(ctx);
> + if (has_ds_bpermute) {
> + LLVMValueRef thread_id, tl_tid, trbl_tid;
> + thread_id = ac_get_thread_id(ctx);
>  
> - tl_tid = LLVMBuildAnd(ctx->builder, thread_id,
> -   LLVMConstInt(ctx->i32, mask, false), "");
> + tl_tid = LLVMBuildAnd(ctx->builder, thread_id,
> +   LLVMConstInt(ctx->i32, mask, false), "");
>  
> - trbl_tid = LLVMBuildAdd(ctx->builder, tl_tid,
> - LLVMConstInt(ctx->i32, idx, false), "");
> + trbl_tid = LLVMBuildAdd(ctx->builder, tl_tid,
> + LLVMConstInt(ctx->i32, idx, false), "");
>  
> - if (has_ds_bpermute) {
>   args[0] = LLVMBuildMul(ctx->builder, tl_tid,
>  LLVMConstInt(ctx->i32, 4, false), "");
>   args[1] = val;
> @@ -828,15 +828,42 @@ ac_build_ddxy(struct ac_llvm_context *ctx,
> AC_FUNC_ATTR_READNONE |
> AC_FUNC_ATTR_CONVERGENT);
>   } else {
> - LLVMValueRef store_ptr, load_ptr0, load_ptr1;
> + uint32_t masks[2];
> +
> + switch (mask) {
> + case AC_TID_MASK_TOP_LEFT:
> + masks[0] = 0x8000;
> + if (idx == 1)
> + masks[1] = 0x8055;
> + else
> + masks[1] = 0x80aa;
> +
> + break;
> + case AC_TID_MASK_TOP:
> + masks[0] = 0x8044;
> + masks[1] = 0x80ee;
> + break;
> + case AC_TID_MASK_LEFT:
> + masks[0] = 0x80a0;
> + masks[1] = 0x80f5;
> + break;
> + }
>  
> - store_ptr = ac_build_gep0(ctx, lds, thread_id);
> - load_ptr0 = ac_build_gep0(ctx, lds, tl_tid);
> - load_ptr1 = ac_build_gep0(ctx, lds, trbl_tid);
> + args[0] = val;
> + args[1] = LLVMConstInt(ctx->i32, masks[0], false);
>  
> - LLVMBuildStore(ctx->builder, val, store_ptr);
> - tl = LLVMBuildLoad(ctx->builder, load_ptr0, "");
> - trbl = LLVMBuildLoad(ctx->builder, load_ptr1, "");
> + tl = ac_build_intrinsic(ctx,
> + "llvm.amdgcn.ds.swizzle", ctx->i32,
> + args, 2,
> + AC_FUNC_ATTR_READNONE |
> + AC_FUNC_ATTR_CONVERGENT);
> +
> + args[1] = LLVMConstInt(ctx->i32, masks[1], false);
> + trbl = ac_build_intrinsic(ctx,
> + "llvm.amdgcn.ds.swizzle", ctx->i32,
> + args, 2,
> + AC_FUNC_ATTR_READNONE |
> + AC_FUNC_ATTR_CONVERGENT);
>   }
>  
>   tl = LLVMBuildBitCast(ctx->builder, tl, ctx->f32, "");
> diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
> index 09fd585..ee27d3c 100644
> --- a/src/amd/common/ac_llvm_build.h
> +++ b/src/amd/common/ac_llvm_build.h
> @@ -174,7 +174,6 @@ ac_build_ddxy(struct ac_llvm_context 

Re: [Mesa-dev] [Mesa-stable] [PATCH 3/4] ac/nir: fix 64-bit shifts

2017-08-17 Thread Andres Gomez
I see.

I'll leave it out, then.

Thanks for the clarification! ☺


On Wed, 2017-08-16 at 20:58 -0400, Connor Abbott wrote:
> I didn't enable the Int64 capability for radv until the next patch in
> this series, so the problem this fixes was never exposed to users at
> all. I just ran into it when enabling VK_EXT_shader_ballot -- the
> extension doesn't require it, but the only way to generate SPIR-V
> using it with glslang is with the ARB_shader_ballot GLSL extension
> that does use 64-bit integers.
> 
> P.S. it would be nice to have some Int64 tests in the Vulkan CTS so we
> can catch stuff like this easier.
> 
> On Wed, Aug 16, 2017 at 8:49 PM, Andres Gomez <ago...@igalia.com> wrote:
> > Connor, it looks like we could want this patch in 17.1 (?)
> > 
> > On Fri, 2017-06-30 at 19:56 -0700, Connor Abbott wrote:
> > > From: Connor Abbott <cwabbo...@gmail.com>
> > > 
> > > NIR always makes the shift amount 32 bits, but LLVM asserts if the two
> > > sources aren't the same type. Zero-extend the shift amount to make LLVM
> > > happy.
> > > 
> > > Signed-off-by: Connor Abbott <cwabbo...@gmail.com>
> > > ---
> > >  src/amd/common/ac_nir_to_llvm.c | 15 ---
> > >  1 file changed, 12 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/src/amd/common/ac_nir_to_llvm.c 
> > > b/src/amd/common/ac_nir_to_llvm.c
> > > index 88f3f44..e72747a 100644
> > > --- a/src/amd/common/ac_nir_to_llvm.c
> > > +++ b/src/amd/common/ac_nir_to_llvm.c
> > > @@ -1621,13 +1621,22 @@ static void visit_alu(struct nir_to_llvm_context 
> > > *ctx, const nir_alu_instr *inst
> > >   result = LLVMBuildXor(ctx->builder, src[0], src[1], "");
> > >   break;
> > >   case nir_op_ishl:
> > > - result = LLVMBuildShl(ctx->builder, src[0], src[1], "");
> > > + result = LLVMBuildShl(ctx->builder, src[0],
> > > +   LLVMBuildZExt(ctx->builder, src[1],
> > > + LLVMTypeOf(src[0]), ""),
> > > +   "");
> > >   break;
> > >   case nir_op_ishr:
> > > - result = LLVMBuildAShr(ctx->builder, src[0], src[1], "");
> > > + result = LLVMBuildAShr(ctx->builder, src[0],
> > > +LLVMBuildZExt(ctx->builder, src[1],
> > > +  LLVMTypeOf(src[0]), 
> > > ""),
> > > +"");
> > >   break;
> > >   case nir_op_ushr:
> > > - result = LLVMBuildLShr(ctx->builder, src[0], src[1], "");
> > > + result = LLVMBuildLShr(ctx->builder, src[0],
> > > +LLVMBuildZExt(ctx->builder, src[1],
> > > +  LLVMTypeOf(src[0]), 
> > > ""),
> > > +"");
> > >   break;
> > >   case nir_op_ilt:
> > >   result = emit_int_cmp(>ac, LLVMIntSLT, src[0], src[1]);
> > 
> > --
> > Br,
> > 
> > Andres
> 
> ___
> mesa-stable mailing list
> mesa-sta...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4] ac/nir: fix 64-bit shifts

2017-08-16 Thread Andres Gomez
Connor, it looks like we could want this patch in 17.1 (?)

On Fri, 2017-06-30 at 19:56 -0700, Connor Abbott wrote:
> From: Connor Abbott 
> 
> NIR always makes the shift amount 32 bits, but LLVM asserts if the two
> sources aren't the same type. Zero-extend the shift amount to make LLVM
> happy.
> 
> Signed-off-by: Connor Abbott 
> ---
>  src/amd/common/ac_nir_to_llvm.c | 15 ---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 88f3f44..e72747a 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -1621,13 +1621,22 @@ static void visit_alu(struct nir_to_llvm_context 
> *ctx, const nir_alu_instr *inst
>   result = LLVMBuildXor(ctx->builder, src[0], src[1], "");
>   break;
>   case nir_op_ishl:
> - result = LLVMBuildShl(ctx->builder, src[0], src[1], "");
> + result = LLVMBuildShl(ctx->builder, src[0],
> +   LLVMBuildZExt(ctx->builder, src[1],
> + LLVMTypeOf(src[0]), ""),
> +   "");
>   break;
>   case nir_op_ishr:
> - result = LLVMBuildAShr(ctx->builder, src[0], src[1], "");
> + result = LLVMBuildAShr(ctx->builder, src[0],
> +LLVMBuildZExt(ctx->builder, src[1],
> +  LLVMTypeOf(src[0]), ""),
> +"");
>   break;
>   case nir_op_ushr:
> - result = LLVMBuildLShr(ctx->builder, src[0], src[1], "");
> + result = LLVMBuildLShr(ctx->builder, src[0],
> +LLVMBuildZExt(ctx->builder, src[1],
> +  LLVMTypeOf(src[0]), ""),
> +"");
>   break;
>   case nir_op_ilt:
>   result = emit_int_cmp(>ac, LLVMIntSLT, src[0], src[1]);
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 3/3] swr: use the correct variable for no undefined symbols

2017-08-16 Thread Andres Gomez
Emil, this patch breaks SWR build in 17.1, although it states that
fixes 9475251145174882b532.

Should I assume that this should be dropped for 17.1 or are you
planning to send some backport (?).

On Fri, 2017-07-21 at 19:05 +0100, Emil Velikov wrote:
> From: Emil Velikov 
> 
> The variable name was missing a leading LD_, which resulted in the
> backend binaries having unresolved symbols.
> 
> With the link addressed with earlier patches, we can correct the typo.
> 
> Thanks to Laurent for the help spotting this.
> 
> v2: Split from a larger patch.
> 
> Cc: mesa-sta...@lists.freedesktop.org
> Cc: Bruce Cherniak 
> Cc: Tim Rowley 
> Cc: Laurent Carlier 
> Fixes: 9475251145174882b532 "swr: standardize linkage and check for
>  unresolved symbols"
> Reviewed-by: Eric Engestrom 
> Reported-by: Laurent Carlier 
> Signed-off-by: Emil Velikov 
> ---
>  src/gallium/drivers/swr/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/swr/Makefile.am 
> b/src/gallium/drivers/swr/Makefile.am
> index bc7abad06af..05fc3b3595b 100644
> --- a/src/gallium/drivers/swr/Makefile.am
> +++ b/src/gallium/drivers/swr/Makefile.am
> @@ -238,7 +238,7 @@ COMMON_LDFLAGS = \
>   -module \
>   -no-undefined \
>   $(GC_SECTIONS) \
> - $(NO_UNDEFINED)
> + $(LD_NO_UNDEFINED)
>  
>  lib_LTLIBRARIES =
>  
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4] ac/nir: fix 64-bit shifts

2017-08-16 Thread Andres Gomez
Connor, it looks like we could want this patch in 17.1 (?)

On Fri, 2017-06-30 at 19:56 -0700, Connor Abbott wrote:
> From: Connor Abbott 
> 
> NIR always makes the shift amount 32 bits, but LLVM asserts if the two
> sources aren't the same type. Zero-extend the shift amount to make LLVM
> happy.
> 
> Signed-off-by: Connor Abbott 
> ---
>  src/amd/common/ac_nir_to_llvm.c | 15 ---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 88f3f44..e72747a 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -1621,13 +1621,22 @@ static void visit_alu(struct nir_to_llvm_context 
> *ctx, const nir_alu_instr *inst
>   result = LLVMBuildXor(ctx->builder, src[0], src[1], "");
>   break;
>   case nir_op_ishl:
> - result = LLVMBuildShl(ctx->builder, src[0], src[1], "");
> + result = LLVMBuildShl(ctx->builder, src[0],
> +   LLVMBuildZExt(ctx->builder, src[1],
> + LLVMTypeOf(src[0]), ""),
> +   "");
>   break;
>   case nir_op_ishr:
> - result = LLVMBuildAShr(ctx->builder, src[0], src[1], "");
> + result = LLVMBuildAShr(ctx->builder, src[0],
> +LLVMBuildZExt(ctx->builder, src[1],
> +  LLVMTypeOf(src[0]), ""),
> +"");
>   break;
>   case nir_op_ushr:
> - result = LLVMBuildLShr(ctx->builder, src[0], src[1], "");
> + result = LLVMBuildLShr(ctx->builder, src[0],
> +LLVMBuildZExt(ctx->builder, src[1],
> +  LLVMTypeOf(src[0]), ""),
> +"");
>   break;
>   case nir_op_ilt:
>   result = emit_int_cmp(>ac, LLVMIntSLT, src[0], src[1]);
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-07-23 Thread Andres Gomez
I'll be pushing already 1/2 and keep this on hold to see whether we
favor instead:
https://lists.freedesktop.org/archives/mesa-dev/2017-July/163730.html


On Thu, 2017-07-20 at 01:44 +0300, Andres Gomez wrote:
> This fixes `make distcheck`
> 
> > make[3]: *** No rule to make target 
> > 'drivers/dri2/linux-dmabuf-unstable-v1-protocol.c', needed by 'distdir'.  
> > Stop.
> > make[3]: Entering directory '/home/local/mesa/src/egl'
> > make[3]: Leaving directory '/home/local/mesa/src/egl'
> > make[2]: *** [distdir] Error 1
> > make[1]: *** [distdir] Error 1
> > make: *** [dist] Error 2
> 
> Fixes: 02cc359372 ("egl/wayland: Use linux-dmabuf interface for buffers")
> Cc: Emil Velikov <emil.veli...@collabora.com>
> Signed-off-by: Andres Gomez <ago...@igalia.com>
> ---
>  src/egl/Makefile.am | 10 --
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
> index 7c1a4929b8..6ee1fb9be8 100644
> --- a/src/egl/Makefile.am
> +++ b/src/egl/Makefile.am
> @@ -44,10 +44,13 @@ noinst_LTLIBRARIES = libEGL_common.la
>  libEGL_common_la_SOURCES = \
>   $(LIBEGL_C_FILES)
>  
> +nodist_libEGL_common_la_SOURCES =
> +
>  libEGL_common_la_LIBADD = \
>   $(EGL_LIB_DEPS)
>  
>  dri2_backend_FILES =
> +nodist_dri2_backend_FILES =
>  dri3_backend_FILES =
>  
>  if HAVE_PLATFORM_X11
> @@ -84,8 +87,8 @@ libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
>  libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
>  libEGL_common_la_LIBADD += 
> $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
>  libEGL_common_la_LIBADD += $(top_builddir)/src/util/libmesautil.la
> -dri2_backend_FILES += drivers/dri2/platform_wayland.c\
> - drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
> +dri2_backend_FILES += drivers/dri2/platform_wayland.c
> +nodist_dri2_backend_FILES += drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
>  endif
>  
>  if HAVE_PLATFORM_DRM
> @@ -119,6 +122,9 @@ libEGL_common_la_SOURCES += \
>   $(dri2_backend_FILES) \
>   $(dri3_backend_FILES)
>  
> +nodist_libEGL_common_la_SOURCES += \
> + $(nodist_dri2_backend_FILES)
> +
>  libEGL_common_la_LIBADD += $(top_builddir)/src/loader/libloader.la
>  libEGL_common_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS) $(CLOCK_LIB)
>  
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-07-23 Thread Andres Gomez
On Mon, 2017-07-24 at 01:27 +0300, Andres Gomez wrote:
> This is:
> 
> Reviewed-by: Andres Gomez <ago...@igalia.com>

Mmmm ... I hit the send button too quickly.

Just wanted to mention that I share the same concerns than Daniel.
Would it be up to me, I would not be adding the generated files in the
release but I really don't have hard thoughts about it.

Therefore, if you would rather go with this solution, it is fine by me.


> 
> 
> On Fri, 2017-07-21 at 13:02 +0100, Emil Velikov wrote:
> > From: Emil Velikov <emil.veli...@collabora.com>
> > 
> > At dist/distcheck time we need to ensure that all the files and their
> > respective dependencies are handled.
> > 
> > At the moment we'll bail out as the linux-dmabuf rules are guarded in a
> > conditional. Move them outside of it and drop the sources from
> > BUILT_SOURCES.
> > 
> > Thus the files will be generated only as needed, which will happen only
> > after the wayland-protocols dependency is enforced in configure.ac.
> > 
> > v2: add dependency tracking for the header
> > 
> > Cc: Andres Gomez <ago...@igalia.com>
> > Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
> > ---
> >  configure.ac| 13 ++---
> >  src/egl/Makefile.am | 13 +++--
> >  2 files changed, 17 insertions(+), 9 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 2689fc55e85..2736fbf201b 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -1681,19 +1681,26 @@ if test "x$WAYLAND_SCANNER" = x; then
> >  AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
> >  fi
> >  
> > +PKG_CHECK_EXISTS([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], 
> > [have_wayland_protocols=yes], [have_wayland_protocols=no])
> > +if test "x$have_wayland_protocols" = xyes; then
> > +ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir 
> > wayland-protocols`
> > +fi
> > +AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
> > +
> >  # Do per platform setups and checks
> >  platforms=`IFS=', '; echo $with_platforms`
> >  for plat in $platforms; do
> >  case "$plat" in
> >  wayland)
> >  
> > -PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED 
> > wayland-server >= $WAYLAND_REQUIRED wayland-protocols >= 
> > $WAYLAND_PROTOCOLS_REQUIRED])
> > -ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir 
> > wayland-protocols`
> > -AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, 
> > $ac_wayland_protocols_pkgdatadir)
> > +PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED 
> > wayland-server >= $WAYLAND_REQUIRED])
> >  
> >  if test "x$WAYLAND_SCANNER" = "x:"; then
> >  AC_MSG_ERROR([wayland-scanner is needed to compile the 
> > wayland platform])
> >  fi
> > +if test "x$have_wayland_protocols" = xno; then
> > +AC_MSG_ERROR([wayland-protocols >= 
> > $WAYLAND_PROTOCOLS_REQUIRED is needed to compile the wayland platform])
> > +fi
> >  DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM"
> >  ;;
> >  
> > diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
> > index 7c1a4929b81..f881145c0e3 100644
> > --- a/src/egl/Makefile.am
> > +++ b/src/egl/Makefile.am
> > @@ -64,7 +64,6 @@ libEGL_common_la_LIBADD += 
> > $(top_builddir)/src/loader/libloader_dri3_helper.la
> >  endif
> >  endif
> >  
> > -if HAVE_PLATFORM_WAYLAND
> >  WL_DMABUF_XML = 
> > $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
> >  
> >  drivers/dri2/linux-dmabuf-unstable-v1-protocol.c: $(WL_DMABUF_XML)
> > @@ -75,17 +74,19 @@ 
> > drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h: $(WL_DMABUF_XML)
> > $(MKDIR_GEN)
> > $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
> >  
> > -BUILT_SOURCES += \
> > -   drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \
> > -   drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
> > +drivers/dri2/linux-dmabuf-unstable-v1-protocol.lo: 
> > drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
> > +drivers/dri2/egl_dri2.lo: 
> > drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
> >  
> > +if HAVE_PLATFORM_WAYLAND
> >  AM_CFLAGS += $(WAYLAND_CFLAGS)
> >  libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
> >  libEGL_common_l

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

2017-07-23 Thread Andres Gomez
This is:

Reviewed-by: Andres Gomez <ago...@igalia.com>


On Fri, 2017-07-21 at 13:02 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.veli...@collabora.com>
> 
> At dist/distcheck time we need to ensure that all the files and their
> respective dependencies are handled.
> 
> At the moment we'll bail out as the linux-dmabuf rules are guarded in a
> conditional. Move them outside of it and drop the sources from
> BUILT_SOURCES.
> 
> Thus the files will be generated only as needed, which will happen only
> after the wayland-protocols dependency is enforced in configure.ac.
> 
> v2: add dependency tracking for the header
> 
> Cc: Andres Gomez <ago...@igalia.com>
> Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
> ---
>  configure.ac| 13 ++---
>  src/egl/Makefile.am | 13 +++--
>  2 files changed, 17 insertions(+), 9 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 2689fc55e85..2736fbf201b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1681,19 +1681,26 @@ if test "x$WAYLAND_SCANNER" = x; then
>  AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
>  fi
>  
> +PKG_CHECK_EXISTS([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], 
> [have_wayland_protocols=yes], [have_wayland_protocols=no])
> +if test "x$have_wayland_protocols" = xyes; then
> +ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir 
> wayland-protocols`
> +fi
> +AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
> +
>  # Do per platform setups and checks
>  platforms=`IFS=', '; echo $with_platforms`
>  for plat in $platforms; do
>  case "$plat" in
>  wayland)
>  
> -PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED 
> wayland-server >= $WAYLAND_REQUIRED wayland-protocols >= 
> $WAYLAND_PROTOCOLS_REQUIRED])
> -ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir 
> wayland-protocols`
> -AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
> +PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED 
> wayland-server >= $WAYLAND_REQUIRED])
>  
>  if test "x$WAYLAND_SCANNER" = "x:"; then
>  AC_MSG_ERROR([wayland-scanner is needed to compile the 
> wayland platform])
>  fi
> +if test "x$have_wayland_protocols" = xno; then
> +AC_MSG_ERROR([wayland-protocols >= 
> $WAYLAND_PROTOCOLS_REQUIRED is needed to compile the wayland platform])
> +fi
>  DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM"
>  ;;
>  
> diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
> index 7c1a4929b81..f881145c0e3 100644
> --- a/src/egl/Makefile.am
> +++ b/src/egl/Makefile.am
> @@ -64,7 +64,6 @@ libEGL_common_la_LIBADD += 
> $(top_builddir)/src/loader/libloader_dri3_helper.la
>  endif
>  endif
>  
> -if HAVE_PLATFORM_WAYLAND
>  WL_DMABUF_XML = 
> $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
>  
>  drivers/dri2/linux-dmabuf-unstable-v1-protocol.c: $(WL_DMABUF_XML)
> @@ -75,17 +74,19 @@ drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h: 
> $(WL_DMABUF_XML)
>   $(MKDIR_GEN)
>   $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
>  
> -BUILT_SOURCES += \
> - drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \
> - drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
> +drivers/dri2/linux-dmabuf-unstable-v1-protocol.lo: 
> drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
> +drivers/dri2/egl_dri2.lo: 
> drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
>  
> +if HAVE_PLATFORM_WAYLAND
>  AM_CFLAGS += $(WAYLAND_CFLAGS)
>  libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
>  libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
>  libEGL_common_la_LIBADD += 
> $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
>  libEGL_common_la_LIBADD += $(top_builddir)/src/util/libmesautil.la
> -dri2_backend_FILES += drivers/dri2/platform_wayland.c\
> - drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
> +dri2_backend_FILES += \
> + drivers/dri2/platform_wayland.c \
> + drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \
> + drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
>  endif
>  
>  if HAVE_PLATFORM_DRM
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-07-20 Thread Andres Gomez
On Thu, 2017-07-20 at 14:37 +0100, Emil Velikov wrote:
> On 20 July 2017 at 13:54, Daniel Stone <dan...@fooishbar.org> wrote:
> > Hi Emil,
> > 
> > On 20 July 2017 at 13:51, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> > > On 19 July 2017 at 23:44, Andres Gomez <ago...@igalia.com> wrote:
> > > > -dri2_backend_FILES += drivers/dri2/platform_wayland.c  \
> > > > -   drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
> > > > +dri2_backend_FILES += drivers/dri2/platform_wayland.c
> > > > +nodist_dri2_backend_FILES += 
> > > > drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
> > > >  endif
> > > > 
> > > >  if HAVE_PLATFORM_DRM
> > > > @@ -119,6 +122,9 @@ libEGL_common_la_SOURCES += \
> > > > $(dri2_backend_FILES) \
> > > > $(dri3_backend_FILES)
> > > > 
> > > > +nodist_libEGL_common_la_SOURCES += \
> > > > +   $(nodist_dri2_backend_FILES)
> > > > +
> > > 
> > > Just add the files two generated file to BUILT_SOURCES. That's the way
> > > we handle it through the tree.
> > 
> > They're already in BUILT_SOURCES (line 78 in master), so I guess
> > something else is wrong.
> > 
> 
> Thanks for the correction Dan.
> 
> Upon a second look - BUILT_SOURCES line is in a conditional which is
> causing the issue. Moving it outside solves the problem on my system.

Mmmm ... the BUILT_SOURCES is in the same conditional in which the
linux-dmabuf-unstable-v1-protocol.c target is define so I don't think
that would be solving the problem and it doesn't seem to be doing so in
my travis:
https://travis-ci.org/Igalia/release-mesa/jobs/255687844

-- 
Br,

Andres

signature.asc
Description: This is a digitally signed message part
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/2] broadcom: correct header file in BROADCOM_FILES

2017-07-19 Thread Andres Gomez
This fixes `make distcheck`

> make[3]: *** No rule to make target 'common/v3d_devinfo.h', needed by 
> 'distdir'.  Stop.
> make[3]: Leaving directory '/home/local/mesa/src/broadcom'
> Makefile:945: recipe for target 'distdir' failed
> make[2]: Leaving directory '/home/local/mesa/src'
> make[2]: *** [distdir] Error 1
> make[1]: *** [distdir] Error 1

Fixes: 42799c ("broadcom: Introduce a header for talking about chip 
revisions.")
Cc: Emil Velikov <emil.veli...@collabora.com>
Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 src/broadcom/Makefile.sources | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/broadcom/Makefile.sources b/src/broadcom/Makefile.sources
index 09c8a9957d..4dadb68ee5 100644
--- a/src/broadcom/Makefile.sources
+++ b/src/broadcom/Makefile.sources
@@ -8,6 +8,6 @@ BROADCOM_GENXML_XML_FILES = \
 
 BROADCOM_FILES = \
cle/v3d_packet_helpers.h \
-   common/v3d_devinfo.h \
+   common/v3d_device_info.h \
$()
 
-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-07-19 Thread Andres Gomez
This fixes `make distcheck`

> make[3]: *** No rule to make target 
> 'drivers/dri2/linux-dmabuf-unstable-v1-protocol.c', needed by 'distdir'.  
> Stop.
> make[3]: Entering directory '/home/local/mesa/src/egl'
> make[3]: Leaving directory '/home/local/mesa/src/egl'
> make[2]: *** [distdir] Error 1
> make[1]: *** [distdir] Error 1
> make: *** [dist] Error 2

Fixes: 02cc359372 ("egl/wayland: Use linux-dmabuf interface for buffers")
Cc: Emil Velikov <emil.veli...@collabora.com>
Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 src/egl/Makefile.am | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index 7c1a4929b8..6ee1fb9be8 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -44,10 +44,13 @@ noinst_LTLIBRARIES = libEGL_common.la
 libEGL_common_la_SOURCES = \
$(LIBEGL_C_FILES)
 
+nodist_libEGL_common_la_SOURCES =
+
 libEGL_common_la_LIBADD = \
$(EGL_LIB_DEPS)
 
 dri2_backend_FILES =
+nodist_dri2_backend_FILES =
 dri3_backend_FILES =
 
 if HAVE_PLATFORM_X11
@@ -84,8 +87,8 @@ libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
 libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
 libEGL_common_la_LIBADD += 
$(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
 libEGL_common_la_LIBADD += $(top_builddir)/src/util/libmesautil.la
-dri2_backend_FILES += drivers/dri2/platform_wayland.c  \
-   drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
+dri2_backend_FILES += drivers/dri2/platform_wayland.c
+nodist_dri2_backend_FILES += drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
 endif
 
 if HAVE_PLATFORM_DRM
@@ -119,6 +122,9 @@ libEGL_common_la_SOURCES += \
$(dri2_backend_FILES) \
$(dri3_backend_FILES)
 
+nodist_libEGL_common_la_SOURCES += \
+   $(nodist_dri2_backend_FILES)
+
 libEGL_common_la_LIBADD += $(top_builddir)/src/loader/libloader.la
 libEGL_common_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS) $(CLOCK_LIB)
 
-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 0/2] Fix distcheck

2017-07-19 Thread Andres Gomez
A couple of patches to fix recent problems while running make
distcheck.

Andres Gomez (2):
  broadcom: correct header file in BROADCOM_FILES
  egl: add linux-dmabuf-unstable-v1-protocol.c to "nodist"

 src/broadcom/Makefile.sources |  2 +-
 src/egl/Makefile.am   | 10 --
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] travis: add missing wayland-protocols

2017-07-19 Thread Andres Gomez
After 02cc359372 "egl/wayland: Use linux-dmabuf interface for buffers"

> checking for WAYLAND... no
>
> configure: error: Package requirements (wayland-client >= 1.11 wayland-server 
> >= 1.11 wayland-protocols >= 1.8) were not met:
>
> No package 'wayland-protocols' found
>
> Consider adjusting the PKG_CONFIG_PATH environment variable if you
> installed software in a non-standard prefix.
>
> Alternatively, you may set the environment variables WAYLAND_CFLAGS
> and WAYLAND_LIBS to avoid the need to call pkg-config.
> See the pkg-config man page for more details.

Also, added extra path to PKG_CONFIG_PATH env variable.

Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 .travis.yml | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index fa52bf96f1..246ad30eff 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,7 @@ env:
   global:
 - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual
 - XCB_RELEASES=http://xcb.freedesktop.org/dist
+- WAYLAND_RELEASES=http://wayland.freedesktop.org/releases
 - XORGMACROS_VERSION=util-macros-1.19.0
 - GLPROTO_VERSION=glproto-1.4.17
 - DRI2PROTO_VERSION=dri2proto-2.8
@@ -23,7 +24,8 @@ env:
 - LIBVDPAU_VERSION=libvdpau-1.1
 - LIBVA_VERSION=libva-1.6.2
 - LIBWAYLAND_VERSION=wayland-1.11.1
-- PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig
+- WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
+- PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
 - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
 
 matrix:
@@ -336,10 +338,14 @@ install:
   - tar -jxvf $LIBVA_VERSION.tar.bz2
   - (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland 
--disable-dummy-driver && make install)
 
-  - wget http://wayland.freedesktop.org/releases/$LIBWAYLAND_VERSION.tar.xz
+  - wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
   - tar -axvf $LIBWAYLAND_VERSION.tar.xz
   - (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix 
--enable-libraries --without-host-scanner --disable-documentation 
--disable-dtd-validation && make install)
 
+  - wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
+  - tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
+  - (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && 
make install)
+
   # Generate the header since one is missing on the Travis instance
   - mkdir -p linux
   - printf "%s\n" \
-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4] docs: avoid overwrite of LD_LIBRARY_PATH during basic testing

2017-07-19 Thread Andres Gomez
On Wed, 2017-07-19 at 13:19 +0100, Emil Velikov wrote:
> On 18 July 2017 at 14:05, Andres Gomez <ago...@igalia.com> wrote:
> > On Tue, 2017-07-18 at 10:48 +0100, Emil Velikov wrote:
> > > On 15 July 2017 at 17:01, Andres Gomez <ago...@igalia.com> wrote:
> > > > On Mon, 2017-07-10 at 12:19 +0100, Emil Velikov wrote:
> > > > > On 8 July 2017 at 20:59, Andres Gomez <ago...@igalia.com> wrote:
> > > > > > The LD_LIBRARY_PATH environment variable could be already defined so
> > > > > > we extend it and restore it rather than just overwriting it.
> > > > > > 
> > > > > 
> > > > > Hmm, what are you doing to actually require LD_LIBRARY_PATH in the 
> > > > > first place?
> > > > > It makes it somewhat uneasy that one will have that in their setup.
> > > > 
> > > > My everyday's work is done in a JHBuild env that already uses this
> > > > variable for mesa dependencies. I would have assumed that this is
> > > > actually quite normal for most of mesa developers, although maybe I'm
> > > > wrong ...
> > > > 
> > > 
> > > This is the first time I hear anyone working on Mesa use JHBuild.
> > > There could be some though ;-)
> > 
> > 
> > 
> > Well, I meant that I assumed it was normal to have LD_LIBRARY_PATH
> > customized to point to the dependencies, not that it was normal to use
> > JHBuild 
> > 
> 
> That is more common that JHBuild, but still fairly rare, AFAICT.
> 
> > > 
> > > > > 
> > > > > > Signed-off-by: Andres Gomez <ago...@igalia.com>
> > > > > > ---
> > > > > >  docs/releasing.html | 4 +++-
> > > > > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > > > > 
> > > > > > diff --git a/docs/releasing.html b/docs/releasing.html
> > > > > > index 8e6e4d1a6d..99235d8412 100644
> > > > > > --- a/docs/releasing.html
> > > > > > +++ b/docs/releasing.html
> > > > > > @@ -472,7 +472,8 @@ Here is one solution that I've been using.
> > > > > > __glxgears_cmd='glxgears 2>1 | grep -v "configuration 
> > > > > > file"'
> > > > > > __es2info_cmd='es2_info 2>1 | egrep 
> > > > > > "GL_VERSION|GL_RENDERER|.*dri\.so"'
> > > > > > __es2gears_cmd='es2gears_x11 2>1 | grep -v 
> > > > > > "configuration file"'
> > > > > > -   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/
> > > > > > +   'x$LD_LIBRARY_PATH' -ne 'x'  
> > > > > > __old_ld='$LD_LIBRARY_PATH'  __token=':'
> > > > > > +   export 
> > > > > > LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/'${__token}${__old_ld}'
> > > > > 
> > > > > AFAICT you don't need __token.
> > > > 
> > > > You do if you want to avoid adding ":" at the end when LD_LIBRARY_PATH
> > > > is not defined previously. It can be done in other ways but I thought
> > > > this to be the simplest/easiest to read.
> > > > 
> > > 
> > > I was thinking about adding the colon, unconditionally. AFAICT things
> > > work perfectly fine with it. Even if one extends LD_LIBRARY_PATH at a
> > > later stage.
> > 
> > Mmmm ... didn't think that was also valid but, I suppose why not. In
> > any case, it feels odd to me. I don't remember seeing env variables
> > like that finishing in ":" before.
> > 
> > Not hard thoughts on this. If you prefer to remove __token, I'm OK with
> > it.
> > 
> 
> Please fixup locally and push the series.

Great! Thanks for the review! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4] docs: avoid overwrite of LD_LIBRARY_PATH during basic testing

2017-07-18 Thread Andres Gomez
On Tue, 2017-07-18 at 10:48 +0100, Emil Velikov wrote:
> On 15 July 2017 at 17:01, Andres Gomez <ago...@igalia.com> wrote:
> > On Mon, 2017-07-10 at 12:19 +0100, Emil Velikov wrote:
> > > On 8 July 2017 at 20:59, Andres Gomez <ago...@igalia.com> wrote:
> > > > The LD_LIBRARY_PATH environment variable could be already defined so
> > > > we extend it and restore it rather than just overwriting it.
> > > > 
> > > 
> > > Hmm, what are you doing to actually require LD_LIBRARY_PATH in the first 
> > > place?
> > > It makes it somewhat uneasy that one will have that in their setup.
> > 
> > My everyday's work is done in a JHBuild env that already uses this
> > variable for mesa dependencies. I would have assumed that this is
> > actually quite normal for most of mesa developers, although maybe I'm
> > wrong ...
> > 
> 
> This is the first time I hear anyone working on Mesa use JHBuild.
> There could be some though ;-)



Well, I meant that I assumed it was normal to have LD_LIBRARY_PATH
customized to point to the dependencies, not that it was normal to use
JHBuild 

> 
> > > 
> > > > Signed-off-by: Andres Gomez <ago...@igalia.com>
> > > > ---
> > > >  docs/releasing.html | 4 +++-
> > > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/docs/releasing.html b/docs/releasing.html
> > > > index 8e6e4d1a6d..99235d8412 100644
> > > > --- a/docs/releasing.html
> > > > +++ b/docs/releasing.html
> > > > @@ -472,7 +472,8 @@ Here is one solution that I've been using.
> > > > __glxgears_cmd='glxgears 2>1 | grep -v "configuration 
> > > > file"'
> > > > __es2info_cmd='es2_info 2>1 | egrep 
> > > > "GL_VERSION|GL_RENDERER|.*dri\.so"'
> > > > __es2gears_cmd='es2gears_x11 2>1 | grep -v "configuration 
> > > > file"'
> > > > -   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/
> > > > +   'x$LD_LIBRARY_PATH' -ne 'x'  
> > > > __old_ld='$LD_LIBRARY_PATH'  __token=':'
> > > > +   export 
> > > > LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/'${__token}${__old_ld}'
> > > 
> > > AFAICT you don't need __token.
> > 
> > You do if you want to avoid adding ":" at the end when LD_LIBRARY_PATH
> > is not defined previously. It can be done in other ways but I thought
> > this to be the simplest/easiest to read.
> > 
> 
> I was thinking about adding the colon, unconditionally. AFAICT things
> work perfectly fine with it. Even if one extends LD_LIBRARY_PATH at a
> later stage.

Mmmm ... didn't think that was also valid but, I suppose why not. In
any case, it feels odd to me. I don't remember seeing env variables
like that finishing in ":" before.

Not hard thoughts on this. If you prefer to remove __token, I'm OK with
it.

> But if you really want to avoid it this is the shortest way, indeed.
> 
> -Emil
> 
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/3] docs: avoid overwrite of LD_LIBRARY_PATH during basic testing

2017-07-15 Thread Andres Gomez
The LD_LIBRARY_PATH environment variable could be already defined so
we extend it and restore it rather than just overwriting it.

v2:
 - Unset the __old_ld helper variable when we are done with it.
 - Corrected test for and escaping of variables (Eric).

Signed-off-by: Andres Gomez <ago...@igalia.com>
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>
---
 docs/releasing.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/releasing.html b/docs/releasing.html
index 85ab6ae8cb..47137f57e6 100644
--- a/docs/releasing.html
+++ b/docs/releasing.html
@@ -472,7 +472,8 @@ Here is one solution that I've been using.
__glxgears_cmd='glxgears 2>1 | grep -v "configuration file"'
__es2info_cmd='es2_info 2>1 | egrep 
"GL_VERSION|GL_RENDERER|.*dri\.so"'
__es2gears_cmd='es2gears_x11 2>1 | grep -v "configuration file"'
-   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/
+   test "x$LD_LIBRARY_PATH" != 'x'  __old_ld="$LD_LIBRARY_PATH" 
 __token=':'
+   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/"${__token}${__old_ld}"
export LIBGL_DRIVERS_PATH=`pwd`/test/usr/local/lib/dri/
export LIBGL_DEBUG=verbose
eval $__glxinfo_cmd
@@ -492,6 +493,7 @@ Here is one solution that I've been using.
eval $__es2gears_cmd
# Smoke test DOTA2
unset LD_LIBRARY_PATH
+   test "x$__old_ld" != 'x'  export LD_LIBRARY_PATH="$__old_ld" 
 unset __old_ld  unset __token
unset LIBGL_DRIVERS_PATH
unset LIBGL_DEBUG
unset LIBGL_ALWAYS_SOFTWARE
-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 3/3] docs: update master's release notes, news and calendar commit

2017-07-15 Thread Andres Gomez
This reflects closer what we are actually doing.

Signed-off-by: Andres Gomez <ago...@igalia.com>
Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com>
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>
---
 docs/releasing.html | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/docs/releasing.html b/docs/releasing.html
index 47137f57e6..4f36dded76 100644
--- a/docs/releasing.html
+++ b/docs/releasing.html
@@ -24,7 +24,6 @@
 Making a branchpoint
 Pre-release announcement
 Making a new release
-Update the calendar
 Announce the release
 Update the mesa3d.org website
 Update Bugzilla
@@ -576,23 +575,17 @@ Something like the following steps will do the trick:
 
 
 
-Also, edit docs/relnotes.html to add a link to the new release notes, and edit
-docs/index.html to add a news entry. Then commit and push:
+Also, edit docs/relnotes.html to add a link to the new release notes,
+edit docs/index.html to add a news entry, and remove the version from
+docs/release-calendar.html. Then commit and push:
 
 
 
-   git commit -as -m "docs: add news item and link release notes for X.Y.Z"
+   git commit -as -m "docs: update calendar, add news item and link 
release notes for X.Y.Z"
git push origin master X.Y
 
 
 
-Update the calendar
-
-
-Remove the version from the calendar.
-
-
-
 Announce the release
 
 
-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/3] docs: add instructions to specify LLVM version for basic testing

2017-07-15 Thread Andres Gomez
The "Perform basic testing" and "Use the release.sh script from xorg
util-modular" sections provide some instructions to do so. We add now
some comments in order to use a recent enough LLVM version to run
dist/distcheck and the automake generated binaries.

v2: Suggested the need to define LLVM_CONFIG also before running the
release.sh script.

Signed-off-by: Andres Gomez <ago...@igalia.com>
Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com>
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>
---
 docs/releasing.html | 8 
 1 file changed, 8 insertions(+)

diff --git a/docs/releasing.html b/docs/releasing.html
index 99707bee3f..85ab6ae8cb 100644
--- a/docs/releasing.html
+++ b/docs/releasing.html
@@ -437,6 +437,8 @@ Here is one solution that I've been using.
chmod 755 -fR $__build_root; rm -rf $__build_root
mkdir -p $__build_root  cd $__build_root
 
+   # For the distcheck, you may want to specify which LLVM to use:
+   # export LLVM_CONFIG=/usr/lib/llvm-3.9/bin/llvm-config
$__mesa_root/autogen.sh  make -j2 distcheck
 
# Build check the tarballs (scons, linux)
@@ -445,18 +447,22 @@ Here is one solution that I've been using.
cd ..  rm -rf mesa-$__version
 
# Build check the tarballs (scons, windows/mingw)
+   # You may need to unset LLVM if you set it before:
+   # unset LLVM_CONFIG
tar -xaf mesa-$__version.tar.xz  cd mesa-$__version
scons platform=windows toolchain=crossmingw
cd ..  rm -rf mesa-$__version
 
# Test the automake binaries
tar -xaf mesa-$__version.tar.xz  cd mesa-$__version
+   # You may want to specify which LLVM to use:
./configure \
--with-dri-drivers=i965,swrast \
--with-gallium-drivers=swrast \
--with-vulkan-drivers=intel \
--enable-llvm-shared-libs \
--enable-llvm \
+   --with-llvm-prefix=/usr/lib/llvm-3.9 \
--enable-glx-tls \
--enable-gbm \
--enable-egl \
@@ -540,6 +546,8 @@ Start the release process.
 
 
 
+   # For the dist/distcheck, you may want to specify which LLVM to use:
+   # export LLVM_CONFIG=/usr/lib/llvm-3.9/bin/llvm-config
../relative/path/to/release.sh . # append --dist if you've already done 
distcheck above
 
 
-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 0/3] docs: update basic testing on the releasing instructions (v2)

2017-07-15 Thread Andres Gomez
Some small update on the "Making a new release" section of the
releasing instructions.

Patches 1 and 2 add some small modifications for performing the basic
testing and releasing.

Patch 3 merges the section for updating the calendar into the previous
one to reflect closer what we are actually doing.

Andres Gomez (3):
  docs: add instructions to specify LLVM version for basic testing
  docs: avoid overwrite of LD_LIBRARY_PATH during basic testing
  docs: update master's release notes, news and calendar commit

 docs/releasing.html | 27 +++
 1 file changed, 15 insertions(+), 12 deletions(-)

-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/4] docs: remove redundant parameter for scons build basic testing

2017-07-15 Thread Andres Gomez
On Mon, 2017-07-10 at 12:22 +0100, Emil Velikov wrote:
> On 8 July 2017 at 20:59, Andres Gomez <ago...@igalia.com> wrote:
> > toolchain=crossmingw is the default option for platform=windows when
> > invoking scons.
> > 
> 
> It may be a bit redundant, but I'd rather keep it. I doubt it's so
> interesting to track when it became the default and if/when that will
> change ;-)

OK, I'll drop this patch.

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4] docs: avoid overwrite of LD_LIBRARY_PATH during basic testing

2017-07-15 Thread Andres Gomez
On Mon, 2017-07-10 at 12:19 +0100, Emil Velikov wrote:
> On 8 July 2017 at 20:59, Andres Gomez <ago...@igalia.com> wrote:
> > The LD_LIBRARY_PATH environment variable could be already defined so
> > we extend it and restore it rather than just overwriting it.
> > 
> 
> Hmm, what are you doing to actually require LD_LIBRARY_PATH in the first 
> place?
> It makes it somewhat uneasy that one will have that in their setup.

My everyday's work is done in a JHBuild env that already uses this
variable for mesa dependencies. I would have assumed that this is
actually quite normal for most of mesa developers, although maybe I'm
wrong ...

> 
> > Signed-off-by: Andres Gomez <ago...@igalia.com>
> > ---
> >  docs/releasing.html | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/docs/releasing.html b/docs/releasing.html
> > index 8e6e4d1a6d..99235d8412 100644
> > --- a/docs/releasing.html
> > +++ b/docs/releasing.html
> > @@ -472,7 +472,8 @@ Here is one solution that I've been using.
> > __glxgears_cmd='glxgears 2>1 | grep -v "configuration file"'
> > __es2info_cmd='es2_info 2>1 | egrep 
> > "GL_VERSION|GL_RENDERER|.*dri\.so"'
> > __es2gears_cmd='es2gears_x11 2>1 | grep -v "configuration 
> > file"'
> > -   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/
> > +   'x$LD_LIBRARY_PATH' -ne 'x'  __old_ld='$LD_LIBRARY_PATH' 
> >  __token=':'
> > +   export 
> > LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/'${__token}${__old_ld}'
> 
> AFAICT you don't need __token.

You do if you want to avoid adding ":" at the end when LD_LIBRARY_PATH
is not defined previously. It can be done in other ways but I thought
this to be the simplest/easiest to read.

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4] docs: avoid overwrite of LD_LIBRARY_PATH during basic testing

2017-07-15 Thread Andres Gomez
On Mon, 2017-07-10 at 12:15 +0100, Eric Engestrom wrote:
> On Saturday, 2017-07-08 22:59:40 +0300, Andres Gomez wrote:
> > The LD_LIBRARY_PATH environment variable could be already defined so
> > we extend it and restore it rather than just overwriting it.
> > 
> > Signed-off-by: Andres Gomez <ago...@igalia.com>
> > ---
> >  docs/releasing.html | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/docs/releasing.html b/docs/releasing.html
> > index 8e6e4d1a6d..99235d8412 100644
> > --- a/docs/releasing.html
> > +++ b/docs/releasing.html
> > @@ -472,7 +472,8 @@ Here is one solution that I've been using.
> > __glxgears_cmd='glxgears 2>1 | grep -v "configuration file"'
> > __es2info_cmd='es2_info 2>1 | egrep 
> > "GL_VERSION|GL_RENDERER|.*dri\.so"'
> > __es2gears_cmd='es2gears_x11 2>1 | grep -v "configuration file"'
> > -   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/
> > +   'x$LD_LIBRARY_PATH' -ne 'x'  __old_ld='$LD_LIBRARY_PATH' 
> >  __token=':'
> 
> s/'/"/g across the patch
> 
> and you need `[ ]` around the tests

Ugh! I messed this patch big time. I intended to use "test" but quotes
and the test itself is wrong ... and I'd swear I checked copying and
pasting from the web page. Oh well ...

Thanks a lot for catching all this ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [ANNOUNCE] mesa 17.1.5

2017-07-14 Thread Andres Gomez
Mesa 17.1.5 is now available.

In this release we have:

In Mesa Core we include a fix to prevent a potential crash.

The state tracker received a fix for properly releasing an EGLImage
texture in case the image format is not supported.

The SPIR-V compiler has gotten a fix for properly implementing
OpBitcast. Additionally, we also have now several fixes on its
translation to NIR when atomics are involved and another one to avoid
hitting an unreachable error for compare exchange on images.

The GLSL compiler has received a fix to enforce the GLSL ES 3.00+ rule
that overloads or overrides of built-ins are disallowed. Also, it has
corrected a problem by which the
gl_Max{Vertex,Fragment}UniformComponents built-ins where not available
from 4.10 onwards and another one by which we were incorrectly trying
to manage the linking of the xfb_stride layout qualifier in the FS
stage.

Intel drivers now have a proper maximum surface limit. Additionally,
i965 has gotten some fixes to use the the "true" distance for
antialiased lines in G45, Ironlake and Sandybridge.

Gallium has seen a fix for properly checking the line width in order to
use the wide line stage. The VA library, has seen fixed a leak. While
WGL has seen improved the selection of pixel format.

The etnaviv driver has gotten a fix for miscompilation of shaders which
were leading to GPU hangs, another one for an initialization to avoid
the improper removal of the pipe screen and a third one to avoid a
potential crash situation.

The AMD drivers has seen corrected some problems in the NIR to LLVM
translation with image atomic names and has now the 64-bit packing and
unpacking that improves the Float64 support situation. radeon has
gotten a fix to limit the VRAM allocation size and has now a couple of
crashes fixed, one of which was affecting the game Factorio.

The swr driver has received a patch to limit the memory held by defer
deleted resources that could lead to the trigger of the OOM-killer in
systems with not that much memory. Also, we have fixed a problem by
which it was not possible to compile with gcc<4.9 and another one that
should improve performance.

The svga driver has received several patches. Among them, the wide line
stage is used now only when it is needed, the total surface size has
been corrected to include also the array size and the query for
checking the maximum texture buffer size has also been corrected.

From build and integration point of view, we have added a fix to solve
a linking problem with standalone Android builds while SCons is now
properly checking for xlocale.h.



Aaron Watry (1):
  radeon/winsys: Limit max allocation size to 70% of VRAM

Aleksander Morgado (2):
  etnaviv: fix refcnt initialization in etna_screen
  etnaviv: don't dereference etna_resource pointer if allocation
fails

Alex Smith (2):
  ac/nir: Use correct LLVM intrinsics for atomic ops on
imageBuffers
  ac/nir: Fix ordering of parameters for image atomic cmpswap
intrinsics

Andres Gomez (4):
  docs: add sha256 checksums for 17.1.4
  cherry-ignore: i965: Fix anisotropic filtering for mag filter
  Update version to 17.1.5
  docs: add release notes for 17.1.5

Anuj Phogat (2):
  intel/isl: Use uint64_t to store total surface size
  intel/isl: Add the maximum surface size limit

Brian Paul (3):
  draw: check for line_width != 1.0f in validate_pipeline()
  svga: clamp device line width to at least 1 to fix HWv8 line
stippling
  svga: fix PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE value

Bruce Cherniak (1):
  swr: Limit memory held by defer deleted resources.

Chandu Babu N (1):
  st/va: Fix leak in VAAPI subpictures

Charmaine Lee (1):
  svga: fixed surface size to include array size

Connor Abbott (2):
  spirv: fix OpBitcast when the src and dst bitsize are different
(v3)
  ac/nir: implement 64-bit packing and unpacking

Iago Toral Quiroga (1):
  glsl: gl_Max{Vertex,Fragment}UniformComponents exist in all
desktop GL versions

Ilia Mirkin (1):
  glsl: check if any of the named builtins are available first

James Legg (2):
  ac/nir: Make intrinsic_name buffer long enough
  spirv: Fix reaching unreachable for compare exchange on images

Jason Ekstrand (1):
  nir/spirv: Use the type from the deref for atomics

Juan A. Suarez Romero (1):
  glsl: do not call link_xfb_stride_layout_qualifiers() for
fragment shaders

Kenneth Graunke (2):
  i965: Use true AA line distance on G45/Ironlake.
  i965: Always set AALINEDISTANCE_TRUE on Sandybridge.

Lucas Stach (1):
  etnaviv: fix shader miscompilation with more than 16 labels

Marek Olšák (1):
  gallium/radeon: fix a possible crash for buffer exports

Neha Bhende (1):
  svga: loop over box.depth for ReadBack_image on each slice

Nicolai Hähnle (1):
  winsys/radeon: only call pb_slabs_reclaim when slabs are actually
used

Olivier Lauffenburger (1):
  st/wgl: improve selection of pixel format


Re: [Mesa-dev] Mesa 17.1.5 release candidate

2017-07-13 Thread Andres Gomez
Hi,


On Thu, 2017-07-13 at 12:39 +0900, Michel Dänzer wrote:
> Hi Andres,
> 
> 
> On 13/07/17 04:02 AM, Andres Gomez wrote:
> > 
> > Gallivm has seen a fix for properly checking the line width in order to
> > use the wide line stage. The VA library, has seen fixed a leak. While
> > WGL has seen improved the selection of pixel format.
> 
> Nitpick: "gallivm" refers only to src/gallium/auxiliary/gallivm/ , an
> auxiliary module for LLVM related things. The paragraph above is about
> the Gallium3D (or just Gallium) framework.

Ooops! Right, thanks for the correction! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Mesa 17.1.5 release candidate

2017-07-12 Thread Andres Gomez
Hello list,

The candidate for the Mesa 17.1.5 is now available. Currently we have:
 - 36 queued
 - 2 nominated (outstanding)
 - and 0 rejected patch(es)


In the current queue we have:

In Mesa Core we include a fix to prevent a potential crash.

The state tracker received a fix for properly releasing an EGLImage
texture in case the image format is not supported.

The SPIR-V compiler has gotten a fix for properly implementing
OpBitcast. Additionally, we also have now several fixes on its
translation to NIR when atomics are involved and another one to avoid
hitting an unreachable error for compare exchange on images.

The GLSL compiler has received a fix to enforce the GLSL ES 3.00+ rule
that overloads or overrides of built-ins are disallowed. Also, it has
corrected a problem by which the
gl_Max{Vertex,Fragment}UniformComponents built-ins where not available
from 4.10 onwards and another one by which we were incorrectly trying
to manage the linking of the xfb_stride layout qualifier in the FS
stage.

Intel drivers now have a proper maximum surface limit. Additionally,
i965 has gotten some fixes to use the the "true" distance for
antialiased lines in G45, Ironlake and Sandybridge.

Gallivm has seen a fix for properly checking the line width in order to
use the wide line stage. The VA library, has seen fixed a leak. While
WGL has seen improved the selection of pixel format.

The etnaviv driver has gotten a fix for miscompilation of shaders which
were leading to GPU hangs, another one for an initialization to avoid
the improper removal of the pipe screen and a third one to avoid a
potential crash situation.

The AMD drivers has seen corrected some problems in the NIR to LLVM
translation with image atomic names and has now the 64-bit packing and
unpacking that improves the Float64 support situation. radeon has
gotten a fix to limit the VRAM allocation size and has now a couple of
crashes fixed, one of which was affecting the game Factorio.

The swr driver has received a patch to limit the memory held by defer
deleted resources that could lead to the trigger of the OOM-killer in
systems with not that much memory. Also, we have fixed a problem by
which it was not possible to compile with gcc<4.9 and another one that
should improve performance.

The svga driver has received several patches. Among them, the wide line
stage is used now only when it is needed, the total surface size has
been corrected to include also the array size and the query for
checking the maximum texture buffer size has also been corrected.

From build and integration point of view, we have added a fix to solve
a linking problem with standalone Android builds while SCons is now
properly checking for xlocale.h.

Take a look at section "Mesa stable queue" for more information.


Testing reports/general approval


Any testing reports (or general approval of the state of the branch)
will be greatly appreciated.

The plan is to have 17.1.5 this Friday (14th of July), around or
shortly after 19:00 GMT.

If you have any questions or suggestions - be that about the current
patch queue or otherwise, please go ahead.


Trivial merge conflicts
---

cc2a62991a104bdbaf06913501d777cd4037fed8
Author: Alex Smith <asm...@feralinteractive.com>

ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffers

(cherry picked from commit 909184ac9cf59f23803915773f5659f05c161394)

commit 2711a13a4fca238d0647558905f98e7f1170b67d
Author: Ilia Mirkin <imir...@alum.mit.edu>

glsl: check if any of the named builtins are available first

(cherry picked from commit 880f21f55d579fe2183255d031c23343da30f69e)

commit e9f0179221d175aa59974eaa4a386074ad37ca8a
Author: Plamena Manolova <plamena.manol...@intel.com>

mesa/main: Move NULL pointer check.

(cherry picked from commit b3b61211157ab934f1898d3519e7288c1fd89d80)

c36c8ec52808eb55bf1517a7beaaacc955c1e612
Author: Juan A. Suarez Romero <jasua...@igalia.com>

glsl: do not call link_xfb_stride_layout_qualifiers() for fragment shaders

(cherry picked from commit 860919a3b237386cba5b2951ae520bf6734fd17e)


Cheers,
Andres


Mesa stable queue
-

Nominated (2)
=

Brian Paul (1):
  f7e78abdf4 svga: fix texture swizzle writemasking

Jason Ekstrand (1):
  8e3d9c5d09 anv: Round u_vector element sizes to a power of two


Queued (36)
===

Aaron Watry (1):
  radeon/winsys: Limit max allocation size to 70% of VRAM

Aleksander Morgado (2):
  etnaviv: fix refcnt initialization in etna_screen
  etnaviv: don't dereference etna_resource pointer if allocation fails

Alex Smith (2):
  ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffers
  ac/nir: Fix ordering of parameters for image atomic cmpswap intrinsics

Andres Gomez (2):
  docs: add sha256 checksums for 17.1.4
  cherry-ignore: i965: Fix anisotropic filtering for ma

Re: [Mesa-dev] [PATCH v3 1/3] spirv: Fix reaching unreachable for compare exchange on images

2017-07-10 Thread Andres Gomez
James, it doesn't seem like this patch has landed in master. Are you in
need of review or is it that this has been superseded?

Thanks!

On Mon, 2017-06-26 at 10:46 +0100, James Legg wrote:
> We were hitting the
>   unreachable("Invalid image opcode")
> near the end of vtn_handle_image when parsing the
> SpvOpAtomicCompareExchange opcode.
> 
> v2: Add stable CC.
> v3: Ignore SpvOpAtomicCompareExchangeWeak. It requires the Kernel
> capability which is not exposed in Vulkan, and spirv_to_nir is not used
> for OpenCL which does support it.
> 
> CC: 
> ---
>  src/compiler/spirv/spirv_to_nir.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/compiler/spirv/spirv_to_nir.c 
> b/src/compiler/spirv/spirv_to_nir.c
> index 0a5eb0e..0e6229b 100644
> --- a/src/compiler/spirv/spirv_to_nir.c
> +++ b/src/compiler/spirv/spirv_to_nir.c
> @@ -1977,6 +1977,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
>intrin->src[2] = nir_src_for_ssa(vtn_ssa_value(b, w[3])->def);
>break;
>  
> +   case SpvOpAtomicCompareExchange:
> case SpvOpAtomicIIncrement:
> case SpvOpAtomicIDecrement:
> case SpvOpAtomicExchange:
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] meta: Fix BlitFramebuffer temp texture setup

2017-07-10 Thread Andres Gomez
Ville, has this patch fallen through the cracks ?

On Fri, 2017-06-23 at 14:58 +0300, ville.syrj...@linux.intel.com wrote:
> From: Ville Syrjälä 
> 
> Pass the correct src coordinates to CopyTexSubImage()
> when creating the temporary texture, and also take care to adjust
> flipX/Y if the original src coordinates were flipped compared to
> the new temporary texture src coordinates.
> 
> This fixes all the flip_src_x/y tests in
> piglit.spec.arb_framebuffer_object.fbo-blit-stretch on i915, but
> we're still left with the some failures in the stretch tests.
> 
> It looks to me like commit b702233f53d6 ("meta: Refactor the
> BlitFramebuffer color CopyTexImage fallback.") most likely
> broke this codepath.
> 
> Cc: mesa-sta...@lists.freedesktop.org
> Cc: Eric Anholt 
> Cc: Kenneth Graunke 
> Cc: Ian Romanick 
> Cc: Anuj Phogat 
> Fixes: b702233f53d6 ("meta: Refactor the BlitFramebuffer color CopyTexImage 
> fallback.")
> References: https://bugs.freedesktop.org/show_bug.cgi?id=101414
> Signed-off-by: Ville Syrjälä 
> ---
>  src/mesa/drivers/common/meta_blit.c | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/common/meta_blit.c 
> b/src/mesa/drivers/common/meta_blit.c
> index 7adad469aceb..7262ecdfaf13 100644
> --- a/src/mesa/drivers/common/meta_blit.c
> +++ b/src/mesa/drivers/common/meta_blit.c
> @@ -680,12 +680,16 @@ blitframebuffer_texture(struct gl_context *ctx,
>}
>  
>_mesa_meta_setup_copypix_texture(ctx, meta_temp_texture,
> -   srcX0, srcY0,
> +   MIN2(srcX0, srcX1),
> +   MIN2(srcY0, srcY1),
> srcW, srcH,
> tex_base_format,
> filter);
>  
> -
> +  if (srcX0 > srcX1)
> + flipX = -flipX;
> +  if (srcY0 > srcY1)
> + flipY = -flipY;
>srcX0 = 0;
>srcY0 = 0;
>srcX1 = srcW;
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] i965/blorp: Use the renderbuffer format for clears

2017-07-10 Thread Andres Gomez
Jason, which is the status of this patch? Has it been superseded or
discarded?


On Mon, 2017-06-26 at 09:01 -0700, Jason Ekstrand wrote:
> This fixes the Piglit ARB_texture_views rendering-formats test.
> 
> Cc: "17.1" 
> ---
>  src/mesa/drivers/dri/i965/brw_blorp.c | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c 
> b/src/mesa/drivers/dri/i965/brw_blorp.c
> index 87c9dd4..96dc657 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> @@ -746,9 +746,9 @@ do_single_blorp_clear(struct brw_context *brw, struct 
> gl_framebuffer *fb,
>  {
> struct gl_context *ctx = >ctx;
> struct intel_renderbuffer *irb = intel_renderbuffer(rb);
> -   mesa_format format = irb->mt->format;
> uint32_t x0, x1, y0, y1;
>  
> +   mesa_format format = irb->Base.Base.Format;
> if (!encode_srgb && _mesa_get_format_color_encoding(format) == GL_SRGB)
>format = _mesa_get_srgb_format_linear(format);
>  
> @@ -772,6 +772,14 @@ do_single_blorp_clear(struct brw_context *brw, struct 
> gl_framebuffer *fb,
> if (set_write_disables(irb, ctx->Color.ColorMask[buf], 
> color_write_disable))
>can_fast_clear = false;
>  
> +   /* We store clear colors as floats or uints as needed.  If there are
> +* texture views in play, the formats will not properly be respected
> +* during resolves because the resolve operations only know about the
> +* miptree and not the renderbuffer.
> +*/
> +   if (irb->Base.Base.Format != irb->mt->format)
> +  can_fast_clear = false;
> +
> if (!irb->mt->supports_fast_clear ||
> !brw_is_color_fast_clear_compatible(brw, irb->mt, 
> >Color.ClearColor))
>can_fast_clear = false;
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH] nir: copy front interpolation when creating fake back color input

2017-07-10 Thread Andres Gomez
I'll leave it out, then.

Thanks for the feedback! ☺

On Mon, 2017-07-10 at 13:35 -0400, Ilia Mirkin wrote:
> I wouldn't object to it being in stable, but it's also not
> super-important. It does fix some piglits for freedreno though. (I
> don't think vc4 exposes GL 3.0, so the problematic condition can't
> happen there.)
> 
> On Mon, Jul 10, 2017 at 1:30 PM, Andres Gomez <ago...@igalia.com> wrote:
> > Ilia, would we want this patch in -stable ?
> > 
> > On Fri, 2017-07-07 at 20:34 -0400, Ilia Mirkin wrote:
> > > Fixes a bunch of gl_BackColor interpolation tests that had explicit
> > > interpolation specified on the fragment shader gl_Color.
> > > 
> > > Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>
> > > ---
> > >  src/compiler/nir/nir_lower_two_sided_color.c | 8 ++--
> > >  1 file changed, 6 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/src/compiler/nir/nir_lower_two_sided_color.c 
> > > b/src/compiler/nir/nir_lower_two_sided_color.c
> > > index 7d1a3bd236d..90da1013ec8 100644
> > > --- a/src/compiler/nir/nir_lower_two_sided_color.c
> > > +++ b/src/compiler/nir/nir_lower_two_sided_color.c
> > > @@ -46,7 +46,8 @@ typedef struct {
> > >   */
> > > 
> > >  static nir_variable *
> > > -create_input(nir_shader *shader, unsigned drvloc, gl_varying_slot slot)
> > > +create_input(nir_shader *shader, unsigned drvloc, gl_varying_slot slot,
> > > + enum glsl_interp_mode interpolation)
> > >  {
> > > nir_variable *var = rzalloc(shader, nir_variable);
> > > 
> > > @@ -56,6 +57,7 @@ create_input(nir_shader *shader, unsigned drvloc, 
> > > gl_varying_slot slot)
> > > var->name = ralloc_asprintf(var, "in_%d", drvloc);
> > > var->data.index = 0;
> > > var->data.location = slot;
> > > +   var->data.interpolation = interpolation;
> > > 
> > > exec_list_push_tail(>inputs, >node);
> > > 
> > > @@ -116,7 +118,9 @@ setup_inputs(lower_2side_state *state)
> > >else
> > >   slot = VARYING_SLOT_BFC1;
> > > 
> > > -  state->colors[i].back = create_input(state->shader, ++maxloc, 
> > > slot);
> > > +  state->colors[i].back = create_input(
> > > +state->shader, ++maxloc, slot,
> > > +state->colors[i].front->data.interpolation);
> > > }
> > > 
> > > return 0;
> > 
> > --
> > Br,
> > 
> > Andres
> 
> ___
> mesa-stable mailing list
> mesa-sta...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH] gallium: improve selection of pixel format

2017-07-10 Thread Andres Gomez
Great!

Thanks for the feedback! ☺

On Mon, 2017-07-10 at 12:18 +0200, Olivier Lauffenburger wrote:
> Technically, a correctly written application should not rely on
> ChoosePixelFormat but should enumerate by itself through all the
> pixel formats and select the best one with its own algorithm.
> 
> However, for the (numerous) applications that use ChoosePixelFormat,
> color depth is more a question of quality of rendering, whereas depth
> and stencil buffers are a question a correct/incorrect rendering.
> 
> The current method gives a higher priority to color depth than to
> depth and stencil buffers depth to the point that a different color
> depth disables the stencil buffer.
> 
> To make things even worse, many applications (including GLUT)
> incorrectly set ppfd->cColorBits to 32 instead of 24, although the
> documentation clearly states that "For RGBA pixel types, it is the
> size of the color buffer, EXCLUDING THE ALPHA BITPLANES" (emphasis is
> mine).
> 
> As a result, those applications never get a stencil buffer, which
> leads to incorrect rendering. I stumbled on this problem while giving
> a try to OpenCSG and it took me a while to discover that the wrong
> results were caused by the absence of a stencil buffer requested by
> GLUT.
> 
> Although there is no universal selection algorithm, the one I suggest
> tries to enforce the following policy:
> 
> - Most important is to enable all the buffers (depth, stencil,
> accumulation...) that are requested (correction).
> - Then, try to allocate at least as many bits as requested (quality +
> performance).
> - Least important, try not to allocate more bits than requested
> (economy).
> 
> This algorithm seems to be in line with the behavior of most Windows
> drivers (Microsoft, NVIDIA, AMD) and, more important, I can't imagine
> a sensible scenario where this change would break an existing
> application.
> 
> -Olivier
> 
> -Message d'origine-
> De : Andres Gomez [mailto:ago...@igalia.com] 
> Envoyé : samedi 8 juillet 2017 22:08
> À : Olivier Lauffenburger <o.lauffenbur...@topsolid.com>; mesa-dev@li
> sts.freedesktop.org
> Cc : mesa-sta...@lists.freedesktop.org; Brian Paul <bri...@vmware.com
> >
> Objet : Re: [Mesa-dev] [PATCH] gallium: improve selection of pixel
> format
> 
> Olivier, Brian, do we want this into -stable?
> 
> On Thu, 2017-07-06 at 17:08 +0200, Olivier Lauffenburger wrote:
> > Current selection of pixel format does not enforce the request of 
> > stencil or depth buffer if the color depth is not the same as 
> > requested.
> > For instance, GLUT requests a 32-bit color buffer with an 8-bit 
> > stencil buffer, but because color buffers are only 24-bit, no
> > priority 
> > is given to creating a stencil buffer.
> > 
> > This patch gives more priority to the creation of requested
> > buffers 
> > and less priority to the difference in bit depth.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101703
> > 
> > Signed-off-by: Olivier Lauffenburger <o.lauffenbur...@topsolid.com>
> > ---
> >  src/gallium/state_trackers/wgl/stw_pixelformat.c | 36 
> > +++-
> >  1 file changed, 29 insertions(+), 7 deletions(-)
> > 
> > diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c 
> > b/src/gallium/state_trackers/wgl/stw_pixelformat.c
> > index 7763f71cbc..833308d964 100644
> > --- a/src/gallium/state_trackers/wgl/stw_pixelformat.c
> > +++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c
> > @@ -432,17 +432,39 @@ stw_pixelformat_choose(HDC hdc, CONST
> > PIXELFORMATDESCRIPTOR *ppfd)
> >    !!(pfi->pfd.dwFlags & PFD_DOUBLEBUFFER))
> >   continue;
> >  
> > -  /* FIXME: Take in account individual channel bits */
> > -  if (ppfd->cColorBits != pfi->pfd.cColorBits)
> > - delta += 8;
> > +  /* Selection logic:
> > +  * - Enabling a feature (depth, stencil...) is given highest
> > priority.
> > +  * - Giving as many bits as requested is given medium
> > priority.
> > +  * - Giving no more bits than requested is given lowest
> > priority.
> > +  */
> >  
> > -  if (ppfd->cDepthBits != pfi->pfd.cDepthBits)
> > - delta += 4;
> > +  /* FIXME: Take in account individual channel bits */
> > +  if (ppfd->cColorBits && !pfi->pfd.cColorBits)
> > + delta += 1;
> > +  else if (ppfd->cColorBits > pfi->pfd.cColorBits)
> > + delta += 100;
> > +  else if (ppfd->cColorBits < pfi->

Re: [Mesa-dev] [PATCH] nir: copy front interpolation when creating fake back color input

2017-07-10 Thread Andres Gomez
Ilia, would we want this patch in -stable ?

On Fri, 2017-07-07 at 20:34 -0400, Ilia Mirkin wrote:
> Fixes a bunch of gl_BackColor interpolation tests that had explicit
> interpolation specified on the fragment shader gl_Color.
> 
> Signed-off-by: Ilia Mirkin 
> ---
>  src/compiler/nir/nir_lower_two_sided_color.c | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/compiler/nir/nir_lower_two_sided_color.c 
> b/src/compiler/nir/nir_lower_two_sided_color.c
> index 7d1a3bd236d..90da1013ec8 100644
> --- a/src/compiler/nir/nir_lower_two_sided_color.c
> +++ b/src/compiler/nir/nir_lower_two_sided_color.c
> @@ -46,7 +46,8 @@ typedef struct {
>   */
>  
>  static nir_variable *
> -create_input(nir_shader *shader, unsigned drvloc, gl_varying_slot slot)
> +create_input(nir_shader *shader, unsigned drvloc, gl_varying_slot slot,
> + enum glsl_interp_mode interpolation)
>  {
> nir_variable *var = rzalloc(shader, nir_variable);
>  
> @@ -56,6 +57,7 @@ create_input(nir_shader *shader, unsigned drvloc, 
> gl_varying_slot slot)
> var->name = ralloc_asprintf(var, "in_%d", drvloc);
> var->data.index = 0;
> var->data.location = slot;
> +   var->data.interpolation = interpolation;
>  
> exec_list_push_tail(>inputs, >node);
>  
> @@ -116,7 +118,9 @@ setup_inputs(lower_2side_state *state)
>else
>   slot = VARYING_SLOT_BFC1;
>  
> -  state->colors[i].back = create_input(state->shader, ++maxloc, slot);
> +  state->colors[i].back = create_input(
> +state->shader, ++maxloc, slot,
> +state->colors[i].front->data.interpolation);
> }
>  
> return 0;
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [Fwd: Re: [PATCH 1/2] intel/isl: Use uint64_t to store total surface size]

2017-07-10 Thread Andres Gomez
OK, thanks for the feedback! ☺

On Mon, 2017-07-10 at 09:46 -0700, Anuj Phogat wrote:
> These patches are not fixing any known bug. But they are adding the
> previously missing surface size limits for the hardware. It's really hard
> to hit these limits. But, let's pick them to stable for the sake of 
> completion.
> Thanks for marking them for mesa-stable.
> 
> 
> On Fri, Jul 7, 2017 at 7:25 AM, Andres Gomez <ago...@igalia.com> wrote:
> > On Thu, 2017-07-06 at 18:21 +0100, Emil Velikov wrote:
> > > On 3 July 2017 at 21:14, Andres Gomez <ago...@igalia.com> wrote:
> > > > Actually, forgot to add -stable into CC.
> > > > 
> > > >  Forwarded Message 
> > > > From: Andres Gomez <ago...@igalia.com>
> > > > To: Anuj Phogat <anuj.pho...@gmail.com>, mesa-dev@lists.freedesktop.org
> > > > Subject: Re: [Mesa-dev] [PATCH 1/2] intel/isl: Use uint64_t to store
> > > > total surface size
> > > > Date: Mon, 03 Jul 2017 23:02:31 +0300
> > > > 
> > > > It looks like we could want these 2 into -stable (?)
> > > > 
> > > 
> > > Shouldn't hurt, despite that most of the
> > > isl_surf_init/isl_surf_get_[a-z]_surf handling is a simple assert(ok).
> > > I'll leave the call to the experts, but my take is "don't bother".
> > 
> > OK, I'll wait to see if Anuj has anything to say before picking this
> > one, then.
> > 
> > Thanks for the feedback!
> > 
> > --
> > Br,
> > 
> > Andres
> 
> ___
> mesa-stable mailing list
> mesa-sta...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 03/14] gallium/radeon: fix a possible crash for buffer exports

2017-07-09 Thread Andres Gomez
On Sun, 2017-07-09 at 14:29 +0200, Marek Olšák wrote:
> On Sat, Jul 8, 2017 at 4:07 PM, Andres Gomez <ago...@igalia.com> wrote:
> > Marek, do we want this into -stable?
> 
> Yes, this one can go to stable if it applies cleanly.

It does. Thanks for the feedback! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] drirc: Add glsl_correct_derivatives_after_discard for The Witcher 2

2017-07-09 Thread Andres Gomez
On Sun, 2017-07-09 at 14:23 +0200, Marek Olšák wrote:
> On Sat, Jul 8, 2017 at 3:58 PM, Andres Gomez <ago...@igalia.com> wrote:
> > Related to my previous mail, do we try to pick this for -stable?
> 
> This one actually fixes a very visible incorrect rendering in Witcher
> 2. Still, I think the 5-piece series is too large for stable.

Thanks for the feedback!

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/5] Gallium: Passing drirc options to create_screen() and fixing Rocket League

2017-07-09 Thread Andres Gomez
On Sun, 2017-07-09 at 14:21 +0200, Marek Olšák wrote:
> On Sat, Jul 8, 2017 at 3:56 PM, Andres Gomez <ago...@igalia.com> wrote:
> > Marek, is it worth the effort of trying to bring this series into
> > -stable?
> 
> Probably not. The incorrect rendering in Rocket League isn't
> noticeable if you don't know what to look for.

OK, thanks! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] vbo: fix glPrimitiveRestartNV crash inside a display list

2017-07-08 Thread Andres Gomez
It looks like we could want this series into -stable (?)

On Fri, 2017-07-07 at 08:10 -0600, Brian Paul wrote:
> From: Olivier Lauffenburger 
> 
> glPrimitiveRestartNV crashes when it is called during the compilation
> of a display list.
> 
> There are two reasons:
> - ctx->Driver.CurrentSavePrimitive is not set to the current primitive
> - save_PrimitiveRestartNV() calls _save_Begin() which only sets an
>   OpenGL error, instead of calling vbo_save_NotifyBegin().
> 
> This patch correctly calls vbo_save_NotifyBegin() but it detects
> the current primitive mode by looking at the latest saved primitive.
> 
> Additional work by Brian Paul
> 
> Signed-off-by: Olivier Lauffenburger 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101464
> Reviewed-by: Brian Paul 
> ---
>  src/mesa/vbo/vbo_save_api.c | 20 +++-
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
> index a42a3c3..aab5f54 100644
> --- a/src/mesa/vbo/vbo_save_api.c
> +++ b/src/mesa/vbo/vbo_save_api.c
> @@ -1108,13 +1108,23 @@ _save_Begin(GLenum mode)
>  static void GLAPIENTRY
>  _save_PrimitiveRestartNV(void)
>  {
> -   GLenum curPrim;
> GET_CURRENT_CONTEXT(ctx);
> +   struct vbo_save_context *save = _context(ctx)->save;
>  
> -   curPrim = ctx->Driver.CurrentSavePrimitive;
> -
> -   _save_End();
> -   _save_Begin(curPrim);
> +   if (save->prim_count == 0) {
> +  /* We're not inside a glBegin/End pair, so calling 
> glPrimitiverRestartNV
> +   * is an error.
> +   */
> +  _mesa_compile_error(ctx, GL_INVALID_OPERATION,
> +  "glPrimitiveRestartNV called outside glBegin/End");
> +   } else {
> +  /* get current primitive mode */
> +  GLenum curPrim = save->prim[save->prim_count - 1].mode;
> +
> +  /* restart primitive */
> +  CALL_End(GET_DISPATCH(), ());
> +  vbo_save_NotifyBegin(ctx, curPrim);
> +   }
>  }
>  
>  
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallium: improve selection of pixel format

2017-07-08 Thread Andres Gomez
Olivier, Brian, do we want this into -stable?

On Thu, 2017-07-06 at 17:08 +0200, Olivier Lauffenburger wrote:
> Current selection of pixel format does not enforce the request of
> stencil or depth buffer if the color depth is not the same as
> requested.
> For instance, GLUT requests a 32-bit color buffer with an 8-bit
> stencil buffer, but because color buffers are only 24-bit, no
> priority is given to creating a stencil buffer.
> 
> This patch gives more priority to the creation of requested buffers
> and less priority to the difference in bit depth.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101703
> 
> Signed-off-by: Olivier Lauffenburger 
> ---
>  src/gallium/state_trackers/wgl/stw_pixelformat.c | 36 
> +++-
>  1 file changed, 29 insertions(+), 7 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c 
> b/src/gallium/state_trackers/wgl/stw_pixelformat.c
> index 7763f71cbc..833308d964 100644
> --- a/src/gallium/state_trackers/wgl/stw_pixelformat.c
> +++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c
> @@ -432,17 +432,39 @@ stw_pixelformat_choose(HDC hdc, CONST 
> PIXELFORMATDESCRIPTOR *ppfd)
>!!(pfi->pfd.dwFlags & PFD_DOUBLEBUFFER))
>   continue;
>  
> -  /* FIXME: Take in account individual channel bits */
> -  if (ppfd->cColorBits != pfi->pfd.cColorBits)
> - delta += 8;
> +  /* Selection logic:
> +  * - Enabling a feature (depth, stencil...) is given highest priority.
> +  * - Giving as many bits as requested is given medium priority.
> +  * - Giving no more bits than requested is given lowest priority.
> +  */
>  
> -  if (ppfd->cDepthBits != pfi->pfd.cDepthBits)
> - delta += 4;
> +  /* FIXME: Take in account individual channel bits */
> +  if (ppfd->cColorBits && !pfi->pfd.cColorBits)
> + delta += 1;
> +  else if (ppfd->cColorBits > pfi->pfd.cColorBits)
> + delta += 100;
> +  else if (ppfd->cColorBits < pfi->pfd.cColorBits)
> + delta++;
>  
> -  if (ppfd->cStencilBits != pfi->pfd.cStencilBits)
> +  if (ppfd->cDepthBits && !pfi->pfd.cDepthBits)
> + delta += 1;
> +  else if (ppfd->cDepthBits > pfi->pfd.cDepthBits)
> + delta += 200;
> +  else if (ppfd->cDepthBits < pfi->pfd.cDepthBits)
>   delta += 2;
>  
> -  if (ppfd->cAlphaBits != pfi->pfd.cAlphaBits)
> +  if (ppfd->cStencilBits && !pfi->pfd.cStencilBits)
> + delta += 1;
> +  else if (ppfd->cStencilBits > pfi->pfd.cStencilBits)
> + delta += 400;
> +  else if (ppfd->cStencilBits < pfi->pfd.cStencilBits)
> + delta++;
> +
> +  if (ppfd->cAlphaBits && !pfi->pfd.cAlphaBits)
> + delta += 1;
> +  else if (ppfd->cAlphaBits > pfi->pfd.cAlphaBits)
> + delta += 100;
> +  else if (ppfd->cAlphaBits < pfi->pfd.cAlphaBits)
>   delta++;
>  
>if (delta < bestdelta) {
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 3/4] docs: avoid overwrite of LD_LIBRARY_PATH during basic testing

2017-07-08 Thread Andres Gomez
The LD_LIBRARY_PATH environment variable could be already defined so
we extend it and restore it rather than just overwriting it.

Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 docs/releasing.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/releasing.html b/docs/releasing.html
index 8e6e4d1a6d..99235d8412 100644
--- a/docs/releasing.html
+++ b/docs/releasing.html
@@ -472,7 +472,8 @@ Here is one solution that I've been using.
__glxgears_cmd='glxgears 2>1 | grep -v "configuration file"'
__es2info_cmd='es2_info 2>1 | egrep 
"GL_VERSION|GL_RENDERER|.*dri\.so"'
__es2gears_cmd='es2gears_x11 2>1 | grep -v "configuration file"'
-   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/
+   'x$LD_LIBRARY_PATH' -ne 'x'  __old_ld='$LD_LIBRARY_PATH' 
 __token=':'
+   export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/'${__token}${__old_ld}'
export LIBGL_DRIVERS_PATH=`pwd`/test/usr/local/lib/dri/
export LIBGL_DEBUG=verbose
eval $__glxinfo_cmd
@@ -492,6 +493,7 @@ Here is one solution that I've been using.
eval $__es2gears_cmd
# Smoke test DOTA2
unset LD_LIBRARY_PATH
+   'x$__old_ld' -ne 'x'  export LD_LIBRARY_PATH='$__old_ld' 
 unset __token
unset LIBGL_DRIVERS_PATH
unset LIBGL_DEBUG
unset LIBGL_ALWAYS_SOFTWARE
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 4/4] docs: update master's release notes, news and calendar commit

2017-07-08 Thread Andres Gomez
This reflects closer what we are actually doing.

Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 docs/releasing.html | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/docs/releasing.html b/docs/releasing.html
index 99235d8412..152f5cea73 100644
--- a/docs/releasing.html
+++ b/docs/releasing.html
@@ -24,7 +24,6 @@
 Making a branchpoint
 Pre-release announcement
 Making a new release
-Update the calendar
 Announce the release
 Update the mesa3d.org website
 Update Bugzilla
@@ -574,23 +573,17 @@ Something like the following steps will do the trick:
 
 
 
-Also, edit docs/relnotes.html to add a link to the new release notes, and edit
-docs/index.html to add a news entry. Then commit and push:
+Also, edit docs/relnotes.html to add a link to the new release notes,
+edit docs/index.html to add a news entry, and remove the version from
+docs/release-calendar.html. Then commit and push:
 
 
 
-   git commit -as -m "docs: add news item and link release notes for X.Y.Z"
+   git commit -as -m "docs: update calendar, add news item and link 
release notes for X.Y.Z"
git push origin master X.Y
 
 
 
-Update the calendar
-
-
-Remove the version from the calendar.
-
-
-
 Announce the release
 
 
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/4] docs: remove redundant parameter for scons build basic testing

2017-07-08 Thread Andres Gomez
toolchain=crossmingw is the default option for platform=windows when
invoking scons.

Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 docs/releasing.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/releasing.html b/docs/releasing.html
index ceb6e365e4..8e6e4d1a6d 100644
--- a/docs/releasing.html
+++ b/docs/releasing.html
@@ -450,7 +450,7 @@ Here is one solution that I've been using.
# You may need to unset LLVM if you set it before:
# unset LLVM_CONFIG
tar -xaf mesa-$__version.tar.xz  cd mesa-$__version
-   scons platform=windows toolchain=crossmingw
+   scons platform=windows
cd ..  rm -rf mesa-$__version
 
# Test the automake binaries
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/4] docs: add instructions to specify LLVM version for basic testing

2017-07-08 Thread Andres Gomez
The "Perform basic testing" section provides some instructions to do
so. We add now some comments in order to use a recent enough LLVM
version to test the distcheck and the automake generated binaries.

Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 docs/releasing.html | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/docs/releasing.html b/docs/releasing.html
index 99707bee3f..ceb6e365e4 100644
--- a/docs/releasing.html
+++ b/docs/releasing.html
@@ -437,6 +437,8 @@ Here is one solution that I've been using.
chmod 755 -fR $__build_root; rm -rf $__build_root
mkdir -p $__build_root  cd $__build_root
 
+   # For the distcheck, you may want to specify which LLVM to use:
+   # export LLVM_CONFIG=/usr/lib/llvm-3.9/bin/llvm-config
$__mesa_root/autogen.sh  make -j2 distcheck
 
# Build check the tarballs (scons, linux)
@@ -445,18 +447,22 @@ Here is one solution that I've been using.
cd ..  rm -rf mesa-$__version
 
# Build check the tarballs (scons, windows/mingw)
+   # You may need to unset LLVM if you set it before:
+   # unset LLVM_CONFIG
tar -xaf mesa-$__version.tar.xz  cd mesa-$__version
scons platform=windows toolchain=crossmingw
cd ..  rm -rf mesa-$__version
 
# Test the automake binaries
tar -xaf mesa-$__version.tar.xz  cd mesa-$__version
+   # You may want to specify which LLVM to use:
./configure \
--with-dri-drivers=i965,swrast \
--with-gallium-drivers=swrast \
--with-vulkan-drivers=intel \
--enable-llvm-shared-libs \
--enable-llvm \
+   --with-llvm-prefix=/usr/lib/llvm-3.9 \
--enable-glx-tls \
--enable-gbm \
--enable-egl \
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 0/4] docs: update basic testing on the releasing instructions

2017-07-08 Thread Andres Gomez
Some small update on the "Making a new release" section of the
releasing instructions.

Patches 1-3 add some small modifications for performing the basic
testing.

Patch 4 merges the section for updating the calendar into the previous
one to reflect closer what we are actually doing.

Andres Gomez (4):
  docs: add instructions to specify LLVM version for basic testing
  docs: remove redundant parameter for scons build basic testing
  docs: avoid overwrite of LD_LIBRARY_PATH during basic testing
  docs: update master's release notes, news and calendar commit

 docs/releasing.html | 27 ++-
 1 file changed, 14 insertions(+), 13 deletions(-)

-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH] etnaviv: don't dereference etna_resource pointer if allocation fails

2017-07-08 Thread Andres Gomez
On Sat, 2017-07-08 at 18:45 +0200, Christian Gmeiner wrote:
> 2017-07-08 14:42 GMT+02:00 Andres Gomez <ago...@igalia.com>:
> > It looks like we could want this into -stable (?)
> 
> Forgot to add CC during push but I have nominated it for stable now.

Great! Thanks a lot! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: Require mipmap completeness for glCopyImageSubData() at times.

2017-07-08 Thread Andres Gomez
On Sat, 2017-07-08 at 07:52 -0700, Kenneth Graunke wrote:
> On Saturday, July 8, 2017 7:01:30 AM PDT Andres Gomez wrote:
> > Kenneth, worth cherry-picking for -stable?
> 
> I wouldn't - this patch just imposes additional restrictions, making
> things we used to support illegal.  That means it carries a risk of
> breaking existing applications, and really only benefits test cases
> that try illegal things and expect an error.
> 
> We usually skip such patches for stable.

Thanks for the feedback! I will have that into account in the future ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 03/14] gallium/radeon: fix a possible crash for buffer exports

2017-07-08 Thread Andres Gomez
Marek, do we want this into -stable?

On Thu, 2017-06-29 at 21:47 +0200, Marek Olšák wrote:
> From: Marek Olšák 
> 
> ---
>  src/gallium/drivers/radeon/r600_texture.c | 24 +++-
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/src/gallium/drivers/radeon/r600_texture.c 
> b/src/gallium/drivers/radeon/r600_texture.c
> index d68587b..139ab13 100644
> --- a/src/gallium/drivers/radeon/r600_texture.c
> +++ b/src/gallium/drivers/radeon/r600_texture.c
> @@ -582,30 +582,36 @@ static boolean r600_texture_get_handle(struct 
> pipe_screen* screen,
>* doesn't set it.
>*/
>   res->external_usage |= usage & 
> ~PIPE_HANDLE_USAGE_EXPLICIT_FLUSH;
>   if (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
>   res->external_usage &= 
> ~PIPE_HANDLE_USAGE_EXPLICIT_FLUSH;
>   } else {
>   res->b.is_shared = true;
>   res->external_usage = usage;
>   }
>  
> - if (rscreen->chip_class >= GFX9) {
> - offset = rtex->surface.u.gfx9.surf_offset;
> - stride = rtex->surface.u.gfx9.surf_pitch *
> -  rtex->surface.bpe;
> - slice_size = rtex->surface.u.gfx9.surf_slice_size;
> + if (res->b.b.target == PIPE_BUFFER) {
> + offset = 0;
> + stride = 0;
> + slice_size = 0;
>   } else {
> - offset = rtex->surface.u.legacy.level[0].offset;
> - stride = rtex->surface.u.legacy.level[0].nblk_x *
> -  rtex->surface.bpe;
> - slice_size = rtex->surface.u.legacy.level[0].slice_size;
> + if (rscreen->chip_class >= GFX9) {
> + offset = rtex->surface.u.gfx9.surf_offset;
> + stride = rtex->surface.u.gfx9.surf_pitch *
> +  rtex->surface.bpe;
> + slice_size = rtex->surface.u.gfx9.surf_slice_size;
> + } else {
> + offset = rtex->surface.u.legacy.level[0].offset;
> + stride = rtex->surface.u.legacy.level[0].nblk_x *
> +  rtex->surface.bpe;
> + slice_size = rtex->surface.u.legacy.level[0].slice_size;
> + }
>   }
>   return rscreen->ws->buffer_get_handle(res->buf, stride, offset,
> slice_size, whandle);
>  }
>  
>  static void r600_texture_destroy(struct pipe_screen *screen,
>struct pipe_resource *ptex)
>  {
>   struct r600_texture *rtex = (struct r600_texture*)ptex;
>   struct r600_resource *resource = >resource;
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] st/mesa: check for incomplete texture in st_finalize_texture()

2017-07-08 Thread Andres Gomez
Brian, it looks like we could want this series into -stable (?)

On Wed, 2017-06-28 at 16:12 -0600, Brian Paul wrote:
> Return early from st_finalize_texture() if we have an incomplete
> texture.  This avoids trying to create a texture resource with invalid
> parameters (too many mipmap levels given the base dimension).
> 
> Specifically, the Piglit fbo-incomplete-texture-03 test winds up
> calling pipe_screen::resource_create() with width0=32, height0=32 and
> last_level=6 because the first five cube faces are 32x32 but the sixth
> face is 64x64.  Some drivers handle this, but others (like VMware svga)
> do not (generates device errors).
> 
> Note that this code is on the path that's usually not taken (we normally
> build consistent textures).
> 
> No Piglit regressions.
> ---
>  src/mesa/state_tracker/st_cb_texture.c | 14 ++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/src/mesa/state_tracker/st_cb_texture.c 
> b/src/mesa/state_tracker/st_cb_texture.c
> index 9798321..7708443 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -2543,6 +2543,20 @@ st_finalize_texture(struct gl_context *ctx,
>  stObj->base.Target == GL_TEXTURE_CUBE_MAP_ARRAY)
> ptHeight = ptWidth;
>   }
> +
> + /* At this point, the texture may be incomplete (mismatched cube
> +  * face sizes, for example).  If that's the case, give up, but
> +  * don't return GL_FALSE as that would raise an incorrect
> +  * GL_OUT_OF_MEMORY error.  See Piglit fbo-incomplete-texture-03 
> test.
> +  */
> + if (!stObj->base._BaseComplete ||
> + !stObj->base._MipmapComplete) {
> +_mesa_test_texobj_completeness(ctx, >base);
> +if (!stObj->base._BaseComplete ||
> +!stObj->base._MipmapComplete) {
> +   return TRUE;
> +}
> + }
>}
>  
>ptNumSamples = firstImage->base.NumSamples;
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: Require mipmap completeness for glCopyImageSubData() at times.

2017-07-08 Thread Andres Gomez
Kenneth, worth cherry-picking for -stable?

On Wed, 2017-06-28 at 02:44 -0700, Kenneth Graunke wrote:
> This patch makes glCopyImageSubData require mipmap completeness when the
> texture object's built-in sampler object has a mipmapping MinFilter.
> This is apparently the de facto behavior and mandated by Android's CTS.
> 
> One exception is that we ignore format based completeness rules
> (specifically integer formats with linear filtering), as this is
> also the de facto behavior that until recently was mandated by the
> OpenGL 4.5 CTS.
> 
> This was discussed with both the OpenGL and OpenGL ES working groups,
> and while everyone agrees this behavior is unfortunate and complicated,
> it is what it is at this point.  There was little appetite for relaxing
> restrictions given that all conformant Android drivers followed the
> mipmapping rule, and all conformant GL 4.5 implementations ignored the
> integer/linear rule.
> 
> Fixes (on i965):
> dEQP-GLES31.functional.debug.negative_coverage.*.buffer.copy_image_sub_data
> 
> Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224
> Cc: Roland Scheidegger 
> ---
>  src/mesa/main/copyimage.c | 59 
> +--
>  1 file changed, 57 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c
> index 2cb617ca811..10777cfdf05 100644
> --- a/src/mesa/main/copyimage.c
> +++ b/src/mesa/main/copyimage.c
> @@ -149,9 +149,64 @@ prepare_target_err(struct gl_context *ctx, GLuint name, 
> GLenum target,
>   return false;
>}
>  
> +  /* The ARB_copy_image specification says:
> +   *
> +   *"INVALID_OPERATION is generated if either object is a texture and
> +   * the texture is not complete (as defined in section 3.9.14)"
> +   *
> +   * The cited section says:
> +   *
> +   *"Using the preceding definitions, a texture is complete unless 
> any
> +   * of the following conditions hold true: [...]
> +   *
> +   * * The minification filter requires a mipmap (is neither NEAREST
> +   *   nor LINEAR), and the texture is not mipmap complete."
> +   *
> +   * This imposes the bizarre restriction that glCopyImageSubData 
> requires
> +   * mipmap completion based on the sampler minification filter, even
> +   * though the call fundamentally ignores the sampler.  Additionally, it
> +   * doesn't work with texture units, so it can't consider any bound
> +   * separate sampler objects.  It appears that you're supposed to use
> +   * the sampler object which is built-in to the texture object.
> +   *
> +   * dEQP and the Android CTS mandate this behavior, and the Khronos
> +   * GL and ES working groups both affirmed that this is unfortunate but
> +   * correct.  See 
> https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224.
> +   *
> +   * Integer textures with filtering cause another completeness snag:
> +   *
> +   *"Any of:
> +   * – The internal format of the texture is integer (see table 
> 8.12).
> +   * – The internal format is STENCIL_INDEX.
> +   * – The internal format is DEPTH_STENCIL, and the value of
> +   *   DEPTH_STENCIL_TEXTURE_MODE for the texture is STENCIL_INDEX.
> +   * and either the magnification filter is not NEAREST, or the
> +   * minification filter is neither NEAREST nor
> +   * NEAREST_MIPMAP_NEAREST."
> +   *
> +   * However, applications in the wild (such as "Total War: WARHAMMER")
> +   * appear to call glCopyImageSubData with integer textures and the
> +   * default mipmap filters of GL_LINEAR and GL_NEAREST_MIPMAP_LINEAR,
> +   * which would be considered incomplete, but expect this to work.  In
> +   * fact, until VK-GL-CTS commit fef80039ff875a51806b54d151c5f2d0c12da,
> +   * the GL 4.5 CTS contained three tests which did the exact same thing
> +   * by accident, and all conformant implementations allowed it.
> +   *
> +   * A proposal was made to amend the spec to say "is not complete (as
> +   * defined in section , but ignoring format-based completeness
> +   * rules)" to allow this case.  It makes some sense, given that
> +   * glCopyImageSubData copies raw data without considering format.
> +   * While the official edits have not yet been made, the OpenGL
> +   * working group agreed with the idea of allowing this behavior.
> +   *
> +   * To ignore formats, we check texObj->_MipmapComplete directly
> +   * rather than calling _mesa_is_texture_complete().
> +   */
>_mesa_test_texobj_completeness(ctx, texObj);
> -  if (!texObj->_BaseComplete ||
> -  (level != 0 && !texObj->_MipmapComplete)) {
> +  const bool texture_complete_aside_from_formats =
> + _mesa_is_mipmap_filter(>Sampler) ? texObj->_MipmapComplete
> +  

Re: [Mesa-dev] [PATCH] drirc: Add glsl_correct_derivatives_after_discard for The Witcher 2

2017-07-08 Thread Andres Gomez
Related to my previous mail, do we try to pick this for -stable?

On Wed, 2017-06-21 at 22:40 +0200, Edmondo Tommasina wrote:
> This fixes the long-standing problem with black transitions in The Wicher 2.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98238
> ---
> This patch depends on Marek's series: 
>
> https://patchwork.freedesktop.org/series/26089/
> 
>  src/mesa/drivers/dri/common/drirc | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/common/drirc 
> b/src/mesa/drivers/dri/common/drirc
> index 7d73b1218b..494d768312 100644
> --- a/src/mesa/drivers/dri/common/drirc
> +++ b/src/mesa/drivers/dri/common/drirc
> @@ -155,6 +155,10 @@ TODO: document the other workarounds.
>  
>   value="true"/>
>  
> +
> +
> + value="true"/>
> +
>  
>  
>  
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/5] Gallium: Passing drirc options to create_screen() and fixing Rocket League

2017-07-08 Thread Andres Gomez
Marek, is it worth the effort of trying to bring this series into
-stable?

On Wed, 2017-06-21 at 00:54 +0200, Marek Olšák wrote:
> Hi,
> 
> This series updates pipe loaders so that flags such as drirc options
> can be passed to create_screen(). I have compile-tested everything
> except clover.
> 
> The first pipe_screen flag is a drirc option to fix incorrect grass
> rendering in Rocket League for radeonsi. Rocket League expects DirectX
> behavior for partial derivative computations after discard/kill, but
> radeonsi implements the more efficient but stricter OpenGL behavior
> and that will remain our default behavior. The new screen flag forces
> radeonsi to use the DX behavior for that game.
> 
> Please review.
> 
> Thanks,
> Marek
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] etnaviv: don't dereference etna_resource pointer if allocation fails

2017-07-08 Thread Andres Gomez
It looks like we could want this into -stable (?)

On Thu, 2017-07-06 at 11:35 +0200, Aleksander Morgado wrote:
> The check for the pointer being non-NULL was being done too late.
> 
> Signed-off-by: Aleksander Morgado 
> ---
>  src/gallium/drivers/etnaviv/etnaviv_resource.c | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c 
> b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> index 97e0a15597..a709482c1b 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> @@ -320,9 +320,9 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
>struct winsys_handle *handle, unsigned usage)
>  {
> struct etna_screen *screen = etna_screen(pscreen);
> -   struct etna_resource *rsc = CALLOC_STRUCT(etna_resource);
> -   struct etna_resource_level *level = >levels[0];
> -   struct pipe_resource *prsc = >base;
> +   struct etna_resource *rsc;
> +   struct etna_resource_level *level;
> +   struct pipe_resource *prsc;
> struct pipe_resource *ptiled = NULL;
>  
> DBG("target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, "
> @@ -331,9 +331,13 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
> tmpl->height0, tmpl->depth0, tmpl->array_size, tmpl->last_level,
> tmpl->nr_samples, tmpl->usage, tmpl->bind, tmpl->flags);
>  
> +   rsc = CALLOC_STRUCT(etna_resource);
> if (!rsc)
>return NULL;
>  
> +   level = >levels[0];
> +   prsc = >base;
> +
> *prsc = *tmpl;
>  
> pipe_reference_init(>reference, 1);
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] nir/spirv: Remove unnecessary comment.

2017-07-08 Thread Andres Gomez
It should have been removed after 00c47e111c.

Cc: Jason Ekstrand <ja...@jlekstrand.net>
Cc: Connor Abbott <cwabbo...@gmail.com>
Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 src/compiler/spirv/spirv_to_nir.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/src/compiler/spirv/spirv_to_nir.c 
b/src/compiler/spirv/spirv_to_nir.c
index 1743d8915a..8da58a7a3e 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -759,11 +759,6 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
   assert(glsl_type_is_scalar(base->type));
   val->type->base_type = vtn_base_type_vector;
   val->type->type = glsl_vector_type(glsl_get_base_type(base->type), 
elems);
-
-  /* Vectors implicitly have sizeof(base_type) stride.  For now, this
-   * is always 4 bytes.  This will have to change if we want to start
-   * supporting doubles or half-floats.
-   */
   val->type->stride = glsl_get_bit_size(base->type) / 8;
   val->type->array_element = base;
   break;
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3] mesa: GL_TEXTURE_BORDER_COLOR exists in OpenGL 1.0, so don't depend on GL_ARB_texture_border_clamp

2017-07-07 Thread Andres Gomez
Ian, it looks like we could want this patch (and the others from the
series when they land) in -stable (?)

On Tue, 2017-06-27 at 10:09 -0700, Ian Romanick wrote:
> From: Ian Romanick 
> 
> On NV20 (and probably also on earlier NV GPUs that lack
> GL_ARB_texture_border_clamp) fixes the following piglit tests:
> 
> gl-1.0-beginend-coverage gltexparameter[if]{v,}
> push-pop-texture-state
> texwrap 1d
> texwrap 1d proj
> texwrap 2d proj
> texwrap formats
> 
> All told, 49 more tests pass on NV20 (10de:0201).
> 
> No changes on Intel CI run or RV250 (1002:4c66).
> 
> Signed-off-by: Ian Romanick 
> ---
>  src/mesa/main/texparam.c | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
> index 3c110de..857faf6 100644
> --- a/src/mesa/main/texparam.c
> +++ b/src/mesa/main/texparam.c
> @@ -736,8 +736,16 @@ set_tex_parameterf(struct gl_context *ctx,
>break;
>  
> case GL_TEXTURE_BORDER_COLOR:
> +  /* Border color exists in desktop OpenGL since 1.0 for GL_CLAMP.  In
> +   * OpenGL ES 2.0+, it only exists in when GL_OES_texture_border_clamp 
> is
> +   * enabled.  It is never available in OpenGL ES 1.x.
> +   *
> +   * FIXME: Every driver that supports GLES2 has this extension.  Elide
> +   * the check?
> +   */
>if (ctx->API == API_OPENGLES ||
> -  !ctx->Extensions.ARB_texture_border_clamp)
> +  (ctx->API == API_OPENGLES2 &&
> +   !ctx->Extensions.ARB_texture_border_clamp))
>   goto invalid_pname;
>  
>if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] swr: invalidate attachment on transition change

2017-07-07 Thread Andres Gomez
George, would we want this patch in -stable or we shouldn't bother ?

On Tue, 2017-06-20 at 11:42 -0500, George Kyriazis wrote:
> Consider the following RT attachment order:
> 1. Attach surfaces attachments 0 & 1, and render with them
> 2. Detach 0 & 1
> 3. Re-attach 0 & 1 to different surfaces
> 4. Render with the new attachment
> 
> The definition of a tile being resolved is that local changes have been
> flushed out to the surface, hence there is no need to reload the tile before
> it's written to.  For an invalid tile, the tile has to be reloaded from
> the surface before rendering.
> 
> Stage (2) was marking hot tiles for attachements 0 & 1 as RESOLVED,
> which means that the hot tiles can be written out to memory with no
> need to read them back in (they are "clean").  They need to be marked as
> resolved here, because a surface may be destroyed after a detach, and we
> don't want to have un-resolved tiles that may force a readback from a
> NULL (destroyed) surface.  (Part of a destroy is detach all attachments first)
> 
> Stage (3), during the no att -> att transition, we  need to realize that the
> "new" surface tiles need to be fetched fresh from the new surface, instead
> of using the resolved tiles, that belong to a stale attachment.
> 
> This is done by marking the hot tiles as invalid in stage (3), when we realize
> that a new attachment is being made, so that they are re-fetched during
> rendering in stage (4).
> 
> Also note that hot tiles are indexed by attachment.
> 
> - Fixes VTK dual depth-peeling tests.
> - No piglit changes
> ---
>  src/gallium/drivers/swr/swr_draw.cpp   | 19 +++
>  src/gallium/drivers/swr/swr_resource.h |  4 
>  src/gallium/drivers/swr/swr_state.cpp  |  5 +
>  3 files changed, 28 insertions(+)
> 
> diff --git a/src/gallium/drivers/swr/swr_draw.cpp 
> b/src/gallium/drivers/swr/swr_draw.cpp
> index 03c82a7..ac300e2 100644
> --- a/src/gallium/drivers/swr/swr_draw.cpp
> +++ b/src/gallium/drivers/swr/swr_draw.cpp
> @@ -215,6 +215,25 @@ swr_finish(struct pipe_context *pipe)
> swr_fence_reference(pipe->screen, , NULL);
>  }
>  
> +/*
> + * Invalidate tiles so they can be reloaded back when needed
> + */
> +void
> +swr_invalidate_render_target(struct pipe_context *pipe,
> + uint32_t attachment,
> + uint16_t width, uint16_t height)
> +{
> +   struct swr_context *ctx = swr_context(pipe);
> +
> +   /* grab the rect from the passed in arguments */
> +   swr_update_draw_context(ctx);
> +   SWR_RECT full_rect =
> +  {0, 0, (int32_t)width, (int32_t)height};
> +   SwrInvalidateTiles(ctx->swrContext,
> +  1 << attachment,
> +  full_rect);
> +}
> +
>  
>  /*
>   * Store SWR HotTiles back to renderTarget surface.
> diff --git a/src/gallium/drivers/swr/swr_resource.h 
> b/src/gallium/drivers/swr/swr_resource.h
> index ae9954c..4effd46 100644
> --- a/src/gallium/drivers/swr/swr_resource.h
> +++ b/src/gallium/drivers/swr/swr_resource.h
> @@ -96,6 +96,10 @@ swr_resource_data(struct pipe_resource *resource)
>  }
>  
>  
> +void swr_invalidate_render_target(struct pipe_context *pipe,
> +  uint32_t attachment,
> +  uint16_t width, uint16_t height);
> +
>  void swr_store_render_target(struct pipe_context *pipe,
>   uint32_t attachment,
>   enum SWR_TILE_STATE post_tile_state);
> diff --git a/src/gallium/drivers/swr/swr_state.cpp 
> b/src/gallium/drivers/swr/swr_state.cpp
> index 08549e5..deae4e6 100644
> --- a/src/gallium/drivers/swr/swr_state.cpp
> +++ b/src/gallium/drivers/swr/swr_state.cpp
> @@ -933,6 +933,11 @@ swr_change_rt(struct swr_context *ctx,
> * INVALID so they are reloaded from surface. */
>swr_store_render_target(>pipe, attachment, SWR_TILE_INVALID);
>need_fence = true;
> +   } else {
> +  /* if no previous attachment, invalidate tiles that may be marked
> +   * RESOLVED because of an old attachment */
> +  swr_invalidate_render_target(>pipe, attachment, sf->width, 
> sf->height);
> +  /* no need to set fence here */
> }
>  
> /* Make new attachment */
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/8] mesa: check for allocation failures in _mesa_new_texture_object()

2017-07-07 Thread Andres Gomez
On Fri, 2017-07-07 at 09:14 +0200, Samuel Pitoiset wrote:
> 
> On 07/06/2017 08:06 PM, Andres Gomez wrote:
> > It looks like we could want patches 1 and 3-8 from this series into
> > -stable (?)
> 
> These are not critical fixes, your call.

OK. I will leave them out by now, then.

Thanks for the feedback! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/4] radeonsi: fix DCC fast clear for luminance and alpha formats

2017-07-07 Thread Andres Gomez
On Thu, 2017-07-06 at 23:24 +0200, Marek Olšák wrote:
> On Thu, Jul 6, 2017 at 8:24 PM, Andres Gomez <ago...@igalia.com> wrote:
> > Marek, would we want this series in -stable or we shouldn't bother ?
> 
> Don't bother. Patch 1 isn't that important. Other patches are for
> features not enabled in 17.1.

OK. Thanks for the feedback! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [Fwd: Re: [PATCH 1/2] intel/isl: Use uint64_t to store total surface size]

2017-07-07 Thread Andres Gomez
On Thu, 2017-07-06 at 18:21 +0100, Emil Velikov wrote:
> On 3 July 2017 at 21:14, Andres Gomez <ago...@igalia.com> wrote:
> > Actually, forgot to add -stable into CC.
> > 
> >  Forwarded Message 
> > From: Andres Gomez <ago...@igalia.com>
> > To: Anuj Phogat <anuj.pho...@gmail.com>, mesa-dev@lists.freedesktop.org
> > Subject: Re: [Mesa-dev] [PATCH 1/2] intel/isl: Use uint64_t to store
> > total surface size
> > Date: Mon, 03 Jul 2017 23:02:31 +0300
> > 
> > It looks like we could want these 2 into -stable (?)
> > 
> 
> Shouldn't hurt, despite that most of the
> isl_surf_init/isl_surf_get_[a-z]_surf handling is a simple assert(ok).
> I'll leave the call to the experts, but my take is "don't bother".

OK, I'll wait to see if Anuj has anything to say before picking this
one, then.

Thanks for the feedback!

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] mesa/main: Move NULL pointer check.

2017-07-07 Thread Andres Gomez
On Thu, 2017-07-06 at 18:02 +0100, Emil Velikov wrote:
> On 6 July 2017 at 15:35, Andres Gomez <ago...@igalia.com> wrote:
> > It looks like we could want this into -stable (?)
> > 
> 
> _mesa_update_draw_buffer_bounds is a no-op if the buffer pointer is NULL.
> There's no issue to fix, but making Coverity happy is not a bad idea either 
> ;-)

_mesa_update_draw_buffer_bounds is a no-op but, if I'm not mistaken,
_mesa_update_framebuffer could end in a crash.

In any case, I think I will pick this.

Thanks for the feedback, Emil ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [st/va] Fix leak in VAAPI subpictures

2017-07-06 Thread Andres Gomez
It looks like we could want this into -stable (?)

On Thu, 2017-07-06 at 21:10 +0300, Andres Gomez wrote:
> On Thu, 2017-06-22 at 09:25 +, Namburu, Chandu-babu wrote:
> > From: Chandu Babu N <cha...@amd.com>
> > Subject: [PATCH] [st/va] Fix leak in VAAPI subpictures
> >  
> > sampler view allocated in vaAssociateSubpicture is not cleared
> > in vaiDeassociateSubpicture.
> >  
> > Reviewed-by: Christian König <christian.koe...@amd.com>
> > ---
> > src/gallium/state_trackers/va/subpicture.c | 1 +
> > 1 file changed, 1 insertion(+)
> >  
> > diff --git a/src/gallium/state_trackers/va/subpicture.c 
> > b/src/gallium/state_trackers/va/subpicture.c
> > index 15d52b9..981a99c 100644
> > --- a/src/gallium/state_trackers/va/subpicture.c
> > +++ b/src/gallium/state_trackers/va/subpicture.c
> > @@ -283,6 +283,7 @@ vlVaDeassociateSubpicture(VADriverContextP ctx, 
> > VASubpictureID subpicture,
> >    while (surf->subpics.size && util_dynarray_top(>subpics, 
> > vlVaSubpicture *) == NULL)
> >       (void)util_dynarray_pop(>subpics, vlVaSubpicture *);
> >     }
> > +   pipe_sampler_view_reference(>sampler,NULL);
> >     mtx_unlock(>mutex);
> > return VA_STATUS_SUCCESS;
> > --
> > 2.7.4
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [st/va] Fix leak in VAAPI subpictures

2017-07-06 Thread Andres Gomez
It looks like we could want this into -stable (?)

On Thu, 2017-07-06 at 21:10 +0300, Andres Gomez wrote:
> On Thu, 2017-06-22 at 09:25 +, Namburu, Chandu-babu wrote:
> > From: Chandu Babu N <cha...@amd.com>
> > Subject: [PATCH] [st/va] Fix leak in VAAPI subpictures
> >  
> > sampler view allocated in vaAssociateSubpicture is not cleared
> > in vaiDeassociateSubpicture.
> >  
> > Reviewed-by: Christian König <christian.koe...@amd.com>
> > ---
> > src/gallium/state_trackers/va/subpicture.c | 1 +
> > 1 file changed, 1 insertion(+)
> >  
> > diff --git a/src/gallium/state_trackers/va/subpicture.c 
> > b/src/gallium/state_trackers/va/subpicture.c
> > index 15d52b9..981a99c 100644
> > --- a/src/gallium/state_trackers/va/subpicture.c
> > +++ b/src/gallium/state_trackers/va/subpicture.c
> > @@ -283,6 +283,7 @@ vlVaDeassociateSubpicture(VADriverContextP ctx, 
> > VASubpictureID subpicture,
> >    while (surf->subpics.size && util_dynarray_top(>subpics, 
> > vlVaSubpicture *) == NULL)
> >       (void)util_dynarray_pop(>subpics, vlVaSubpicture *);
> >     }
> > +   pipe_sampler_view_reference(>sampler,NULL);
> >     mtx_unlock(>mutex);
> > return VA_STATUS_SUCCESS;
> > --
> > 2.7.4
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/4] radeonsi: fix DCC fast clear for luminance and alpha formats

2017-07-06 Thread Andres Gomez
Marek, would we want this series in -stable or we shouldn't bother ?

On Tue, 2017-06-20 at 19:06 +0200, Marek Olšák wrote:
> From: Marek Olšák 
> 
> I reproduced this bug on Polaris11 and Raven.
> 
> I can't get this bug on Fiji. The reason might be that Fiji doesn't use
> 2D tiling for the test due to higher 2D tiling alignment requirements.
> 
> Fixes piglit: spec@ext_framebuffer_object@fbo-fast-clear
> ---
>  src/gallium/drivers/radeon/r600_texture.c | 11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeon/r600_texture.c 
> b/src/gallium/drivers/radeon/r600_texture.c
> index d0492d6..f74bbce 100644
> --- a/src/gallium/drivers/radeon/r600_texture.c
> +++ b/src/gallium/drivers/radeon/r600_texture.c
> @@ -2404,39 +2404,48 @@ static void evergreen_set_clear_color(struct 
> r600_texture *rtex,
>  static bool vi_get_fast_clear_parameters(enum pipe_format surface_format,
>const union pipe_color_union *color,
>uint32_t* reset_value,
>bool* clear_words_needed)
>  {
>   bool values[4] = {};
>   int i;
>   bool main_value = false;
>   bool extra_value = false;
>   int extra_channel;
> +
> + /* This is needed to get the correct DCC clear value for luminance 
> formats.
> +  * 1) Get the linear format (because the next step can't handle 
> L8_SRGB).
> +  * 2) Convert luminance to red. (the real hw format for luminance)
> +  */
> + surface_format = util_format_linear(surface_format);
> + surface_format = util_format_luminance_to_red(surface_format);
> +
>   const struct util_format_description *desc = 
> util_format_description(surface_format);
>  
>   if (desc->block.bits == 128 &&
>   (color->ui[0] != color->ui[1] ||
>color->ui[0] != color->ui[2]))
>   return false;
>  
>   *clear_words_needed = true;
>   *reset_value = 0x20202020U;
>  
>   /* If we want to clear without needing a fast clear eliminate step, we
>* can set each channel to 0 or 1 (or 0/max for integer formats). We
>* have two sets of flags, one for the last or first channel(extra) and
>* one for the other channels(main).
>*/
>  
>   if (surface_format == PIPE_FORMAT_R11G11B10_FLOAT ||
>   surface_format == PIPE_FORMAT_B5G6R5_UNORM ||
> - surface_format == PIPE_FORMAT_B5G6R5_SRGB) {
> + surface_format == PIPE_FORMAT_B5G6R5_SRGB ||
> + util_format_is_alpha(surface_format)) {
>   extra_channel = -1;
>   } else if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) {
>   if(r600_translate_colorswap(surface_format, false) <= 1)
>   extra_channel = desc->nr_channels - 1;
>   else
>   extra_channel = 0;
>   } else
>   return true;
>  
>   for (i = 0; i < 4; ++i) {
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [st/va] Fix leak in VAAPI subpictures

2017-07-06 Thread Andres Gomez
On Thu, 2017-06-22 at 09:25 +, Namburu, Chandu-babu wrote:
> From: Chandu Babu N 
> Subject: [PATCH] [st/va] Fix leak in VAAPI subpictures
>  
> sampler view allocated in vaAssociateSubpicture is not cleared
> in vaiDeassociateSubpicture.
>  
> Reviewed-by: Christian König 
> ---
> src/gallium/state_trackers/va/subpicture.c | 1 +
> 1 file changed, 1 insertion(+)
>  
> diff --git a/src/gallium/state_trackers/va/subpicture.c 
> b/src/gallium/state_trackers/va/subpicture.c
> index 15d52b9..981a99c 100644
> --- a/src/gallium/state_trackers/va/subpicture.c
> +++ b/src/gallium/state_trackers/va/subpicture.c
> @@ -283,6 +283,7 @@ vlVaDeassociateSubpicture(VADriverContextP ctx, 
> VASubpictureID subpicture,
>    while (surf->subpics.size && util_dynarray_top(>subpics, 
> vlVaSubpicture *) == NULL)
>       (void)util_dynarray_pop(>subpics, vlVaSubpicture *);
>     }
> +   pipe_sampler_view_reference(>sampler,NULL);
>     mtx_unlock(>mutex);
> return VA_STATUS_SUCCESS;
> --
> 2.7.4
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/8] mesa: check for allocation failures in _mesa_new_texture_object()

2017-07-06 Thread Andres Gomez
It looks like we could want patches 1 and 3-8 from this series into
-stable (?)

On Wed, 2017-06-21 at 11:04 +0200, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset 
> ---
>  src/mesa/main/texobj.c | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
> index 1877262ed65..ed1eaf9b77b 100644
> --- a/src/mesa/main/texobj.c
> +++ b/src/mesa/main/texobj.c
> @@ -234,11 +234,14 @@ _mesa_get_current_tex_object(struct gl_context *ctx, 
> GLenum target)
>   * \return pointer to new texture object.
>   */
>  struct gl_texture_object *
> -_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target 
> )
> +_mesa_new_texture_object(struct gl_context *ctx, GLuint name, GLenum target)
>  {
> struct gl_texture_object *obj;
> -   (void) ctx;
> +
> obj = MALLOC_STRUCT(gl_texture_object);
> +   if (!obj)
> +  return NULL;
> +
> _mesa_initialize_texture_object(ctx, obj, name, target);
> return obj;
>  }
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3] mesa/main: Move NULL pointer check.

2017-07-06 Thread Andres Gomez
It looks like we could want this into -stable (?)

On Wed, 2017-06-14 at 19:33 +0300, Plamena Manolova wrote:
> In blit_framebuffer we're already doing a NULL
> pointer check for readFb and drawFb so it makes
> sense to do it before we actually use the pointers.
> 
> CID: 1412569
> Signed-off-by: Plamena Manolova 
> ---
>  src/mesa/main/blit.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c
> index bb866b1..8bb3ba3 100644
> --- a/src/mesa/main/blit.c
> +++ b/src/mesa/main/blit.c
> @@ -349,12 +349,6 @@ blit_framebuffer(struct gl_context *ctx,
>  {
> FLUSH_VERTICES(ctx, 0);
>  
> -   /* Update completeness status of readFb and drawFb. */
> -   _mesa_update_framebuffer(ctx, readFb, drawFb);
> -
> -   /* Make sure drawFb has an initialized bounding box. */
> -   _mesa_update_draw_buffer_bounds(ctx, drawFb);
> -
> if (!readFb || !drawFb) {
>/* This will normally never happen but someday we may want to
> * support MakeCurrent() with no drawables.
> @@ -362,6 +356,12 @@ blit_framebuffer(struct gl_context *ctx,
>return;
> }
>  
> +   /* Update completeness status of readFb and drawFb. */
> +   _mesa_update_framebuffer(ctx, readFb, drawFb);
> +
> +   /* Make sure drawFb has an initialized bounding box. */
> +   _mesa_update_draw_buffer_bounds(ctx, drawFb);
> +
> if (!no_error) {
>const GLbitfield legalMaskBits = (GL_COLOR_BUFFER_BIT |
>  GL_DEPTH_BUFFER_BIT |
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glsl: gl_Max{Vertex, Fragment}UniformComponents exist in all desktop GL versions

2017-07-06 Thread Andres Gomez
It looks like we could want this into -stable (?)

On Fri, 2017-06-16 at 12:05 +0200, Iago Toral Quiroga wrote:
> The current implementation assumed that these were replaced in GLSL >= 4.10
> by gl_Max{Vertex,Fragment}UniformVectors, however this is not true: both
> built-ins should be produced from GLSL 4.10 onwards.
> 
> This was raised by new CTS tests that are in development.
> ---
>  src/compiler/glsl/builtin_variables.cpp | 16 +---
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/src/compiler/glsl/builtin_variables.cpp 
> b/src/compiler/glsl/builtin_variables.cpp
> index 405502e..19d427e 100644
> --- a/src/compiler/glsl/builtin_variables.cpp
> +++ b/src/compiler/glsl/builtin_variables.cpp
> @@ -632,8 +632,16 @@ builtin_variable_generator::generate_constants()
> add_const("gl_MaxDrawBuffers", state->Const.MaxDrawBuffers);
>  
> /* Max uniforms/varyings: GLSL ES counts these in units of vectors; 
> desktop
> -* GL counts them in units of "components" or "floats".
> +* GL counts them in units of "components" or "floats" and also in units
> +* of vectors since GL 4.1
>  */
> +   if (!state->es_shader) {
> +  add_const("gl_MaxFragmentUniformComponents",
> +state->Const.MaxFragmentUniformComponents);
> +  add_const("gl_MaxVertexUniformComponents",
> +state->Const.MaxVertexUniformComponents);
> +   }
> +
> if (state->is_version(410, 100)) {
>add_const("gl_MaxVertexUniformVectors",
>  state->Const.MaxVertexUniformComponents / 4);
> @@ -661,16 +669,10 @@ builtin_variable_generator::generate_constants()
> state->Const.MaxDualSourceDrawBuffers);
>}
> } else {
> -  add_const("gl_MaxVertexUniformComponents",
> -state->Const.MaxVertexUniformComponents);
> -
>/* Note: gl_MaxVaryingFloats was deprecated in GLSL 1.30+, but not
> * removed
> */
>add_const("gl_MaxVaryingFloats", state->ctx->Const.MaxVarying * 4);
> -
> -  add_const("gl_MaxFragmentUniformComponents",
> -state->Const.MaxFragmentUniformComponents);
> }
>  
> /* Texel offsets were introduced in ARB_shading_language_420pack (which
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 00/16] anv: Fix our 48-bit problems

2017-07-04 Thread Andres Gomez
On Mon, 2017-07-03 at 22:48 -0700, Jason Ekstrand wrote:
> On July 3, 2017 12:31:48 PM Andres Gomez <ago...@igalia.com> wrote:
> 
> > Never too late! ☺
> > 
> > On Fri, 2017-06-30 at 16:45 -0700, Jason Ekstrand wrote:
> > > I know this is rather late but
> > > 
> > > On June 26, 2017 1:15:16 PM Andres Gomez <ago...@igalia.com> wrote:
> > > 
> > > > Jason, you CCed this whole series for stable. However:
> > > >  * Patch 1/16 already landed, but without the -stable tag. Should it be
> > > >cherry-picked? It looks like yes.
> > > 
> > > Yes
> > 
> > I'll pick it for 17.1.5.
> 
> If everything applied without it and didn't break anything then don't 
> bother.  It doesn't did any bugs.  I just thought it was required for the 
> others.  I may have remembered wrong.

ACK.

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] i965: Use true AA line distance on G45/Ironlake.

2017-07-03 Thread Andres Gomez
It looks like we could want these 2 into -stable (?)

On Wed, 2017-04-26 at 15:15 -0700, Kenneth Graunke wrote:
> The original Broadwater and Crestline platforms computed antialiased
> line distances using "manhattan" distance, aka a + b = c.  Eaglelake
> and Cantiga added "true" distance, aka a^2 + b^2 = c^2, which is
> obviously superior.
> 
> The G45 documentation indicates that the old manhattan distance setting
> is "only for debug purposes" and should never be used.  The Ironlake
> documentation no longer mentions AALINEDISTANCE_MANHATTAN, though it
> does still contain the narrative about the feature.
> 
> At any rate, we should use it.
> 
> Cc: rafael.antogno...@intel.com
> ---
>  src/mesa/drivers/dri/i965/brw_sf_state.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c 
> b/src/mesa/drivers/dri/i965/brw_sf_state.c
> index e919f5d14b4..d50ceb12133 100644
> --- a/src/mesa/drivers/dri/i965/brw_sf_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
> @@ -265,7 +265,7 @@ static void upload_sf_unit( struct brw_context *brw )
> /* _NEW_PROGRAM | _NEW_POINT */
> sf->sf7.use_point_size_state = !(ctx->VertexProgram.PointSizeEnabled ||
>   ctx->Point._Attenuated);
> -   sf->sf7.aa_line_distance_mode = 0;
> +   sf->sf7.aa_line_distance_mode = brw->is_g4x || brw->gen == 5;
>  
> /* might be BRW_NEW_PRIMITIVE if we have to adjust pv for polygons:
>  * _NEW_LIGHT
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/6] i965: Make Gen4-5 SF_STATE use the point size calculations from Gen6+.

2017-07-03 Thread Andres Gomez
It looks like we could want this whole series into -stable (?)

On Wed, 2017-05-10 at 11:47 -0700, Kenneth Graunke wrote:
> Apparently, Nanhai made the Gen4-5 point size calculations round to the
> nearest integer in commit 8d5231a3582e4f2769ac0685cf0174e09750700e,
> "according to spec".  When Eric first ported the driver to Sandybridge,
> he did not implement this rounding.
> 
> In the GL 2.1 and 3.0 specs "Basic Point Rasterization" section, it does
> say "If antialiasing and point sprites are disabled, the actual width is
> determined by rounding the supplied width to the nearest integer, then
> clamping it to the implementation-dependent maximum non-antialised point
> width."
> 
> In contrast, GL 3.1 and later do not appear to contain this rounding.
> 
> It might be reasonable to round, given that we only implement GL 2.1.
> Of course, if we were to do that, we should actually implement the AA
> vs. non-AA distinction.  Brian added an XXX comment reminding us to fix
> this 10 years ago, but it never happened.
> 
> I think a better plan is to follow the newer, unrounded behavior.  This
> is what we do on Gen6+ and it passes all the relevant conformance tests.
> ---
>  src/mesa/drivers/dri/i965/brw_sf_state.c | 11 ++-
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c 
> b/src/mesa/drivers/dri/i965/brw_sf_state.c
> index d50ceb12133..ff6b5ebf79b 100644
> --- a/src/mesa/drivers/dri/i965/brw_sf_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
> @@ -254,14 +254,15 @@ static void upload_sf_unit( struct brw_context *brw )
> */
>sf->sf6.point_rast_rule = BRW_RASTRULE_LOWER_RIGHT;
> }
> -   /* XXX clamp max depends on AA vs. non-AA */
>  
> /* _NEW_POINT */
> sf->sf7.sprite_point = ctx->Point.PointSprite;
> -   sf->sf7.point_size = CLAMP(rintf(CLAMP(ctx->Point.Size,
> -  ctx->Point.MinSize,
> -  ctx->Point.MaxSize)), 1.0f, 
> 255.0f) *
> -(1<<3);
> +
> +   float point_sz;
> +   point_sz = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize);
> +   point_sz = CLAMP(point_sz, 0.125f, 255.875f);
> +   sf->sf7.point_size = U_FIXED(point_sz, 3);
> +
> /* _NEW_PROGRAM | _NEW_POINT */
> sf->sf7.use_point_size_state = !(ctx->VertexProgram.PointSizeEnabled ||
>   ctx->Point._Attenuated);
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] intel/isl: Use uint64_t to store total surface size

2017-07-03 Thread Andres Gomez
It looks like we could want these 2 into -stable (?)

On Tue, 2017-05-23 at 14:37 -0700, Anuj Phogat wrote:
> Signed-off-by: Anuj Phogat 
> ---
>  src/intel/isl/isl.c | 3 ++-
>  src/intel/isl/isl.h | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index f89f351..32aa698 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -1362,7 +1362,8 @@ isl_surf_init_s(const struct isl_device *dev,
> _slice0_sa, _pitch))
>return false;
>  
> -   uint32_t size, base_alignment;
> +   uint32_t base_alignment;
> +   uint64_t size;
> if (tiling == ISL_TILING_LINEAR) {
>size = row_pitch * total_h_el + pad_bytes;
>  
> diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
> index 8131f45..99c99d4 100644
> --- a/src/intel/isl/isl.h
> +++ b/src/intel/isl/isl.h
> @@ -882,7 +882,7 @@ struct isl_surf {
> uint32_t samples;
>  
> /** Total size of the surface, in bytes. */
> -   uint32_t size;
> +   uint64_t size;
>  
> /** Required alignment for the surface's base address. */
> uint32_t alignment;
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 00/16] anv: Fix our 48-bit problems

2017-07-03 Thread Andres Gomez
Never too late! ☺

On Fri, 2017-06-30 at 16:45 -0700, Jason Ekstrand wrote:
> I know this is rather late but
> 
> On June 26, 2017 1:15:16 PM Andres Gomez <ago...@igalia.com> wrote:
> 
> > Jason, you CCed this whole series for stable. However:
> >  * Patch 1/16 already landed, but without the -stable tag. Should it be
> >cherry-picked? It looks like yes.
> 
> Yes

I'll pick it for 17.1.5.

Thanks a lot!

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [ANNOUNCE] mesa 17.1.4

2017-06-30 Thread Andres Gomez
Mesa 17.1.4 is now available.

In this release we have:

In Mesa Core we include some fixes that involve flushing vertices
before some state changes.

The state tracker also received a fix for the Scissor with multiple
viewports.

The SPIR-V compiler has gotten a work around to prevent a shader bug in
Doom.

i965 has gotten many patches, including a couple of fixes for having
proper color interpolation in gen3, a bunch of corrections to avoid
hangings on Haswell, specially with fast-clear operations that happen
at the start of a batch, an initialization of the step rate for
interleaved vertex buffers to avoid rendering errors, a correction to
set the depth offset when there is only stencil attachment, a fix for
incorrect renderings due to using anisotropic filtering in nearest
mode, a fix for gl_Fragcoord's interpolation, a fix for Broxton 2x6 l3
config, a correction in Sky Lake for getting in-range clear colors, and
an improvement in gen7+ has been added to comply with OpenGL 4.1+.

anv has gotten a fix for L3 cache programming on Bay Trail.

Gallivm has seen a fix to avoid a segfault when we get invalid
glDrawRangeElements, a recursion that might have impacted performance
has been broken and, in the VA library, another fix has been added to
avoid memory corruptions.

The etnaviv driver has gotten a handful of patches, including fixes for
some resource copy issues, to prevent some fallout from the RB swapped
rendertarget work, to correct the max LOD bias, and a performance
regression has also been fixed.

The AMD drivers have received a fix for the proper generation of the
sid tables. radeonsi has gotten several improvements, including a new
polaris12 pci id and a deadlock fix while r600 is receiving a fix to
upload PBO textures to compressed textures.

The svga driver has received some patches to invalidate surfaces
correctly and a fix to properly unbind the GS.

nouveau's codegen has seen some improvements, including a fix to
properly fold constants in SPLIT operation.

EGL has gotten a couple of fixes to make the platform detection thread-
safe. The DRI2 drivers include now a fix to properly count configs. In
the case of the Android driver, we also got a workaround for apps which
choose their EGLConfig incorrectly and, in the case of the X11 one, a
crash fix has also been included.

From build and integration point of view, we have added a fix to solve
a linking problem for systems that lack libpthread.so, we have fixed a
recent build problem with Android and we have included also a missing
header for EGL, GLES and VG headers that was not included when EGL
building was disabled.



Alex Deucher (1):
  radeonsi: add new polaris12 pci id

Andres Gomez (4):
  cherry-ignore: 17.1.4 rejected commits
  cherry-ignore: bin/get-fixes-pick-list.sh: better identify multiple 
"fixes:" tags
  Update version to 17.1.4
  docs: add release notes for 17.1.4

Anuj Phogat (2):
  i965: Add and initialize l3_banks field for gen7+
  i965: Fix broxton 2x6 l3 config

Ben Crocker (1):
  egl_dri2: swrastGetDrawableInfo: set *x, *y [v2]

Brian Paul (2):
  svga: check return value from svga_set_shader( SVGA3D_SHADERTYPE_GS, NULL)
  gallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()

Chad Versace (1):
  egl/android: Change order of EGLConfig generation (v2)

Chandu Babu N (1):
  change va max_entrypoints

Charmaine Lee (1):
  svga: use the winsys interface to invalidate surface

Emil Velikov (3):
  docs: add sha256 checksums for 17.1.3
  configure.ac: add -pthread to PTHREAD_LIBS
  radeonsi: include ac_binary.h for struct ac_shader_binary

Eric Engestrom (3):
  egl: properly count configs
  egl/display: only detect the platform once
  egl/display: make platform detection thread-safe

Eric Le Bihan (1):
  Fix khrplatform.h not installed if EGL is disabled.

Iago Toral Quiroga (1):
  i965: update MaxTextureRectSize to match PRMs and comply with OpenGL 4.1+

Ilia Mirkin (2):
  nv50/ir: fetch indirect sources BEFORE the op that uses them
  nv50/ir: fix combineLd/St to update existing records as necessary

Jason Ekstrand (10):
  i965: Flush around state base address
  i965: Take a uint64_t immediate in emit_pipe_control_write
  i965: Unify the two emit_pipe_control functions
  i965: Do an end-of-pipe sync prior to STATE_BASE_ADDRESS
  i965/blorp: Do an end-of-pipe sync around CCS ops
  i965: Do an end-of-pipe sync after flushes
  i965: Disable the interleaved vertex optimization when instancing
  i965: Set step_rate = 0 for interleaved vertex buffers
  spirv: Work around the Doom shader bug
  i965: Clamp clear colors to the representable range

Jonas Kulla (1):
  anv: Fix L3 cache programming on Bay Trail

Kenneth Graunke (1):
  i965: Ignore anisotropic filtering in nearest mode.

Lucas Stach (7):
  etnaviv: don't try RS blit if blit region is unaligned
  et

[Mesa-dev] Mesa 17.1.4 release candidate

2017-06-28 Thread Andres Gomez
Hello list,

The candidate for the Mesa 17.1.4 is now available. Currently we have:
 - 54 queued
 - 0 nominated (outstanding)
 - and 2 rejected patch(es)


In the current queue we have:

In Mesa Core we include some fixes that involve flushing vertices
before some state changes.

The state tracker also received a fix for the Scissor with multiple
viewports.

The SPIR-V compiler has gotten a work around to prevent a shader bug in
Doom.

i965 has gotten many patches, including a couple of fixes for having
proper color interpolation in gen3, a bunch of corrections to avoid
hangings on Haswell, specially with fast-clear operations that happen
at the start of a batch, an initialization of the step rate for
interleaved vertex buffers to avoid rendering errors, a correction to
set the depth offset when there is only stencil attachment, a fix for
incorrect renderings due to using anisotropic filtering in nearest
mode, a fix for gl_Fragcoord's interpolation, a fix for Broxton 2x6 l3
config, a correction in Sky Lake for getting in-range clear colors, and
an improvement in gen7+ has been added to comply with OpenGL 4.1+.

anv has gotten a fix for L3 cache programming on Bay Trail.

Gallivm has seen a fix to avoid a segfault when we get invalid
glDrawRangeElements, a recursion that might have impacted performance
has been broken and, in the VA library, another fix has been added to
avoid memory corruptions.

The etnaviv driver has gotten a handful of patches, including fixes for
some resource copy issues, to prevent some fallout from the RB swapped
rendertarget work, to correct the max LOD bias, and a performance
regression has also been fixed.

The AMD drivers have received a fix for the proper generation of the
sid tables. radeonsi has gotten several improvements, including a new
polaris12 pci id and a deadlock fix while r600 is receiving a fix to
upload PBO textures to compressed textures.

The svga driver has received some patches to invalidate surfaces
correctly and a fix to properly unbind the GS.

nouveau's codegen has seen some improvements, including a fix to
properly fold constants in SPLIT operation.

EGL has gotten a couple of fixes to make the platform detection thread-
safe. The DRI2 drivers include now a fix to properly count configs. In
the case of the Android driver, we also got a workaround for apps which
choose their EGLConfig incorrectly and, in the case of the X11 one, a
crash fix has also been included.

From build and integration point of view, we have added a fix to solve
a linking problem for systems that lack libpthread.so, we have fixed a
recent build problem with Android and we have included also a missing
header for EGL, GLES and VG headers that was not included when EGL
building was disabled.

Take a look at section "Mesa stable queue" for more information.


Testing reports/general approval


Any testing reports (or general approval of the state of the branch)
will be greatly appreciated.

The plan is to have 17.1.4 this Friday (30th of June), around or
shortly after 18:00 GMT.

If you have any questions or suggestions - be that about the current
patch queue or otherwise, please go ahead.


Trivial merge conflicts
---
commit 4379c53b9b6b7a272ab852c908b723cca24d4ca8
Author: Jason Ekstrand <jason.ekstr...@intel.com>

i965: Take a uint64_t immediate in emit_pipe_control_write

(cherry picked from commit a8ea68bc930f212dddf78a4e2073bcbd698b9140)

commit 4cd15cf137a640a59b7ff8a7208d98306d91dbdf
Author: Anuj Phogat 

i965: Fix broxton 2x6 l3 config

(cherry picked from commit 8521559e086a3d56f549962ab8e9f45a6a5989d8)

commit 695493671af0efaabf039147e19367de926e5d67
Author: Brian Paul <bri...@vmware.com>

gallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()

(cherry picked from commit
d8148ed10ae5faea6f88f2f964797f4b0590c083)

commit 863756e6856a0fc3d9b973d5adf995943f736414
Author: Jason Ekstrand <jason.ekstr...@intel.com>

i965: Clamp clear colors to the representable range

(cherry picked from commit f1fa4be871e13c68b50685aaf64dc095b49ed0b5)


Cheers,
Andres


Mesa stable queue
-

Nominated (0)
==


Queued (54)
===

Alex Deucher (1):
  radeonsi: add new polaris12 pci id

Andres Gomez (2):
  cherry-ignore: 17.1.4 rejected commits
  cherry-ignore: bin/get-fixes-pick-list.sh: better identify multiple 
"fixes:" tags

Anuj Phogat (2):
  i965: Add and initialize l3_banks field for gen7+
  i965: Fix broxton 2x6 l3 config

Ben Crocker (1):
  egl_dri2: swrastGetDrawableInfo: set *x, *y [v2]

Brian Paul (2):
  svga: check return value from svga_set_shader( SVGA3D_SHADERTYPE_GS, NULL)
  gallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()

Chad Versace (1):
  egl/android: Change order of EGLConfig generation (v2)

Chandu Babu N (1):
  change va max_entr

Re: [Mesa-dev] [PATCH 1/2] svga: clamp device line width to at least 1 to fix HWv8 line stippling

2017-06-27 Thread Andres Gomez
It looks like we could want these 2 into -stable (?)

On Thu, 2017-06-15 at 11:41 -0600, Brian Paul wrote:
> The line stipple fallback code for virtual HW version 8 didn't work.
> 
> With HW version 8, we were getting zero when querying the max line
> widths (AA and non-AA).  This means we were setting the draw module's
> wide line threshold to zero.  This caused the wide line stage to always
> get enabled.  That caused the line stipple module to fall because the
> wide line stage was clobbering the rasterization state with a state
> object setting the line stipple pattern to 0x.
> 
> Now the wide_lines variable in draw's validate_pipeline() will not
> be incorrectly set.
> 
> Also improve debug output.
> 
> See VMware bug 1895811.
> ---
>  src/gallium/drivers/svga/svga_screen.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/gallium/drivers/svga/svga_screen.c 
> b/src/gallium/drivers/svga/svga_screen.c
> index 202f54f..3aa9945 100644
> --- a/src/gallium/drivers/svga/svga_screen.c
> +++ b/src/gallium/drivers/svga/svga_screen.c
> @@ -1142,18 +1142,18 @@ svga_screen_create(struct svga_winsys_screen *sws)
>get_bool_cap(sws, SVGA3D_DEVCAP_LINE_STIPPLE, FALSE);
>  
> svgascreen->maxLineWidth =
> -  get_float_cap(sws, SVGA3D_DEVCAP_MAX_LINE_WIDTH, 1.0f);
> +  MAX2(1.0, get_float_cap(sws, SVGA3D_DEVCAP_MAX_LINE_WIDTH, 1.0f));
>  
> svgascreen->maxLineWidthAA =
> -  get_float_cap(sws, SVGA3D_DEVCAP_MAX_AA_LINE_WIDTH, 1.0f);
> +  MAX2(1.0, get_float_cap(sws, SVGA3D_DEVCAP_MAX_AA_LINE_WIDTH, 1.0f));
>  
> if (0) {
>debug_printf("svga: haveProvokingVertex %u\n",
> svgascreen->haveProvokingVertex);
>debug_printf("svga: haveLineStip %u  "
> -   "haveLineSmooth %u  maxLineWidth %f\n",
> +   "haveLineSmooth %u  maxLineWidth %.2f  maxLineWidthAA 
> %.2f\n",
> svgascreen->haveLineStipple, svgascreen->haveLineSmooth,
> -   svgascreen->maxLineWidth);
> +   svgascreen->maxLineWidth, svgascreen->maxLineWidthAA);
>debug_printf("svga: maxPointSize %g\n", svgascreen->maxPointSize);
>debug_printf("svga: msaa samples mask: 0x%x\n", 
> svgascreen->ms_samples);
> }
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH mesa] Fix khrplatform.h not installed if EGL is disabled.

2017-06-27 Thread Andres Gomez
Sound like a good inclusion for -stable (?)

On Mon, 2017-06-12 at 12:00 +0100, Eric Engestrom wrote:
> From: Eric Le Bihan 
> 
> KHR/khrplatform.h is required by the EGL, GLES and VG headers, but is
> only installed if Mesa3d is compiled with EGL support.
> 
> This patch installs this header file unconditionally.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77240
> Signed-off-by: Eric Le Bihan 
> ---
>  src/egl/Makefile.am  | 3 ---
>  src/mapi/Makefile.am | 3 +++
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
> index 14fd77f14a..81090387b5 100644
> --- a/src/egl/Makefile.am
> +++ b/src/egl/Makefile.am
> @@ -163,9 +163,6 @@ pkgconfigdir = $(libdir)/pkgconfig
>  
>  pkgconfig_DATA = main/egl.pc
>  
> -khrdir = $(includedir)/KHR
> -khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
> -
>  egldir = $(includedir)/EGL
>  egl_HEADERS = \
>   $(top_srcdir)/include/EGL/eglext.h \
> diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
> index e5477364ce..9ff70a14fd 100644
> --- a/src/mapi/Makefile.am
> +++ b/src/mapi/Makefile.am
> @@ -241,3 +241,6 @@ es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml 
> $(glapi_gen_mapi_deps)
>   $(srcdir)/glapi/gen/gl_and_es_API.xml > $@
>  
>  include $(top_srcdir)/install-lib-links.mk
> +
> +khrdir = $(includedir)/KHR
> +khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH] nv50, nvc0: remove IDX from bufctx immediately, to avoid conflicts with clear

2017-06-27 Thread Andres Gomez
Ilia, this patch tries to fix 61d8f3387d which, in turn, tried to fix
330d0607e.

None of them did it for 17.1 so I suppose we should leave this out,
then.

Let me know if you think otherwise.

On Sat, 2017-06-24 at 13:24 -0400, Ilia Mirkin wrote:
> The idxbuf could linger, and when a clear happened, which also uses the
> 3d bufctx, we could get an error trying to access it.
> 
> This fixes spurious crashes/errors in CTS tests.
> 
> Fixes: 61d8f3387d ("nv50,nvc0: clear index buffer bufctx bin unconditionally")
> Signed-off-by: Ilia Mirkin 
> Cc: mesa-sta...@lists.freedesktop.org
> ---
>  src/gallium/drivers/nouveau/nv50/nv50_vbo.c | 9 +
>  src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c | 9 +
>  2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_vbo.c 
> b/src/gallium/drivers/nouveau/nv50/nv50_vbo.c
> index ac7d8267861..ed041121a26 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_vbo.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_vbo.c
> @@ -770,7 +770,6 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct 
> pipe_draw_info *info)
> bool tex_dirty = false;
> int s;
>  
> -   nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_3D_INDEX);
> if (info->index_size && !info->has_user_indices)
>BCTX_REFN(nv50->bufctx_3d, 3D_INDEX, 
> nv04_resource(info->index.resource), RD);
>  
> @@ -838,9 +837,7 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct 
> pipe_draw_info *info)
>  
> if (nv50->vbo_fifo) {
>nv50_push_vbo(nv50, info);
> -  push->kick_notify = nv50_default_kick_notify;
> -  nouveau_pushbuf_bufctx(push, NULL);
> -  return;
> +  goto cleanup;
> }
>  
> if (nv50->state.instance_base != info->start_instance) {
> @@ -894,9 +891,13 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct 
> pipe_draw_info *info)
> info->mode, info->start, info->count,
> info->instance_count);
> }
> +
> +cleanup:
> push->kick_notify = nv50_default_kick_notify;
>  
> nv50_release_user_vbufs(nv50);
>  
> nouveau_pushbuf_bufctx(push, NULL);
> +
> +   nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_3D_INDEX);
>  }
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c 
> b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
> index 2856b4c6096..a5671ca09ac 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
> @@ -921,7 +921,6 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct 
> pipe_draw_info *info)
> struct nvc0_screen *screen = nvc0->screen;
> int s;
>  
> -   nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_IDX);
> nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_BINDLESS);
>  
> /* NOTE: caller must ensure that (min_index + index_bias) is >= 0 */
> @@ -1040,9 +1039,7 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct 
> pipe_draw_info *info)
>  
> if (nvc0->state.vbo_mode) {
>nvc0_push_vbo(nvc0, info);
> -  push->kick_notify = nvc0_default_kick_notify;
> -  nouveau_pushbuf_bufctx(push, NULL);
> -  return;
> +  goto cleanup;
> }
>  
> /* space for base instance, flush, and prim restart */
> @@ -1089,9 +1086,13 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct 
> pipe_draw_info *info)
> info->mode, info->start, info->count,
> info->instance_count);
> }
> +
> +cleanup:
> push->kick_notify = nvc0_default_kick_notify;
>  
> nvc0_release_user_vbufs(nvc0);
>  
> nouveau_pushbuf_bufctx(push, NULL);
> +
> +   nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_IDX);
>  }
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] amd/common: fix off-by-one in sid_tables.py

2017-06-26 Thread Andres Gomez
On Mon, 2017-06-26 at 14:23 +0100, Emil Velikov wrote:
> On 23 June 2017 at 00:07, Andres Gomez <ago...@igalia.com> wrote:
> > On Mon, 2017-06-19 at 12:36 +0100, Emil Velikov wrote:
> > > Hi Nicolai,
> > > 
> > > On 12 June 2017 at 20:33, Nicolai Hähnle <nhaeh...@gmail.com> wrote:
> > > > From: Nicolai Hähnle <nicolai.haeh...@amd.com>
> > > > 
> > > > The very last entry in the sid_strings_offsets table ended up missing,
> > > > leading to out-of-bounds reads and potential crashes.
> > > 
> > > Should we have this and " [PATCH 2/3] r600: fix off-by-one in
> > > egd_tables.py" for -stable?
> > > Seems like a worthy material IMHO.
> > 
> > Thanks for spotting this, Emil, but egd_tables.py didn't make it for
> > -stable so I suppose we will still leave those 2 out too.
> > 
> 
> Right, so let's have only the sid_tables.py fix in?

Right! ☺

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 00/16] anv: Fix our 48-bit problems

2017-06-26 Thread Andres Gomez
Jason, you CCed this whole series for stable. However:
 * Patch 1/16 already landed, but without the -stable tag. Should it be
   cherry-picked? It looks like yes.
 * Patch 2/16 did not land. Is it in need of review or it has been
   superseded?
 * Patches 3-15/16 were already cherry-picked in the 17.1.2 release.
 * Patch 16/16 has not landed yet. Is it in need of review or it has
   been superseded? Not sure if we want to cherry-pick it in any case
   ...

Please, let us know when you can.

Thanks!

On Thu, 2017-05-18 at 14:00 -0700, Jason Ekstrand wrote:
> This patch series aims to fix the remaining 48-bit problems in the Vulkan
> driver.  As such, the entire thing will be CC'd to stable before landing.
> 
> The first 5 patches fix the driver to handle memory aliasing correctly.
> Vulkan allows you to bind multiple buffers or images to overlapping memory
> regions so long as you get your layout transitions correct.  Up until now,
> we've been doing a memset at vkBindImageMemory time to initialize auxiliary
> surfaces which isn't valid in light of aliasing.  Instead, these patches
> provide actual support for layout transitions from UNDEFINED to other
> layouts.  This isn't actually a 48-bit issue but the other patches cause a
> change in the behavior of some CTS tests which makes them start failing due
> to memory aliasing problems.
> 
> The next 10 patches refactor memory type setup and make us advertise 2
> heaps on platforms with a lot of memory.  For justification, see the
> comment in patch 15.
> 
> The last patch just extends the new pass added in patch 2 for gen7-8.  It's
> fairly straightforward but completely untested.  Hopefully it will help
> Nanley or someone else if they ever need it.
> 
> Cc: "17.1" 
> Cc: Nanley Chery 
> 
> Jason Ekstrand (16):
>   isl: Make get_intratile_offset_el take the element size in bits
>   intel/blorp: Add a CCS ambiguation pass
>   anv: Handle color layout transitions from the UNINITIALIZED layout
>   anv: Handle transitioning depth from UNDEFINED to other layouts
>   anv/image: Get rid of the memset(aux, 0, sizeof(aux)) hack
>   anv: Predicate 48bit support on gen >= 8
>   anv: Set up memory types and heaps during physical device init
>   anv: Determine the type of mapping based on type metadata
>   anv: Add valid_bufer_usage to the memory type metadata
>   anv: Set image memory types based on the type count
>   anv: Stop setting BO flags in bo_init_new
>   anv: Make supports_48bit_addresses a heap property
>   anv: Refactor memory type setup
>   anv: Advertise both 32-bit and 48-bit heaps when we have enough memory
>   anv: Require vertex buffers to come from a 32-bit heap
>   intel/blorp: Add gen7-8 support to ccs_ambiguate
> 
>  src/intel/blorp/blorp.h|   5 +
>  src/intel/blorp/blorp_clear.c  | 159 +-
>  src/intel/isl/isl.c|   7 +-
>  src/intel/isl/isl.h|   6 +-
>  src/intel/vulkan/anv_allocator.c   |  17 +--
>  src/intel/vulkan/anv_blorp.c   |  40 +++
>  src/intel/vulkan/anv_device.c  | 201 
> -
>  src/intel/vulkan/anv_image.c   |  40 ++-
>  src/intel/vulkan/anv_private.h |  33 +-
>  src/intel/vulkan/anv_queue.c   |   4 +-
>  src/intel/vulkan/genX_cmd_buffer.c |  33 --
>  src/mesa/drivers/dri/i965/intel_blit.c |   2 +-
>  12 files changed, 428 insertions(+), 119 deletions(-)
> 
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] anv: Stop racing relocation offsets

2017-06-26 Thread Andres Gomez
Jason, it doesn't seem like this patch has landed in master. Are you in
need of review or is it that this has been superseded?

Thanks!

On Wed, 2017-05-10 at 16:08 -0700, Jason Ekstrand wrote:
> One of the key invariants of the relocation system is the
> presumed_offset field.  The assumption is made that the value currently
> in the address to be relocated agrees with the presumed_offset field.
> If presumed_offset is equal to the offset of the BO, the kernel will
> skip the relocation assuming that the value is already correct.
> 
> Our initial implementation of relocation handling had a race where we
> would read bo->offset once when we wrote the relocation entry and again
> when we filled out actual address.
> 
> Found with helgrind
> 
> Cc: "17.0 17.1" 
> ---
>  src/intel/vulkan/anv_batch_chain.c | 21 +
>  src/intel/vulkan/anv_private.h |  2 +-
>  src/intel/vulkan/genX_blorp_exec.c |  5 -
>  src/intel/vulkan/genX_cmd_buffer.c |  7 +--
>  4 files changed, 27 insertions(+), 8 deletions(-)
> 
> diff --git a/src/intel/vulkan/anv_batch_chain.c 
> b/src/intel/vulkan/anv_batch_chain.c
> index 9def174..13303b1 100644
> --- a/src/intel/vulkan/anv_batch_chain.c
> +++ b/src/intel/vulkan/anv_batch_chain.c
> @@ -143,7 +143,8 @@ anv_reloc_list_grow(struct anv_reloc_list *list,
>  VkResult
>  anv_reloc_list_add(struct anv_reloc_list *list,
> const VkAllocationCallbacks *alloc,
> -   uint32_t offset, struct anv_bo *target_bo, uint32_t delta)
> +   uint32_t offset, struct anv_bo *target_bo, uint32_t delta,
> +   uint64_t *bo_offset_out)
>  {
> struct drm_i915_gem_relocation_entry *entry;
> int index;
> @@ -155,6 +156,14 @@ anv_reloc_list_add(struct anv_reloc_list *list,
> if (result != VK_SUCCESS)
>return result;
>  
> +   /* Read the BO offset once.  This same value will be used in the 
> relocation
> +* entry and passed back to the caller for it to use when it writes the
> +* actual value.  This guarantees that the two values match even if there
> +* is a data race between now and when the caller gets around to writing
> +* the address into the BO.
> +*/
> +   uint64_t presumed_offset = target_bo->offset;
> +
> /* XXX: Can we use I915_EXEC_HANDLE_LUT? */
> index = list->num_relocs++;
> list->reloc_bos[index] = target_bo;
> @@ -162,11 +171,13 @@ anv_reloc_list_add(struct anv_reloc_list *list,
> entry->target_handle = target_bo->gem_handle;
> entry->delta = delta;
> entry->offset = offset;
> -   entry->presumed_offset = target_bo->offset;
> +   entry->presumed_offset = presumed_offset;
> entry->read_domains = domain;
> entry->write_domain = domain;
> VG(VALGRIND_CHECK_MEM_IS_DEFINED(entry, sizeof(*entry)));
>  
> +   *bo_offset_out = presumed_offset;
> +
> return VK_SUCCESS;
>  }
>  
> @@ -218,14 +229,16 @@ uint64_t
>  anv_batch_emit_reloc(struct anv_batch *batch,
>   void *location, struct anv_bo *bo, uint32_t delta)
>  {
> +   uint64_t bo_offset;
> VkResult result = anv_reloc_list_add(batch->relocs, batch->alloc,
> -location - batch->start, bo, delta);
> +location - batch->start, bo, delta,
> +_offset);
> if (result != VK_SUCCESS) {
>anv_batch_set_error(batch, result);
>return 0;
> }
>  
> -   return bo->offset + delta;
> +   return bo_offset + delta;
>  }
>  
>  void
> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
> index 9b0dd67..1686da8 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -825,7 +825,7 @@ void anv_reloc_list_finish(struct anv_reloc_list *list,
>  VkResult anv_reloc_list_add(struct anv_reloc_list *list,
>  const VkAllocationCallbacks *alloc,
>  uint32_t offset, struct anv_bo *target_bo,
> -uint32_t delta);
> +uint32_t delta, uint64_t *bo_offset_out);
>  
>  struct anv_batch_bo {
> /* Link in the anv_cmd_buffer.owned_batch_bos list */
> diff --git a/src/intel/vulkan/genX_blorp_exec.c 
> b/src/intel/vulkan/genX_blorp_exec.c
> index 71ed707..513c269 100644
> --- a/src/intel/vulkan/genX_blorp_exec.c
> +++ b/src/intel/vulkan/genX_blorp_exec.c
> @@ -57,9 +57,12 @@ blorp_surface_reloc(struct blorp_batch *batch, uint32_t 
> ss_offset,
>  struct blorp_address address, uint32_t delta)
>  {
> struct anv_cmd_buffer *cmd_buffer = batch->driver_batch;
> +   MAYBE_UNUSED uint64_t bo_offset;
> +
> VkResult result =
>anv_reloc_list_add(_buffer->surface_relocs, 
> _buffer->pool->alloc,
> - ss_offset, address.buffer, address.offset + delta);
> + ss_offset, address.buffer, 

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] i965: Fix broxton 2x6 l3 config

2017-06-26 Thread Andres Gomez
Anuj, this depends on:
https://cgit.freedesktop.org/mesa/mesa/commit/src/mesa?id=eb23be1d97da290073d76c2510b8999b250f0139

Which didn't make it for -stable. Should we cherry-pick that too?

On Mon, 2017-06-12 at 10:01 -0700, Anuj Phogat wrote:
> The new table added in this patch matches with the table
> in gfxspecs. We were programming the wrong values earlier.
> 
> Signed-off-by: Anuj Phogat 
> Cc: Francisco Jerez 
> Cc: "17.1" 
> ---
>  src/intel/common/gen_device_info.c |  1 +
>  src/intel/common/gen_device_info.h |  1 +
>  src/intel/common/gen_l3_config.c   | 19 +++
>  3 files changed, 21 insertions(+)
> 
> diff --git a/src/intel/common/gen_device_info.c 
> b/src/intel/common/gen_device_info.c
> index 75284a6..eccb464 100644
> --- a/src/intel/common/gen_device_info.c
> +++ b/src/intel/common/gen_device_info.c
> @@ -502,6 +502,7 @@ static const struct gen_device_info gen_device_info_bxt = 
> {
>  
>  static const struct gen_device_info gen_device_info_bxt_2x6 = {
> GEN9_LP_FEATURES_2X6,
> +   .is_broxton_2x6 = 1,
> .l3_banks = 1,
>  };
>  /*
> diff --git a/src/intel/common/gen_device_info.h 
> b/src/intel/common/gen_device_info.h
> index 6207630..4fe1b21 100644
> --- a/src/intel/common/gen_device_info.h
> +++ b/src/intel/common/gen_device_info.h
> @@ -41,6 +41,7 @@ struct gen_device_info
> bool is_haswell;
> bool is_cherryview;
> bool is_broxton;
> +   bool is_broxton_2x6;
> bool is_kabylake;
>  
> bool has_hiz_and_separate_stencil;
> diff --git a/src/intel/common/gen_l3_config.c 
> b/src/intel/common/gen_l3_config.c
> index ae31d08..e17994b 100644
> --- a/src/intel/common/gen_l3_config.c
> +++ b/src/intel/common/gen_l3_config.c
> @@ -102,6 +102,23 @@ static const struct gen_l3_config chv_l3_configs[] = {
>  };
>  
>  /**
> + * BXT 2x6 validated L3 configurations.  \sa ivb_l3_configs.
> + * Number of ways =
> + *Allocation in KB for SKU / (Way size per bank * Number of banks).
> + * For BXT 2x6: Banks = 1, Way size per bank = 4.
> + */
> +static const struct gen_l3_config bxt_2x6_l3_configs[] = {
> +   /*SLM URB  All DC  RO  IS   C   T */
> +   {{  0, 32, 48,  0,  0,  0,  0,  0 }},
> +   {{  0, 32,  0,  8, 40,  0,  0,  0 }},
> +   {{  0, 32,  0, 32, 16,  0,  0,  0 }},
> +   {{ 16, 16, 48,  0,  0,  0,  0,  0 }},
> +   {{ 16, 16,  0, 40,  8,  0,  0,  0 }},
> +   {{ 16, 16,  0, 16, 32,  0,  0,  0 }},
> +   {{ 0 }}
> +};
> +
> +/**
>   * Return a zero-terminated array of validated L3 configurations for the
>   * specified device.
>   */
> @@ -117,6 +134,8 @@ get_l3_configs(const struct gen_device_info *devinfo)
>  
> case 9:
> case 10:
> +  if (devinfo->is_broxton_2x6)
> + return bxt_2x6_l3_configs;
>return chv_l3_configs;
>  
> default:
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] amd/common: fix off-by-one in sid_tables.py

2017-06-22 Thread Andres Gomez
On Mon, 2017-06-19 at 12:36 +0100, Emil Velikov wrote:
> Hi Nicolai,
> 
> On 12 June 2017 at 20:33, Nicolai Hähnle  wrote:
> > From: Nicolai Hähnle 
> > 
> > The very last entry in the sid_strings_offsets table ended up missing,
> > leading to out-of-bounds reads and potential crashes.
> 
> Should we have this and " [PATCH 2/3] r600: fix off-by-one in
> egd_tables.py" for -stable?
> Seems like a worthy material IMHO.

Thanks for spotting this, Emil, but egd_tables.py didn't make it for
-stable so I suppose we will still leave those 2 out too.

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH] st/glsl_to_tgsi: use correct writemask when converting generic intrinsics

2017-06-22 Thread Andres Gomez
Nicolai, this depends on:
https://cgit.freedesktop.org/mesa/mesa/commit/src/mesa?id=944455217b67cb524efef9e628baf09416db5524

Which didn't make it for -stable. Should we cherry-pick that too?


On Mon, 2017-06-12 at 21:45 +0200, Nicolai Hähnle wrote:
> From: Nicolai Hähnle 
> 
> This fixes a bug when lowering ballotARB: previously, using writemask 0xf,
> emit_asm would create TGSI_OPCODE_BALLOT instructions that span two registers
> to cover 4 64-bit channels. This could trample over other a neighbouring
> temporary.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101360
> Cc: 17.1 
> ---
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index c5d2e0f..cb86392 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -3906,20 +3906,22 @@ glsl_to_tgsi_visitor::visit_image_intrinsic(ir_call 
> *ir)
> if (imgvar->data.memory_volatile)
>inst->buffer_access |= TGSI_MEMORY_VOLATILE;
>  }
>  
>  void
>  glsl_to_tgsi_visitor::visit_generic_intrinsic(ir_call *ir, unsigned op)
>  {
> ir->return_deref->accept(this);
> st_dst_reg dst = st_dst_reg(this->result);
>  
> +   dst.writemask = u_bit_consecutive(0, 
> ir->return_deref->var->type->vector_elements);
> +
> st_src_reg src[4] = { undef_src, undef_src, undef_src, undef_src };
> unsigned num_src = 0;
> foreach_in_list(ir_rvalue, param, >actual_parameters) {
>assert(num_src < ARRAY_SIZE(src));
>  
>this->result.file = PROGRAM_UNDEFINED;
>param->accept(this);
>assert(this->result.file != PROGRAM_UNDEFINED);
>  
>src[num_src] = this->result;
-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] amd/common: fix off-by-one in sid_tables.py

2017-06-22 Thread Andres Gomez
On Mon, 2017-06-19 at 12:36 +0100, Emil Velikov wrote:
> Hi Nicolai,
> 
> On 12 June 2017 at 20:33, Nicolai Hähnle  wrote:
> > From: Nicolai Hähnle 
> > 
> > The very last entry in the sid_strings_offsets table ended up missing,
> > leading to out-of-bounds reads and potential crashes.
> 
> Should we have this and " [PATCH 2/3] r600: fix off-by-one in
> egd_tables.py" for -stable?
> Seems like a worthy material IMHO.

Thanks for spotting this, Emil, but egd_tables.py didn't make it for
-stable so I suppose we will still leave those 2 out too.

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] bin/get-fixes-pick-list.sh: better identify multiple "fixes:" tags

2017-06-15 Thread Andres Gomez
On Mon, 2017-05-15 at 11:56 +0100, Emil Velikov wrote:
> On 13 May 2017 at 01:11, Andres Gomez <ago...@igalia.com> wrote:
> > We were not considering as multiple fixes lines with:
> > Fixes: $sha_1, Fixes: $sha_2
> > 
> > Now, we split the lines so we will consider them individually, as in:
> > Fixes: $sha_1,
> > Fixes: $sha_2
> > 
> > Additionally, we try to get the SHA from split lines so:
> > Fixes:
> > $sha_1
> > 
> > Will be considered as:
> > Fixes: $sha_1
> > 
> > Signed-off-by: Andres Gomez <ago...@igalia.com>
> > ---
> >  bin/get-fixes-pick-list.sh | 12 
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/bin/get-fixes-pick-list.sh b/bin/get-fixes-pick-list.sh
> > index f9afcc49ce..32d830cda0 100755
> > --- a/bin/get-fixes-pick-list.sh
> > +++ b/bin/get-fixes-pick-list.sh
> > @@ -36,14 +36,18 @@ do
> > continue
> > fi
> > 
> > +   # Place every "fixes:" tag on its own line and join with the next 
> > word
> > +   # on its line or a later one.
> > +   fixes=`git show -s $sha | tr -d "\n" | sed -e 
> > 's/fixes:/\nfixes:/Ig' | grep "fixes:" | sed -e 
> > 's/\(fixes:\)[[:space:]]*\([a-zA-Z0-9]*\).*$/\1\2/g'`
> 
> Do we need the tr -d?

If what we are intending is that each new line will start with the
"fixes:" tag then, yes, I think it is needed.

I tried to see how to do this with sed and found it much more
cumbersome and felt using "tr -d" much easier to do and understand.

> Nit: Let's also handle any trailing whitespace after the tag.
> Something like the following should do it.
> 
> 's/fixes:[[:space:]]*/\nfixes:/Ig'

This is already done by the second sed. I'll move it to the first one
but I don't think we are really gaining anything ...

> > # For each one try to extract the tag
> > -   fixes_count=`git show -s $sha | grep -i "fixes:" | wc -l`
> > +   fixes_count=`echo "$fixes" | wc -l`
> > warn=`(test $fixes_count -gt 1 && echo $fixes_count) || echo 0`
> > while [ $fixes_count -gt 0 ] ; do
> > -   fixes=`git show -s $sha | grep -i "fixes:" | tail -n 
> > $fixes_count`
> > +   # Treat only the current line
> > +   fix=`echo "$fixes" | tail -n $fixes_count | head -n 1`
> > fixes_count=$(($fixes_count-1))
> > -   # The following sed/cut combination is borrowed from GregKH
> > -   id=`echo ${fixes} | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' 
> > | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`
> > +   id=`echo "$fix" | cut -d : -f 2`
> 
> Nit: fold the fix line in here?

I'll do.

> With the nitpicks the series is
> Reviewed-by: Emil Velikov <emli.veli...@collabora.com>
> 
> -Emil
> 
> P.S. An alternative construct that just hit me. It allows us to drop
> the "tail | head" dance, drop the count variable and make the whole
> thing a bit easier to read.
> I'm quite biased of course, but if you agree I can address it as a
> follow-up patch.
> 
> # try to fold ill-formed fixes tags
> fixes=`git show -s $sha ...
> count=... // obsolete? see below
> warn=0
> save_IFS...
> IFS=\n
> for i in fixes; do
> $process
> if failed; then
> # warn if we fail to parse any of the tags
> warn=1
> continue
> fi
> done
> restore_IFS
> 
> # only if there's multiple?
> # with the sed pattern fixed, we well drop the multiple 'requirement'
> if warn /* && count -gt 1 */; then
> echo WARNING
> fi

It looks good and, yes, maybe easier to understand, so feel free to go
ahead ☺

I'll push this by now ...

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] anv: FORMAT_FEATURE_TRANSFER_SRC/DST_BIT_KHR not used with VkFormatProperties.bufferFeatures

2017-06-15 Thread Andres Gomez
On Thu, 2017-06-15 at 01:13 +0100, Lionel Landwerlin wrote:
> Out of curiosity, does this fix a test (maybe upcoming one)?

Not really, but realized checking an upcoming test for vk-gl-cts.

The test was failing on some conditions because of erroneously checking
some FORMAT_FEATURE flags against VkFormatProperties.bufferFeatures.

Upon analysis, I also realized that it should also be failing in a
similar scenario because of checking
FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR against
VkFormatProperties.bufferFeatures. It was not failing when running
against anv due to the bug corrected here.

When this lands, that test will start to (incorrectly) fail also
because of the latter case. That test is also being fixed right now to
check against the proper members of VkFormatProperties and not
bufferFeatures.

Hope this helps to understand where this is all coming from.

-- 
Br,

Andres
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


<    1   2   3   4   5   6   7   >