The suite drove apple-gfx's C API as QEMU did and recorded what the paravirt device did; the owner's ruling deletes apple-gfx and everything of it, the suite with it, so make test, bless and coverage go too. Its shader fixtures are the platforms', the graphics device's and the guest bundle's tests too: they move to tests/shaders. guest/bundle's Makefile, an input of the prebuilt kexts, still names tests/suite/fixtures/shaders, which stays as a link to tests/shaders until the kexts are next built. A worktree no longer clones the suite's 257 MiB, so new-worktree.sh adds it plainly.
12 lines
459 B
Metal
12 lines
459 B
Metal
#include <metal_stdlib>
|
|
using namespace metal;
|
|
// 64 words of static threadgroup memory, which a pipeline reports as its
|
|
// staticThreadgroupMemoryLength.
|
|
kernel void tg_static(device uint *out [[buffer(0)]], uint lid [[thread_position_in_threadgroup]],
|
|
uint gid [[thread_position_in_grid]]) {
|
|
threadgroup uint tg[64];
|
|
tg[lid & 63] = gid;
|
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
|
out[gid] = tg[(lid + 1) & 63];
|
|
}
|