Bug 68460 - [SNB/IVB/HSW Bisected]Piglit spec_ARB_uniform_buffer_object_compiler_layout-column_major-non-uniform.frag fail
Summary: [SNB/IVB/HSW Bisected]Piglit spec_ARB_uniform_buffer_object_compiler_layout-c...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Matt Turner
QA Contact:
URL:
Whiteboard:
Keywords:
: 68493 (view as bug list)
Depends on:
Blocks: 67224
  Show dependency treegraph
 
Reported: 2013-08-23 01:45 UTC by lu hua
Modified: 2013-08-30 02:22 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2013-08-23 01:45:19 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       Sandybridge
Libdrm:		(master)libdrm-2.4.46-26-g3c967e715528ee52195c178c4d09d03b643f0c06
Mesa:	(master)b6037e734ee22849cea05a3c92d908e5f92a79fb
Xserver:(master)xorg-server-1.14.99.1-187-ge01a3f65d3e6d92f92ef2992b338cc9625bde082
Xf86_video_intel:(master)2.21.15
Cairo:		(master)95f320e3f26b2a1552a53ebad14dd5086ccf0c60
Libva:		(staging)d540f278465929f3a31030e3f18fdc95ceecffa5
Libva_intel_driver:(staging)42bb613e72d235bcbe141c906dec9431e4c29661
Kernel:	(drm-intel-nightly) 0c2aa6738e47e82d2694c4bf88bba38e70c9421f

Bug detailed description:
-----------------------------
It fails on sandybridge,ivybridge and haswell with mesa master branch, and works well on 9.2 branch.
Following cases also fail with same bisect commit:
spec_ARB_uniform_buffer_object_compiler_layout-row_major-non-uniform.frag
GL3Tests_uniform_buffer_object_uniform_buffer_object_layouts_for_uniforms_outside_ub0.test
GL3Tests_uniform_buffer_object_uniform_buffer_object_layouts_not_for_matrix_type.test

Bisect shows:dded321f92e4727584a98b71d7aaa15d4f01fb24 is the first bad commit.
commit dded321f92e4727584a98b71d7aaa15d4f01fb24
Author:     Ian Romanick <ian.d.romanick@intel.com>
AuthorDate: Thu Aug 15 11:24:11 2013 -0700
Commit:     Matt Turner <mattst88@gmail.com>
CommitDate: Wed Aug 21 23:06:59 2013 -0700

    glsl: Give a warning, not an error, for UBO qualifiers on non-matrices.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59648
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>

output:
Successfully compiled fragment shader tests/spec/arb_uniform_buffer_object/compiler/layout-row_major-non-uniform.frag: 0:21(25): warning: uniform block layout qualifiers row_major and column_major applied to non-matrix types may be rejected by older compilers

Shader source:
// [config]
// expect_result: fail
// glsl_version: 1.20
// require_extensions: GL_ARB_uniform_buffer_object
// [end config]

/* From the GL_ARB_uniform_buffer_object_spec:
 *
 *     "Uniform block layout qualifiers can be declared at global
 *      scope, on a single uniform block, or on a single block member.
 *
 *      At global scope, it is an error to use layout qualifiers to
 *      declare a variable. Instead, at global scope, layout
 *      qualifiers apply just to the keyword uniform and establish
 *      default qualification for subsequent blocks:"
 */

#version 120
#extension GL_ARB_uniform_buffer_object: require

layout(row_major) vec4 a;

vec4 foo(void) {
        return a;
}

PIGLIT: {'result': 'fail' }

Reproduce steps:
----------------------------
1. xinit
2. ./bin/glslparsertest tests/spec/arb_uniform_buffer_object/compiler/layout-row_major-non-uniform.frag fail 1.20 GL_ARB_uniform_buffer_object
Comment 1 Ian Romanick 2013-08-23 15:23:15 UTC
The failure in GL3Tests_uniform_buffer_object_uniform_buffer_object_layouts_not_for_matrix_type.test can be ignored.  It's trying to verify the behavior that has changed in the GLSL specification.  The test will be changed in a future conformance tarball.

The other two failures are the same issue, and that should be fixed ASAP.
Comment 2 Kenneth Graunke 2013-08-23 23:30:01 UTC
I bisected it the uniform_buffer_object_layouts_for_uniforms_outside_ub0 failure to:

77373e020ecc1b156802a583745dc6ce16e91c9e is the first bad commit
commit 77373e020ecc1b156802a583745dc6ce16e91c9e
Author: Matt Turner <mattst88@gmail.com>
Date:   Thu Aug 15 10:46:46 2013 -0700

    glsl: Drop duplicate error messages.
    
    This same message is printed in the validate_matrix_layout_for_type
    function.
    
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Comment 3 Matt Turner 2013-08-24 00:09:14 UTC
I can confirm that QA's bisection is right for layout-row_major-non-uniform.frag.

I'm wondering (see https://bugs.freedesktop.org/show_bug.cgi?id=59648#c6) if we should update the test.
Comment 4 Matt Turner 2013-08-24 01:21:46 UTC
*** Bug 68493 has been marked as a duplicate of this bug. ***
Comment 5 Ian Romanick 2013-08-24 17:48:04 UTC
(In reply to comment #3)
> I can confirm that QA's bisection is right for
> layout-row_major-non-uniform.frag.
> 
> I'm wondering (see https://bugs.freedesktop.org/show_bug.cgi?id=59648#c6) if
> we should update the test.

This test is correct.  Even with the language change, layout(row_major) can still only be used on the members of a uniform block.
Comment 6 lu hua 2013-08-26 02:08:14 UTC
It also happens on latest mesa 9.2 branch.
Comment 7 Matt Turner 2013-08-27 06:21:00 UTC
d8ac987f6a committed to master which fixes all three reported tests. Cherry-picked to 9.2, so marking as fixed.
Comment 8 Matt Turner 2013-08-27 06:22:51 UTC
Crap. Just noticed uniform_buffer_object_layouts_not_for_matrix_type, which it doesn't fix.
Comment 9 Kenneth Graunke 2013-08-27 06:33:06 UTC
(In reply to comment #8)
> Crap. Just noticed uniform_buffer_object_layouts_not_for_matrix_type, which
> it doesn't fix.

Matt, did you notice comment #1?  Ian doesn't think that test is a problem.
Comment 10 Matt Turner 2013-08-27 06:53:14 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Crap. Just noticed uniform_buffer_object_layouts_not_for_matrix_type, which
> > it doesn't fix.
> 
> Matt, did you notice comment #1?  Ian doesn't think that test is a problem.

Oh, cool. Thanks for the heads up.
Comment 11 lu hua 2013-08-30 02:22:14 UTC
Verified. Fixed(except GL3Tests_uniform_buffer_object_uniform_buffer_object_layouts_not_for_matrix_type.test)


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.