On Saturday, December 26, 2015 11:09:24 AM PST Jason Ekstrand wrote:
> When Connor originally drafted NIR, he copied the same function+overload
> system that GLSL IR had with a few names changed. However, this
> double-indirection is not really needed and has only served to confuse
> people. Inst
On Dec 26, 2015 8:15 PM, "Connor Abbott" wrote:
>
> On Sat, Dec 26, 2015 at 9:55 PM, Jason Ekstrand
wrote:
> >
> >
> > On Sat, Dec 26, 2015 at 5:15 PM, Jason Ekstrand
> > wrote:
> >>
> >>
> >>
> >> On Sat, Dec 26, 2015 at 4:59 PM, Connor Abbott
> >> wrote:
> >>>
> >>> On Sat, Dec 26, 2015 at 7:
On Sat, Dec 26, 2015 at 9:55 PM, Jason Ekstrand wrote:
>
>
> On Sat, Dec 26, 2015 at 5:15 PM, Jason Ekstrand
> wrote:
>>
>>
>>
>> On Sat, Dec 26, 2015 at 4:59 PM, Connor Abbott
>> wrote:
>>>
>>> On Sat, Dec 26, 2015 at 7:08 PM, Jason Ekstrand
>>> wrote:
>>> >
>>> > On Dec 26, 2015 3:04 PM, "Con
On Sat, Dec 26, 2015 at 5:15 PM, Jason Ekstrand
wrote:
>
>
> On Sat, Dec 26, 2015 at 4:59 PM, Connor Abbott
> wrote:
>
>> On Sat, Dec 26, 2015 at 7:08 PM, Jason Ekstrand
>> wrote:
>> >
>> > On Dec 26, 2015 3:04 PM, "Connor Abbott" wrote:
>> >>
>> >> On Sat, Dec 26, 2015 at 5:57 PM, Jason Ekstr
On Sat, Dec 26, 2015 at 4:59 PM, Connor Abbott wrote:
> On Sat, Dec 26, 2015 at 7:08 PM, Jason Ekstrand
> wrote:
> >
> > On Dec 26, 2015 3:04 PM, "Connor Abbott" wrote:
> >>
> >> On Sat, Dec 26, 2015 at 5:57 PM, Jason Ekstrand
> >> wrote:
> >> >
> >> > On Dec 26, 2015 2:22 PM, "Connor Abbott"
On Sat, Dec 26, 2015 at 7:08 PM, Jason Ekstrand wrote:
>
> On Dec 26, 2015 3:04 PM, "Connor Abbott" wrote:
>>
>> On Sat, Dec 26, 2015 at 5:57 PM, Jason Ekstrand
>> wrote:
>> >
>> > On Dec 26, 2015 2:22 PM, "Connor Abbott" wrote:
>> >>
>> >> On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand
>> >>
On Dec 26, 2015 3:04 PM, "Connor Abbott" wrote:
>
> On Sat, Dec 26, 2015 at 5:57 PM, Jason Ekstrand
wrote:
> >
> > On Dec 26, 2015 2:22 PM, "Connor Abbott" wrote:
> >>
> >> On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand
> >> wrote:
> >> > This commit adds a NIR pass for lowering away returns i
Reviewed-by: Connor Abbott
On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand wrote:
> When Connor originally drafted NIR, he copied the same function+overload
> system that GLSL IR had with a few names changed. However, this
> double-indirection is not really needed and has only served to confuse
On Sat, Dec 26, 2015 at 5:57 PM, Jason Ekstrand wrote:
>
> On Dec 26, 2015 2:22 PM, "Connor Abbott" wrote:
>>
>> On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand
>> wrote:
>> > This commit adds a NIR pass for lowering away returns in functions. If
>> > the
>> > return is in a loop, it is lowered
On Dec 26, 2015 2:22 PM, "Connor Abbott" wrote:
>
> On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand
wrote:
> > This commit adds a NIR pass for lowering away returns in functions. If
the
> > return is in a loop, it is lowered to a break. If it is not in a loop,
> > it's lowered away by moving/de
On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand wrote:
> This commit adds a NIR pass for lowering away returns in functions. If the
> return is in a loop, it is lowered to a break. If it is not in a loop,
> it's lowered away by moving/deleting code as needed.
> ---
>
> Unfortunately, the loop-ha
---
src/glsl/nir/nir_control_flow.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c
index ecd9cbd..33b06d0 100644
--- a/src/glsl/nir/nir_control_flow.c
+++ b/src/glsl/nir/nir_control_flow.c
@@ -749,6 +749,12 @@ nir_cf_e
---
src/glsl/nir/nir.c | 63 ++
src/glsl/nir/nir.h | 2 ++
2 files changed, 65 insertions(+)
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index 12bd30f..4793673 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -695,6 +695,69
---
src/glsl/nir/glsl_to_nir.cpp | 3 ---
src/glsl/nir/nir.c | 6 --
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index 0d1d0f4..2210e5a 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_
This is useful if you want to clone a single function_impl if, for
instance, you wanted to do function inlining.
---
src/glsl/nir/nir.c | 37 -
src/glsl/nir/nir.h | 2 ++
2 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/src/glsl/nir/nir.c b/src/
When Connor originally drafted NIR, he copied the same function+overload
system that GLSL IR had with a few names changed. However, this
double-indirection is not really needed and has only served to confuse
people. Instead, let's just have functions which may not have unique names
and may or may
This can happen if a function ends in a return instruction and you remove
the return.
---
src/glsl/nir/nir_control_flow.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c
index 96395a4..ecd9cbd 100644
--- a
---
src/glsl/nir/nir_types.cpp | 6 ++
src/glsl/nir/nir_types.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp
index 41ac546..4452ee6 100644
--- a/src/glsl/nir/nir_types.cpp
+++ b/src/glsl/nir/nir_types.cpp
@@ -186,6 +186,12 @@ g
This will be useful for things such as function inlining.
---
src/glsl/nir/nir.h | 3 +-
src/glsl/nir/nir_clone.c | 111 +--
2 files changed, 81 insertions(+), 33 deletions(-)
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index d862bcc..7
---
src/glsl/nir/nir_builder.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/src/glsl/nir/nir_builder.h b/src/glsl/nir/nir_builder.h
index ee6131a..9a5825c 100644
--- a/src/glsl/nir/nir_builder.h
+++ b/src/glsl/nir/nir_builder.h
@@ -324,6 +324,29 @@ nir_store_var(nir
This commit adds a NIR pass for lowering away returns in functions. If the
return is in a loop, it is lowered to a break. If it is not in a loop,
it's lowered away by moving/deleting code as needed.
---
Unfortunately, the loop-handling portion hasn't had proper testing. I'm
pretty sure the appr
This commit adds a new NIR pass that lowers all function calls away by
inlining the functions.
---
There are still two things missing here:
1) We really shouldn't do the inline recursively. We should keep a
hash-table of inlined versions or something.
2) It doesn't properly handle things
This little series adds the basics of what we need to actually do functions
in NIR. We've had NIR function support in theory for some time, but it's
never been used beyond the single-function "void main()" casae. This
series gives us what we need to do it for real.
The first patch, I would like
Otherwise, we have a problem when we go to print functions with arguments
because their names get added to the hash table during declaration which
happens after we print the prototype.
---
src/glsl/nir/nir_print.c | 61
1 file changed, 31 insertions
24 matches
Mail list logo