Bug 76391 - [IVB/HSW] ogl-samples: gl-320-draw-instanced failure
Summary: [IVB/HSW] ogl-samples: gl-320-draw-instanced failure
Status: CLOSED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-20 11:03 UTC by meng
Modified: 2015-05-14 01:45 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description meng 2014-03-20 11:03:37 UTC
System Environment:
--------------------------
Mesa:   (master)eaf9affa5ec9c5fd919e4207ab80b4677650ac67
Xserver:(master)xorg-server-1.15.99.901 Xf86_video_intel:	
Xf86_video_intel:(master)2.99.911
Kernel:	(drm-intel-nightly)git-ec45c7

Bug detailed description:
----------------------------
It’s not a regression, firstly test ogl-samples.

Pre-conditions:
 - build: https://github.com/g-truc/ogl-samples

Test-case: gl-320-draw-instanced

Expected outcome:
-----------------
https://github.com/g-truc/ogl-samples/blob/master/data/templates/reference/gl-320-draw-instanced.png

Actual outcome:
---------------
- doesn't run
- "error: definitions of interface block 'block' do not match"
Comment 1 Kenneth Graunke 2014-03-23 08:48:34 UTC
Did a bit of digging here:

The vertex shader contains code to override the default qualifiers for uniform blocks.

layout(std140, column_major) uniform;

However, the fragment shader does not.

So, when we compile the vertex shader, the uniform blocks get packing set to GLSL_INTERFACE_PACKING_STD140.  However, when we compile the fragment shader, they get packing set to GLSL_INTERFACE_PACKING_SHARED.  This information is captured in the types, so the two shaders get different glsl_types for the otherwise identical interfaces, and interstage_match() rejects the shaders.

Anyway, that's what's going on.  I haven't looked at specs to determine whether we have a bug, or the demo has a bug.
Comment 2 Tapani Pälli 2015-02-12 13:10:49 UTC
Please test again on master, this works at least for me on IVB (9f7efa7). I did not bisect why.
Comment 3 meng 2015-02-21 02:35:25 UTC
Hi, I found that: update ogl-samples version to git-144867d, the issue should be fixed.
BTW, the issue could still be reproduced on IVB (9f7efa7) if using the ogl-samples git-1ced5a15c.
Comment 4 Tapani Pälli 2015-02-25 06:44:58 UTC
Yep, the test has been fixed to have same layout qualifiers on both shaders.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.