mojira.dev
MC-310831

Null pipeline handles are bound before the guard that rejects them runs

Setting a pipeline that declares a depth stencil state on a render pass with no depth attachment records vkCmdBindPipeline with VK_NULL_HANDLE, because the depth-less variant of such a pipeline is deliberately left as a null handle and that is the variant the render pass selects.

The frontend already treats this combination as invalid and rejects it precisely, since the condition it tests is defined as the depth stencil state being present, which is exactly what leaves the second variant null. That rejection lives in the draw validation path, so by the time it throws, the bind has already been recorded into the command buffer. Vanilla never produces the combination, as every pipeline it uses in a depth-less pass declares no depth stencil state.

Rejecting the combination where the pipeline is set, rather than where a draw is issued, would stop the invalid command from reaching the command buffer at all.

Comments 1

Lolo

Adrien Givry

Community Consensus

Platform G

Normal

Rendering

26.3 Snapshot 7

Retrieved