Re: [Mesa-dev] [PATCH 1/3] nir: add new linking opt nir_move_out_const_to_consumer()

2018-11-07 Thread Eric Anholt
Timothy Arceri writes: > On 7/11/18 7:40 pm, Samuel Pitoiset wrote: >> IIRC, I wrote a pass similar to this one a while ago, but never finished >> it. >> >> I don't really like the helper name though, how about >> nir_link_immediate_varyings()? or nir_link_constant_varyings()? > > Sure. Happy

Re: [Mesa-dev] [PATCH 1/3] nir: add new linking opt nir_move_out_const_to_consumer()

2018-11-07 Thread Timothy Arceri
On 7/11/18 7:40 pm, Samuel Pitoiset wrote: IIRC, I wrote a pass similar to this one a while ago, but never finished it. I don't really like the helper name though, how about nir_link_immediate_varyings()? or nir_link_constant_varyings()? Sure. Happy to change the name. I''ll go with

Re: [Mesa-dev] [PATCH 1/3] nir: add new linking opt nir_move_out_const_to_consumer()

2018-11-07 Thread Samuel Pitoiset
IIRC, I wrote a pass similar to this one a while ago, but never finished it. I don't really like the helper name though, how about nir_link_immediate_varyings()? or nir_link_constant_varyings()? On 11/7/18 5:20 AM, Timothy Arceri wrote: This pass moves constant outputs to the consuming

Re: [Mesa-dev] [PATCH 1/3] nir: add new linking opt nir_move_out_const_to_consumer()

2018-11-06 Thread Timothy Arceri
Thinking about this some more I think I need to add some code to check write_masks. I'll add this and some piglit tests for it later tonight or tomorrow. On 7/11/18 3:20 pm, Timothy Arceri wrote: This pass moves constant outputs to the consuming shader stage where possible. ---

[Mesa-dev] [PATCH 1/3] nir: add new linking opt nir_move_out_const_to_consumer()

2018-11-06 Thread Timothy Arceri
This pass moves constant outputs to the consuming shader stage where possible. --- src/compiler/nir/nir.h| 2 + src/compiler/nir/nir_linking_helpers.c| 104 ++ src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- 3 files changed, 107 insertions(+), 1