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.
15 lines
765 B
Metal
15 lines
765 B
Metal
// For scenarios/mutgap_decoders.py: a tile function that goes through
|
|
// threadgroup memory 0, whose length the render encoder sets (0x9c): each
|
|
// thread of a 16x16 tile stores blue at its own index, and after a barrier
|
|
// writes the half4 its mirror thread stored into colour 0.
|
|
#include <metal_stdlib>
|
|
using namespace metal;
|
|
struct TileOut { half4 c [[color(0)]]; };
|
|
kernel void mutdec_tiletg(imageblock<TileOut, imageblock_layout_implicit> ib, threadgroup half4 *tg [[threadgroup(0)]],
|
|
ushort2 lid [[thread_position_in_threadgroup]]) {
|
|
uint i = lid.y * 16 + lid.x;
|
|
tg[i] = half4(0.0h, 0.0h, 1.0h, 1.0h);
|
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
|
TileOut t = ib.read(lid); t.c = tg[255 - i]; ib.write(t, lid);
|
|
}
|