Re: [Mesa-dev] [PATCH 15/20] pan/midgard: Use type-appropriate swizzle for texture coordinate

2019-08-16 Thread Alyssa Rosenzweig
Thanks, fixed in v2. On Fri, Aug 16, 2019 at 11:55:59AM -0400, Ilia Mirkin wrote: > On Fri, Aug 16, 2019 at 11:38 AM Alyssa Rosenzweig > wrote: > > > > The texture coordinate for a 2D texture could be a vec2 or a vec3, > > depending if it's an array texture or not. If it's vec2 (non-array > >

Re: [Mesa-dev] [PATCH 15/20] pan/midgard: Use type-appropriate swizzle for texture coordinate

2019-08-16 Thread Ilia Mirkin
On Fri, Aug 16, 2019 at 11:38 AM Alyssa Rosenzweig wrote: > > The texture coordinate for a 2D texture could be a vec2 or a vec3, > depending if it's an array texture or not. If it's vec2 (non-array > texture), we should not reference the z component; otherwise, liveness > analysis will get very

[Mesa-dev] [PATCH 16/20] pan/midgard: Clamp st_vary swizzle by number of components

2019-08-16 Thread Alyssa Rosenzweig
Same issue with liveness analysis. If we store out a vec3, we should not reference the .w component. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_compile.c

[Mesa-dev] [PATCH 10/20] pan/midgard: Index blocks for printing

2019-08-16 Thread Alyssa Rosenzweig
Better than having pointers flying about. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h| 6 ++ src/panfrost/midgard/midgard_compile.c | 2 ++ src/panfrost/midgard/midgard_print.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 07/20] pan/midgard: Add mir_foreach_successor helper

2019-08-16 Thread Alyssa Rosenzweig
Now we should be able to walk the control-flow graph naturally. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 8 1 file changed, 8 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index f196389c36a..a78d933e9e4

[Mesa-dev] [PATCH 09/20] pan/midgard: Add mir_foreach_src

2019-08-16 Thread Alyssa Rosenzweig
This is repeated often enough. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 6f953d48cb8..217ab317090 100644 ---

[Mesa-dev] [PATCH 06/20] pan/midgard: Add mir_foreach_predecessor utility

2019-08-16 Thread Alyssa Rosenzweig
It's ugly, but c'est la vie. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index e51ea8ba602..f196389c36a 100644 ---

[Mesa-dev] [PATCH 03/20] pan/midgard: Maintain block predecessor set

2019-08-16 Thread Alyssa Rosenzweig
While we already compute the successors array, for backwards data flow analysis, it is useful to walk the control flow graph backwards based on predecessors, so let's compute that information as well. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h| 2 ++

[Mesa-dev] [PATCH 15/20] pan/midgard: Use type-appropriate swizzle for texture coordinate

2019-08-16 Thread Alyssa Rosenzweig
The texture coordinate for a 2D texture could be a vec2 or a vec3, depending if it's an array texture or not. If it's vec2 (non-array texture), we should not reference the z component; otherwise, liveness analysis will get very confused when z is never written. Signed-off-by: Alyssa Rosenzweig

[Mesa-dev] [PATCH 05/20] pan/midgard: Link exit block

2019-08-16 Thread Alyssa Rosenzweig
The exit block has been 'dangling' in the successors graph, so let's ensure it's linked in. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_compile.c

[Mesa-dev] [PATCH 04/20] pan/midgard: Add mir_exit_block helper

2019-08-16 Thread Alyssa Rosenzweig
The exit block is gauranteed to be empty, signaling the end of the program. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 13 + 1 file changed, 13 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index

[Mesa-dev] [PATCH 12/20] pan/midgard: Add mir_rewrite_index_dst_single helper

2019-08-16 Thread Alyssa Rosenzweig
Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 1 + src/panfrost/midgard/mir.c | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 1fddd3f1fe8..1cbebdbef2e 100644 ---

[Mesa-dev] [PATCH 18/20] pan/midgard: Treat cubemaps "stores" as loads

2019-08-16 Thread Alyssa Rosenzweig
It's always been ambiguous which they are, but their primary register is their output, not their input; therefore, they are loads. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/helpers.h | 5 ++--- src/panfrost/midgard/midgard.h | 9 -

[Mesa-dev] [PATCH 14/20] pan/midgard: Set mask for lowered read-hazard moves

2019-08-16 Thread Alyssa Rosenzweig
If we need to lower a move for a read from a vec2 texture coordinate, we shouldn't write zw, even incidentally. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_ra.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panfrost/midgard/midgard_ra.c

[Mesa-dev] [PATCH 13/20] pan/midgard: Fix texw lowering with complex control flow

2019-08-16 Thread Alyssa Rosenzweig
Fixes shaders with control flow like: out = 0; if (A) { if (B) out = texture(A, ...) } else { out = texture(B, ...) } Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_ra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 17/20] pan/midgard: Clamp cubemap swizzle to XYXX

2019-08-16 Thread Alyssa Rosenzweig
Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 73ba3173eb3..705c3b32778 100644 --- a/src/panfrost/midgard/midgard_compile.c +++

[Mesa-dev] [PATCH 20/20] pan/midgard: Compute liveness per-block

2019-08-16 Thread Alyssa Rosenzweig
Rather than using a regalloc based on live internals, computed hastily with repeated invocations of a forward-analysis pass, we switch to compute liveness information on a per-block basis. Within a given basic block, we compute liveness backwards with a linear-time algorithm; for common shaders,

[Mesa-dev] [PATCH 11/20] pan/midgard: Print predecessors in MIR

2019-08-16 Thread Alyssa Rosenzweig
Just as a sanity check. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_print.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c index 240780a1f7d..1f8bd12680e 100644 ---

[Mesa-dev] [PATCH 19/20] pan/midgard: Analyze load/store for swizzle propagation

2019-08-16 Thread Alyssa Rosenzweig
If there's a nontrivial swizzle fed into an extra (shortened) argument, we bail on copyprop. No glmark changes (since it doesn't use fancy texturing/loads). Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_opt_copy_prop.c | 24 +--- 1 file changed, 21

[Mesa-dev] [PATCH 08/20] pan/midgard: Add mir_foreach_instr_in_block_rev

2019-08-16 Thread Alyssa Rosenzweig
Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index a78d933e9e4..6f953d48cb8 100644 --- a/src/panfrost/midgard/compiler.h +++

[Mesa-dev] [PATCH 01/20] pan/midgard: Shrink successors[] to 2 length

2019-08-16 Thread Alyssa Rosenzweig
A block can't have more. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 942d288a326..61fe8a92b2e 100644 ---

[Mesa-dev] [PATCH 00/20] panfrost: Fix Midgard liveness analysis

2019-08-16 Thread Alyssa Rosenzweig
This series was motivated by RA failures in a Krita shader. The fix -- rewriting liveness analysis entirely -- turned out to be rather more involved than I expected. Ah well, I think it was worth it (as the issue fixed really does apply to GLES2 even, it was just missed in dEQP). Alyssa

[Mesa-dev] [PATCH 02/20] pan/midgard: Use ralloc on ctx/blocks

2019-08-16 Thread Alyssa Rosenzweig
This will allow us to get some level of automatic memory management. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/panfrost/midgard/midgard_compile.c

Re: [Mesa-dev] [PATCH 2/2] panfrost: Add madvise support to BO cache

2019-08-16 Thread Tomeu Vizoso
Both patches look good to me. Reviewed-by: Tomeu Vizoso Thanks! Tomeu On Fri, 9 Aug 2019 at 21:53, Rob Herring wrote: > > The kernel now supports madvise ioctl to indicate which BOs can be freed > when there is memory pressure. Mark BOs purgeable when they are in the > BO cache. The BOs must

Re: [Mesa-dev] Concern about proposed patch "egl/android: remove HAL_PIXEL_FORMAT_BGRA_8888 support"

2019-08-16 Thread Lepton Wu
OK, Actually android-x86 has a "workaround" at android side to enable BRGA here:

[Mesa-dev] [Bug 111403] OpenCL device doesn't support "Image support"

2019-08-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=111403 --- Comment #2 from vans88 --- @Jan Vesely Thank you very much for your reply. After reading the Bug(id 87738), I realized this is a software issue in mesa OpenCL implementation framework. But for AMD graphics card, Clover Platform