Re: [Mesa-dev] [PATCH] st/nir: fix illegal designated initializer in st_glsl_to_nir.cpp

2019-09-16 Thread Caio Marcelo de Oliveira Filho
> How about something simple like this instead: > > > diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp > b/src/mesa/state_tracker > index d6a0264..4f5acfd 100644 > --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp > +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp > @@ -687,9 +687,14 @@ st_lin

Re: [Mesa-dev] [PATCH v2 1/5] util/hash_table: Fix hashing in clears on 32-bit

2019-08-07 Thread Caio Marcelo de Oliveira Filho
-bit key value. Fix _mesa_hash_table_u64_clear() to handle the 32-bit case by creating a temporary hash_key_u64 to pass to the hash function. This patch is Reviewed-by: Caio Marcelo de Oliveira Filho Caio ___ mesa-dev mailing list mesa-dev@list

Re: [Mesa-dev] [PATCH 1/5] util/hash_table: Don't hash the deleted and freed keys

2019-08-05 Thread Caio Marcelo de Oliveira Filho
you can use the entire u64 value space -- there shouldn't be "bad" or "bogus" keys from the caller perspective. So I think Panfrost should be fine. Caio > On Mon, Aug 05, 2019 at 09:10:00AM -0700, Caio Marcelo de Oliveira Filho > wrote: > > On Mon,

Re: [Mesa-dev] [PATCH 1/5] util/hash_table: Don't hash the deleted and freed keys

2019-08-05 Thread Caio Marcelo de Oliveira Filho
On Mon, Aug 05, 2019 at 05:18:32PM +0200, Tomeu Vizoso wrote: > Some hash functions (eg. key_u64_hash) will attempt to dereference the > key, causing an invalid access when passed DELETED_KEY_VALUE (0x1) or > FREED_KEY_VALUE (0x0). > > The entry.hash field isn't needed by the delete_function, so j

Re: [Mesa-dev] [PATCH] llvmpipe: make remove_shader_variant static.

2019-06-19 Thread Caio Marcelo de Oliveira Filho
5 deletions(-) This patch is `Reviewed-by: Caio Marcelo de Oliveira Filho ` Caio ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] swrast: Rename blend_func->swrast_blend_func

2019-05-10 Thread Caio Marcelo de Oliveira Filho
On Fri, May 10, 2019 at 09:25:06AM -0700, Caio Marcelo de Oliveira Filho wrote: > On Fri, May 10, 2019 at 04:22:05PM +, Alyssa Rosenzweig wrote: > > This avoids a conflict with the new (driver-agnostic) blend_func enum in > > shader_enum.h, which broke the build of swra

Re: [Mesa-dev] [PATCH] swrast: Rename blend_func->swrast_blend_func

2019-05-10 Thread Caio Marcelo de Oliveira Filho
> Fixes: f41be53a ("compiler: Add enums for blend state") > Cc: Caio Marcelo de Oliveira Filho > --- Reviewed-by: Caio Marcelo de Oliveira Filho Caio ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl_to_nir: remove unused type_is_int()

2019-05-07 Thread Caio Marcelo de Oliveira Filho
On Wed, May 08, 2019 at 01:55:53PM +1000, Timothy Arceri wrote: > This was missed in e00fa99b08b3. > > Cc: Christian Gmeiner > --- > src/compiler/glsl/glsl_to_nir.cpp | 9 - > 1 file changed, 9 deletions(-) Reviewed-by: Caio Marcelo

Re: [Mesa-dev] [PATCH 2/3] u_dynarray: return 0 on realloc failure

2019-05-04 Thread Caio Marcelo de Oliveira Filho
Hi, > > diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h > > index b30fd7b1154..f6a81609dbe 100644 > > --- a/src/util/u_dynarray.h > > +++ b/src/util/u_dynarray.h > > @@ -85,20 +85,22 @@ util_dynarray_ensure_cap(struct util_dynarray *buf, > > unsigned newcap) > > buf->capacity

Re: [Mesa-dev] [PATCH] glsl: fix and clean up NV_compute_shader_derivatives support

2019-05-01 Thread Caio Marcelo de Oliveira Filho
Sorry, missed this one. It seems https://github.com/KhronosGroup/GLSL/blob/master/extensions/nv/GLSL_NV_compute_shader_derivatives.txt don't explicitly mention the interaction with EXT_texture_array but seems reasonable to enable those. This patch is Reviewed-by: Caio Marcelo de Oliveira

Re: [Mesa-dev] [PATCH] nir: Fix anonymous union initialization with older GCC.

2019-03-22 Thread Caio Marcelo de Oliveira Filho
mous).’) > > Fixes: 96c32d77763c ("nir/copy_prop_vars: handle load/store of vector > elements") > Signed-off-by: Vinson Lee > --- > src/compiler/nir/nir_opt_copy_prop_vars.c | 10 ++ > 1 files changed, 6 insertions(+), 4 deletions(-) This patch is

Re: [Mesa-dev] [PATCH 3/9] u_dynarray: add util_dynarray_enlarge

2019-03-15 Thread Caio Marcelo de Oliveira Filho
On Sat, Mar 16, 2019 at 09:28:48AM +0800, Qiang Yu wrote: > This is for the case that user only know a max size > it wants to append to the array and enlarge the array > capacity before writing into it. > > Signed-off-by: Qiang Yu > --- > src/util/u_dynarray.h | 19 +++ > 1 file

Re: [Mesa-dev] [PATCH] nir/builder: Emit better code for iadd/imul_imm

2019-03-07 Thread Caio Marcelo de Oliveira Filho
nsertions(+), 2 deletions(-) Reviewed-by: Caio Marcelo de Oliveira Filho There's a single case in src/compiler/spirv/vtn_variables.c:^vtn_access_link_as_ssa that does a check for != 1 before multiply. Maybe remove it too? > diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/ni

Re: [Mesa-dev] [PATCH] spirv: Add missing break

2019-02-13 Thread Caio Marcelo de Oliveira Filho
Reviewed-by: Caio Marcelo de Oliveira Filho On Wed, Feb 13, 2019 at 03:03:59PM -0800, Ian Romanick wrote: > From: Ian Romanick > > Fixes: c6465fec0c5 ("spirv: add SpvCapabilityInt64Atomics") > CID: 1442555 > --- > src/compiler/spirv/spirv_to_nir.c | 1 + &g

[Mesa-dev] [PATCH] nir: fix example in opt_peel_loop_initial_if description

2019-02-12 Thread Caio Marcelo de Oliveira Filho
--- src/compiler/nir/nir_opt_if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c index 9afb901be14..170caaad89d 100644 --- a/src/compiler/nir/nir_opt_if.c +++ b/src/compiler/nir/nir_opt_if.c @@ -96,7 +96,7 @@

Re: [Mesa-dev] [PATCH] nir: remove jump from two merging jump-ending blocks

2019-02-12 Thread Caio Marcelo de Oliveira Filho
tinue block and keep the one from continue list, as it will be > executed first. > > CC: Jason Ekstrand > --- > src/compiler/nir/nir_opt_if.c | 21 +++-- > 1 file changed, 19 insertions(+), 2 deletions(-) Reviewed-by: Caio Marcelo de Oliveira Filho > dif

Re: [Mesa-dev] [PATCH] nir: allow stitching of non-empty block

2019-02-12 Thread Caio Marcelo de Oliveira Filho
Just saw your patch. I'll review that one then :-) On Tue, Feb 12, 2019 at 09:38:32AM -0800, Caio Marcelo de Oliveira Filho wrote: > Hi Juan, > > On Tue, Feb 12, 2019 at 04:37:23PM +0100, Juan A. Suarez Romero wrote: > > On Fri, 2019-02-08 at 15:39 -0600, Jason Ekstrand

Re: [Mesa-dev] [PATCH] nir: allow stitching of non-empty block

2019-02-12 Thread Caio Marcelo de Oliveira Filho
Hi Juan, On Tue, Feb 12, 2019 at 04:37:23PM +0100, Juan A. Suarez Romero wrote: > On Fri, 2019-02-08 at 15:39 -0600, Jason Ekstrand wrote: > > I had a chat with Caio about this and I'm skeptical. In general, users of > > the CF manipulation code shouldn't be stitching two blocks together where

Re: [Mesa-dev] [PATCH] intel/fs: Use enumerated array assignments in fb read TXF setup

2019-02-06 Thread Caio Marcelo de Oliveira Filho
This patch is Reviewed-by: Caio Marcelo de Oliveira Filho On Wed, Feb 06, 2019 at 04:43:00PM -0600, Jason Ekstrand wrote: > It's more clear and means we don't have to update the array every time > we add an optional texture instruction argument > --- > src/intel/compil

[Mesa-dev] [MR] intel: Skip bit6 swizzle test in Gen8+

2019-01-31 Thread Caio Marcelo de Oliveira Filho
iginated from a conversation with Ken. Caio Marcelo de Oliveira Filho (3): i965: skip bit6 swizzle detection in Gen8+ anv: skip bit6 swizzle detection in Gen8+ isl: assert that Gen8+ don't have bit6_swizzling Series diff --stat src/intel/isl/isl.c | 3 +

[Mesa-dev] [MR] nir: Copy propagate indirect access of vector elements

2019-01-29 Thread Caio Marcelo de Oliveira Filho
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/171 Depends on https://gitlab.freedesktop.org/mesa/mesa/merge_requests/121, only the last three commits are new. Caio Marcelo de Oliveira Filho (3): nir/copy_prop_vars: add tests for indirect array deref nir/copy_prop_vars

Re: [Mesa-dev] [PATCH] nir: allow stitching of non-empty block

2019-01-26 Thread Caio Marcelo de Oliveira Filho
This patch is Reviewed-by: Caio Marcelo de Oliveira Filho On Fri, Jan 25, 2019 at 06:37:33PM +0100, Juan A. Suarez Romero wrote: > When stitching two blocks A and B, where A's last instruction is a jump, > it is not required that B is empty; it can be plainly removed. > > Thi

Re: [Mesa-dev] [PATCH] meson: Fix typo.

2019-01-26 Thread Caio Marcelo de Oliveira Filho
This patch is Reviewed-by: Caio Marcelo de Oliveira Filho Since it fixes a patch that were marked for stable, maybe add CC: stable for this one too? On Sat, Jan 26, 2019 at 08:28:20AM +, Vinson Lee wrote: > meson.build:166:21: ERROR: Unknown method "verson_compare"

Re: [Mesa-dev] Thoughts after hitting 100 merge requests?

2019-01-23 Thread Caio Marcelo de Oliveira Filho
On Wed, Jan 23, 2019 at 11:01:46AM +, Eric Engestrom wrote: > On Friday, 2019-01-11 09:50:25 -0800, Caio Marcelo de Oliveira Filho wrote: > [snip] > > - To find the discussion associated with a commit in master, I'd > > search the title in the mailing list archive

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Caio Marcelo de Oliveira Filho
Hi, > > The different problem I've found was that uses in the phi instruction > > after the then/else blocks was being replaced, causing churn in the > > optimizations further on. As a hack, I've ignored phi instructions in > > the use loop above. HURTs are gone and HELPs continued. > > > > The

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Caio Marcelo de Oliveira Filho
Hi, > Did you look at any of the HURT? The problem I was seeing was this could end > up stopping copy propagation from working on some UBOs etc. They were not UBO cases like yours, but looking at them I've found a different problem. > However with this patch we end up with: > > load UBO at off

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Caio Marcelo de Oliveira Filho
ult: > + return false; > + } > + > + return false; Optional: unless you plan to add more cases here, consider replacing the switch with an if (alu->op == ... || alu->op == ...), so you don't have this noise at the end. With the 

Re: [Mesa-dev] [PATCH] vulkan: make generated enum to strings helpers available from c++

2019-01-22 Thread Caio Marcelo de Oliveira Filho
Reviewed-by: Caio Marcelo de Oliveira Filho On Tue, Jan 22, 2019 at 05:36:56PM +, Lionel Landwerlin wrote: > Signed-off-by: Lionel Landwerlin > --- > src/vulkan/util/gen_enum_to_str.py | 8 > 1 file changed, 8 insertions(+) > > diff --git a/src/vulkan/util/gen_e

Re: [Mesa-dev] [PATCH] util: fix off-by-one when loading source

2019-01-20 Thread Caio Marcelo de Oliveira Filho
On Sun, Jan 20, 2019 at 09:09:56AM +, Eric Engestrom wrote: > Yeah, I had that change locally, but didn't push it :] > > Reviewed-by: Eric Engestrom > > > > > 7c8ee3f0f "util: simplify string duplication logic" > > "Fixes:" ? Fixed "Fixes" and pushed :-) Caio ___

Re: [Mesa-dev] [PATCH] util: fix off-by-one when loading source

2019-01-19 Thread Caio Marcelo de Oliveira Filho
Sorry for the wrong list. Sent again to piglit@. On Sat, Jan 19, 2019 at 03:40:01PM -0800, Caio Marcelo de Oliveira Filho wrote: > One extra character is leaking from the text into the copied line. > The "+ 1" is an artifact from when malloc was used, strndup will add > t

[Mesa-dev] [PATCH] util: fix off-by-one when loading source

2019-01-19 Thread Caio Marcelo de Oliveira Filho
One extra character is leaking from the text into the copied line. The "+ 1" is an artifact from when malloc was used, strndup will add the extra '\0' after copying text_size bytes (if available). 7c8ee3f0f "util: simplify string duplication logic" --- tests/util/piglit-shader-test.c | 2 +- 1 fi

[Mesa-dev] [MR] nir: check NIR_SKIP to skip passes by name

2019-01-17 Thread Caio Marcelo de Oliveira Filho
"Passes' function names, separated by comma, listed in NIR_SKIP environment variable will be skipped in debug mode. The mechanism is hooked into the _PASS macro, like NIR_PRINT." https://gitlab.freedesktop.org/mesa/mesa/merge_requests/130 Caio ___

[Mesa-dev] [MR] Copy propagate direct access of vector elements

2019-01-16 Thread Caio Marcelo de Oliveira Filho
--- src/compiler/nir/tests/vars_tests.cpp | 284 ++ 3 files changed, 552 insertions(+), 176 deletions(-) Caio Marcelo de Oliveira Filho

Re: [Mesa-dev] Thoughts after hitting 100 merge requests?

2019-01-14 Thread Caio Marcelo de Oliveira Filho
On Mon, Jan 14, 2019 at 12:36:26PM +, Daniel Stone wrote: > FWIW, if you go to > https://gitlab.freedesktop.org/mesa/mesa/commit/SHA1 then you get a > hyperlink from the web UI which points you to the MR. The API to do > this is pretty straightforward and amenable to piping through jq: > https:

[Mesa-dev] [MR] util: Helper to create sets and hashes with pointer keys

2019-01-11 Thread Caio Marcelo de Oliveira Filho
Just a small convenience patch I had sitting here for a while. https://gitlab.freedesktop.org/mesa/mesa/merge_requests/104 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] Thoughts after hitting 100 merge requests?

2019-01-11 Thread Caio Marcelo de Oliveira Filho
On Fri, Jan 11, 2019 at 10:57:16AM -0600, Jason Ekstrand wrote: > All, > > The mesa project has now hit 100 merge requests (36 are still open). I > (and I'm sure others) would be curious to hear people's initial thoughts on > the process. What's working well? What's not working? Is it total fa

[Mesa-dev] [PATCH v2] nir: fix warning in nir_lower_io.c

2019-01-08 Thread Caio Marcelo de Oliveira Filho
Initialize the variable with NULL. Fixes the following In file included from ../src/compiler/nir/nir_lower_io.c:34: ../src/compiler/nir/nir_lower_io.c: In function ‘nir_lower_explicit_io’: ../src/compiler/nir/nir.h:668:11: warning: ‘addr’ may be used uninitialized in this function [-

[Mesa-dev] [PATCH] nir: fix warning in nir_lower_io.c

2019-01-08 Thread Caio Marcelo de Oliveira Filho
Add unreachable case for invalid deref type. Fixes the warning below In file included from ../src/compiler/nir/nir_lower_io.c:34: ../src/compiler/nir/nir_lower_io.c: In function ‘nir_lower_explicit_io’: ../src/compiler/nir/nir.h:668:11: warning: ‘addr’ may be used uninitialized in thi

Re: [Mesa-dev] [PATCH 1/2] spirv: Sort supported capabilities

2019-01-07 Thread Caio Marcelo de Oliveira Filho
This and the other patch are Reviewed-by: Caio Marcelo de Oliveira Filho On Mon, Jan 07, 2019 at 10:53:09AM -0600, Jason Ekstrand wrote: > --- > src/amd/vulkan/radv_shader.c| 24 - > src/compiler/shader_info.h | 34 ---

[Mesa-dev] Two MRs related to NIR copy_prop_vars

2018-12-17 Thread Caio Marcelo de Oliveira Filho
Hi, nir: properly find the entry to keep in copy_prop_vars https://gitlab.freedesktop.org/mesa/mesa/merge_requests/23 Fixes https://bugs.freedesktop.org/show_bug.cgi?id=108624. nir: properly clear the entry sources in copy_prop_vars https://gitlab.freedesktop.org/mesa/mesa/merge_requests/24

[Mesa-dev] [PATCH v3] nir: Copy propagation between blocks

2018-10-15 Thread Caio Marcelo de Oliveira Filho
Extend the pass to propagate the copies information along the control flow graph. It performs two walks, first it collects the vars that were written inside each node. Then it walks applying the copy propagation using a list of copies previously available. At each node the list is invalidated acc

Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-15 Thread Caio Marcelo de Oliveira Filho
> > > > +{ > > > > + bool progress = false; > > > > + > > > > + /* Find writes that are unused and can be removed. */ > > > > + util_dynarray_foreach_reverse(unused_writes, struct write_entry, > > > > entry) { > > > > + nir_deref_compare_result comp = nir_compare_derefs(dst, > > entry->d

Re: [Mesa-dev] [PATCH 11/11] nir: Copy propagation between blocks

2018-10-15 Thread Caio Marcelo de Oliveira Filho
Hi, > > + } > > + > > + if (new_written) { > > + /* Merge new information to the parent control flow node. */ > > + if (written) { > > + written->modes |= new_written->modes; > > + struct hash_entry *ht_entry; > > + hash_table_foreach(new_written->derefs, ht_e

Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-15 Thread Caio Marcelo de Oliveira Filho
Hi, > > +{ > > + bool progress = false; > > + > > + /* Find writes that are unused and can be removed. */ > > + util_dynarray_foreach_reverse(unused_writes, struct write_entry, > > entry) { > > + nir_deref_compare_result comp = nir_compare_derefs(dst, entry->dst); > > + if (comp &

Re: [Mesa-dev] [PATCH] i965/miptree: Use enum instead of boolean.

2018-10-10 Thread Caio Marcelo de Oliveira Filho
On Wed, Oct 10, 2018 at 10:41:43AM -0700, Rafael Antognolli wrote: > ISL_AUX_USAGE_NONE happens to be the same as "false", but let's do the > right thing and use the enum. > --- Reviewed-by: Caio Marcelo de Oliveira Filho I think intel_miptree_finish_depth() in intel_mi

Re: [Mesa-dev] [PATCH] intel/fs: Fix a typo in need_matching_subreg_offset

2018-10-01 Thread Caio Marcelo de Oliveira Filho
1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Caio Marcelo de Oliveira Filho ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] Where to send Crucible patches?

2018-09-28 Thread Caio Marcelo de Oliveira Filho
> > Where should new contributions go? > > > > - pig...@lists.freedesktop.org > > - mesa-dev@lists.freedesktop.org > > - merge requests in GitLab > > Yes; I believe GitLab MR are now used for crucible development. Thanks for the clarification. Created https://gitlab.freedesktop.org/mesa/crucibl

Re: [Mesa-dev] [PATCH] intel/compiler: Export TCS passthrough creation

2018-09-28 Thread Caio Marcelo de Oliveira Filho
On Fri, Sep 21, 2018 at 10:37:38PM +0200, Jason Ekstrand wrote: > Wiring up TCS in some other driver? Pushed early this week. It was for Iris :-) Thanks, Caio ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailm

[Mesa-dev] Where to send Crucible patches?

2018-09-26 Thread Caio Marcelo de Oliveira Filho
Hi, I was a bit unsure about where to send Crucible(*) patches, neither README or HACKING file has the answer. In #dri-devel channel people were also not sure. I've ended up sending to piglit mailing list, but found out later some potential reviewers don't subscribe to it. Where should new cont

[Mesa-dev] [PATCH] intel/compiler: Export TCS passthrough creation

2018-09-21 Thread Caio Marcelo de Oliveira Filho
Move create_passthrough_tcs() from i965 so can be used in other contexts. --- src/intel/compiler/brw_nir.c| 81 src/intel/compiler/brw_nir.h| 5 ++ src/mesa/drivers/dri/i965/brw_tcs.c | 83 + 3 files changed, 87 insertions(+

Re: [Mesa-dev] [PATCH 02/11] util: Add macro to get number of elements in dynarray

2018-09-21 Thread Caio Marcelo de Oliveira Filho
On Fri, Sep 21, 2018 at 09:28:53AM +0200, Christian Gmeiner wrote: > Am Sa., 15. Sep. 2018 um 07:45 Uhr schrieb Caio Marcelo de Oliveira > Filho : > > > > --- > > > > I've ended up not using this macro in this series, but it is useful > > for other cases, s

[Mesa-dev] [PATCH] i965: remove outdated comment about TCS passthrough

2018-09-17 Thread Caio Marcelo de Oliveira Filho
Since commit 75881bed9e1 "i965: Rework the TCS passthrough shader to use NIR." the created nir_shader is not dummy, and it is compiled by the backend like the others. --- src/mesa/drivers/dri/i965/brw_tcs.c | 4 1 file changed, 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c

Re: [Mesa-dev] Lets talk about autotools

2018-09-17 Thread Caio Marcelo de Oliveira Filho
> Quoting Marek Olšák (2018-09-17 14:25:36) > > Where do I find default values for meson configure options? > > > > Thanks, > > Marek > > The meson_options.txt file has the default options. A lot of them are > unfortunately just "auto", which is the downside of having a single build > system > t

Re: [Mesa-dev] Lets talk about autotools

2018-09-17 Thread Caio Marcelo de Oliveira Filho
On Mon, Sep 17, 2018 at 06:11:37PM -0400, Marek Olšák wrote: > 'meson configure' returns 'auto' for a lot of options. I'm interested > in what meson chose. I see what you mean now, thanks for clarification. Even though meson sets replacement values when it sees 'auto', it doesn't update the optio

Re: [Mesa-dev] Lets talk about autotools

2018-09-17 Thread Caio Marcelo de Oliveira Filho
On Mon, Sep 17, 2018 at 05:18:52PM -0400, Marek Olšák wrote: > If I configure meson, how can I know which state trackers, APIs, and > backends are enabled? 'meson configure' in the build directory gives you that information (at least some of it). That might give you some information. Part of the

Re: [Mesa-dev] Lets talk about autotools

2018-09-17 Thread Caio Marcelo de Oliveira Filho
On Mon, Sep 17, 2018 at 05:30:22PM -0400, Marek Olšák wrote: > Is there any documentation for configure options? Or do I have to do > "grep get_option meson.build" to get the list at least? The options are fully described in meson_options.txt file. 'meson configure' in a build directory will pret

[Mesa-dev] [PATCH 07/11] freedreno/ir3: Use the separated dead write vars pass

2018-09-14 Thread Caio Marcelo de Oliveira Filho
No changes to shader-db expected. --- src/gallium/drivers/freedreno/ir3/ir3_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_nir.c index db1d74fdee7..d5f42f2a231 100644 --- a/src/gallium/drivers/freedreno

[Mesa-dev] [PATCH 09/11] nir: Add tests for copy propagation of derefs

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Also tests for removal of redundant loads, that we currently handle as part of the copy propagation. --- src/compiler/nir/tests/vars_tests.cpp | 300 ++ 1 file changed, 300 insertions(+) diff --git a/src/compiler/nir/tests/vars_tests.cpp b/src/compiler/nir/tests/vars_test

[Mesa-dev] [PATCH 08/11] nir: Remove handling of dead writes from copy_prop_vars

2018-09-14 Thread Caio Marcelo de Oliveira Filho
These are covered by another pass now. --- src/compiler/nir/nir_opt_copy_prop_vars.c | 84 +++ 1 file changed, 8 insertions(+), 76 deletions(-) diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c index 9fecaf0eeec..5276aa176d8 10

[Mesa-dev] [PATCH 11/11] nir: Copy propagation between blocks

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Extend the pass to propagate the copies information along the control flow graph. It performs two walks, first it collects the vars that were written inside each node. Then it walks applying the copy propagation using a list of copies previously available. At each node the list is invalidated acc

[Mesa-dev] [PATCH 06/11] intel/nir: Use the separated dead write vars pass

2018-09-14 Thread Caio Marcelo de Oliveira Filho
No changes to shader-db. --- src/intel/compiler/brw_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index b38c3ba383d..77938efae31 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -553,6 +553,7 @@

[Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Instead of doing this as part of the existing copy_prop_vars pass. Separation makes easier to expand the scope of both passes to be more than per-block. For copy propagation, the information about valid copies comes from previous instructions; while the dead write removal depends on information f

[Mesa-dev] [PATCH 10/11] nir: Take call instruction into account in copy_prop_vars

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Calls are not used yet (functions are inlined), but since new code is already taking them into account, do it here too. The convention here and in other places is that no writable memory is assumed to remain unchanged, as well as global variables. Also, explicitly state the modes affected (instea

[Mesa-dev] [PATCH 02/11] util: Add macro to get number of elements in dynarray

2018-09-14 Thread Caio Marcelo de Oliveira Filho
--- I've ended up not using this macro in this series, but it is useful for other cases, so kept it here. src/util/u_dynarray.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h index f74bfc7080b..53dde9241bb 100644 --- a/src/util/u_dynarray.h +++

[Mesa-dev] [PATCH 04/11] nir: Add tests for dead write elimination

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Note at the moment the pass called is nir_opt_copy_prop_vars, because dead write elimination is implemented there. Also added tests that involve identifying dead writes in multiple blocks (e.g. the overwrite happens in another block). Those currently fail as expected, so are marked to be skipped.

[Mesa-dev] [PATCH 03/11] nir: Add test file for vars related passes

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Add basic helpers for doing tests on the vars related optimization passes. The main goal is to lower the barrier to create tests during development and debugging of the passes. Full coverage is not a requirement. --- src/compiler/Makefile.nir.am | 34 +++-- src/compiler/nir/meson.build

[Mesa-dev] [PATCH 00/11] NIR Copy Propagation between blocks

2018-09-14 Thread Caio Marcelo de Oliveira Filho
the copies, or only the fully qualified load/stores, or handle only scalars (after a vec to scalar pass). For now, I've shelved the global optimization for dead write removal. It wasn't helping any cases, so will wait until we have more derefs around to see the difference. Caio Marcelo

[Mesa-dev] [PATCH 01/11] util: Add foreach_reverse for dynarray

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Useful to walk the array removing elements by swapping them with the last element. --- src/util/u_dynarray.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h index 6bea481d44b..f74bfc7080b 100644 --- a/src/util/u_dynarray.h +++ b/src/util/u_dy

[Mesa-dev] [PATCH] util: Helper to create sets and hashes with pointer keys

2018-09-12 Thread Caio Marcelo de Oliveira Filho
These combinations are common enough and deserve a shortcut. --- src/util/hash_table.c | 10 ++ src/util/hash_table.h | 3 +++ src/util/set.c| 12 src/util/set.h| 3 +++ 4 files changed, 28 insertions(+) diff --git a/src/util/hash_table.c b/src/util/hash_tab

Re: [Mesa-dev] [PATCH] intel/nir: Lowering image loads and stores trashes all metadata

2018-08-30 Thread Caio Marcelo de Oliveira Filho
_bug.cgi?id=107745 > Fixes: 37f7983bcca1 "intel/compiler: Do image load/store lowering..." > --- > src/intel/compiler/brw_nir_lower_image_load_store.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Caio Marcelo de Oliveira Filho

Re: [Mesa-dev] [PATCH 5/9] nir: Add a local dead write vars removal pass

2018-08-29 Thread Caio Marcelo de Oliveira Filho
Jason Ekstrand writes: >> >> +static bool >> >> +remove_dead_write_vars_local(struct state *state, nir_block *block) >> >> +{ >> >> + bool progress = false; >> >> + >> >> + struct util_dynarray unused_writes; >> >> + util_dynarray_init(&unused_writes, state->mem_ctx); >> >> + >> >> + nir_

[Mesa-dev] [PATCH] nir: Remove outdated comment

2018-08-27 Thread Caio Marcelo de Oliveira Filho
--- The move of comapre functions landed before the suggestion to remove the comment, so removing it now. src/compiler/nir/nir_deref.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index c8851688f9d..097ea8f1046 100644 --- a/src

Re: [Mesa-dev] [PATCH 5/9] nir: Add a local dead write vars removal pass

2018-08-27 Thread Caio Marcelo de Oliveira Filho
(Disregard the incomplete mail, still adapting to notmuch-emacs). Jason Ekstrand writes: >> +static nir_deref_path * >> +get_path(struct state *state, nir_deref_instr *deref) >> +{ >> + struct hash_entry *entry = _mesa_hash_table_search(state->paths, >> deref); >> + if (!entry) { >> + n

Re: [Mesa-dev] [PATCH 5/9] nir: Add a local dead write vars removal pass

2018-08-27 Thread Caio Marcelo de Oliveira Filho
Jason Ekstrand writes: > On Wed, Aug 15, 2018 at 4:57 PM Caio Marcelo de Oliveira Filho < > caio.olive...@intel.com> wrote: > >> Instead of doing this as part of the existing (local) copy prop vars >> pass. This is an intermediate step before changing both the dead

Re: [Mesa-dev] [PATCH 6/9] nir: Make dead_write_vars pass global

2018-08-27 Thread Caio Marcelo de Oliveira Filho
Jason Ekstrand writes: > On Sat, Aug 25, 2018 at 9:40 AM Jason Ekstrand wrote: > >> Sorry I haven't given you any in-line review yet. I've been letting this >> pass simmer in my brain a bit and thinking about complexity and data >> structures. Here's a few questions for which I do not expect y

Re: [Mesa-dev] [PATCH 0/5] Emit BRW_AOP_INC or BRW_AOP_DEC

2018-08-24 Thread Caio Marcelo de Oliveira Filho
Ian Romanick writes: > I don't know why we never did this. Almost every shader in shader-db > that uses atomicAdd or imageAtomicAdd uses it with a constant of 1 or > -1. Nice. The series is Reviewed-by: Caio Marcelo de Oliveira Filho

Re: [Mesa-dev] [PATCH v2 08/11] nir: Add a array-of-vector variable shrinking pass

2018-08-23 Thread Caio Marcelo de Oliveira Filho
it_vars.c | 694 ++ > 2 files changed, 695 insertions(+) This patch and the one that enables the pass are Reviewed-by: Caio Marcelo de Oliveira Filho I have some suggestions below, pick the ones you like. (...) > +static void > +mark_deref_use

Re: [Mesa-dev] [PATCH v2 11/11] intel/nir: Enable nir_opt_find_array_copies

2018-08-23 Thread Caio Marcelo de Oliveira Filho
reads instead of making a copy of 4.5 KiB of input data > and then indirecting on it with if-ladders. > --- > src/intel/compiler/brw_nir.c | 16 +--- > src/intel/compiler/brw_nir.h | 3 ++- > 2 files changed, 11 insertions(+), 8 deletions(-) Given the comment mentioned below i

Re: [Mesa-dev] [PATCH mesa] vk/wsi: avoid reading uninitialised memory

2018-08-22 Thread Caio Marcelo de Oliveira Filho
ninitialised memory. > > While at it, drop the unused assignment right before returning. > > Signed-off-by: Eric Engestrom > --- > src/vulkan/wsi/wsi_common_x11.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-b

Re: [Mesa-dev] [PATCH] nir/vars_to_ssa: Don't build deref nodes for non-local variables

2018-08-22 Thread Caio Marcelo de Oliveira Filho
On Mon, Jul 09, 2018 at 05:11:54PM -0700, Jason Ekstrand wrote: > --- > src/compiler/nir/nir_lower_vars_to_ssa.c | 18 ++ > 1 file changed, 14 insertions(+), 4 deletions(-) This patch is Reviewed-by: Caio Marcelo de Oliveira Filho I also verified it pass the test

Re: [Mesa-dev] [PATCH v2 10/11] nir: Add an array copy optimization

2018-08-22 Thread Caio Marcelo de Oliveira Filho
> I've applied your suggestions. Please double-check: > > https://gitlab.freedesktop.org/jekstrand/mesa/commit/28c01e9a0ce84ff53fa8805e4a35a691ea3fc744 Reviewed-by: Caio Marcelo de Oliveira Filho ___ mesa-dev mailing

Re: [Mesa-dev] [PATCH v2 08/11] nir: Add a array-of-vector variable shrinking pass

2018-08-21 Thread Caio Marcelo de Oliveira Filho
On Tue, Aug 21, 2018 at 06:15:20PM -0500, Jason Ekstrand wrote: > On Tue, Aug 21, 2018 at 5:55 PM Caio Marcelo de Oliveira Filho < > caio.olive...@intel.com> wrote: > > > Hi, > > > > On Sat, Jul 28, 2018 at 10:44:39PM -0700, Jason Ekstrand wrote: > > > Th

Re: [Mesa-dev] [PATCH v2 10/11] nir: Add an array copy optimization

2018-08-21 Thread Caio Marcelo de Oliveira Filho
a few minor comments and a comment about store write mask. Assuming those are resolved this patch is: Reviewed-by: Caio Marcelo de Oliveira Filho Note: the "deref_map" (well, an evolution of it) from the dead write elimination series, could be used to keep track of multiple of such copies

Re: [Mesa-dev] [PATCH v2 09/11] intel/nir: Use nir_shrink_vec_array_vars

2018-08-21 Thread Caio Marcelo de Oliveira Filho
> diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c > index 96ad77c3906..5e9da9e1ef2 100644 > --- a/src/intel/compiler/brw_nir.c > +++ b/src/intel/compiler/brw_nir.c > @@ -542,6 +542,7 @@ brw_nir_optimize(nir_shader *nir, const struct > brw_compiler *compiler, > do { >

Re: [Mesa-dev] [PATCH v2 08/11] nir: Add a array-of-vector variable shrinking pass

2018-08-21 Thread Caio Marcelo de Oliveira Filho
Hi, On Sat, Jul 28, 2018 at 10:44:39PM -0700, Jason Ekstrand wrote: > This pass looks for variables with vector or array-of-vector types and > narrows the type to only the components used. > --- > src/compiler/nir/nir.h| 1 + > src/compiler/nir/nir_split_vars.c | 694 +++

Re: [Mesa-dev] [PATCH v2 07/11] intel/nir: Use the new structure and array splitting passes

2018-08-20 Thread Caio Marcelo de Oliveira Filho
to be > lowered to SSA values is fairly advanced. > --- > src/intel/compiler/brw_nir.c | 2 ++ > 1 file changed, 2 insertions(+) This patch is Reviewed-by: Caio Marcelo de Oliveira Filho > diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c > index 5990427b731..

Re: [Mesa-dev] [PATCH v2.1 6/11] nir: Add an array splitting pass

2018-08-20 Thread Caio Marcelo de Oliveira Filho
: > - Fix a couple of bugs that were added in the rework including one >which basically prevented it from running > --- > src/compiler/nir/nir.h| 1 + > src/compiler/nir/nir_split_vars.c | 583 ++ > 2 files changed, 584 insert

Re: [Mesa-dev] [PATCH v2 05/11] nir: Add a structure splitting pass

2018-08-20 Thread Caio Marcelo de Oliveira Filho
/compiler/nir/nir.h| 1 + > src/compiler/nir/nir_split_vars.c | 271 ++ > 4 files changed, 274 insertions(+) > create mode 100644 src/compiler/nir/nir_split_vars.c With the fix below, this patch is Reviewed-by: Caio Marcelo de Oliveira Filho >

Re: [Mesa-dev] [PATCH 02/13] glsl: Add built-in functions for NV_shader_atomic_float

2018-08-20 Thread Caio Marcelo de Oliveira Filho
> > Question: why some builtins care about "supported" while other care > > about the extension being "enabled"? > > There are actually two different things happening. In the cases where > we only care about the extension being supported, we're creating a > hidden intrinsic function. These are u

Re: [Mesa-dev] [PATCH 00/13] Implement INTEL_shader_atomic_float_minmax

2018-08-20 Thread Caio Marcelo de Oliveira Filho
> The code is here: > > > https://cgit.freedesktop.org/~idr/mesa/log/?h=INTEL_shader_atomic_float_minmax The series is Reviewed-by: Caio Marcelo de Oliveira Filho I'd consider adding some clarification about not quietizing sNaN and/or relaxing the definition in

Re: [Mesa-dev] [PATCH 02/13] glsl: Add built-in functions for NV_shader_atomic_float

2018-08-20 Thread Caio Marcelo de Oliveira Filho
Hi, > @@ -1133,6 +1159,9 @@ builtin_builder::create_intrinsics() > _atomic_intrinsic2(buffer_atomics_supported, > glsl_type::int_type, > ir_intrinsic_generic_atomic_add), > +_atomic_intrinsic2(

Re: [Mesa-dev] [PATCH 09/13] nir: Add floating point atomic min, max, and compare-swap instrinsics

2018-08-17 Thread Caio Marcelo de Oliveira Filho
On Fri, Jun 22, 2018 at 10:03:54PM -0700, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/compiler/glsl/glsl_to_nir.cpp| 32 > ++-- > src/compiler/nir/nir_intrinsics.py | 11 +- > src/compiler/nir/nir_lo

Re: [Mesa-dev] [PATCH 12/13] i965: Sort Gen9+ extension enables

2018-08-17 Thread Caio Marcelo de Oliveira Filho
This patch is Reviewed-by: Caio Marcelo de Oliveira Filho On Fri, Jun 22, 2018 at 10:03:57PM -0700, Ian Romanick wrote: > From: Ian Romanick > > This is a strictly alphabetic sort, as is done in extensions_table.h > There are other options. We should pick one and document it.

Re: [Mesa-dev] [PATCH 10/13] intel/compiler: Silence unused parameter warnings

2018-08-17 Thread Caio Marcelo de Oliveira Filho
You've fixed the warnings in "generate_*" functions in another patch that landed. I guess this commit also fixed and the rebase was clean, but the commit message remained. With that update to the commit message, this patch is Reviewed-by: Caio Marcelo de Oliveira Filho On Fr

Re: [Mesa-dev] [PATCH 11/13] intel/compiler: Implement untyped atomic float min, max, and compare-swap dataport messages

2018-08-17 Thread Caio Marcelo de Oliveira Filho
deletions(-) Regardless of the suggestion above, this patch is Reviewed-by: Caio Marcelo de Oliveira Filho ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 03/13] docs: Initial version of INTEL_shader_atomic_float_minmax spec

2018-08-16 Thread Caio Marcelo de Oliveira Filho
Hello, > +(add a new row after the exiting "atomicMax" table row, p. 179) > + > +float atomicMax(inout float mem, float data) > + > +Computes a new value by taking the maximum of the value of data and > + the contents of mem. If one of these is an IEEE signaling NaN (i.e.,

Re: [Mesa-dev] [PATCH 1/9] util/dynarray: add a clone function

2018-08-16 Thread Caio Marcelo de Oliveira Filho
On Thu, Aug 16, 2018 at 07:29:40AM +0200, Thomas Helland wrote: > 2018-08-15 23:56 GMT+02:00 Caio Marcelo de Oliveira Filho > : > > --- > > src/util/u_dynarray.h | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git a/src/util/u_dynarray

Re: [Mesa-dev] [PATCH mesa] i965: drop duplicate assignments

2018-08-16 Thread Caio Marcelo de Oliveira Filho
On Thu, Aug 16, 2018 at 04:00:16PM +0100, Eric Engestrom wrote: > These are all already assigned when declared, a few lines above. > > Signed-off-by: Eric Engestrom > --- > Note: I'm not 100% certain the value can never change by the time this > second assignment is done, so maybe it's the initia

[Mesa-dev] [PATCH 4/9] nir: Give end_block its own index

2018-08-15 Thread Caio Marcelo de Oliveira Filho
Since there's no particular reason for the index to be 0, choose an index that is not used by other block. This is convenient when we store "per-block" data in an array AND look for the successors data (e.g. any kind of backwards data-flow analysis). --- src/compiler/nir/nir.c | 2 +- 1 file chan

[Mesa-dev] [PATCH 5/9] nir: Add a local dead write vars removal pass

2018-08-15 Thread Caio Marcelo de Oliveira Filho
Instead of doing this as part of the existing (local) copy prop vars pass. This is an intermediate step before changing both the dead write and the copy prop vars to act on the whole program instead of on local blocks. The nature of data we store and the way we iterate is different enough that wo

  1   2   3   >