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.
11 lines
499 B
Metal
11 lines
499 B
Metal
#include <metal_stdlib>
|
|
using namespace metal;
|
|
// Relations between host-assigned 64-bit values the guest cannot lock by
|
|
// value: for pair i (in[2i], in[2i+1]), out[i] = bit 0 equal, bit 1 first
|
|
// nonzero, bit 2 second nonzero.
|
|
kernel void rel(device const ulong *in [[buffer(0)]], device uint *out [[buffer(1)]],
|
|
uint gid [[thread_position_in_grid]]) {
|
|
ulong a = in[2 * gid], b = in[2 * gid + 1];
|
|
out[gid] = (a == b ? 1u : 0u) | (a != 0 ? 2u : 0u) | (b != 0 ? 4u : 0u);
|
|
}
|