<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 11, 2019 at 1:50 PM Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Friday, January 11, 2019 9:32:20 AM PST Eric Anholt wrote:<br>
> Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>> writes:<br>
> <br>
> > On Fri, Jan 11, 2019 at 11:11 AM Kenneth Graunke <<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>><br>
> > wrote:<br>
> ><br>
> >> On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote:<br>
> >> > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote:<br>
> >> > > Those names (nir_var_func_local, nir_var_thread_local, and<br>
> >> > > nir_var_thread_global) make more sense to me than private/function.<br>
> >> > ><br>
> >> > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`,<br>
> >> > > indicating that they're just temporary variables, and not anything<br>
> >> > > with special semantics like memory. shader_temp would pair well with<br>
> >> > > the existing shader_in/shader_out, since they have the same scope.<br>
> >> > ><br>
> >> > > I might also consider adding 'mem' to variables representing memory.<br>
> >> > ><br>
> >> > > So that would look like...<br>
> >> > ><br>
> >> > > nir_var_shader_in<br>
> >> > > nir_var_shader_out<br>
> >> > > nir_var_shader_temp (formerly local/function)<br>
> >> > > nir_var_local_temp (formerly global/private)<br>
> >> > ><br>
> >> ><br>
> >> > Are those flipped?<br>
> >><br>
> >> Gah! Sorry. Yes.<br>
> >><br>
> >> nir_var_shader_in<br>
> >> nir_var_shader_out<br>
> >> nir_var_shader_temp (formerly global/private)<br>
> >> nir_var_local_temp (formerly local/function)<br>
> >> nir_var_uniform<br>
> >> nir_var_system_value<br>
> >> nir_var_mem_ubo (added mem)<br>
> >> nir_var_mem_ssbo (added mem)<br>
> >> nir_var_mem_shared (added mem)<br>
> >> nir_var_mem_global (the new global memory type being introduced)<br>
> >><br>
> ><br>
> > I can work with that. I do think I'd mildly prefer function_temp over<br>
> > local_temp but I think the adding of _temp is an improvement.<br>
> <br>
> I like the _temp suggestion a lot! And I think I'm also mildly in favor<br>
> of function_temp.<br>
> <br>
> (Also, thanks to taking naming seriously, to everyone involved here.<br>
> It's hard.)<br>
<br>
Yep, it's not easy. Karol, sorry for being grumpy the other day, it<br>
wasn't a very constructive email on my part. I agree that the names<br>
should change, for all the reasons you suggested.<br>
<br>
I'm fine with nir_var_function_temp / nir_var_func_temp if people<br>
prefer that to local_temp. Closer to Karol's original suggestion,<br>
but I think "temp" clarifies it a bit. shader_in is an input in the<br>
shader, function_temp is a temp in a function.<br>
<br>
Sound good? Should I do the sed-job and send patches?<br></blockquote><div><br></div><div>Go for it. Mind also renaming the variable lists? I don't care if it's one patch or two.<br></div></div></div>