Re: [Mesa-dev] [PATCH 2/2] nir: fix bug with moves in nir_opt_remove_phis()

2016-09-02 Thread Connor Abbott
bit today. Maybe we should just go ahead and > implement that? For unary ALU operations, phi distribution is a clear win > and mov is definitely unary. Yeah, if we implement that then we can just get rid of the whole thing. > > On Fri, Sep 2, 2016 at 4:28 PM, Connor Abbott wro

Re: [Mesa-dev] [PATCH] nir/tests: Update the CF tests to not assume fake edges

2016-09-04 Thread Connor Abbott
Reviewed-by: Connor Abbott On Sat, Sep 3, 2016 at 2:59 PM, Jason Ekstrand wrote: > In aad4f1550, we removed the concept of "fake" edges from NIR. Now, if you > have a block at the end of an infinite loop it really has no predecessors. > This updates the unit tests to match

Re: [Mesa-dev] [PATCH] glsl: remove interpolateAt* instructions for demoted inputs

2016-09-12 Thread Connor Abbott
Since demoted inputs become global variables, wouldn't it be more efficient to simply turn it into a straight assignment? Then the backend wouldn't have to initialize it to a constant (since it would be undefined). On Fri, Sep 9, 2016 at 10:06 AM, Marek Olšák wrote: > From: Marek Olšák > > This

Re: [Mesa-dev] [PATCH 48/59] nir: Enable 64-bit integer support for almost all unary and binary operations

2016-10-26 Thread Connor Abbott
On Tue, Oct 25, 2016 at 8:59 PM, Ian Romanick wrote: > From: Ian Romanick > > The shift operations are a little weird. NIR expects both operands to > have the same size, but the shift count operand is always 32-bits in > GLSL. Upconvert to make the rest of NIR happy, and we'll assume the > driv

Re: [Mesa-dev] [PATCH 46/59] nir: Add 64-bit integer support for conversions and bitcasts

2016-10-26 Thread Connor Abbott
On Tue, Oct 25, 2016 at 8:59 PM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/compiler/glsl/glsl_to_nir.cpp | 30 +++ > src/compiler/nir/nir_lower_alu_to_scalar.c | 1 + > src/compiler/nir/nir_opcodes.py| 33

Re: [Mesa-dev] [PATCH 00/59] Enable GL_ARB_gpu_shader_int64

2016-10-26 Thread Connor Abbott
On Tue, Oct 25, 2016 at 8:59 PM, Ian Romanick wrote: > Whew! Here it is! There are four main groups to this patch series. > All of this is available at: > > https://cgit.freedesktop.org/~idr/mesa/log/?h=arb_gpu_shader_int64 > > There are some gaps in our current piglit tests. For example, I

Re: [Mesa-dev] [PATCH 48/59] nir: Enable 64-bit integer support for almost all unary and binary operations

2016-10-26 Thread Connor Abbott
On Wed, Oct 26, 2016 at 10:52 PM, Ian Romanick wrote: > On 10/26/2016 03:04 PM, Connor Abbott wrote: >> On Tue, Oct 25, 2016 at 8:59 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> The shift operations are a little weird. NIR expects both operand

Re: [Mesa-dev] [PATCH 48.1/59] nir: Remove incorrect src_size vs dest_size assertions

2016-10-26 Thread Connor Abbott
imilar for the others. If that doesn't work, I could take a look if you push what you tried to fdo. > > Signed-off-by: Ian Romanick > Cc: Connor Abbott > Cc: Jason Ekstrand > --- > src/compiler/nir/nir_builder.h | 4 +--- > src/compiler/nir/nir_validate.c | 7 --- &g

Re: [Mesa-dev] [PATCH 48.1/59 v2] nir: Shift count for shift opcodes is always 32-bits

2016-10-27 Thread Connor Abbott
2:25 assert src_class == src_type_bits > 03:12:25 AssertionError It's pretty great that Jason wrote this validation pass, since otherwise this would've been a rare and hard-to-diagnose failure condition at runtime. Anyways, much better! This patch is Reviewed-by: Connor Abbot

Re: [Mesa-dev] [RFC 0/7] nir, i965/fs: Lower indirect local variables to scratch

2016-12-05 Thread Connor Abbott
I'm a little worried about this since it seems like the load/store_scratch intrinsics are basically doing the same thing as registers were originally intended to do. Either we should use the existing register lowering, and make it conditional on the size like you've done here, or we should just gut

Re: [Mesa-dev] [PATCH 00/50] GL_ARB_gpu_shader_int64... this time for sure!

2016-12-05 Thread Connor Abbott
On Mon, Dec 5, 2016 at 3:22 PM, Matt Turner wrote: > On 12/05, Matt Turner wrote: >> >> On 11/28, Ian Romanick wrote: >>> >>> From: Ian Romanick >>>Patches 42 through 50 enable the extension on BDW+. >> >> >> 42-48 are >> >> Reviewed-by: Matt Turner >> >> I don't understand the 64-bit CMP is

Re: [Mesa-dev] [PATCH 00/50] GL_ARB_gpu_shader_int64... this time for sure!

2016-12-05 Thread Connor Abbott
On Mon, Dec 5, 2016 at 5:09 PM, Connor Abbott wrote: > On Mon, Dec 5, 2016 at 3:22 PM, Matt Turner wrote: >> On 12/05, Matt Turner wrote: >>> >>> On 11/28, Ian Romanick wrote: >>>> >>>> From: Ian Romanick >>>>Patches 42

Re: [Mesa-dev] [PATCH 00/50] GL_ARB_gpu_shader_int64... this time for sure!

2016-12-05 Thread Connor Abbott
On Mon, Dec 5, 2016 at 5:48 PM, Matt Turner wrote: > On Mon, Dec 5, 2016 at 2:20 PM, Connor Abbott wrote: >> On Mon, Dec 5, 2016 at 5:09 PM, Connor Abbott wrote: >>> On Mon, Dec 5, 2016 at 3:22 PM, Matt Turner wrote: >>>> On 12/05, Matt Turner wrote: >>&g

Re: [Mesa-dev] [PATCH 1/2] nir: Add optimization for (a || True == True)

2016-07-07 Thread Connor Abbott
On Thu, Jul 7, 2016 at 12:57 PM, Erik Faye-Lund wrote: > On Thu, Jul 7, 2016 at 2:12 AM, Eric Anholt wrote: >> This was appearing in vc4 VS/CS in mupen64, due to vertex attrib lowering >> producing some constants that were getting compared. >> >> total instructions in shared programs: 112276 -> 1

Re: [Mesa-dev] [GSoC] Update about floating point library

2016-07-23 Thread Connor Abbott
On Sat, Jul 23, 2016 at 3:32 PM, tournier.elie wrote: > Hello, > > I hope you are well and that you enjoy these beautiful summer days. > > You can found a new post on my blog : https://hopetech.github.io/ . > During these few days, I implemented eq_fp64, le_fp64, lt_fp64, mul_fp64, > add_fp64 and

Re: [Mesa-dev] [PATCH 06/95] i965/vec4/nir: fix nir_intrinsic_load_uniform for doubles

2016-07-28 Thread Connor Abbott
On Thu, Jul 28, 2016 at 2:25 AM, Iago Toral wrote: > On Thu, 2016-07-28 at 15:49 +1000, Timothy Arceri wrote: >> On Tue, 2016-07-19 at 12:40 +0200, Iago Toral Quiroga wrote: >> > >> > From: Connor Abbott >> > >> > --- >> > src/mesa/drivers/d

Re: [Mesa-dev] [PATCH 2/7] gallium/auxiliary: Add u_bitcast.h header.

2016-07-28 Thread Connor Abbott
On Thu, Jul 28, 2016 at 7:58 PM, Roland Scheidegger wrote: > Am 29.07.2016 um 00:35 schrieb Matt Turner: >> --- >> src/gallium/auxiliary/Makefile.sources | 1 + >> src/gallium/auxiliary/util/u_bitcast.h | 57 >> ++ >> 2 files changed, 58 insertions(+) >> create

Re: [Mesa-dev] [GSoC] Update about floating point library

2016-07-28 Thread Connor Abbott
ieve "real" softfloat libraries use some kind of integer-based higher-precision thing, but you don't need an exact result so you don't need to be that fancy (again, a good reason why our implementation is probably better to base off of!). Connor > > > Elie > > >

Re: [Mesa-dev] [PATCH 00/19] i965/fs: load_payload on Gen7+.

2014-06-11 Thread Connor Abbott
On Tue, Jun 10, 2014 at 3:34 PM, Matt Turner wrote: > On Wed, May 28, 2014 at 4:44 PM, Connor Abbott wrote: >> On Tue, May 27, 2014 at 9:47 PM, Matt Turner wrote: >>> Here's a respin of my load_payload series from mid-April with some >>> feedback from K

Re: [Mesa-dev] ATI_envmap_bumpmap

2014-06-27 Thread Connor Abbott
On Jun 26, 2014 5:30 PM, "Jason Ekstrand" wrote: > > Right now, the Intel driver is the only driver in mesa that implements this extension. Is anyone using this? Is it ok if we purge it? I'm doing some work on the texture format code and DUDV8 is an ugly special case. > Thanks, > --Jason Ekstra

Re: [Mesa-dev] [PATCH 23/23] i965/disasm: Fix INTEL_DEBUG=fs on Broadwell for ARB_fp applications.

2014-06-29 Thread Connor Abbott
On Sat, Jun 28, 2014 at 9:34 PM, Kenneth Graunke wrote: > Apparently INTEL_DEBUG=fs has crashed on Broadwell for anything using > ARB_fragment_program since commit 9cee3ff5. We need to NULL-check the > right field. > > Signed-off-by: Kenneth Graunke > Cc: "10.2" > --- > src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 0/3] various exec_list things

2014-07-08 Thread Connor Abbott
This series adds a couple things I need to exec_list for my work, and does some cleanups made possible. Only compile tested on i965. Connor Abbott (3): exec_list: add a prepend function exec_list: add a function to count the size of a list exec_list: make various places use the new get_size

[Mesa-dev] [PATCH 1/3] exec_list: add a prepend function

2014-07-08 Thread Connor Abbott
This complements the existing append function. It's implemented in a rather simple way right now; it could be changed if performance is a concern. Signed-off-by: Connor Abbott --- src/glsl/list.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src

[Mesa-dev] [PATCH 2/3] exec_list: add a function to count the size of a list

2014-07-08 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/list.h | 20 1 file changed, 20 insertions(+) diff --git a/src/glsl/list.h b/src/glsl/list.h index ca6ee9d..68ab3fd 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -324,6 +324,8 @@ struct exec_list { const exec_node

[Mesa-dev] [PATCH 3/3] exec_list: make various places use the new get_size() method

2014-07-08 Thread Connor Abbott
Instead of hand-rolling it. Signed-off-by: Connor Abbott --- src/glsl/ast_to_hir.cpp | 4 +--- src/glsl/ir_reader.cpp| 7 +++ src/glsl/opt_function_inlining.cpp| 7 ++- src/mesa/drivers/dri/i965/brw_fs.cpp

Re: [Mesa-dev] [PATCH 2/3] exec_list: add a function to count the size of a list

2014-07-09 Thread Connor Abbott
On Wednesday, July 09, 2014 03:56:41 PM Ian Romanick wrote: > On 07/08/2014 12:20 PM, Connor Abbott wrote: > > Signed-off-by: Connor Abbott > > --- > > > > src/glsl/list.h | 20 > > 1 file changed, 20 insertions(+) > > > > d

Re: [Mesa-dev] [PATCH 03/16] glsl: Use constant_expression_value instead of as_constant

2014-07-21 Thread Connor Abbott
optimization, in that if deref->array_index were a constant but it got wrapped in an i2u expressoin then we would've gone and generated an add and a mul instruction when that isn't really necessary. In any case, this patch is Reviewed-by: Connor Abbott >

[Mesa-dev] [PATCH] glsl/linker: pass through the is_intrinsic flag

2014-07-28 Thread Connor Abbott
7;s useful for codepaths that want to distinguish between intrinsics and non-intrinsics without using strcmp. Signed-off-by: Connor Abbott --- src/glsl/link_functions.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/link_functions.cpp b/src/glsl/link_functions.cpp index 2ce960

[Mesa-dev] [PATCH 2/3] ra: make the p, q test more efficient

2014-07-29 Thread Connor Abbott
. No difference in shader-db run times, but I'm keeping this in because the q total that it calculates will also be used in the next commit. Signed-off-by: Connor Abbott --- src/mesa/program/register_allocate.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletion

[Mesa-dev] [PATCH 0/3] Some register allocator cleanups and optimizations

2014-07-29 Thread Connor Abbott
s the summary: total instructions in shared programs: 4545447 -> 4545411 (-0.00%) instructions in affected programs: 1353 -> 1317 (-2.66%) GAINED:124 LOST: 6 Connor Abbott (3): ra: cleanup the public API ra: make the p,

[Mesa-dev] [PATCH 1/3] ra: cleanup the public API

2014-07-29 Thread Connor Abbott
we're at it rename ra_allocate_no_spills() to ra_allocate() since there's no equivalent "with spills," because the backend is supposed to handle spilling. Signed-off-by: Connor Abbott --- src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c | 2 +- src/m

[Mesa-dev] [PATCH 3/3] ra: optimistically color only one node at a time

2014-07-29 Thread Connor Abbott
4545411 (-0.00%) instructions in affected programs: 1353 -> 1317 (-2.66%) GAINED:124 LOST: 6 Signed-off-by: Connor Abbott --- src/mesa/program/register_allocate.c | 111 +-- 1 file changed, 29 inserti

Re: [Mesa-dev] [PATCH 0/3] Some register allocator cleanups and optimizations

2014-07-29 Thread Connor Abbott
On Tue, Jul 29, 2014 at 5:53 PM, Connor Abbott wrote: > This patch series contains some improvements to the register allocator > used by the i965 fs and vec4 backends and r300g. The most important > patch, and the only one with an intended functional change, is the last > one. Fu

[Mesa-dev] [PATCH] exec_list: add a list_foreach_typed_reverse() macro

2014-07-30 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/list.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/list.h b/src/glsl/list.h index 3ee6cda..c402f48 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -644,6 +644,12 @@ inline void exec_node::insert_before(exec_list *before

[Mesa-dev] [PATCH v2 1/4] ra: cleanup the public API

2014-07-30 Thread Connor Abbott
we're at it rename ra_allocate_no_spills() to ra_allocate() since there's no equivalent "with spills," because the backend is supposed to handle spilling. Reviewed-by: Eric Anholt Signed-off-by: Connor Abbott --- src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c | 2

[Mesa-dev] [PATCH v2 2/4] ra: make the p, q test more efficient

2014-07-30 Thread Connor Abbott
. No difference in shader-db run times, but I'm keeping this in because the q total that it calculates will also be used in the next few commits. Reviewed-by: Eric Anholt Signed-off-by: Connor Abbott --- src/mesa/program/register_allocate.c | 33 ++--- 1 file c

[Mesa-dev] [PATCH v2 4/4] ra: optimistically color only one node at a time

2014-07-30 Thread Connor Abbott
124 LOST: 6 Signed-off-by: Connor Abbott --- src/mesa/program/register_allocate.c | 57 ++-- 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c

[Mesa-dev] [PATCH v2 3/4] ra: consider all spillable nodes for spilling

2014-07-30 Thread Connor Abbott
0 Signed-off-by: Connor Abbott --- src/mesa/program/register_allocate.c | 52 +--- 1 file changed, 6 insertions(+), 46 deletions(-) diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c index 73d3b1a..f2f5910 100644 --- a/src/mes

[Mesa-dev] [PATCH v2 0/4] Some register allocator cleanups and optimizations

2014-07-30 Thread Connor Abbott
ix trailing whitespace, split the last patch in two Connor Abbott (4): ra: cleanup the public API ra: make the p, q test more efficient ra: consider all spillable nodes for spilling ra: optimistically color only one node at a time .../drivers/r300/compiler/radeon_pair_regalloc.c | 2 +

Re: [Mesa-dev] [PATCH v2 3/4] ra: consider all spillable nodes for spilling

2014-07-31 Thread Connor Abbott
On Wed, Jul 30, 2014 at 10:50 PM, Eric Anholt wrote: > Connor Abbott writes: > >> Before, we would only consider nodes for spilling if they were >> optimistically pushed onto the stack. But the logic for this was >> complicated, and duplicated some things; also, we migh

Re: [Mesa-dev] [PATCH v2 3/4] ra: consider all spillable nodes for spilling

2014-07-31 Thread Connor Abbott
On Thu, Jul 31, 2014 at 1:05 PM, Eric Anholt wrote: > Connor Abbott writes: >> That's not necessarily true - you could want to spill a trivially >> colored register that interferes with a non trivially colored >> register, especially if the spill cost of the non trivia

[Mesa-dev] [PATCH v3 4/4] ra: optimistically color only one node at a time

2014-07-31 Thread Connor Abbott
s in affected programs: 1353 -> 1307 (-3.40%) GAINED:124 LOST: 6 Signed-off-by: Connor Abbott --- src/mesa/program/register_allocate.c | 57 ++-- 1 file changed, 22 insertions(+), 35 deletions(

[Mesa-dev] [PATCH v3 0/4] Some register allocator cleanups and optimizations

2014-07-31 Thread Connor Abbott
6 v2: fix trailing whitespace, split the last patch in two v3: rewrite patch 3, removing regressions in number of instructions Connor Abbott (4): ra: cleanup the public API ra: make the p, q test more efficient ra: don't consider nodes for spilling we don't need to ra: optimistically c

[Mesa-dev] [PATCH v3 1/4] ra: cleanup the public API

2014-07-31 Thread Connor Abbott
we're at it rename ra_allocate_no_spills() to ra_allocate() since there's no equivalent "with spills," because the backend is supposed to handle spilling. Reviewed-by: Eric Anholt Signed-off-by: Connor Abbott --- src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c | 2

[Mesa-dev] [PATCH v3 3/4] ra: don't consider nodes for spilling we don't need to

2014-07-31 Thread Connor Abbott
7;s). Signed-off-by: Connor Abbott --- Eric, does this patch seem OK to you? There are some comments indicating the deleted code is necessary, but based on our conversation and my tests it doesn't seem so... src/mesa/program/register_allocate.c | 51 1 fi

[Mesa-dev] [PATCH v3 2/4] ra: make the p, q test more efficient

2014-07-31 Thread Connor Abbott
. No difference in shader-db run times, but I'm keeping this in because the q total that it calculates will also be used in the next few commits. Reviewed-by: Eric Anholt Signed-off-by: Connor Abbott --- src/mesa/program/register_allocate.c | 33 ++--- 1 file c

Re: [Mesa-dev] [PATCH v2 3/4] ra: consider all spillable nodes for spilling

2014-08-01 Thread Connor Abbott
On Fri, Aug 1, 2014 at 11:51 AM, Eric Anholt wrote: > Connor Abbott writes: > >> On Thu, Jul 31, 2014 at 1:05 PM, Eric Anholt wrote: >>> Connor Abbott writes: >>>> That's not necessarily true - you could want to spill a trivially >>>> col

Re: [Mesa-dev] [PATCH v2 3/4] ra: consider all spillable nodes for spilling

2014-08-01 Thread Connor Abbott
On Fri, Aug 1, 2014 at 12:25 PM, Eric Anholt wrote: > Connor Abbott writes: > >> On Fri, Aug 1, 2014 at 11:51 AM, Eric Anholt wrote: >>> Connor Abbott writes: >>> >>>> On Thu, Jul 31, 2014 at 1:05 PM, Eric Anholt wrote: >>>>> Connor

[Mesa-dev] main/hash_table.h vs program/hash_table.h

2013-12-20 Thread Connor Abbott
Hi, While looking at the GLSL IR code, I noticed that different parts of the code use 2 different hash table implementations. ir_loop_analysis, ir_variable_refcount, ir_clone, etc. use struct hash_table under program/hash_table.h, whereas ir_variable_refcount and link_uniform_blocks use struct has

Re: [Mesa-dev] [PATCH 09/16] i965/fs: Calculate interference better in register_coalesce.

2013-12-27 Thread Connor Abbott
I'm not sure if this is relevant to the i965 fs backend in particular, but Briggs in his thesis [1] recommended simply ignoring the liveness of any register read by a copy instruction immediately after said instruction when computing the interference graph in order to solve this exact problem (see

Re: [Mesa-dev] [PATCH 09/16] i965/fs: Calculate interference better in register_coalesce.

2013-12-28 Thread Connor Abbott
27, 2013 at 7:38 PM, Connor Abbott wrote: > I'm not sure if this is relevant to the i965 fs backend in particular, but > Briggs in his thesis [1] recommended simply ignoring the liveness of any > register read by a copy instruction immediately after said instruction when > computi

[Mesa-dev] [PATCH RFC 06/11] glsl: add swizzle_component() to ir_builder

2014-01-22 Thread Connor Abbott
Like swizzle_x(), swizzle_y(), etc., except the index is programmable. --- src/glsl/ir_builder.cpp | 6 ++ src/glsl/ir_builder.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp index 7f41ed6..2229cd2 100644 --- a/src/glsl/ir_builder.cpp

[Mesa-dev] [PATCH RFC 04/11] glsl: add dead branch analysis

2014-01-22 Thread Connor Abbott
--git a/src/glsl/ir_dead_branches.cpp b/src/glsl/ir_dead_branches.cpp new file mode 100644 index 000..f86f009 --- /dev/null +++ b/src/glsl/ir_dead_branches.cpp @@ -0,0 +1,226 @@ +/* + * Copyright © 2013 Connor Abbott (con...@abbott.cx) + * + * Permission is hereby granted, free of charge, to any

[Mesa-dev] [PATCH RFC 05/11] glsl: add loop jump visitor

2014-01-22 Thread Connor Abbott
\ $(GLSL_SRCDIR)/ir_reader.cpp \ $(GLSL_SRCDIR)/ir_rvalue_visitor.cpp \ diff --git a/src/glsl/ir_loop_jumps.cpp b/src/glsl/ir_loop_jumps.cpp new file mode 100644 index 000..1386340 --- /dev/null +++ b/src/glsl/ir_loop_jumps.cpp @@ -0,0 +1,129 @@ +/* + * Copyright © 2013 Connor Abbott (con

[Mesa-dev] [PATCH RFC 09/11] glsl: add pass to convert GLSL IR to SSA form

2014-01-22 Thread Connor Abbott
0..c1044f6 --- /dev/null +++ b/src/glsl/opt_to_ssa.cpp @@ -0,0 +1,1155 @@ +/* + * Copyright © 2013 Connor Abbott (con...@abbott.cx) + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"),

[Mesa-dev] [PATCH RFC 01/11] glsl: fix handling of quadop_vector constant expression

2014-01-22 Thread Connor Abbott
We forgot to handle the case where the base type was a boolean. --- src/glsl/ir_constant_expression.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index f811fd1..9edc378 100644 --- a/src/glsl/ir_constant_express

[Mesa-dev] [PATCH RFC 10/11] glsl: add a pass to convert out of SSA form

2014-01-22 Thread Connor Abbott
, bool uniform_locations_assigned, diff --git a/src/glsl/opt_from_ssa.cpp b/src/glsl/opt_from_ssa.cpp new file mode 100644 index 000..6071c45 --- /dev/null +++ b/src/glsl/opt_from_ssa.cpp @@ -0,0 +1,198 @@ +/* + * Copyright © 2013 Connor Abbott (con...@abbott.cx) + * + * Permission is hereby

[Mesa-dev] [PATCH RFC 07/11] glsl: add SSA infrastructure

2014-01-22 Thread Connor Abbott
This patch introduces all the changes to the IR that are necessary for representing programs in the SSA form. This consists of a new variable mode, the SSA temporary, which is guarenteed to be written to exactly once, and classes to represent phi nodes in the IR. In the current code, variables are

[Mesa-dev] [PATCH RFC 00/11] glsl: add Single Static Assignment (SSA)

2014-01-22 Thread Connor Abbott
edu/courses/cse501/04wi/papers/click-pldi95.pdf Connor Abbott (11): glsl: fix handling of quadop_vector constant expression glsl: add as_loop_jump() method to ir_instruction glsl: add a foreach_list_reverse macro glsl: add dead branch analysis glsl: add loop jump visitor glsl: add swi

[Mesa-dev] [PATCH RFC 02/11] glsl: add as_loop_jump() method to ir_instruction

2014-01-22 Thread Connor Abbott
This will let us dynamically downcast to ir_loop_jump, which will be needed later. --- src/glsl/ir.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 19e8383..d1e790d 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -138,6 +138,7 @@ public: virtual

[Mesa-dev] [PATCH RFC 08/11] glsl: add ssa_assign() to ir_builder

2014-01-22 Thread Connor Abbott
ssa_assign() creates an SSA variable and assignment at the same time. With this, simple sequences of SSA statements can be easily created. --- src/glsl/ir_builder.cpp | 14 ++ src/glsl/ir_builder.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/glsl/ir_builder.cpp b/src/

[Mesa-dev] [PATCH RFC 11/11] glsl: convert to and from SSA form in the compiler

2014-01-22 Thread Connor Abbott
This patch is mainly for allowing me to test these changes with piglit. In the future, a do_ssa_optimizations() function will need to be created and used by this code, as well as all other users of do_common_optimizations(). --- src/glsl/glsl_parser_extras.cpp | 4 1 file changed, 4 insertion

[Mesa-dev] [PATCH RFC 03/11] glsl: add a foreach_list_reverse macro

2014-01-22 Thread Connor Abbott
--- src/glsl/list.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/list.h b/src/glsl/list.h index 694b686..2de20c3 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -383,6 +383,11 @@ inline void exec_node::insert_before(exec_list *before) ; (__node)->next != NULL

[Mesa-dev] [PATCH 3/4] glsl/tests: call create_test_cases.py in optimization-test

2014-05-27 Thread Connor Abbott
This way, when someone modifies create_test_cases.py and forgets to commit their changes again, people will notice. Signed-off-by: Connor Abbott --- src/glsl/tests/optimization-test | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/tests/optimization-test b/src/glsl/tests

[Mesa-dev] [PATCH 1/4] glsl: be more consistent about printing constants

2014-05-27 Thread Connor Abbott
will bring create_test_cases.py in line with them. Signed-off-by: Connor Abbott --- src/glsl/ir_print_visitor.cpp | 2 +- src/glsl/tests/lower_jumps/lower_breaks_1.opt_test | 3 +-- src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected| 3 +-- src/

[Mesa-dev] [PATCH 2/4] glsl/tests/lower_jumps: fix generated sexpr's for loops

2014-05-27 Thread Connor Abbott
he used to create the tests. Fix that, so that now create_test_cases.py is synced with the generated tests. Signed-off-by: Connor Abbott --- src/glsl/tests/lower_jumps/create_test_cases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/tests/lower_jumps

[Mesa-dev] [PATCH 4/4] glsl/tests: remove generated tests from the repo

2014-05-27 Thread Connor Abbott
They were made unneccesary by the last commit. Signed-off-by: Connor Abbott --- src/glsl/tests/lower_jumps/.gitignore | 2 ++ src/glsl/tests/lower_jumps/lower_breaks_1.opt_test | 12 - .../lower_jumps/lower_breaks_1.opt_test.expected | 4 --- src/glsl/tests/lower_jumps

[Mesa-dev] [PATCH 0/4] glsl/tests: remove generated files

2014-05-27 Thread Connor Abbott
ect in the input files. I fixed both problems, and then I removed the generated tests so that stuff like this won't happen again. Connor Abbott (4): glsl: be more consistent about printing constants glsl/tests/lower_jumps: fix generated sexpr's for loops glsl/tests: call create_test_

[Mesa-dev] [PATCH v2 2/4] glsl/tests/lower_jumps: fix generated sexpr's for loops

2014-05-27 Thread Connor Abbott
he used to create the tests. Fix that, so that now create_test_cases.py is synced with the generated tests. Signed-off-by: Connor Abbott --- src/glsl/tests/lower_jumps/create_test_cases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/tests/lower_jumps

[Mesa-dev] [PATCH v2 0/4] glsl/tests: remove generated files

2014-05-27 Thread Connor Abbott
in the input files. This series fixes both problems, and then removes the generated tests so that stuff like this won't happen again. v2: actually generate the test files Connor Abbott (4): glsl: be more consistent about printing constants glsl/tests/lower_jumps: fix generated sexpr

[Mesa-dev] [PATCH v2 4/4] glsl/tests: remove generated tests from the repo

2014-05-27 Thread Connor Abbott
They were made unneccesary by the last commit. Signed-off-by: Connor Abbott --- src/glsl/tests/lower_jumps/.gitignore | 2 ++ src/glsl/tests/lower_jumps/lower_breaks_1.opt_test | 12 - .../lower_jumps/lower_breaks_1.opt_test.expected | 4 --- src/glsl/tests/lower_jumps

[Mesa-dev] [PATCH v2 3/4] glsl/tests: call create_test_cases.py in optimization-test

2014-05-27 Thread Connor Abbott
This way, when someone modifies create_test_cases.py and forgets to commit their changes again, people will notice. v2: make sure we parse the right directories and check for existance the right way. Signed-off-by: Connor Abbott --- src/glsl/tests/optimization-test | 8 1 file changed

[Mesa-dev] [PATCH v2 1/4] glsl: be more consistent about printing constants

2014-05-27 Thread Connor Abbott
will bring create_test_cases.py in line with them. Signed-off-by: Connor Abbott --- src/glsl/ir_print_visitor.cpp | 2 +- src/glsl/tests/lower_jumps/lower_breaks_1.opt_test | 3 +-- src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected| 3 +-- src/

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Connor Abbott
On Wed, May 28, 2014 at 2:37 PM, Eric Anholt wrote: > Here's a series I started back in January as a little experiment. > Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd > just fixed up Mesa IR back in the day. But, given that we're still > feeding Mesa IR into drivers

Re: [Mesa-dev] [PATCH 00/19] i965/fs: load_payload on Gen7+.

2014-05-28 Thread Connor Abbott
On Tue, May 27, 2014 at 9:47 PM, Matt Turner wrote: > Here's a respin of my load_payload series from mid-April with some > feedback from Ken addressed and some bugs fixed. > > This series is available in my tree (with a few unrelated patches > before it) > >git://people.freedesktop.org/~mattst

Re: [Mesa-dev] [PATCH v2 3/4] glsl/tests: call create_test_cases.py in optimization-test

2014-05-28 Thread Connor Abbott
On Wed, May 28, 2014 at 6:18 PM, Kenneth Graunke wrote: > On 05/28/2014 01:17 PM, Matt Turner wrote: >> On Wed, May 28, 2014 at 1:09 PM, Kenneth Graunke >> wrote: >>> On 05/27/2014 06:23 PM, Connor Abbott wrote: >>>> This way, when someone modifies

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Connor Abbott
On Wed, May 28, 2014 at 8:50 PM, Eric Anholt wrote: > Connor Abbott writes: > >> On Wed, May 28, 2014 at 2:37 PM, Eric Anholt wrote: >>> Here's a series I started back in January as a little experiment. >>> Basically, I feel guilty for pushing GLSL IR int

Re: [Mesa-dev] [PATCH RFC 00/11] glsl: add Single Static Assignment (SSA)

2014-02-04 Thread Connor Abbott
On Fri, Jan 31, 2014 at 3:34 PM, Paul Berry wrote: > On 22 January 2014 09:16, Connor Abbott wrote: > >> This series enables GLSL IR support for SSA, including passes to convert >> to and from SSA form. SSA is a form of the intermediate representation >> of a compiler i

Re: [Mesa-dev] [PATCH RFC 07/11] glsl: add SSA infrastructure

2014-02-05 Thread Connor Abbott
On Tue, Jan 28, 2014 at 2:45 PM, Paul Berry wrote: > On 22 January 2014 09:16, Connor Abbott wrote: > >> diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp >> index cb732a5..7075579 100644 >> --- a/src/glsl/ir_clone.cpp >> +++ b/src/glsl/ir_clone.cpp &

Re: [Mesa-dev] [PATCH RFC 07/11] glsl: add SSA infrastructure

2014-02-05 Thread Connor Abbott
On Tue, Jan 28, 2014 at 1:50 PM, Paul Berry wrote: > On 22 January 2014 09:16, Connor Abbott wrote: > >> This patch introduces all the changes to the IR that are necessary for >> representing programs in the SSA form. This consists of a new variable >> mode, the

Re: [Mesa-dev] [PATCH RFC 10/11] glsl: add a pass to convert out of SSA form

2014-02-05 Thread Connor Abbott
On Fri, Jan 31, 2014 at 11:55 AM, Paul Berry wrote: > On 22 January 2014 09:16, Connor Abbott wrote: > >> Right now we are being basically as naive as possible, and inserting >> more copies than necessary. It is possible to implement a more >> sophisticated algorithm l

[Mesa-dev] Flatland

2014-02-06 Thread Connor Abbott
Hi, So I believe that we can all agree that the tree-based representation that GLSL IR currently uses for shaders needs to go. For the benefit of those that didn't watch Ian Romanick's talk at FOSDEM, I'll reiterate some of the problems with it as of now: - All the ir_dereference chains blow up t

Re: [Mesa-dev] Flatland

2014-02-07 Thread Connor Abbott
On Fri, Feb 7, 2014 at 3:13 PM, Ian Romanick wrote: > On 02/06/2014 09:34 PM, Connor Abbott wrote: >> Hi, >> >> So I believe that we can all agree that the tree-based representation >> that GLSL IR currently uses for shaders needs to go. For the benefit >&g

Re: [Mesa-dev] [PATCH RFC 07/11] glsl: add SSA infrastructure

2014-02-07 Thread Connor Abbott
On Tue, Jan 28, 2014 at 1:50 PM, Paul Berry wrote: > On 22 January 2014 09:16, Connor Abbott wrote: >> >> This patch introduces all the changes to the IR that are necessary for >> representing programs in the SSA form. This consists of a new variable >> mode,

Re: [Mesa-dev] [PATCH 1/8] glsl: Group all of the constant_referenced functions together

2014-03-12 Thread Connor Abbott
On Wed, Mar 12, 2014 at 6:49 PM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/glsl/ir_clone.cpp | 10 +- > src/glsl/ir_constant_expression.cpp | 195 > +++- > 2 files changed, 109 insertions(+), 96 deletions

Re: [Mesa-dev] [PATCH 2/8] glsl: Add wrapper function that calls ir_dereference::constant_referenced

2014-03-12 Thread Connor Abbott
On Wed, Mar 12, 2014 at 6:49 PM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/glsl/ir_constant_expression.cpp | 52 > + > 1 file changed, 36 insertions(+), 16 deletions(-) > > diff --git a/src/glsl/ir_constant_expressi

Re: [Mesa-dev] [PATCH] r600g: fix regression since UCMP change

2014-12-09 Thread Connor Abbott
On Tue, Dec 9, 2014 at 12:44 AM, Roland Scheidegger wrote: > Am 09.12.2014 um 02:31 schrieb Dave Airlie: >> From: Dave Airlie >> >> Since d8da6deceadf5e48201d848b7061dad17a5b7cac where the >> state tracker started using UCMP on cayman a number of tests >> regressed. >> >> this seems to be r600g i

Re: [Mesa-dev] [PATCH 027/133] Fix what I think are a few NIR typos

2014-12-16 Thread Connor Abbott
On Tue, Dec 16, 2014 at 1:04 AM, Jason Ekstrand wrote: > --- > src/glsl/nir/nir_opcodes.h| 6 +++--- > src/glsl/nir/nir_opt_copy_propagate.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/glsl/nir/nir_opcodes.h b/src/glsl/nir/nir_opcodes.h > index 36a5

Re: [Mesa-dev] [PATCH 020/133] i965/fs: make emit_fragcoord_interpolation() more general

2014-12-16 Thread Connor Abbott
When Ken rebased my texture patches, he changed the titles to say "make thing() not take an ir_variable", which I like. Can you change the title of this one too? On Tue, Dec 16, 2014 at 1:04 AM, Jason Ekstrand wrote: > From: Connor Abbott > > --- > src/mesa/drive

Re: [Mesa-dev] [PATCH 022/133] i965/fs: add a NIR frontend

2014-12-16 Thread Connor Abbott
On Tue, Dec 16, 2014 at 1:04 AM, Jason Ekstrand wrote: > From: Connor Abbott > > This is similar to the GLSL IR frontend, except consuming NIR. This lets > us test NIR as part of an actual compiler. > > v2: Jason Ekstrand : >Make brw_fs_nir build again >Only use

Re: [Mesa-dev] [PATCH 087/133] i965/fs_nir: Don't dump the shader.

2014-12-16 Thread Connor Abbott
Can we squash this into wherever we introduced these print statements, and instead port over Matt's i965 fs debugging infrastructure so we can do this with an envvar enable, plus all the other goodies? On Tue, Dec 16, 2014 at 1:11 AM, Jason Ekstrand wrote: > This is killing piglit. I'll leave th

Re: [Mesa-dev] [PATCH 039/133] i965/fs: Don't take an ir_variable for emit_general_interpolation

2014-12-16 Thread Connor Abbott
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > index 3e447b8..fd7dd43 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > @@ -97,7 +97,11 @@ fs_visitor::visit(ir_var

Re: [Mesa-dev] [PATCH 022/133] i965/fs: add a NIR frontend

2014-12-16 Thread Connor Abbott
On Tue, Dec 16, 2014 at 5:22 PM, Jason Ekstrand wrote: > > > On Tue, Dec 16, 2014 at 1:28 PM, Connor Abbott wrote: >> >> On Tue, Dec 16, 2014 at 1:04 AM, Jason Ekstrand >> wrote: >> > From: Connor Abbott >> > >> > This is similar to the GLS

Re: [Mesa-dev] [PATCH 065/133] glsl/list: Add a foreach_list_typed_safe_reverse macro

2014-12-16 Thread Connor Abbott
_field.prev, __field)) > + > #endif /* LIST_CONTAINER_H */ > -- > 2.2.0 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Reviewed-by: Connor Abbott __

Re: [Mesa-dev] [PATCH 059/133] glsl/list: Fix the exec_list_validate function

2014-12-16 Thread Connor Abbott
On Tue, Dec 16, 2014 at 1:05 AM, Jason Ekstrand wrote: > Some time while refactoring things to make it look nicer before pushing to > master, I completely broke the function. This fixes it to be correct. > Just goes to show you why you souldn't push code that has no users yet... > > Signed-off-by

Re: [Mesa-dev] [PATCH 000/123] Reintroducing NIR, a new IR for mesa

2014-12-16 Thread Connor Abbott
asier to look at the end result rather than the > patches. The branch can be found via freedesktop cgit here: > > http://cgit.freedesktop.org/~jekstrand/mesa/log/?h=review/nir-v1 > > Last week, I did a presentation for some of the other Intel people to try > and help bring them up t

Re: [Mesa-dev] [PATCH 004/133] nir: add the core datastructures

2014-12-16 Thread Connor Abbott
On Tue, Dec 16, 2014 at 5:48 PM, Eric Anholt wrote: > Jason Ekstrand writes: > >> From: Connor Abbott >> >> This includes all the instructions, ifs, loops, functions, etc. This is >> similar to the information in ir.h. >> >> v2: Jason Ekstrand : >>

Re: [Mesa-dev] [PATCH 136/133] nir/opcodes: Remove the per_component info field

2014-12-16 Thread Connor Abbott
ype_unsigned, nir_type_unsigned, nir_type_unsigned, > nir_type_unsigned), \ >0) > #define QUADOP_HORIZ(name, output_size, src1_size, src2_size, src3_size, \ > src4_size) \ > - OPCODE(name, 4, false, output_size, nir_type_unsigned, \ > +

[Mesa-dev] [PATCH] glsl: fix stale comment

2014-12-16 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/ir_function_can_inline.cpp | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/glsl/ir_function_can_inline.cpp b/src/glsl/ir_function_can_inline.cpp index 7b15d5d..3b1d15f 100644 --- a/src/glsl/ir_function_can_inline.cpp

Re: [Mesa-dev] [PATCH 000/123] Reintroducing NIR, a new IR for mesa

2014-12-16 Thread Connor Abbott
Oh, I forgot... patch 20 should probably get cherry-picked as well. On Tue, Dec 16, 2014 at 6:01 PM, Jason Ekstrand wrote: > > > On Tue, Dec 16, 2014 at 2:52 PM, Connor Abbott wrote: >> >> Hi, >> >> On Tue, Dec 16, 2014 at 1:04 AM, Jason Ekstrand >> wrot

<    1   2   3   4   5   6   7   8   9   10   >