Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Jason Ekstrand
On Wed, Oct 28, 2015 at 3:13 PM, Rob Clark wrote: > On Wed, Oct 28, 2015 at 6:01 PM, Jason Ekstrand wrote: >> On Wed, Oct 28, 2015 at 2:49 PM, Rob Clark wrote: >>> On Wed, Oct 28, 2015 at 5:24 PM, Connor Abbott wrote: On Wed, Oct 28, 2015 at 1:37 PM, Rob Clark wrote: > On Wed, Oct 28,

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 6:01 PM, Jason Ekstrand wrote: > On Wed, Oct 28, 2015 at 2:49 PM, Rob Clark wrote: >> On Wed, Oct 28, 2015 at 5:24 PM, Connor Abbott wrote: >>> On Wed, Oct 28, 2015 at 1:37 PM, Rob Clark wrote: On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand wrote: > On

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Jason Ekstrand
On Wed, Oct 28, 2015 at 2:49 PM, Rob Clark wrote: > On Wed, Oct 28, 2015 at 5:24 PM, Connor Abbott wrote: >> On Wed, Oct 28, 2015 at 1:37 PM, Rob Clark wrote: >>> On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand >>> wrote: On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: > From: Ro

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 5:24 PM, Connor Abbott wrote: > On Wed, Oct 28, 2015 at 1:37 PM, Rob Clark wrote: >> On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand >> wrote: >>> On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: From: Rob Clark Convenient place to put in some extra s

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Connor Abbott
On Wed, Oct 28, 2015 at 1:37 PM, Rob Clark wrote: > On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand wrote: >> On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: >>> From: Rob Clark >>> >>> Convenient place to put in some extra sanity checking, without making >>> things messy for the drivers ru

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 3:40 PM, Jason Ekstrand wrote: > On Wed, Oct 28, 2015 at 10:37 AM, Rob Clark wrote: >> On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand >> wrote: >>> On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: From: Rob Clark Convenient place to put in some extra

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Jason Ekstrand
On Wed, Oct 28, 2015 at 10:37 AM, Rob Clark wrote: > On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand wrote: >> On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: >>> From: Rob Clark >>> >>> Convenient place to put in some extra sanity checking, without making >>> things messy for the drivers r

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand wrote: > On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: >> From: Rob Clark >> >> Convenient place to put in some extra sanity checking, without making >> things messy for the drivers running the passes. > > In the short-term this seems to work

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Jason Ekstrand
On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: > From: Rob Clark > > Convenient place to put in some extra sanity checking, without making > things messy for the drivers running the passes. In the short-term this seems to work (at least for testing nir_clone). In the long-term, I'm not sure

[Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes (v2)

2015-10-26 Thread Rob Clark
From: Rob Clark Convenient place to put in some extra sanity checking, without making things messy for the drivers running the passes. v2: don't use GNU C ({}) extension Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 38 +++ src/mesa/drivers/dri/i965/brw_nir.c | 1

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-25 Thread Thomas Helland
2015-10-25 13:58 GMT+01:00 Rob Clark : > On Sun, Oct 25, 2015 at 8:05 AM, Erik Faye-Lund wrote: >> On Sat, Oct 24, 2015 at 7:08 PM, Rob Clark wrote: >>> From: Rob Clark >>> >>> +#define NIR_PASS_PROGRESS(pass, nir, ...) ({ \ >>> + assert(nir_shader_is_mutable(nir));

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-25 Thread Rob Clark
On Sun, Oct 25, 2015 at 8:05 AM, Erik Faye-Lund wrote: > On Sat, Oct 24, 2015 at 7:08 PM, Rob Clark wrote: >> From: Rob Clark >> >> +#define NIR_PASS_PROGRESS(pass, nir, ...) ({ \ >> + assert(nir_shader_is_mutable(nir)); \ >> + bool __ret = pass(nir, ##__

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-25 Thread Erik Faye-Lund
On Sat, Oct 24, 2015 at 7:08 PM, Rob Clark wrote: > From: Rob Clark > > +#define NIR_PASS_PROGRESS(pass, nir, ...) ({ \ > + assert(nir_shader_is_mutable(nir)); \ > + bool __ret = pass(nir, ##__VA_ARGS__); \ > + nir_validate_shader(nir);

[Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-24 Thread Rob Clark
From: Rob Clark Convenient place to put in some extra sanity checking, without making things messy for the drivers running the passes. TODO: convert ir3/vc4.. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 33 ++ src/mesa/drivers/dri/i965/brw_nir.c | 126 +