<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 28, 2016 at 4:01 PM, Timothy Arceri <span dir="ltr"><<a href="mailto:timothy.arceri@collabora.com" target="_blank">timothy.arceri@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 2016-10-28 at 13:46 -0700, Jason Ekstrand wrote:<br>
> Timothy's attempts to extract shader_info from nir_shader got me<br>
> thinking,<br>
> "What if shader_info were simply a byproduct of compilation?" His<br>
> last<br>
> patch series made nir_shader::info just a pointer to gl_program::info<br>
> in<br>
> most cases, so why don't we go all the way and just say that the<br>
> shader_info lives in the gl_program?<br>
><br>
> This series shows what that would look like. Instead of grabbing the<br>
> info<br>
> from the nir_shader, state setup grabs it from the gl_program. On<br>
> the<br>
> compiler side, each of the brw_compile_foo functions now takes a<br>
> shader_info structure that's treated as an in-out parameter like<br>
> prog_data.<br>
> Eventually, once we use nir_gather_info for everything, it will end<br>
> up<br>
> being purely an out-parameter. Do we like the way this looks?<br>
<br>
</span>I'll let others comment on this.<br>
<br>
I'm not sure what you mean by it only being an out-parameter do you<br>
mean in-parameter? (I haven't had anything to eat yet today so maybe<br>
hunger is making my brain not work properly). </blockquote><div><br></div><div>Ignore that comment. I was thinking gather_info would go in postprocess_nir but it would probably go earlier.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've looked over the<br>
series and everything looks like it does what it should. So feel free<br>
to add my r-b if everyone is ok in heading this direction.<br></blockquote><div><br></div><div>Cool I've added Matt and Ken to the CC to see if either of them have an opinion. I think it's a reasonable direction to go.<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
><br>
> With this series, I can build the entire i965 backend compiler<br>
> without the<br>
> nir_shader::info field. (Of course, NIR doesn't build without that<br>
> yet,<br>
> but that's a different refactor.)<br>
><br>
> Cc: Timothy Arceri <<a href="mailto:timothy.arceri@collabora.com">timothy.arceri@collabora.com</a>><br>
><br>
> Jason Ekstrand (11):<br>
> i965: Pull shader_info out of gl_program rather than nir_shader<br>
> i965/shader: Add an explicit shader_info field<br>
> i965/fs: Use the new info field instead of nir->info<br>
> i965/vec4: Use the new info field instead of nir->info<br>
> i965/vec4: Make generate_assembly take an explicit shader_info<br>
> parameter<br>
> i965/compiler: Take an explicit shader_info parameter in compile_vs<br>
> i965/compiler: Take an explicit shader_info parameter in<br>
> compile_tcs<br>
> i965/compiler: Take an explicit shader_info parameter in<br>
> compile_tes<br>
> i965/compiler: Take an explicit shader_info parameter in compile_gs<br>
> i965/compiler: Take an explicit shader_info parameter in compile_fs<br>
> i965/compiler: Take an explicit shader_info parameter in compile_cs<br>
><br>
> src/intel/blorp/blorp.c <wbr> | 4 +-<br>
> src/intel/vulkan/anv_<wbr>pipeline.c |<wbr> 8 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_compiler.h | 6 ++<br>
> src/mesa/drivers/dri/i965/<wbr>brw_cs.c | 4 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_fs.cpp | 102 +++++++++++-<br>
> ----------<br>
> src/mesa/drivers/dri/i965/<wbr>brw_fs.h | 2 +<br>
> src/mesa/drivers/dri/i965/<wbr>brw_fs_nir.cpp | 18 ++--<br>
> src/mesa/drivers/dri/i965/<wbr>brw_fs_visitor.cpp | 18 ++--<br>
> src/mesa/drivers/dri/i965/<wbr>brw_gs.c | 2 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_nir.c | 3 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_nir.h | 4 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_nir_intrinsics.c | 9 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_shader.cpp | 32 +++----<br>
> src/mesa/drivers/dri/i965/<wbr>brw_shader.h | 2 +<br>
> src/mesa/drivers/dri/i965/<wbr>brw_tcs.c | 18 ++--<br>
> src/mesa/drivers/dri/i965/<wbr>brw_tes.c | 11 +--<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4.cpp | 26 +++---<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4.h | 3 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_generator.cpp | 10 +--<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_gs_visitor.cpp | 48 +++++-----<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_gs_visitor.h | 1 +<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_nir.cpp | 8 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_tcs.cpp | 37 ++++----<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_tcs.h | 1 +<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_tes.cpp | 3 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_tes.h | 1 +<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_visitor.cpp | 3 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vec4_vs_visitor.cpp | 3 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vs.c | 6 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_vs.h | 1 +<br>
> src/mesa/drivers/dri/i965/<wbr>brw_wm.c | 8 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_wm_iz.cpp | 2 +-<br>
> src/mesa/drivers/dri/i965/<wbr>brw_wm_surface_state.c | 12 +--<br>
> src/mesa/drivers/dri/i965/<wbr>gen6_gs_visitor.cpp | 12 +--<br>
> src/mesa/drivers/dri/i965/<wbr>gen6_gs_visitor.h | 5 +-<br>
> 35 files changed, 233 insertions(+), 200 deletions(-)<br>
><br>
</div></div></blockquote></div><br></div></div>