[Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory

Eric Anholt eric at anholt.net
Fri Jan 11 17:32:20 UTC 2019


Jason Ekstrand <jason at jlekstrand.net> writes:

> On Fri, Jan 11, 2019 at 11:11 AM Kenneth Graunke <kenneth at whitecape.org>
> wrote:
>
>> On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote:
>> > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote:
>> > > Those names (nir_var_func_local, nir_var_thread_local, and
>> > > nir_var_thread_global) make more sense to me than private/function.
>> > >
>> > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`,
>> > > indicating that they're just temporary variables, and not anything
>> > > with special semantics like memory.  shader_temp would pair well with
>> > > the existing shader_in/shader_out, since they have the same scope.
>> > >
>> > > I might also consider adding 'mem' to variables representing memory.
>> > >
>> > > So that would look like...
>> > >
>> > >    nir_var_shader_in
>> > >    nir_var_shader_out
>> > >    nir_var_shader_temp  (formerly local/function)
>> > >    nir_var_local_temp   (formerly global/private)
>> > >
>> >
>> > Are those flipped?
>>
>> Gah!  Sorry.  Yes.
>>
>>    nir_var_shader_in
>>    nir_var_shader_out
>>    nir_var_shader_temp  (formerly global/private)
>>    nir_var_local_temp   (formerly local/function)
>>    nir_var_uniform
>>    nir_var_system_value
>>    nir_var_mem_ubo      (added mem)
>>    nir_var_mem_ssbo     (added mem)
>>    nir_var_mem_shared   (added mem)
>>    nir_var_mem_global   (the new global memory type being introduced)
>>
>
> I can work with that.  I do think I'd mildly prefer function_temp over
> local_temp but I think the adding of _temp is an improvement.

I like the _temp suggestion a lot!  And I think I'm also mildly in favor
of function_temp.

(Also, thanks to taking naming seriously, to everyone involved here.
It's hard.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190111/befd6d3d/attachment-0001.sig>


More information about the mesa-dev mailing list