Bug 91608

Summary: [Regression, bisected] arb_program_interface_query.arb_program_interface_query-getprogramresourceiv fails
Product: Mesa Reporter: Mark Janes <mark.a.janes>
Component: Drivers/DRI/i965Assignee: Tapani Pälli <lemody>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: currojerez, lemody, mark.a.janes
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Mark Janes 2015-08-11 17:11:12 UTC
When image_load_store was enabled, arb_program_interface_query-getprogramresourceiv regressed to a failing state.

On haswell:
Standard Output

/tmp/build_root/m64/lib/piglit/bin/arb_program_interface_query-getprogramresourceiv -auto
piglit: debug: Requested an OpenGL 3.2 Core Context, and received a matching 3.3 context

Unexpected GL error: GL_INVALID_ENUM 0x500
(Error at /var/lib/jenkins/jobs/Leeroy/workspace/repos/piglit/tests/spec/arb_program_interface_query/getprogramresourceiv.c:646)
	Latest error generated while running 'vs_input0: GL_REFERENCED_BY_COMPUTE_SHADER on GL_PROGRAM_INPUT'
< many similar errors follow >

Standard Error

Mesa: User error: GL_INVALID_VALUE in glGetProgramResourceiv
Mesa: User error: GL_INVALID_OPERATION in glGetProgramResourceIndex
Mesa: User error: GL_INVALID_VALUE in glGetProgramResourceiv(propCount <= 0)
Mesa: User error: GL_INVALID_VALUE in glGetProgramResourceiv(propCount <= 0)
< many similar errors follow > 


In addition d03c657 changes spec.arb_shader_image_load_store.early-z from skipped -> failing.  This is less surprising, since the commit enables new functionality.
Comment 1 Mark Janes 2015-08-11 17:52:19 UTC
According to Curro, the test may be flawed:  

       "IIRC the test was trying to pass some
        ARB_compute_shader-specific enums in presence of
        ARB_shader_image_load_store"

Tapani may be able to comment.
Comment 2 Tapani Pälli 2015-08-12 05:02:40 UTC
Yep, I will take a look.
Comment 3 Tapani Pälli 2015-08-12 05:15:35 UTC
I've sent a fix to piglit mailing list.
Comment 4 Tapani Pälli 2015-08-13 06:51:31 UTC
fixed by

--- 8< ---
commit d345f9b1e048c8064b0ee25a3c8e39dd9723999d
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Wed Aug 12 08:11:44 2015 +0300

    arb_program_interface_query: fix getprogramresourceiv errors
    
    Move IS_PER_PATCH as part of tessellation queries, require
    GL_ARB_compute_shader for compute shader enum queries.
    
    Strictly speaking, spec would allow to query GL_REFERENCED_BY_COMPUTE_SHADER
    without having compute shaders but as it disallows GL_COMPUTE_SUBROUTINE and
    GL_COMPUTE_SUBROUTINE_UNIFORM if there is no compute shader support, it is
    likely that this is a bug in the spec.
    
    v2: add missing parenthesis! (spotted by Curro)
    
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91608
    Tested-by:  Mark Janes <mark.a.janes@intel.com>
    Reviewed-by: Francisco Jerez <currojerez@riseup.net>

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.