Bug 108457

Summary: [OpenGL CTS] KHR-GL46.tessellation_shader.single.xfb_captures_data_from_correct_stage fails
Product: Mesa Reporter: Chema Casanova <jmcasanova>
Component: glsl-compilerAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Chema Casanova 2018-10-16 14:32:16 UTC
With the landing of update f75a5cccd800bb011b44c799415efdfe547d6076 at OpenGL CTS 4.6.0  KHR-GL46.tessellation_shader.single.xfb_captures_data_from_correct_stage starts failing.

commit f75a5cccd800bb011b44c799415efdfe547d6076
Author: Piers Daniell <pdaniell@nvidia.com>
Date:   Tue Oct 2 11:51:25 2018 -0600

    Use non-arrayed varying name for TCS blocks
    
    This is a partial revert of CL 2625 to restore naming the
    value member of the BLOCK_INOUT interface block as
    "BLOCK_INOUT.value" rather than "BLOCK_INOUT[0].value".
    
    Affects:
    
    KHR-GL46.tessellation_shader.single.xfb_captures_data_from_correct_stage
    
    Components: OpenGL
    
    VK-GL-CTS issue: 1388
    
    Change-Id: I9ef6453ec5465a0fa5561220cc9d7bfe54298416

Mesa populates the transform feedback candidates with the following names because TCS interface block is arrayed:

BLOCK_INOUT[0].value
BLOCK_INOUT[1].value
BLOCK_INOUT[2].value
BLOCK_INOUT[3].value

As now the tests has been changed to use as XFB name BLOCK_INOUT.value the variable isn't found and a linking error is raised.

More details about the motivations of the test modification are available at Khronos Gitlab.
Comment 1 Chema Casanova 2018-11-21 18:55:44 UTC
I've just send a fix for review:

https://patchwork.freedesktop.org/series/52841/
Comment 2 Chema Casanova 2019-03-04 02:13:14 UTC
Fix landed in Mesa master.

commit 4eec3a2a3652317f8e0fa97e0730c297bde8241a 
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Fri Feb 22 01:13:39 2019 -0500

    glsl: fix recording of variables for XFB in TCS shaders
    
    This is purely for conformance, since it's not actually possible to do
    XFB on TCS output varyings. However we do have to make sure we record
    the names correctly, and this removes an extra level of array-ness from
    the names in question.
    
    Fixes KHR-GL45.tessellation_shader.single.xfb_captures_data_from_correct_stage
    
    v2: Add comment to the new program_resource_visitor::process function.
        (Ilia Mirkin)
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108457
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: 19.0 <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Comment 3 jacobarch02@gmail.com (Spammer; Account disabled) 2019-08-24 05:53:54 UTC Comment hidden (spam)

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.