Files
metal2vulkan/docs
Anees Iqbal 6ef64ae3ee rt: a depth bias's clamp is the device's own
setDepthBias:slopeScale:clamp: bounds the bias by its clamp: "Pass a positive or negative value to
limit the largest magnitude of a positive or negative bias, respectively. You can disable the bias
clamping functionality by passing 0.0" (Apple's page for the method, as fetched). Vulkan's
depthBiasClamp is the same bound (dbclamp: x for 0, min(x, clamp) above 0, max(x, clamp) below).
rt refused every clamp but 0 (DrawKind::DepthBiasClamp), where the deleted runtime passed it.

floor: depthBiasClamp joins REQUIRED. Every dumped venue reports it (vulkaninfo m3-max-48727 to
48731, 48736, 48737 and 61508 for the RX 550: RX 7900 XTX, the three 780Ms, RTX 2080, RTX 3090,
Iris Xe, RTX 5080 Laptop, llvmpipe, the UHD 630's Windows driver, KosmicKrisp on the M3 Max, RX
550), and Vulkan 1.4 and Roadmap 2022 require it.

render encoder: set_depth_bias keeps the clamp beside the bias and slope scale and records it in
vkCmdSetDepthBias, as dynamic state (no pipeline). It returns nothing now, as Metal's call does:
its only error was the clamp. DrawKind::DepthBiasClamp is deleted. The consumer's checkout names
both: rt_platform/render.rs:380 (`e.set_depth_bias(...)?`) and rt_platform/unbuilt.rs:873 (a test's
sample refusal of DepthBiasClamp); each needs a one-line change at its next pin.

AGENTS.md: the Scope sentence on features no guest has used is replaced with the planner's
wording: a feature a program can ask about is answered from the Vulkan query; one Metal gives every
Mac device with no way to ask is built, a typed refusal in the known gaps until it is.

Docs: the README's floor table, its depth bias paragraph and its render encoder known gaps;
docs/REFUSALS.md regenerated (Draw's basis and sites); api_signatures.tsv blessed (the setter's
signature, the variant gone). The conformance ledger drops render-state-depth-bias's refusal row.

Tests: every_device_tests_writes_and_biases_a_depth_attachment's first draw is biased by 2^23
(0.25 or 0.125 in the device's unit at depth 0.25) clamped to 0.0625, and the depth read back is
0.3125 on every device; the later draws' answers are unchanged in kind. The conformance case
render-state-depth-bias (a slope-scaled bias under the clamp -0.0125) now compares against Metal's
recording.
2026-11-20 21:33:03 -08:00
..