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.
18 lines
791 B
Metal
18 lines
791 B
Metal
// Render suite: a vertex function whose positions come from vertex buffer 0
|
|
// (indexed by vertex_id) and whose colour comes from buffer 1 (indexed by
|
|
// instance_id); each instance is shifted right by half the target. It
|
|
// surfaces vertex buffers and their offsets, vertex start and count,
|
|
// instances, base instance and base vertex.
|
|
#include <metal_stdlib>
|
|
using namespace metal;
|
|
struct VOut { float4 pos [[position]]; float4 color [[user(color)]]; float psize [[point_size]]; };
|
|
vertex VOut render_vbuf(uint vid [[vertex_id]], uint iid [[instance_id]],
|
|
const device float4 *pos [[buffer(0)]], const device float4 *col [[buffer(1)]]) {
|
|
VOut o;
|
|
o.pos = pos[vid];
|
|
o.pos.x += float(iid) * 0.5;
|
|
o.color = col[iid];
|
|
o.psize = 1.0;
|
|
return o;
|
|
}
|