Bug 81528 - Linking of uniform struct with array of structs doesnt produce the correct outcome
Summary: Linking of uniform struct with array of structs doesnt produce the correct ou...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-19 10:04 UTC by Timothy Arceri
Modified: 2014-09-18 10:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Piglit patch (1.37 KB, text/plain)
2014-07-19 10:04 UTC, Timothy Arceri
Details

Description Timothy Arceri 2014-07-19 10:04:17 UTC
Created attachment 103097 [details]
Piglit patch

Attached is a piglit patch that triggers the issue.
Comment 1 Tapani Pälli 2014-09-18 10:43:31 UTC
test passes fine on mesa master (71d4fc8), it was fixed by:

--- 8< ---
commit b48621c348fef53cc226b5ca8c08e4c71d24edec
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Sat Jul 19 14:14:29 2014 -0700

    glsl: Do not add extra padding to structures
    
    This code was attemping to align the base of the structure to the required
    alignment of the structure.  However, it had two problems:
    
    1. It was aligning the target structure member, not the base of the
    structure.
    
    2. It was calculating the alignment based on the members previous to the
    target member instead of all the members of the structure.
    
    Fixes gles3conform failures in:
    
    ES3-CTS.shaders.uniform_block.random.nested_structs.6
    ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.2
    ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.6
    ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.5
    ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.19
    ES3-CTS.shaders.uniform_block.random.all_shared_buffer.0
    ES3-CTS.shaders.uniform_block.random.all_shared_buffer.2
    ES3-CTS.shaders.uniform_block.random.all_shared_buffer.6
    ES3-CTS.shaders.uniform_block.random.all_shared_buffer.12
    
    v2: Fix rebase failure noticed by Matt.
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Matt Turner <mattst88@gmail.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.