You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depth write dynamic state seems to currently be required for any draw if marked as dynamic in the pipeline, regardless of the depth test enable value. This is contrary to how it works for other state that would go unused, for example depth compare op, which is not required when depth test is disabled. According to the spec, if depth test enable is false, depth write enable has no effect and is also treated as false, so it should not be required here.
The VUID for depth compare op, which indicates it is not needed with depth test disabled:
VUID-vkCmdDraw-None-07845
If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of rasterizerDiscardEnable is VK_FALSE, and the current value of depthTestEnable is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command
The VUID for depth write enable, which does not (and which the validation layer will complain about):
VUID-vkCmdDraw-None-07844
If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of rasterizerDiscardEnable is VK_FALSE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command
The text was updated successfully, but these errors were encountered:
Depth write dynamic state seems to currently be required for any draw if marked as dynamic in the pipeline, regardless of the depth test enable value. This is contrary to how it works for other state that would go unused, for example depth compare op, which is not required when depth test is disabled. According to the spec, if depth test enable is false, depth write enable has no effect and is also treated as false, so it should not be required here.
The VUID for depth compare op, which indicates it is not needed with depth test disabled:
VUID-vkCmdDraw-None-07845
If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value of rasterizerDiscardEnable is VK_FALSE, and the current value of depthTestEnable is VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command
The VUID for depth write enable, which does not (and which the validation layer will complain about):
VUID-vkCmdDraw-None-07844
If a shader object is bound to any graphics stage or a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value of rasterizerDiscardEnable is VK_FALSE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command
The text was updated successfully, but these errors were encountered: