Bug 83741 - [UBO] row_major layout partially ignored for arrays of structures
Summary: [UBO] row_major layout partially ignored for arrays of structures
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
Depends on:
Reported: 2014-09-10 22:11 UTC by Ian Romanick
Modified: 2016-02-23 08:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Test case (2.72 KB, text/plain)
2014-09-10 22:11 UTC, Ian Romanick

Description Ian Romanick 2014-09-10 22:11:35 UTC
Created attachment 106089 [details]
Test case

The API reports the correct offsets for everything, but the compiler generates the following for the UBO access:

    (expression int ubo_load (constant uint (0)) (constant uint (64)))

The offset should be 112, not 64.
Comment 1 Samuel Iglesias Gonsálvez 2015-07-27 08:18:37 UTC
I run it against today's master (d69da58) on a HSW machine and I got the right offset for the UBO access:

   (expression int ubo_load (constant uint (0)) (constant uint (112))

Is it still happening to you?
Comment 2 Timothy Arceri 2016-02-23 08:12:20 UTC
Fixed by:

commit	c3f17bb18f597d7f606805ae94363dae7fd51582

glsl: Strip arrayness from ir_type_dereference_variable too

If the thing being dereferenced is a record or an array of records, it
should be treated as row-major.  The ir_type_derference_record path
already does this, and I think I intended to do the same for this path
in b17a4d5d.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83741
Cc: mesa-stable@lists.freedesktop.org

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.