Hi Brian,
On Tuesday, 20 March 2018 16:16:13 CET Brian Paul wrote:
> The code changes look good, AFAICT. But some of the comments could be
> improved, IMHO. See other replies...
>
> Otherwise, for the series,
> Reviewed-by: Brian Paul
Thanks for the review!
Will incorporate the proposed chan
This commit adds a pass for lowering deref instructions to deref chains
as well as some smaller helpers to ease the transition.
---
src/compiler/Makefile.sources | 1 +
src/compiler/nir/meson.build | 1 +
src/compiler/nir/nir.h | 50 ++-
src/compiler/nir/nir_builder.h | 23 +++
We already have these for bit_size
---
src/compiler/nir/nir.h | 12
1 file changed, 12 insertions(+)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 7ad19b4..8f4a28c 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -626,11 +626,23 @@ nir_src_bit_
---
src/compiler/nir/nir.h | 2 ++
src/compiler/nir/nir_print.c | 6 ++
2 files changed, 8 insertions(+)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 14b532d..b575545 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1233,6 +1233,8 @@ typedef enu
This is something that Connor and I have been talking about for some time
now. The basic idea is to replace the current singly linked nir_deref list
with deref instructions. This is similar to what LLVM does and it offers
quite a bit more freedom when we start getting more realistic pointers from
Cc: mesa-sta...@lists.freedesktop.org
---
src/compiler/nir/nir_lower_vars_to_ssa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c
b/src/compiler/nir/nir_lower_vars_to_ssa.c
index e8cfe30..0cc6514 100644
--- a/src/compiler/nir/nir_lower
Non-intrinsic function handling has never actually been tested and
probably doesn't work. Just get rid of it for now. We can always add
it back in later if it's useful.
---
src/compiler/glsl/glsl_to_nir.cpp | 25 ++---
1 file changed, 2 insertions(+), 23 deletions(-)
diff --
Because nir_instr_remove is an inline wrapper around nir_instr_remove_v,
the compiler should be able to tell that the return value is unused and
not emit the extra code in most cases.
---
src/compiler/nir/nir.c| 2 +-
src/compiler/nir/nir.h| 16
---
src/compiler/nir/nir_builder.h | 87 ++
1 file changed, 87 insertions(+)
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index 36e0ae3..27aa65b 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
This commit adds a new instruction type to NIR for handling derefs.
Nothing uses it yet but this adds the data structure as well as all of
the code to validate, print, clone, and [de]serialize them.
---
src/compiler/nir/nir.c| 50 +++
src/compiler/nir/nir.h
We were validating this for locals but nothing else.
---
src/compiler/nir/nir_validate.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index a49948f..e9d6bd5 100644
--- a/src/compiler/nir/nir_v
---
src/compiler/nir/nir.h| 2 +-
src/compiler/nir/nir_builder.h| 37 +
src/compiler/nir/nir_intrinsics.h | 84 +++
3 files changed, 122 insertions(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
i
This fixes the fs-interpolateAtCentroid-block-array piglit test on i965.
Cc: mesa-sta...@lists.freedesktop.org
---
src/compiler/nir/nir_lower_indirect_derefs.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c
b/src/co
Generated with
git grep -l nir_intrinsic_image | xargs \
sed -i 's/nir_intrinsic_image/nir_intrinsic_image_var/g'
and some manual fixing in nir_intrinsics.h
---
src/amd/common/ac_nir_to_llvm.c| 42 -
src/amd/vulkan/radv_meta_bufimage.c| 8 ++--
This replaces some "if (...} { }" with "if (...) continue;" to reduce
nesting depth and makes nir_metadata_preserve conditional on progress
for the given impl.
---
src/compiler/nir/nir_lower_atomics.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/c
---
src/compiler/nir/nir_builder.h | 6 ++
src/mesa/program/prog_to_nir.c | 29 ++---
2 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index f1e52b2..6667d52 100644
--- a/src/compiler/nir/n
---
src/compiler/nir/nir_lower_global_vars_to_local.c | 62 +++
1 file changed, 42 insertions(+), 20 deletions(-)
diff --git a/src/compiler/nir/nir_lower_global_vars_to_local.c
b/src/compiler/nir/nir_lower_global_vars_to_local.c
index c8fdfde..14aa366 100644
--- a/src/compile
---
src/compiler/nir/nir.h | 3 ++
src/compiler/nir/nir_builder.h | 48 ++
src/compiler/nir/nir_lower_var_copies.c | 90 +++--
3 files changed, 138 insertions(+), 3 deletions(-)
diff --git a/src/compiler/nir/nir.h b/src/compil
This commit introduces a new nir_deref.h header for helpers that are
less common and really only needed by a few heavy-duty passes. In this
header is a new struct for representing a full deref path which can be
walked in either direction.
---
src/compiler/Makefile.sources | 1 +
src/compiler/nir
---
src/mesa/program/prog_to_nir.c | 36 ++--
1 file changed, 6 insertions(+), 30 deletions(-)
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 26dfc37..14391a3 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/pro
---
src/compiler/glsl/glsl_to_nir.cpp | 239 +++---
1 file changed, 94 insertions(+), 145 deletions(-)
diff --git a/src/compiler/glsl/glsl_to_nir.cpp
b/src/compiler/glsl/glsl_to_nir.cpp
index 9da4526..be7a510 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/sr
---
src/compiler/nir/nir_split_var_copies.c | 42 +
1 file changed, 42 insertions(+)
diff --git a/src/compiler/nir/nir_split_var_copies.c
b/src/compiler/nir/nir_split_var_copies.c
index bc3ceed..bcd1f10 100644
--- a/src/compiler/nir/nir_split_var_copies.c
+++ b/sr
This inserts a call to nir_lower_deref_instrs at every call site of
glsl_to_nir, spirv_to_nir, and prog_to_nir.
---
src/amd/vulkan/radv_shader.c| 2 ++
src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 3 +++
src/intel/vulkan/anv_pipeline.c | 2 ++
src/mesa/driv
---
src/compiler/nir/nir_lower_system_values.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/compiler/nir/nir_lower_system_values.c
b/src/compiler/nir/nir_lower_system_values.c
index fb560ee..104df51 100644
--- a/src/compiler/nir/nir_lower_system_values.c
---
src/compiler/nir/nir_propagate_invariant.c | 23 ---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/compiler/nir/nir_propagate_invariant.c
b/src/compiler/nir/nir_propagate_invariant.c
index 7b5bd6c..b48b91c 100644
--- a/src/compiler/nir/nir_propagate_in
---
src/compiler/nir/nir_gather_info.c | 26 --
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/src/compiler/nir/nir_gather_info.c
b/src/compiler/nir/nir_gather_info.c
index 743f968..50d67b6 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/
---
src/compiler/nir/nir_lower_io_to_temporaries.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/compiler/nir/nir_lower_io_to_temporaries.c
b/src/compiler/nir/nir_lower_io_to_temporaries.c
index 301ba65..7ba66ba 100644
--- a/src/compiler/nir/nir_lower_io_to_temporaries.c
+++ b/src/com
---
src/compiler/nir/nir_lower_io.c | 70 +
1 file changed, 50 insertions(+), 20 deletions(-)
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index df91feb..549583d 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compil
---
src/compiler/nir/nir_lower_vars_to_ssa.c | 75
1 file changed, 58 insertions(+), 17 deletions(-)
diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c
b/src/compiler/nir/nir_lower_vars_to_ssa.c
index 0cc6514..403ce26 100644
--- a/src/compiler/nir/nir_lower_va
---
src/compiler/nir/nir_linking_helpers.c | 50 ++
1 file changed, 27 insertions(+), 23 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c
b/src/compiler/nir/nir_linking_helpers.c
index 2b0a266..1a0cb91 100644
--- a/src/compiler/nir/nir_linking_help
---
src/intel/compiler/brw_nir.c| 2 ++
src/mesa/drivers/dri/i965/brw_program.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index cf994ac..4fc6cae 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src
---
src/compiler/nir/nir_lower_indirect_derefs.c | 156 +++
1 file changed, 156 insertions(+)
diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c
b/src/compiler/nir/nir_lower_indirect_derefs.c
index 02f202d..ebeb79b 100644
--- a/src/compiler/nir/nir_lower_indirect_d
This pass doesn't handle deref instructions yet. Making it handle both
legacy derefs and deref instructions would be painful. Since it's not
important for correctness, just disable it for now.
---
src/gallium/drivers/freedreno/ir3/ir3_nir.c | 2 +-
src/intel/compiler/brw_nir.c| 2
---
.../nir/nir_lower_clip_cull_distance_arrays.c | 69 --
1 file changed, 65 insertions(+), 4 deletions(-)
diff --git a/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
b/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
index 95eda82..69b31d5 100644
--- a/sr
---
src/compiler/nir/nir_lower_atomics.c | 115 +--
1 file changed, 110 insertions(+), 5 deletions(-)
diff --git a/src/compiler/nir/nir_lower_atomics.c
b/src/compiler/nir/nir_lower_atomics.c
index 2287517..9cf6608 100644
--- a/src/compiler/nir/nir_lower_atomics.c
Sometimes it's useful for a pass to be able to clean up its own derefs
instead of waiting for DCE. This little helper makes it very easy.
---
src/compiler/nir/nir.h | 2 ++
src/compiler/nir/nir_deref.c | 13 +
2 files changed, 15 insertions(+)
diff --git a/src/compiler/nir/nir
---
src/compiler/nir/nir_remove_dead_variables.c | 99
1 file changed, 99 insertions(+)
diff --git a/src/compiler/nir/nir_remove_dead_variables.c
b/src/compiler/nir/nir_remove_dead_variables.c
index eff66f9..6b1927f 100644
--- a/src/compiler/nir/nir_remove_dead_varia
---
src/compiler/nir/nir_lower_wpos_ytransform.c | 29
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c
b/src/compiler/nir/nir_lower_wpos_ytransform.c
index 62166e7..2e0dd86 100644
--- a/src/compiler/nir/nir_l
---
src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
b/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
index 69da83a..0fd1492 100644
--- a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
+++ b/src/mes
This will be needed by anything which changes variable modes without
rewriting derefs.
---
src/compiler/nir/nir.h | 2 ++
src/compiler/nir/nir_deref.c | 30 ++
2 files changed, 32 insertions(+)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index d
Ext_color_buffer_half_float is using type GL_HALF_FLOAT
and data_type GL_FLOAT. This fix Android CTS test android.view.cts.PixelCopyTest
#TestWindowProducerCopyToRGBA16F
Signed-off-by: Lin Johnson
---
src/mesa/main/readpix.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/main/rea
On 21/03/18 06:57, Lin Johnson wrote:
> Ext_color_buffer_half_float is using type GL_HALF_FLOAT
> and data_type GL_FLOAT. This fix Android CTS test
> android.view.cts.PixelCopyTest
> #TestWindowProducerCopyToRGBA16F
>
> Signed-off-by: Lin Johnson
> ---
> src/mesa/main/readpix.c | 2 ++
> 1 file
101 - 142 of 142 matches
Mail list logo