Files
DroidDeck/tools/venus/layer
LarzVader ae47876386 fix(venus): Zink draws on Mali-G610 when the depth test is off (#3102)
With depthTestEnable off, Vulkan ignores depthCompareOp. The Mali-G610 driver behind Venus
(Nothing Phone (2a), Dimensity 7200 Pro) applies it anyway, even without a depth attachment.
Zink leaves the op at VK_COMPARE_OP_NEVER whenever GL has the depth test off, so every fragment
Zink draws is thrown away: clears and copies work, draws never show. This is the black Steam UI
when it renders through Zink and the black picture of OpenGL games such as Stardew Valley. DXVK
sets ALWAYS in the same case, which is why D3D games drew.

The layer now hands the driver ALWAYS while the depth test is off:
- vkCmdSetDepthTestEnable and vkCmdSetDepthCompareOp keep the state per command buffer, which
  vkBeginCommandBuffer clears. While the test is off the driver gets ALWAYS; turning it on again
  restores the application's op.
- A pipeline with the depth test off and neither state dynamic is created with ALWAYS.

It is on for every device with gaps. ALWAYS for a disabled depth test changes nothing on a driver
that follows the spec.
2026-11-24 16:16:26 -05:00
..