Files
metal2vulkan/docs
Anees Iqbal f9633bf18d rt: a pass's depth attachment is loaded, cleared and stored, untested; a pipeline state takes its depth format
The render-state lane's first feature. A replay stream's 478 depth passes (depth census
m3-max-48544, the one stream with any) are a shader-read Depth32Float texture with no stencil
attachment beside it, a Clear of 1 (476) or a Load (2) and a Store, drawn under Metal's default
depth-stencil state (compare Always, no write) by four pipeline states of depthAttachmentPixelFormat
Depth32Float. rt refused all of them: the pass by RenderPassKind::DepthAttachment, the states by
RenderPipelineKind::DepthAttachment.

- pass.rs: Pass holds the depth attachment as it holds the stencil one: a format with depth
  (else Refusal::AttachmentFormat, as Metal's validation stops it), the texture's view of the
  level and layer, Metal's load and store actions as for a colour, its clear depth a float.
  `vkCmdBeginRendering` takes it as pDepthAttachment. With a stencil attachment beside it the two
  are one view (VUID-VkRenderingInfo-pDepthAttachment-06085): two others are
  RenderPassKind::DepthStencilViews. A Clear outside [0, 1] or NaN is RenderPassKind::ClearDepth
  (VUID-VkClearDepthStencilValue-depth-00022; the floor has no VK_EXT_depth_range_unrestricted).
  Pass::targets yields each image once, so a combined texture's one view is moved, kept and
  barriered once.
- render.rs: the descriptor's depth format is no refusal. Fixed holds the translator's depth
  format (vk_format over the device's format query: a format the device does not render depth
  in is the translator's typed refusal), the VkPipeline renders into it, and renders_into holds
  it to the pass's depth attachment, as the colour and stencil formats are.
- The draw keeps DrawKind::DepthTest for a state that tests or writes depth; the encoder's
  dynamic depth state stays off, which is what the default state means.
- error.rs: RenderPassKind::DepthAttachment and RenderPipelineKind::DepthAttachment go;
  DepthStencilViews and ClearDepth come. Their docs, the bases and Refusal::AttachmentFormat's
  doc say what is built.
- README: the render pass and encoder sections and their known gaps.
- docs/REFUSALS.md regenerated; the API signature table blessed (two variants out, two in).
- tests:
  - draw.rs every_device_clears_loads_and_stores_a_depth_attachment_its_draws_do_not_test: a
    shader-read Depth32Float attachment cleared to 0.25, then loaded, each pass one submission,
    three barriers, one pass, no byte copied; the colour drawn; the depth read back 0.25; a state
    without the pass's depth format, one with it in a pass without depth, and a Less test are
    each their gap.
  - pass.rs: the depth refusal is replaced by a depth attachment of a colour format, a depth and
    a stencil of two textures, and a clear depth of 2 and of NaN.
  - render.rs: the depth attachment leaves the pipeline refusal list.

Verified: nothing yet; the next check job compiles and runs it.
2026-11-18 16:52:29 -08:00
..