Bug 81076 - [SNB+]Piglit spec_ARB_explicit_attrib_location_1.10_compiler_layout-12.frag fails
Summary: [SNB+]Piglit spec_ARB_explicit_attrib_location_1.10_compiler_layout-12.frag f...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Tapani Pälli
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2014-07-09 03:23 UTC by lu hua
Modified: 2014-07-24 09:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description lu hua 2014-07-09 03:23:22 UTC
System Environment:
Platform: Ivybridge
Libdrm:	(master)libdrm-2.4.54-17-ge8c3c1358ecaf4e90f7d43762357ae6f8e2022b6
Mesa:	(master)8aa34dc9cb1f4b1b17e49da98e54066832afc98e
Libva:	(master)c61d8c6ce9ffc27320e9e177c1e1123d5f1b5014

Bug detailed description:
It fails on SNB+ platforms with mesa master and 10.2 branch from GL_ARB_explicit_attrib_location enable.
spec_ARB_explicit_attrib_location_1.10_compiler_layout-13.frag also fails.

Failed to compile fragment shader /GFX/Test/Piglit/piglit/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-12.frag: 0:29(1): error: explicit index may only be 0 or 1

Shader source:
// [config]
// expect_result: pass
// glsl_version: 1.10
// require_extensions: GL_ARB_explicit_attrib_location GL_ARB_blend_func_extended
// [end config]
// Even though the specified locations overlap, the spec says that a *link*
// error is generated.  The changes to section 3.9.2 say:
//     "Output binding assignments will cause LinkProgram to fail:
//           * if the number of active outputs is greater than the value of
//             MAX_DRAW_BUFFERS;
//           * if the program has an active output assigned to a location
//             greater than or equal to the value of
//             MAX_DUAL_SOURCE_DRAW_BUFFERS and has an active output assigned
//             an index greater than or equal to one;
//           * if more than one varying out variable is bound to the same
//             number and index; or
//           * if the explicit binding assigments do not leave enough space
//             for the linker to automatically assign a location for a varying
//             out array, which requires multiple contiguous locations."

#version 110
#extension GL_ARB_explicit_attrib_location: require
layout(location = 0, index = 2) out vec4 color;

void main()
        color = vec4(1.0);

PIGLIT: {"result": "fail" }

Reproduce steps:
1. xinit
2.  bin/glslparsertest tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-12.frag pass 1.10 GL_ARB_explicit_attrib_location
Comment 1 Tapani Pälli 2014-07-22 11:00:44 UTC
I sent a fix to piglit mailing list, same change has been done previously to glsl 1.20 compiler tests.
Comment 2 Tapani Pälli 2014-07-23 04:48:42 UTC
fixed in master
Comment 3 lu hua 2014-07-24 09:07:08 UTC

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.