Bug 92137 - [regression, bisected] piglit arb_separate_shader_objects.validateprogrampipeline fails
Summary: [regression, bisected] piglit arb_separate_shader_objects.validateprogrampipe...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Tapani Pälli
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-27 07:46 UTC by Boyan Ding
Modified: 2016-01-14 11:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Boyan Ding 2015-09-27 07:46:01 UTC
Found this while testing my own patches. Bisect shows:

ba02f7a3b6a0e4314753a8e5080db61241563f9c is the first bad commit
commit ba02f7a3b6a0e4314753a8e5080db61241563f9c
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Tue Sep 1 13:53:44 2015 +0300

    mesa: return initial value for VALIDATE_STATUS if pipe not bound
    
    From OpenGL 4.5 Core spec (7.13):
    
        "If pipeline is a name that has been generated (without subsequent
        deletion) by GenProgramPipelines, but refers to a program pipeline
        object that has not been previously bound, the GL first creates a
        new state vector in the same manner as when BindProgramPipeline
        creates a new program pipeline object."
    
    I interpret this as "If GetProgramPipelineiv gets called without a
    bound (but valid) pipeline object, the state should reflect initial
    state of a new pipeline object." This is also expected behaviour by
    ES31-CTS.sepshaderobjs.PipelineApi conformance test.
    
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>

:040000 040000 57ae85456fbbc0c41662d47e13a0dc7419f70448 1b83a40c334739a0feafeafb6a6ce491ad6883ab M	src
Comment 1 Tapani Pälli 2015-09-27 14:21:29 UTC
what is the HEAD commit of your Piglit tree?
Comment 2 Tapani Pälli 2015-09-27 14:22:55 UTC
(In reply to Tapani Pälli from comment #1)
> what is the HEAD commit of your Piglit tree?

Or maybe more specifically, do you have following commit in your tree?

--- 8< ---

sso: bind pipeline object in ValidateProgramPipeline
When fixing some ES 3.1 conformance issues I noticed several subtests
started to fail. Pipeline has to be bound before validation, this makes
failing subtests to pass with planned Mesa changes.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Comment 3 Boyan Ding 2015-09-28 01:31:46 UTC
My piglit tree was a little bit old. I updated today only to find now this test consistently fails on both old and new versions of mesa. Log below

--- 8< ---

PIGLIT: {"subtest": {"VS/FS program, single glUseProgramStages call" : "pass"}}
PIGLIT: {"subtest": {"VS/FS program, multiple glUseProgramStages calls" : "pass"}}
PIGLIT: {"subtest": {"program per pipeline stage" : "pass"}}
Failed to validate the pipeline: Program is active for multiple shader stages with an intervening stage provided by another program
PIGLIT: {"subtest": {"GS splitting a VS/FS pipeline" : "pass"}}
PIGLIT: {"subtest": {"TCS splitting a VS/GS pipeline" : "skip"}}
PIGLIT: {"subtest": {"TES splitting a VS/GS program" : "skip"}}
Unexpected GL error: GL_INVALID_OPERATION 0x502
(Error at /home/dingbur/tech/mesa/piglit/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c:164)
Failed to validate the pipeline: Program lacks a vertex shader
PIGLIT: {"subtest": {"GS without VS" : "pass"}}
PIGLIT: {"subtest": {"TES/TCS without VS" : "skip"}}
Unexpected GL error: GL_INVALID_OPERATION 0x502
(Error at /home/dingbur/tech/mesa/piglit/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c:164)
Failed to validate the pipeline: Program 6 is not active for all shaders that was linked
PIGLIT: {"subtest": {"Only VS from a VS/FS program" : "pass"}}
Unexpected GL error: GL_INVALID_OPERATION 0x502
(Error at /home/dingbur/tech/mesa/piglit/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c:164)
Failed to validate the pipeline: Program 8 is not active for all shaders that was linked
PIGLIT: {"subtest": {"Only GS from a VS/GS program" : "pass"}}
PIGLIT: {"subtest": {"Only TES from TES/TCS program" : "skip"}}
Unexpected GL error: GL_INVALID_OPERATION 0x502
(Error at /home/dingbur/tech/mesa/piglit/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c:164)
PIGLIT: {"subtest": {"Relink attached VS without GL_PROGRAM_SEPARABLE (sanity pre-test)" : "pass"}}
Failed to validate the pipeline: Program 4 was relinked without PROGRAM_SEPARABLE state
PIGLIT: {"subtest": {"Relink attached VS without GL_PROGRAM_SEPARABLE" : "pass"}}
PIGLIT: {"result": "fail" }
Comment 4 Tapani Pälli 2015-09-28 03:44:41 UTC
> My piglit tree was a little bit old. I updated today only to find
> now this test consistently fails on both old and new versions of mesa.

Right, this should be the 'expected result' right now. It has been failing for a long time.
Comment 5 Tapani Pälli 2016-01-14 11:26:01 UTC
This test is now passing.
Comment 6 Tapani Pälli 2016-01-14 11:52:43 UTC
Fixed by
--- 8< ----
commit c3ec12ec3c1ddbc72e50df1f5632fe0547a89f7e
Author: Timothy Arceri <timothy.arceri@collabora.com>
Date:   Thu Nov 26 21:32:48 2015 +1100

    glsl: don't generate extra errors in ValidateProgramPipeline
    
    From Section 11.1.3.11 (Validation) of the GLES 3.1 spec:
    
       "An INVALID_OPERATION error is generated by any command that trans-
       fers vertices to the GL or launches compute work if the current set
       of active program objects cannot be executed, for reasons including:"
    
    It then goes on to list the rules we validate in the
    _mesa_validate_program_pipeline() function.
    
    For ValidateProgramPipeline the only mention of generating an error is:
    
       "An INVALID_OPERATION error is generated if pipeline is not a name re-
       turned from a previous call to GenProgramPipelines or if such a name has
       since been deleted by DeleteProgramPipelines,"
    
    Which we handle separately.
    
    This fixes:
    ES31-CTS.sepshaderobjs.PipelineApi
    
    No regressions on the eEQP 3.1 tests.
    
    Cc: Gregory Hainaut <gregory.hainaut@gmail.com>
    Reviewed-by: Tapani Pälli <tapani.palli@intel.com>


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.