[Mesa-dev] [PATCH] glsl: Do not allow scalar types in vector relational functions

Boyan Ding boyan.j.ding at gmail.com
Mon Jan 9 14:34:28 UTC 2017


2016-11-23 21:20 GMT+08:00 Boyan Ding <boyan.j.ding at gmail.com>:
> 2016-11-07 20:27 GMT+08:00 Boyan Ding <boyan.j.ding at gmail.com>:
>> 2016-11-05 3:23 GMT+08:00 Matt Turner <mattst88 at gmail.com>:
>>> On Sun, Oct 30, 2016 at 11:45 PM, Boyan Ding <boyan.j.ding at gmail.com> wrote:
>>>> According to OpenGL Shading Language 4.50 spec, Section 8.7 "Vector
>>>> Relational Functions", functions of this type do not operate on scalar
>>>> types, so remove scalar types from signature definitions to make the
>>>> behavior consistent with glslangValidator and other drivers.
>>>
>>> Yep. Looks like it's always been this way.
>>>
>>> The patch is
>>>
>>> Reviewed-by: Matt Turner <mattst88 at gmail.com>
>>>
>>> Since this seems to be untested by any suite, could you provide some
>>> piglit parser tests that confirm that lessThanEqual(scalar, scalar),
>>> et al doesn't work?
>>>
>
> Ping? And also for the piglit patch at
> https://lists.freedesktop.org/archives/piglit/2016-November/021350.html
>
> Regards,
> Boyan Ding

Yet another ping...

Boyan Ding

>
>>
>> Thanks for the review, patch has been sent to piglit and tests pass
>> with this patch. Please help me push this one if you think it is
>> appropriate.
>>
>>> Rant: what a stupid mess to require <= for scalars but lessThanEqual
>>> for vectors.
>>
>> Yeah, I happened to find this when doing my homework. I was quite
>> shocked that one of my shaders, in which I somehow used
>> greaterThanEqual on floats to get a boolean, didn't compile on nvidia
>> driver until I saw the spec.
>>
>> Regards,
>> Boyan Ding
>>
>>>
>>> Somewhere on my todo list is a GLSL extension that fixes things like this...


More information about the mesa-dev mailing list