draws.10k's guest bench draws with v_small and f_flat, which take their bytes as a constant float4 & at buffer 0. draw_cost's 10k drew with render_vbuf and render_fbuf, which read device pointers, so the runtime bound storage buffers where the VM's draws bind constant ones: on Iris the VM's lane thread spends 7.7% in the runtime's push_set, and draw_cost's 10k never reached it, with either kind of upload chunk. The 10k and many shapes now run under the bench's pair, render_small and render_flat, compiled alone here with Xcode's metal (no other metallib rebuilt). The runtime path also takes DRAW_COST_RUNTIME_PASS=fresh, which makes each pass's descriptor anew inside the count as the platform's and the decoder's paths do: whether the runtime's extra pass work under the platform comes of a new descriptor each pass or of what the platform's descriptors carry.
7 lines
325 B
Metal
7 lines
325 B
Metal
// Render suite: the guest bench's flat colour (draws.10k's f_flat, in
|
|
// guest/bundle/tools/bench/bench.m): constant buffer 0's float4, which the
|
|
// bench sets with setFragmentBytes once a pass.
|
|
#include <metal_stdlib>
|
|
using namespace metal;
|
|
fragment half4 render_flat(constant float4 &c [[buffer(0)]]) { return half4(c); }
|