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
618 B
Metal
15 lines
618 B
Metal
// Render suite: a full-target triangle at the depth vertex buffer 0's first
|
|
// float gives, coloured by buffer 0's second float4, for depth and stencil
|
|
// tests, depth bias and clipping.
|
|
#include <metal_stdlib>
|
|
using namespace metal;
|
|
struct VOut { float4 pos [[position]]; float4 color [[user(color)]]; };
|
|
struct Params { float4 z; float4 color; };
|
|
vertex VOut render_depth(uint vid [[vertex_id]], const device Params *p [[buffer(0)]]) {
|
|
const float2 v[3] = { float2(-1.0, -1.0), float2(3.0, -1.0), float2(-1.0, 3.0) };
|
|
VOut o;
|
|
o.pos = float4(v[vid], p->z.x, 1.0);
|
|
o.color = p->color;
|
|
return o;
|
|
}
|