On 19/1/19 10:29 am, Bas Nieuwenhuizen wrote:
On Sat, Jan 19, 2019 at 12:27 AM Bas Nieuwenhuizen
wrote:
On Sat, Jan 19, 2019 at 12:17 AM Timothy Arceri wrote:
On 19/1/19 9:36 am, Bas Nieuwenhuizen wrote:
On Thu, Jan 10, 2019 at 6:59 AM Timothy Arceri wrote:
This builds on the recent
On 19/1/19 9:36 am, Bas Nieuwenhuizen wrote:
On Thu, Jan 10, 2019 at 6:59 AM Timothy Arceri wrote:
This builds on the recent interpolate fix by Rhys ee8488ea3b99.
This doesn't handle arrays of structs but I've got a feeling those
might be broken even for radeonsi tgsi (we currently have
Ping!
On 10/1/19 4:59 pm, Timothy Arceri wrote:
This builds on the recent interpolate fix by Rhys ee8488ea3b99.
This doesn't handle arrays of structs but I've got a feeling those
might be broken even for radeonsi tgsi (we currently have no tests).
This fixes the arb_gpu_shader5 interpolateAt
This basically reverts c2bc0aa7b188.
By running the opts we reduce memory using in Team Fortress 2
from 1.5GB -> 1.3GB from start-up to game menu.
This will likely increase Deus Ex start up times as per commit
c2bc0aa7b188. However currently 32bit games like Team Fortress 2
can run out of
Currently only add a cache key for a shader once it is linked.
However games like Team Fortress 2 compile a whole bunch of shaders
which are never actually linked. These compiled shaders can take
up a bunch of memory.
This patch changes things so that we add the key for the shader to
the cache as
type of handle we are dealing with. I'll rework this.
Patches 1-4:
Reviewed-by: Marek Olšák mailto:marek.ol...@amd.com>>
Thanks!
Marek
On Wed, Jan 9, 2019 at 3:54 AM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote:
---
src/gallium/drivers/radeonsi/si_sh
To be honest I have mixed feelings about using Gitlab merge requests. As
Jason mentions bellow the discussions feature is a nice way to avoid the
mess that can happen with mailings list replys.
However I seem to find myself fighting with the interface more that
should be necessary. Most of
This builds on the recent interpolate fix by Rhys ee8488ea3b99.
This doesn't handle arrays of structs but I've got a feeling those
might be broken even for radeonsi tgsi (we currently have no tests).
This fixes the arb_gpu_shader5 interpolateAt* tests that contain
arrays.
Fixes: ee8488ea3b99
The current code only strips off arrays and cannot find the type
for images that are struct members.
Instead of trying to get the image type from the variable, we just
get it directly from the deref instruction.
---
src/amd/common/ac_nir_to_llvm.c | 27 ---
1 file
This wasn't ported over when deref support was implemented.
---
src/amd/common/ac_nir_to_llvm.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 633cc0aa06..4f7b2e4dc2 100644
---
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 33 +++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c
b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 2c95c62d99..256ef28bb1 100644
---
We still need core NIR support for various features such as
image/sampler in/outs etc. But this gets us a step closer.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c
b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 64acf41679..2c95c62d99 100644
---
---
src/amd/common/ac_nir_to_llvm.c | 45 +++--
1 file changed, 26 insertions(+), 19 deletions(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 4f7b2e4dc2..99eb6fb573 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++
On 8/1/19 10:50 am, Bas Nieuwenhuizen wrote:
I think this got fixed by
https://gitlab.freedesktop.org/mesa/mesa/commit/be6cee51c06dc72ac159bd75b4201c61952515bd
already?
ok thanks. Hadn't pulled that one in yet.
On Tue, Jan 8, 2019 at 12:28 AM Timothy Arceri wrote:
Cc: Marek Olšák
Reviewed-by: Timothy Arceri
On 8/1/19 1:11 am, Andres Gomez wrote:
The check for location aliasing was always asuming output variables
but this validation is also called for input variables.
Fixes: e2abb75b0e4 ("glsl/linker: validate explicit locations for SSO programs")
Cc:
Cc: Marek Olšák
---
src/amd/common/ac_nir_to_llvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 84dbe17457..c9e11142eb 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++
On 8/1/19 6:43 am, Marek Olšák wrote:
On Mon, Dec 17, 2018 at 8:18 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote:
The following patch will use this with the radeonsi NIR backend
but I've added it to ac so we can use it with RADV in future.
This is a NIR imple
On 8/1/19 2:51 am, Andres Gomez wrote:
On Mon, 2019-01-07 at 16:48 +0100, Erik Faye-Lund wrote:
On Mon, 2019-01-07 at 15:50 +0200, Andres Gomez wrote:
Correct a typo introduced by
037f68d81e1 ("glsl: apply align layout qualifier rules to block
offsets")
Cc: Timothy Arceri
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109231
---
src/compiler/nir/nir_loop_analyze.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c
b/src/compiler/nir/nir_loop_analyze.c
index 259f02a854..6deb6cb962 100644
---
This commit seems to cause bad stuttering in the Batman Arkham City
benchmark.
On 7/12/18 1:00 am, Nicolai Hähnle wrote:
From: Nicolai Hähnle
This is a move towards using composition instead of inheritance for
different query types.
This change weakens out-of-memory error reporting
The functional change here is moving the nir_lower_io_to_scalar_early()
calls inside st_nir_link_shaders() and moving the st_nir_opts() call
after the call to nir_lower_io_arrays_to_elements().
This fixes a bug with the following piglit test due to the current code
not cleaning up dead code after
---
src/compiler/nir/nir_linking_helpers.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
b/src/compiler/nir/nir_linking_helpers.c
index 97816ccc58..be6b9dd85c 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++
---
src/compiler/nir/nir_linking_helpers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
b/src/compiler/nir/nir_linking_helpers.c
index abbd7e1f5c..97816ccc58 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++
---
src/compiler/nir/nir.h | 1 -
src/compiler/nir/nir_opt_remove_phis.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 4b8de4bb01..94d6578620 100644
--- a/src/compiler/nir/nir.h
+++
If we are outputting the same value to more than one output
component rewrite the inputs to read from a single component.
This will allow the duplicate varying components to be optimised
away by the existing opts.
shader-db results i965 (SKL):
total instructions in shared programs: 12869230 ->
This will be reused by the following patch.
Reviewed-by: Marek Olšák
---
src/compiler/nir/nir_linking_helpers.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
b/src/compiler/nir/nir_linking_helpers.c
index
This will help the new opt introduced in the following patches
allowing us to remove extra duplicate varyings.
Reviewed-by: Marek Olšák
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 2 --
src/mesa/state_tracker/st_glsl_to_nir.cpp| 4 +++-
2 files changed, 3 insertions(+), 3
The following patches will add support for an addition
optimisation so this function will no longer just optimise varying
constants.
Reviewed-by: Marek Olšák
---
src/amd/vulkan/radv_pipeline.c| 4 ++--
src/compiler/nir/nir.h| 2 +-
This just cleans things up a little and make things more safe for
derefs.
---
src/compiler/nir/nir_linking_helpers.c | 28 +++---
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
b/src/compiler/nir/nir_linking_helpers.c
Reviewed-by: Timothy Arceri
On 18/12/18 3:16 am, Rhys Perry wrote:
Signed-off-by: Rhys Perry
---
src/compiler/nir/nir_opt_peephole_select.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_opt_peephole_select.c
b/src/compiler/nir
On 7/12/18 6:45 am, Jason Ekstrand wrote:
D3D Booleans use a 32-bit 0/-1 representation. Because this previously
matched NIR exactly, we didn't have to really optimize for it. Now that
we have 1-bit Booleans, we need some specific optimizations to chew
through the D3D12-style Booleans.
Series:
Reviewed-by: Timothy Arceri
On 18/12/18 3:44 pm, Jason Ekstrand wrote:
Instead of going all the way back to the variable, just look at the
deref. The modes are guaranteed to be the same by nir_validate whenever
the variable can be found. This fixes clear_unused_for_modes for
derefs
The following patch will use this with the radeonsi NIR backend
but I've added it to ac so we can use it with RADV in future.
This is a NIR implementation of the tgsi function
tgsi_scan_tess_ctrl().
---
src/amd/common/ac_nir_to_llvm.c | 161
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c
b/src/gallium/drivers/radeonsi/si_shader_nir.c
index b81bea00b8..931d41245d 100644
---
---
src/gallium/drivers/radeonsi/si_shader.h| 1 -
src/gallium/drivers/radeonsi/si_shader_nir.c| 1 -
src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +-
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.h
On 15/12/18 1:16 pm, Timothy Arceri wrote:
On 15/12/18 7:32 am, Marek Olšák wrote:
For patches 1-3:
Reviewed-by: Marek Olšák <mailto:marek.ol...@amd.com>>
Thanks!
I'm not so knowledgeable to be able to comment on patch 4.
Does it also merge varyings such as (x,y,undef,undef
ce our main focus these days is on Vulkan and there we
always link the entire pipeline so its not an issue.
Marek
On Mon, Dec 10, 2018 at 11:28 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote:
If we are outputting the same value to more than one output
component rew
This just happened not to crash/assert because all loops have at
least 1 if-statement and due to a second bug we end up matching
the same ENDIF to exit both the iteration over the if-statment
and the loop.
The second bug is fixed in the following patch.
Fixes: 386d165d8d09 ("tgsi/scan: add a new
The previous code used a do while loop and continues after walking
a nested loop/if-statement. This means we end up evaluating the
last instruction from the nested block against the while condition
and potentially exit early if it matches the exit condition of the
outer block.
Fixes: 386d165d8d09
On 13/12/18 11:11 pm, Alejandro Piñeiro wrote:
This is needed due how the types get rearranged after the struct
splitting.
So for example, this array of blocks:
layout(location = 0) out block {
vec4 v;
vec3 v2;
} x[2];
Would be splitted on two nir variables with the
I don't think I've seen the warning so its likely I use this (or
removing it) in a future patch. But feel free to push this for now.
On 14/12/18 1:25 am, Alejandro Piñeiro wrote:
To avoid the following warning:
./src/compiler/nir/nir_loop_analyze.c:807:16: warning: unused variable ‘ns’
On 13/12/18 8:10 pm, Samuel Pitoiset wrote:
This introduces crashes for
dEQP-VK.spirv_assembly.instruction.graphics.selection_block_order.out_of_order_frag
dEQP-VK.spirv_assembly.instruction.graphics.selection_block_order.out_of_order_geom
The pass did not correctly handle loops ending in:
if ssa_7 {
block block_8:
/* preds: block_7 */
continue
/* succs: block_1 */
} else {
block block_9:
/* preds: block_7 */
Here we create a helper is_supported_terminator_condition()
and use that rather than embedding all the trip count code
inside a switch.
The new helper will also be used in a following patch.
---
src/compiler/nir/nir_loop_analyze.c | 176 +++-
1 file changed, 95
Rather than getting this from the alu instruction this allows us
some flexibility. In the following pass we instead pass the
inverse op.
---
src/compiler/nir/nir_loop_analyze.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git
This detects an induction variable used as an array index to guess
the trip count of the loop. This enables us to do a partial
unroll of the loop, with can eventually result in the loop being
eliminated.
v2: check if the induction var is used to index more than a single
array and if so get
For some loops can have a single terminator but the exact trip
count is still unknown. For example:
for (int i = 0; i < imin(x, 4); i++)
...
Shader-db results radeonsi (all affected are from Tropico 5):
Totals from affected shaders:
SGPRS: 200 -> 208 (4.00 %)
VGPRS: 164 -> 148 (-9.76
In order to stop continuously partially unrolling the same loop
we add the bool partially_unrolled to nir_loop, we add it here
rather than in nir_loop_info because nir_loop_info is only set
via loop analysis and is intended to be cleared before each
analysis. Also nir_loop_info is never cloned.
This will be used to help find the trip count of loops that look
like the following:
while (a < x && i < 8) {
...
i++;
}
Where the NIR will end up looking something like this:
vec1 32 ssa_0 = load_const (0x /* 0.00 */)
vec1 32 ssa_1 = load_const (0x0008
This adds partial loop unrolling support and makes use of a
guessed trip count based on array access.
The code is written so that we could use partial unrolling
more generally, but for now it's only use when we have guessed
the trip count.
We use partial unrolling for this guessed trip count
This helps make find_trip_count() a little easier to follow but
will also be used by a following patch.
---
src/compiler/nir/nir_loop_analyze.c | 41 ++---
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c
This will be used to help find the trip count of loops that look
like the following:
while (a < x && i < 8) {
...
i++;
}
Where the NIR will end up looking something like this:
vec1 32 ssa_0 = load_const (0x /* 0.00 */)
vec1 32 ssa_1 = load_const (0x0008
This adds support to loop analysis for loops where the induction
variable is compared to the result of min(variable, constant).
For example:
for (int i = 0; i < imin(x, 4); i++)
...
We add a new bool to the loop terminator struct in order to
differentiate terminators with this exit
V2:
- When guessing trip count in patch 1 check if the induction var
is used in more than a single loop and get the smallest array
size if so (Suggested by Jason).
- A bunch of reviewed patches have been pushed
Some piglit tests:
https://patchwork.freedesktop.org/series/53712/
The following patches will add support for an addition
optimisation so this function will no longer just optimise varying
constants.
---
src/amd/vulkan/radv_pipeline.c| 4 ++--
src/compiler/nir/nir.h| 2 +-
src/compiler/nir/nir_linking_helpers.c| 2 +-
This will be reused by the following patch.
---
src/compiler/nir/nir_linking_helpers.c | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
b/src/compiler/nir/nir_linking_helpers.c
index b447729c60..37644d339f 100644
---
This will help the new opt introduced in the following patches
allowing us to remove extra duplicate varyings.
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 2 --
src/mesa/state_tracker/st_glsl_to_nir.cpp| 4 +++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
If we are outputting the same value to more than one output
component rewrite the inputs to read from a single component.
This will allow the duplicate varying components to be optimised
away by the existing opts.
shader-db results i965 (SKL):
total instructions in shared programs: 12869230 ->
t would be easy enough to add, but
it seems more valuable to suggest the developer use the more broadly
supported extension."
On 12/10/18 4:08 PM, Timothy Arceri wrote:
KHR_debug already provides superior functionality but this
extension is still in use and adding support for it seems fai
KHR_debug already provides superior functionality but this
extension is still in use and adding support for it seems fairly
harmless. For example it seems to be used by Unity as seen in the
Parkitect trace attached to Mesa bug #108919.
---
src/mapi/glapi/gen/gl_API.xml| 17 +
Sorry please ignore this for now. I've realised there is a bug here
where we could end up packing components in only one of the shaders but
not the other. For example if we have an array on one side but just a
bunch of individual varyings on the other (which is legal I believe).
I'll send a
I'd much rather land the first 3 patches from this series if possible.
https://patchwork.freedesktop.org/series/53800/
I've confirmed it packs the shaders you were looking at as expected once
you patch 2 is applied. The series makes this code much more flexible
(for future improvements) and
0 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 1053168 -> 1055452 (0.22 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 4636 -> 4616 (-0.43 %)
Wait states: 0 -> 0 (0.00 %)
On 10/12/18 11:31 am, Timothy Arceri wrote:
vkpipeline-d
There are three reasons for the rewrite.
1. Adding support for packing tess patch varyings in a sane way.
2. Making use of qsort allowing the code to be much easier to
follow.
3. Allowing us to add a crude live range analysis for deciding
which components should be packed together. This
vkpipeline-db results RADV (VEGA):
Totals from affected shaders:
SGPRS: 27168 -> 27872 (2.59 %)
VGPRS: 24180 -> 24056 (-0.51 %)
Spilled SGPRs: 28 -> 24 (-14.29 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size:
This adds support needed for marking the varyings as used but we
don't actually support packing patches in this patch.
---
src/compiler/nir/nir_linking_helpers.c | 73 ++
1 file changed, 51 insertions(+), 22 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
This will be used in the following patches to determine if we
support packing the components of a varying.
---
src/compiler/nir/nir_linking_helpers.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/src/compiler/nir/nir_linking_helpers.c
to make this a little clearer.
Also please add:
Fixes: dbd52585fa9f ("st/nir: Disable varying packing when doing
transform feedback.")
With those changes patches 1-2 are:
Reviewed-by: Timothy Arceri
Thanks for looking into this.
even if
NumVaryings is zero. So make the check abo
On 8/12/18 11:16 am, Jason Ekstrand wrote:
On Thu, Dec 6, 2018 at 9:08 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote:
This detects an induction variable used as an array index to guess
the trip count of the loop. This enables us to do a partial
unroll of the loop,
In order to stop continuously partially unrolling the same loop
we add the bool partialy_unrolled to nir_loop, we add it here
rather than in nir_loop_info because nir_loop_info is only set
via loop analysis and is intended to be cleared before each
analysis. Also nir_loop_info is never cloned.
---
This adds support to loop analysis for loops where the induction
variable is compared to the result of min(variable, constant).
For example:
for (int i = 0; i < imin(x, 4); i++)
...
We add a new bool to the loop terminator struct in order to
differentiate terminators with this exit
This will be used to help find the trip count of loops that look
like the following:
while (a < x && i < 8) {
...
i++;
}
Where the NIR will end up looking something like this:
vec1 32 ssa_0 = load_const (0x /* 0.00 */)
vec1 32 ssa_1 = load_const (0x0008
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir_loop_analyze.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c
b/src/compiler/nir/nir_loop_analyze.c
index fbaa638884..ef69422c12 100644
--- a/src/compiler/nir/nir_loop_analyze.c
+++
This will allow us to improve analysis to find more induction
variables.
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir_loop_analyze.c | 34 ++---
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c
Here we create a helper is_supported_terminator_condition()
and use that rather than embedding all the trip count code
inside a switch.
The new helper will also be used in a following patch.
---
src/compiler/nir/nir_loop_analyze.c | 172 +++-
1 file changed, 93
This allows loop analysis to detect inductions variables that
are incremented in both branches of an if rather than in a main
loop block. For example:
loop {
block block_1:
/* preds: block_0 block_7 */
vec1 32 ssa_8 = phi block_0: ssa_4, block_7: ssa_20
vec1 32 ssa_9 =
For some loops can have a single terminator but the exact trip
count is still unknown. For example:
for (int i = 0; i < imin(x, 4); i++)
...
Shader-db results radeonsi (all affected are from Tropico 5):
Totals from affected shaders:
SGPRS: 200 -> 208 (4.00 %)
VGPRS: 164 -> 148 (-9.76
Rather than getting this from the alu instruction this allows us
some flexibility. In the following pass we instead pass the
inverse op.
---
src/compiler/nir/nir_loop_analyze.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git
Here we rework force_unroll_array_access() so that we can reused
the induction variable detection in a following patch.
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir_loop_analyze.c | 49 -
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git
This adds partial loop unrolling support and makes use of a
guessed trip count based on array access.
The code is written so that we could use partial unrolling
more generally, but for now it's only use when we have guessed
the trip count.
We use partial unrolling for this guessed trip count
This will be used to help find the trip count of loops that look
like the following:
while (a < x && i < 8) {
...
i++;
}
Where the NIR will end up looking something like this:
vec1 32 ssa_0 = load_const (0x /* 0.00 */)
vec1 32 ssa_1 = load_const (0x0008
This helps make find_trip_count() a little easier to follow but
will also be used by a following patch.
---
src/compiler/nir/nir_loop_analyze.c | 41 ++---
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c
vate memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 8524 -> 8488 (-0.42 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 7 -> 7 (0.00 %)
Wait states: 0 -> 0 (0.00 %)
v2: (Timothy Arceri):
- allow for continues in either branch
- move
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir_opt_loop_unroll.c | 115 ++---
1 file changed, 64 insertions(+), 51 deletions(-)
diff --git a/src/compiler/nir/nir_opt_loop_unroll.c
b/src/compiler/nir/nir_opt_loop_unroll.c
index c267c185b6..8406880204 100644
---
This detects an induction variable used as an array index to guess
the trip count of the loop. This enables us to do a partial
unroll of the loop, with can eventually result in the loop being
eliminated.
---
src/compiler/nir/nir.h | 4 ++
src/compiler/nir/nir_loop_analyze.c | 78
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir_control_flow.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/src/compiler/nir/nir_control_flow.h
b/src/compiler/nir/nir_control_flow.h
index 2ea460e5df..9111b30a29 100644
--- a/src/compiler/nir/nir_control_flow.h
+++
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir_opt_loop_unroll.c | 76 ++
1 file changed, 28 insertions(+), 48 deletions(-)
diff --git a/src/compiler/nir/nir_opt_loop_unroll.c
b/src/compiler/nir/nir_opt_loop_unroll.c
index 0e9966320b..c267c185b6 100644
---
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir_loop_analyze.c | 31 ++---
1 file changed, 10 insertions(+), 21 deletions(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c
b/src/compiler/nir/nir_loop_analyze.c
index 9c3fd2f286..c779383b36 100644
---
Following commits will introduce additional fields such as
guessed_trip_count. Renaming these will help avoid confusion
as our unrolling feature set grows.
Reviewed-by: Thomas Helland
---
src/compiler/nir/nir.h | 8 +---
src/compiler/nir/nir_loop_analyze.c| 14
This is three series combined. I've sent the first two previously
(patch 1-11 & patch 12-15) and they have been partially reviewed
by Thomas. Please see the previous sends of those series for cover
letters.
There is a small bug fix in patch 11 that was discovered by some
new piglit tests [1].
Ping! on the series
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Ping!
On 20/11/18 7:14 pm, Timothy Arceri wrote:
This series add support for partial loop unrolling for loops with an
unknown trip count. The new partial_unroll function allows the caller
to specifiy how may times the loop should be unrolled and then the
loop is inserted in the innermost
This adds support needed for marking the varyings as used but we
don't actually support packing patches in this patch.
---
src/compiler/nir/nir_linking_helpers.c | 73 ++
1 file changed, 51 insertions(+), 22 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
There are three reasons for the rewrite.
1. Adding support for packing tess patch varyings in a sane way.
2. Making use of qsort allowing the code to be much easier to
follow.
3. Adding a crude live range analysis for deciding which components
should be packed together.
We could simplify
On 1/12/18 9:11 am, Jason Ekstrand wrote:
All,
This week, I've been working on trying to move UBO and SSBO access in
NIR over to deref instructions. I'm hoping that this will allow us to
start doing alias analysis and copy-propagation on it. The passes we
have in NIR *should* be able to
On 30/11/18 5:38 pm, Thomas Helland wrote:
Den ons. 28. nov. 2018 kl. 10:23 skrev Timothy Arceri :
On 28/11/18 6:52 pm, Thomas Helland wrote:
Den ons. 28. nov. 2018 kl. 04:26 skrev Timothy Arceri :
This adds allows loop analysis to detect inductions varibales that
are incremented in both
On Thu, Nov 29, 2018, at 7:47 AM, Connor Abbott wrote:
> On Thu, Nov 29, 2018 at 4:22 PM Jason Ekstrand wrote:
> >
> > Can you provide some context for this? Those rules are already flagged
> > "inexact" (that's what the ~ means) so they won't apply to anything that's
> > "precise" or
On 28/11/18 6:52 pm, Thomas Helland wrote:
Den ons. 28. nov. 2018 kl. 04:26 skrev Timothy Arceri :
This adds allows loop analysis to detect inductions varibales that
are incremented in both branches of an if rather than in a main
loop block. For example:
loop {
block block_1
This will allow us to improve analysis to find more induction
variables.
---
src/compiler/nir/nir_loop_analyze.c | 34 ++---
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/src/compiler/nir/nir_loop_analyze.c
b/src/compiler/nir/nir_loop_analyze.c
index
201 - 300 of 6672 matches
Mail list logo