This fairly-lengthy series is focused on improving the register
allocator and by extension the performance of the generated code.
Meanwhile, we cleanup the compiler, refactoring as we go, driven by the
overall arc of the RA improvements. I was particularly motivated by the
concerns raised by compil
This mechanism is only used by blend shaders, so just use a move here.
Ideally, it'll be copy-propped and DCE'd away; this removes a source of
considerable indirection and will simplify RA logic.
Signed-off-by: Alyssa Rosenzweig
---
.../panfrost/midgard/midgard_compile.c| 19 ++--
In addition to commonizing some related utilities, this adds new MIR
helper functions relevant to passes including pipeline register
creation.
Signed-off-by: Alyssa Rosenzweig
---
src/gallium/drivers/panfrost/meson.build | 1 +
.../drivers/panfrost/midgard/compiler.h | 19 ++-
..
A previous optimization converts fmax(x, 0.0) instructions to fmov.pos.
This pass then propagates the .pos from the move up to the source
instruction (when possible). From there, copy propagation will eliminate
the move.
Signed-off-by: Alyssa Rosenzweig
---
.../panfrost/midgard/midgard_compile.c
This fixes liveness analysis with respect to inline constants and
branching.
Signed-off-by: Alyssa Rosenzweig
---
.../drivers/panfrost/midgard/midgard_liveness.c| 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_liv
This code needs to be rewritten to be RA-agnostic, but until register
pinning is setup the right way for fragment output it's broken dead
code; remove it.
Signed-off-by: Alyssa Rosenzweig
---
.../panfrost/midgard/midgard_schedule.c | 82 +++
1 file changed, 12 insertions(+)
This prepass, run after scheduling but before RA, specializes to
pipeline registers where possible. It walks the IR, checking whether
sources are ever used outside of the immediate bundle in which they are
written. If they are not, they are rewritten to a pipeline register (r24
or r25), valid only
This represents a major upgrade to the RA. We now use conflicting
register classes to represent the subdivision of Midgard's 128-bit
registers into varying sizes and arrangement. We determine class based
on the number of components in the instructions' masks. To support this,
we include a number of
Mostly, this fixes a number of instances of lines >> 80 chars,
refactoring them into something legible.
Signed-off-by: Alyssa Rosenzweig
---
.../drivers/panfrost/midgard/compiler.h | 38 +++
.../panfrost/midgard/midgard_compile.c| 12 ++---
.../drivers/panfrost/midgard/
These were static to midgard_compile.c but are more generally useful
across the compiler; move them to common Midgard code.
Signed-off-by: Alyssa Rosenzweig
---
.../drivers/panfrost/midgard/compiler.h | 46
.../drivers/panfrost/midgard/helpers.h| 50 +
.../panfro
Use the new MIR helpers to cleanup this pass.
Signed-off-by: Alyssa Rosenzweig
---
.../drivers/panfrost/midgard/midgard_compile.c| 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
b/src/gallium/drivers/
First, this moves the scheduler and emitter out of midgard_compile.c
into their own dedicated files.
More interestingly, this slims down midgard_bundle to be essentially an
array of _pointers_ to midgard_instructions (plus some bundling
metadata), rather than the instructions and packing themselve
These snippets of integer assembly are injected for various purposes
(where we cannot express it yet in pure NIR), but we need to make sure
they are int modded too.
Signed-off-by: Alyssa Rosenzweig
---
src/gallium/drivers/panfrost/midgard/midgard_compile.c | 4
1 file changed, 4 insertions(
These masks distinguish scalar/vec2/vec3 loads from the default vec4,
which helps with assembly readability and will enable smarter RA.
Signed-off-by: Alyssa Rosenzweig
---
src/gallium/drivers/panfrost/midgard/midgard_compile.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
I noticed this pattern in glmark's jellyfish scene.
v2: Add inexact qualifier to avoid changing NaN behaviour
I would appreciate if someone did a shader-db run.
Signed-off-by: Alyssa Rosenzweig
Cc: Ilia Mirkin
Cc: Ian Romanick
Cc: Elie Tournier
---
src/compiler/nir/nir_opt_algebraic.py | 1
The mesa/st flips the viewport, so we respect that rather than
trying to flip the framebuffer itself and ignoring the viewport and
using a messy heuristic.
However, this brings an underlying disagreement about the interpretation
of winding order to light. The blob uses a different strategy than Me
This ends up embedded in a for loop expression, ie. the C part in an for (A;B;C)
iirc, that means it needs to be a C expr rather than statement.. or
something roughly like that, I'm too lazy to dig out my C grammar
BR,
-R
On Sat, May 25, 2019 at 3:39 PM Ilia Mirkin wrote:
>
> Why not just do i
Why not just do it in a way that works for everyone? Both the do/while
method and the ifdef-based method that I suggested work everywhere. Or
is there another reason you prefer to use those statement expressions?
On Sat, May 25, 2019 at 6:21 PM Rob Clark wrote:
>
> Is there a convenient #ifdef I
Is there a convenient #ifdef I can use to guard the list_assert()
macro.. I don't really mind if MSVC can't have this, but would rather
not let it prevent the rest of us from having nice things
BR,
-R
On Sat, May 25, 2019 at 1:23 PM Jason Ekstrand wrote:
>
> Yeah, that's a GNU extension. It als
Yeah, that's a GNU extension. It also works in clang but not MSVC which is
used to build NIR.
On May 25, 2019 13:30:29 Rob Clark wrote:
On Sat, May 25, 2019 at 11:13 AM Ilia Mirkin wrote:
On Sat, May 25, 2019 at 2:03 PM Rob Clark wrote:
>
> From: Rob Clark
>
> Debugging use of unsafe ite
On Sat, May 25, 2019 at 11:13 AM Ilia Mirkin wrote:
>
> On Sat, May 25, 2019 at 2:03 PM Rob Clark wrote:
> >
> > From: Rob Clark
> >
> > Debugging use of unsafe iterators when you should have used the _safe
> > version sucks. Add some DEBUG build support to catch and assert if
> > someone does
On Sat, May 25, 2019 at 2:03 PM Rob Clark wrote:
>
> From: Rob Clark
>
> Debugging use of unsafe iterators when you should have used the _safe
> version sucks. Add some DEBUG build support to catch and assert if
> someone does that.
>
> I didn't update the UPPERCASE verions of the iterators. Th
From: Rob Clark
Debugging use of unsafe iterators when you should have used the _safe
version sucks. Add some DEBUG build support to catch and assert if
someone does that.
I didn't update the UPPERCASE verions of the iterators. They should
probably be deprecated/removed.
Signed-off-by: Rob Cl
23 matches
Mail list logo