[Mesa-dev] [PATCH 1/2] clover: assert struct argument is compiled usably
Vedran Miletić
vedran at miletic.net
Mon Sep 19 17:10:49 UTC 2016
On 09/19/2016 07:08 PM, Vedran Miletić wrote:
> On 07/28/2016 07:52 AM, Francisco Jerez wrote:
>> Emil Velikov <emil.l.velikov at gmail.com> writes:
>>
>>> On 6 June 2016 at 00:02, Vedran Miletić <vedran at miletic.net> wrote:
>>>> On 06/04/2016 04:18 AM, Francisco Jerez wrote:
>>>>>
>>>>> Serge Martin <edb+mesa at sigluy.net> writes:
>>>>>
>>>>>> From: Vedran Miletić <vedran at miletic.net>
>>>>>>
>>>>>> Make sure that a struct argument did not get compiled into a pointer
>>>>>> type with the byval attribute. If we try to handle the pointer with
>>>>>> byval, we end up with the pointer size instead of the struct size.
>>>>>>
>>>>> Ugh, is that a bug in the code below? How are byval pointers supposed
>>>>> to be handled here? Exactly as if the argument wasn't a pointer at all
>>>>> by providing a copy of the pointed-to object as-is in the kernel input
>>>>> buffer? In that case wouldn't the code below need to pass the correct
>>>>> size of the pointed-to object as target/api size rather than the size of
>>>>> the pointer?
>>>>>
>>>>
>>>> Yes, byval+pointer should be handled as there is no pointer at all.
>>>>
>>>> I have tried passing the correct size, but IIRC LLVM AMDGPU backend does not
>>>> generate correct asm for byval+pointer variant. The simple solution is to
>>>> fail with an assert here unless Clang generates code both Clover and the
>>>> backend can handle.
>>>>
>>> Gents, can anyone confirm if the series is still applicable for master
>>> or it's been superseded ?
>>>
>> Hi Emil, I don't think PATCH 1 is useful, but v1.1 of PATCH 2 still
>> makes sense. It looks like it's going to need some minor rework though
>> for it to apply cleanly on master.
>>
>>> Thanks
>>> Emil
>
> Hi Emil, Francisco, Serge,
>
> now that PATCH 1 is merged, can we also merge PATCH 2?
>
> Thanks,
> Vedran
>
Oops, it's the other way round. Anyhow, Serge's patch "clover: fix
getting struct args api size" got merged, and I am asking to merge this one.
Regards,
Vedran
--
Vedran Miletić
vedran.miletic.net
More information about the mesa-dev
mailing list