Bug 92095

Summary: [Regression, bisected] arb_shader_atomic_counters.compiler.builtins.frag
Product: Mesa Reporter: Mark Janes <mark.a.janes>
Component: Drivers/DRI/i965Assignee: Matt Turner <mattst88>
Status: CLOSED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: blocker    
Priority: medium CC: chrisf, kenneth, mark.a.janes
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Mark Janes 2015-09-23 23:10:06 UTC
This test regresses on all platforms for mesa at the following commit:

commit da7adb99e85fc6efa7f0e570ab93bd7b625975ae
Author: Chris Forbes <chrisf@ijw.co.nz>
Date:   Sun Aug 17 22:37:16 2014 +1200

    glsl: add builtin constants for ARB_tessellation_shader
    
    Limits from other extensions added by Marek.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

This regression is likely to block chrome shipments on for mesa 11.0
Comment 1 Mark Janes 2015-09-23 23:18:56 UTC
Standard Output from the test:

/tmp/build_root/m64/lib/piglit/bin/glslparsertest /tmp/build_root/m64/lib/piglit/tests/spec/arb_shader_atomic_counters/compiler/builtins.frag pass 1.40 GL_ARB_shader_atomic_counters
piglit: debug: Requested an OpenGL 3.1 Forward-Compatible Core Context, and received a matching 3.3 context

Shader source:
/* [config]
 * expect_result: pass
 * glsl_version: 1.40
 * require_extensions: GL_ARB_shader_atomic_counters
 * [end config]
 *
 * Check that the builtin constants defined by the extension
 * are present.
 */
#version 140
#extension GL_ARB_shader_atomic_counters: require

out ivec4 fcolor;

void main()
{
        fcolor.x = gl_MaxVertexAtomicCounters +
                gl_MaxTessControlAtomicCounters +
                gl_MaxTessEvaluationAtomicCounters +
                gl_MaxGeometryAtomicCounters +
                gl_MaxFragmentAtomicCounters +
                gl_MaxCombinedAtomicCounters +
                gl_MaxAtomicCounterBindings;
}

Standard Error

Failed to compile fragment shader /tmp/build_root/m64/lib/piglit/tests/spec/arb_shader_atomic_counters/compiler/builtins.frag: 0:18(2): error: `gl_MaxTessControlAtomicCounters' undeclared
0:17(13): error: operands to arithmetic operators must be numeric
0:19(2): error: `gl_MaxTessEvaluationAtomicCounters' undeclared
0:17(13): error: operands to arithmetic operators must be numeric
0:17(13): error: operands to arithmetic operators must be numeric
0:17(13): error: operands to arithmetic operators must be numeric
0:17(13): error: operands to arithmetic operators must be numeric
0:17(13): error: operands to arithmetic operators must be numeric
Comment 2 Matt Turner 2015-09-24 01:02:07 UTC
Looking at the shader_test, I would have expected it was wrong to assume that gl_MaxTessControlAtomicCounters and gl_MaxTessEvaluationAtomicCounters exist without ARB_tessellation_shader being enabled, but the GL_ARB_shader_atomic_counters says no such thing.

I'll send a patch to get discussion started.
Comment 3 Matt Turner 2015-09-24 01:16:14 UTC
Patch sent:

[PATCH] glsl: Expose gl_MaxTess{Control,Evaluation}AtomicCounters.
Comment 4 Matt Turner 2015-09-24 20:45:59 UTC
Fixed by

commit d6bb46bbe8e4ef90dedc5a04c7434a8113c10a8b
Author: Matt Turner <mattst88@gmail.com>
Date:   Wed Sep 23 18:06:19 2015 -0700

    glsl: Expose gl_MaxTess{Control,Evaluation}AtomicCounters.

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.