[Mesa-dev] [PATCH 1/2] glcpp: Check version_resolved in the proper place.
Ian Romanick
idr at freedesktop.org
Mon Jan 27 15:20:51 PST 2014
On 01/27/2014 04:18 PM, Matt Turner wrote:
> On Mon, Jan 27, 2014 at 3:14 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> On 01/26/2014 07:14 PM, Matt Turner wrote:
>>> The check was in the wrong place, such that if a shader incorrectly put
>>> a preprocessor token before the #version declaration, the version would
>>> be resolved twice, leading to a segmentation fault when attempting to
>>> redefine the __VERSION__ macro.
>>>
>>> #define GL_ARB_sample_shading
>>> #version 130
>>> void main() {}
>>
>> This is an invalid shader. Segfaulting is bad, and fixing it is good.
>> Is the compile error still generated?
>
> Yeah, after fixing #define GL... -> #extension GL_... : require:
>
>> Failed to compile fragment shader version.frag: 0:2(1): error: syntax error, unexpected VERSION_TOK
Okay. Then this patch is also
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
More information about the mesa-dev
mailing list