<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Clover does not respect alignment of pointer arguments"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93977">93977</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clover does not respect alignment of pointer arguments
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Other
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>arsenm2@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>The handling of arguments seems to not account for the required alignment of
pointer kernel arguments. The alignment is tracked for the pointer value
itself, but nothing is recording the alignment of the pointer element type
needed for the runtime to provide the correctly aligned pointer.
I believe this is why the conformance test kernel_memory_alignment_local fails
for all of the parameter tests. The global and constant versions seem to work,
I'm assuming because every allocated buffer happens to have an alignment of 16
or higher anyway.
Also here:
const unsigned arg_store_size = TD.getTypeStoreSize(arg_type);
// OpenCL 1.2 specification, Ch. 6.1.5: "A built-in data
// type that is not a power of two bytes in size must be
// aligned to the next larger power of two". We need this
// alignment for three element vectors, which have
// non-power-of-2 store size.
const unsigned arg_api_size = util_next_power_of_two(arg_store_size);
TD.getTypeAllocSize(arg_type) should be used instead of manually rounding it.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>