[Mesa-dev] [PATCH 4/6] gallium: use PIPE_SHADER_* everywhere, remove TGSI_PROCESSOR_*

Jose Fonseca jfonseca at vmware.com
Sun Apr 17 20:52:47 UTC 2016


On 17/04/16 20:21, Marek Olšák wrote:
> On Sun, Apr 17, 2016 at 8:23 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
>> On 17/04/16 13:57, Marek Olšák wrote:
>>>
>>> On Sun, Apr 17, 2016 at 11:12 AM, Jose Fonseca <jfonseca at vmware.com>
>>> wrote:
>>>>
>>>> On 16/04/16 23:27, Roland Scheidegger wrote:
>>>>>
>>>>>
>>>>> Am 16.04.2016 um 14:50 schrieb Marek Olšák:
>>>>>>
>>>>>>
>>>>>> From: Marek Olšák <marek.olsak at amd.com>
>>>>>>
>>>>>> we should use MESA_SHADER_* everywhere, but we're not ready for that
>>>>>> yet
>>>>>> ---
>>>>>
>>>>>
>>>>>
>>>>> I think the idea initially was that tgsi is essentially self-contained:
>>>>> you can parse the token stream without any "external" dependencies.
>>>>> Feels a bit unnecessary though.
>>>>>
>>>>> I would object to using MESA_SHADER_ though. Those are clearly defined
>>>>> outside gallium. If you'd wanted to reorder the pipe ones to match the
>>>>> ordering, that would be something different, though pretty sure it would
>>>>> require some code changes and break even more out-of-tree code ;-).
>>>>
>>>>
>>>>
>>>> Agree.  For sake of non-Mesa state trackers, gallium interface should not
>>>> depend on Mesa/OpenGL etc.
>>>
>>>
>>> The MESA_SHADER_* enums are used by OpenGL, Vulkan, and NIR, which is
>>> an even more independent IR than TGSI and is going to be supported by
>>> Gallium.
>>
>>
>> MESA_SHADER are defined in src/compiler/shader_enums.h , which is full of
>> symbols without any sort of standard prefix.
>>
>> Furthermore src/compiler/shader_enums.c depends on src/mesa/* i.
>>
>> I'm OK with src/compiler/* becoming a API-agnostic module, and have gallium
>> interfaces depend on it at some point, but first the house needs to be
>> cleaned up, at least to the same standards of gallium headers, which are not
>> even particularly high by any standard.
>>
>>
>> I'm also a bit frustrated we keep going around on circles on these sort of
>> matters.  Gallium is already OS/API agnostic.  It was made so it didn't
>> depend on anything.  So I'm not sure why we need to make it depend on stuff
>> it clearly had no goal of being OS/API agnostic when it was designed.
>>
>> Honestly, using a single set of FOO_SHADER_* enums everywhere is far less
>> important that keeping gallium dependencies in check IMO.
>
> OK. Anyway, since you haven't commented on the patch, I can assume
> it's totally okay with you, right?
>
> Marek

Yes, I didn't review the series in detail, but it looks alright to me 
overall, and it's:

Acked-by: Jose Fonseca <jfonseca at vmware.com>



More information about the mesa-dev mailing list