[Bug 104553] mat4: m[i][j] incorrect result with row_major UBO

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jan 10 09:09:12 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104553

--- Comment #4 from florian.will at googlemail.com ---
I used the generated_tests/random_ubo-arb_uniform_buffer_object.py script and
it generated 270 tests, and initially they all passed. That's because the tests
only verify matrix values using the [i].{x,y,z,w} method. I added the [i][j]
method and 187 out of the 270 tests started to fail.

I tested the Mesa change I suggested in the orignal bug report, i.e.
array_stride = *row_major ? 16 : 4;
and while this works for most of the generated tests, 45 tests still fail (and
they only check UBOs, so there's no std430 involved, maybe that change looks
even worse when taking that into account).

Looking at two of the individual checks that fail:
if (!float_match(m22_1[0][1], 29246.2736706, 0x46e47c8cu)), and
if (!float_match(m24_2[0][3], 13624.6092622, 0x4654e270u)),
it turns out that m22_1 and m24_2 are both row_major and 2-column.

So (obviously?) the array_stride needs to be set to 8 (instead of 4 or 16) for
2-column row-major matrices. I'm unable to figure out how to identify the
matrix type from that part of the code though. deref_array->array->type appears
to be the type of m[i], i.e. a vector data type with no info about the number
of other columns in m.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180110/ffb7d282/attachment.html>


More information about the intel-3d-bugs mailing list