[Mesa-dev] [PATCH mesa] meson: add GL/glext.h warning fix for MacOS

Jeremy Huddleston Sequoia jeremyhu at apple.com
Fri Jun 15 15:14:40 UTC 2018


I think we can instead revert c7f3657450683827446072ad6b1e8fce04078162.  I believe the underlying issue should instead be addressed by a087a09fa86f9617af98f6294dd2228555a4891c.  If any issues remain, we should address them properly rather than masking them with this.

A quick audit makes me suspect we'll get some (benign) 32-64 pointer conversion warnings in some cases which can be addressed like this:

 void GLAPIENTRY
 _mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount,
                             GLsizei * count, GLhandleARB * obj)
 {
    GET_CURRENT_CONTEXT(ctx);
-   get_attached_shaders(ctx, (GLuint)container, maxCount, count, NULL, obj);
+   get_attached_shaders(ctx, (GLuint)(uintptr_t)container, maxCount, count, NULL, obj);
 }

I think that is preferable to masking the problem.  If you prefer, I can do a pass to fixup the casting followed by a revert of c7f3657450683827446072ad6b1e8fce04078162 separate from your series.

Thanks,
Jeremy

> On Jun 15, 2018, at 6:41 AM, Jon Turney <jon.turney at dronecode.org.uk> wrote:
> 
> On 12/06/2018 16:53, Dylan Baker wrote:
>> Quoting Eric Engestrom (2018-06-12 04:25:10)
>>> Copied from configure.ac:1950
>>> 
>>> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
>>> ---
>>> Is it still needed? We've been building on MacOS for a while,
>>> yet nobody noticed anything (Dylan?)
>>> If not, we should probably avoid unnecessary differences with Khronos'
>>> headers and nuke BUILDING_MESA.
>>> ---
>>>  meson.build | 1 +
>>>  1 file changed, 1 insertion(+)
>>> 
>>> diff --git a/meson.build b/meson.build
>>> index c5acc8a3587ea20e131e..04b3bdfd77f36670ff7f 100644
>>> --- a/meson.build
>>> +++ b/meson.build
>>> @@ -209,6 +209,7 @@ endif
>>>    if host_machine.system() == 'darwin'
>>>    with_dri_platform = 'apple'
>>> +  pre_args += '-DBUILDING_MESA'
>>>  elif ['windows', 'cygwin'].contains(host_machine.system())
>>>    with_dri_platform = 'windows'
>>>  elif system_has_kms_drm
>>> -- 
>>> Cheers,
>>>   Eric
>>> 
>> I didn't notice, but I also didn't do a whole lot of testing
>> I've added Jon who did most of the meson mac work and Jeremy who's the resident
>> mac expert.
> No expert, but I believe this is unfortunately still needed.
> 
> See commit c7f36574 and the referenced BZ.



More information about the mesa-dev mailing list