The guest bundle's device answers some calls otherwise than Metal: buffers' allocatedSize, event creators with options, binary archives over fat files, newFunctionWithDescriptor: on an archive miss, the type of functions of other stages, a dynamic library's type, and more. oracle_bundle measures what an AMD or Intel Mac answers for each, one case a child process, so the bundle can answer the same where every Mac agrees.
11 lines
313 B
Metal
11 lines
313 B
Metal
// oracle_bundle's intersection function (oracle_bundle.m, case functypes).
|
|
#include <metal_stdlib>
|
|
#include <metal_raytracing>
|
|
using namespace metal;
|
|
using namespace metal::raytracing;
|
|
|
|
[[intersection(triangle, triangle_data)]] bool div_intersection(float2 bary [[barycentric_coord]])
|
|
{
|
|
return bary.x > 0.5f;
|
|
}
|