KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

Need stagemask validation for subpass' self dependency. #723

Open ratchetfreak opened 8 years ago

ratchetfreak commented 8 years ago

https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/tests/layer_validation_tests.cpp#L3135

This test (RenderPassSubpassZeroTransitionsApplied) violates the following sentence of the spec:

Self-dependencies must only include pipeline stage bits that are graphics stages.

ALL_COMMANDS is not a graphics stage (or at least includes more than just graphics stages). Not to mention the created dependency includes all stages on both sides of the dependency which violates:

Self-dependencies must not have any earlier pipeline stages depend on any later pipeline stages. More precisely, this means that whatever is the last pipeline stage in srcStageMask must be no later than whatever is the first pipeline stage in dstStageMask (the latest source stage can be equal to the earliest destination stage).

This would also mean that ALL_GRAPHICS is not allowed because there is no way to make a sensible dependency with it.

Proposals for failing tests,

  1. using a non-graphics stage in the masks like transfer or compute
  2. using srcStageMask = Fragment and dst = Vertex (violating the order constraint)
chrisforbes commented 8 years ago

Yes, this test is subtly wrong. Sounds like a good idea.

chrisforbes commented 8 years ago

Issue in RenderPassSubpassZeroTransitionsApplied now resolved; validation work to catch this is not yet done.