I want to do logging from a .metal file.
From the specification:
Metal defines the logging functions and types in <metal_logging>. To enable logging, you need to set -fmetal-enable-logging (see section 1.6.9).
I made a simple shader with a log
#include <metal_stdlib>
#include <metal_logging>
using namespace metal;
[[stitchable]] float2 wave(float2 pos, float t) {
os_log_default.log("SOMELOG");
pos.y += sin(t * 5 + pos.y / 20) * 5;
return pos;
}
And getting error “precondition failure: pipeline error: custom_effect-oQAAALAAAABQ9BMA: Encountered unlowered function call to air.os_log”
Metal version 3.2