[Mesa-dev] [PATCH 03/16] gallium: add a group_id field to pipe_driver_query_info v2
Ilia Mirkin
imirkin at alum.mit.edu
Mon Jul 7 08:25:16 PDT 2014
On Mon, Jul 7, 2014 at 11:20 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> On 07/07/2014 05:12 PM, Ilia Mirkin wrote:
>>
>> On Mon, Jul 7, 2014 at 11:47 AM, Samuel Pitoiset
>> <samuel.pitoiset at gmail.com> wrote:
>>>
>>> V2:
>>> - make group_id the last field of this struct, this fixes
>>> drivers which use pipe_driver_query_info like radeon
>>
>> While I have no problem with this patch, how exactly would placing
>> group_id at some other locatoin break radeon?
>>
>> I believe Marek's comment was regarding the fact that you were
>> removing some fields that were used by radeon without updating the
>> driver accordingly.
>
>
> When group_id is at the end of pipe_driver_query_info, I don't break
> anything in radeon and in other drivers which use that struct, group_id is
> defined implicitely to 0.
>
> You can have a quick look at the code here :
> http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeon/r600_pipe_common.c#n543
Oh. Because of the way the C89 initializers work. Right :)
>
>
>
>>
>>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>>> ---
>>> src/gallium/include/pipe/p_defines.h | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/src/gallium/include/pipe/p_defines.h
>>> b/src/gallium/include/pipe/p_defines.h
>>> index 8f20974..065c8d9 100644
>>> --- a/src/gallium/include/pipe/p_defines.h
>>> +++ b/src/gallium/include/pipe/p_defines.h
>>> @@ -733,6 +733,7 @@ struct pipe_driver_query_info
>>> unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
>>> uint64_t max_value; /* max value that can be returned */
>>> boolean uses_byte_units; /* whether the result is in bytes */
>>> + unsigned group_id;
>>> };
>>>
>>> struct pipe_driver_query_group_info
>>> --
>>> 2.0.0
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
More information about the mesa-dev
mailing list