mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 06:28:08 +02:00
would have exposed the bug fixed. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
28 lines
592 B
C
28 lines
592 B
C
/*
|
|
* Copyright 2024 Valve Corporation
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
#include "compiler/libcl/libcl.h"
|
|
|
|
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];
|
|
}
|
|
|
|
KERNEL(16)
|
|
libagx_copy_uchar(global uint8_t *dest, global uint8_t *src)
|
|
{
|
|
dest[cl_global_id.x] = src[cl_global_id.x];
|
|
}
|