[Mesa-dev] Mesa (master): mesa: Validate assembly shaders when GLSL shaders are used

Dave Airlie airlied at gmail.com
Thu Oct 14 15:25:03 PDT 2010


On Fri, Oct 15, 2010 at 7:28 AM, Ian Romanick <idr at freedesktop.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Brian Paul wrote:
>> On 10/12/2010 07:49 PM, Ian Romanick wrote:
>>> Brian Paul wrote:
>>>>> -
>>>>> +#include<stdbool.h>
>>>>
>>>> Ian, could we stick with GLboolean/GL_TRUE/GL_FALSE in core Mesa to be
>>>> consistent?  It wouldn't surprise me if stdbool.h isn't present on one
>>>> platform or another.
>>>
>>> If possible, I'd prefer not.  All of the GL types are ugly anachronisms
>>> from the early 90's when there were no standard, cross-platform sized
>>> types.  We've had those types for over a decade, and not using them
>>> makes the code more obtuse.  To be perfectly honest, I'd love to see
>>> them removed from OpenGL altogether.
>>
>> My concern here is people will get lazy and just use int everywhere.
>> Using GL types such as GLuint, GLint, GLboolean and GLbitfield convey
>> useful information about the variables declared with those types.
>
> GLuint -> unsigned
> GLint -> int
> GLboolean -> bool

be careful with that sort of change, from what I know the C bool type
is not guaranteed to be the same size as the GLboolean type, I think a
compiler can use a bitfield for the C bool type internally if it wants
and was insane, whereas GLboolean looks to unsigned char.

Dave.


More information about the mesa-dev mailing list