[Mesa-dev] [PATCH] glsl: Structures must have same name to be considered same type.

Tapani Pälli tapani.palli at intel.com
Thu Sep 25 22:31:59 PDT 2014


On 09/26/2014 04:25 AM, kalyan kondapally wrote:
> On Wed, Sep 24, 2014 at 11:45 AM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>> On Mon, Sep 22, 2014 at 5:11 AM, Tapani Pälli <tapani.palli at intel.com> wrote:
>>> From: Kalyan Kondapally <kalyan.kondapally at intel.com>
>>>
>>> According to GLSL(4.2) and GLSL-ES (1.0, 3.0) spec, Structures must
>>> have the same name to be considered same type. We currently ignore
>>> the name check while checking if two records are same. This patch
>>> fixes this.
>>>
>>> Patch fixes failing tests in WebGL conformance test
>>> 'shaders-with-uniform-structs' when running Chrome on OpenGL ES.
>>>
>>> v2: Do not force name comparison with unnamed types (Tapani)
>>>
>>> Signed-off-by: Kalyan Kondapally <kalyan.kondapally at intel.com>
>>> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83934
>>> ---
>>>  src/glsl/glsl_types.cpp | 14 ++++++++++++++
>>>  src/glsl/glsl_types.h   |  8 ++++++++
>>>  2 files changed, 22 insertions(+)
>>>
>>> diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
>>> index 66e9b13..4f8bb62 100644
>> Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
>>
>> Do we have piglit test for this?
> I am not sure. I will check it.

There's "glsl-link-unnamed-types.shader_test" to test anonymous structs
and bunch of linker tests using structs but not exactly like how the
WebGL one goes. Would be good to add a test for this.

> Br,
> Kalyan



More information about the mesa-dev mailing list