Skip to content
Snippets Groups Projects
Commit bc8b9a38 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig
Browse files

libagx: assert alignment for copies


would have exposed the bug fixed.

Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
parent e03ec6a9
No related merge requests found
......@@ -7,12 +7,17 @@
KERNEL(32)
libagx_fill(global uint32_t *address, uint32_t value)
{
assert((((uintptr_t)address) & 0x3) == 0);
address[cl_global_id.x] = value;
}
KERNEL(32)
libagx_copy_uint4(global uint4 *dest, global uint4 *src)
{
assert((((uintptr_t)dest) & 0xf) == 0);
assert((((uintptr_t)src) & 0xf) == 0);
dest[cl_global_id.x] = src[cl_global_id.x];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment