Fix out of bounds access to map_out which has only 1024 uint32_t. Fix assert condition which was exact oposite of the correct one.
As a result test now is expected to fail until https://github.com/KhronosGroup/glslang/issues/94 is resolved. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107371 Signed-off-by: Danylo Piliaiev <danylo.pilia...@globallogic.com> --- src/tests/func/ssbo/interleave.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/func/ssbo/interleave.c b/src/tests/func/ssbo/interleave.c index 6b42e75..282effa 100644 --- a/src/tests/func/ssbo/interleave.c +++ b/src/tests/func/ssbo/interleave.c @@ -201,11 +201,11 @@ test(void) qoQueueWaitIdle(t_queue); uint32_t *map_out = qoMapMemory(t_device, mem_out, 0, 4096, 0); - for (unsigned i = 0; i < 1024; i++) { - t_assertf(map_out[i * 4 + 0] != i * 4 + 0 || - map_out[i * 4 + 1] != i * 4 + 2 || - map_out[i * 4 + 2] != i * 4 + 1 || - map_out[i * 4 + 3] != i * 4 + 3, + for (unsigned i = 0; i < 256; i++) { + t_assertf(map_out[i * 4 + 0] == i * 4 + 0 && + map_out[i * 4 + 1] == i * 4 + 2 && + map_out[i * 4 + 2] == i * 4 + 1 && + map_out[i * 4 + 3] == i * 4 + 3, "buffer mismatch at uvec4 %d: found (%u, %u, %u, %u), " "expected (%u, %u, %u, %u)", i, map_out[i * 4 + 0], map_out[i * 4 + 1], -- 2.17.1 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit