tests: Break dynamic state tests out
Having all dynamic state tests in a single testcase causes
errors on mobile so breaking them back out into separate
tests. There's still one failing on mobile that needs to
be separately debugged.
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 5c21899..5476dc7 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -3906,15 +3906,24 @@
m_errorMonitor->VerifyNotFound();
}
-TEST_F(VkLayerTest, DynamicStatesNotBound) {
+TEST_F(VkLayerTest, DynamicDepthBiasNotBound) {
TEST_DESCRIPTION(
- "Run a series of simple draw calls to validate all the different "
- "failure cases that can occur when dynamic state is required but not "
- "correctly bound."
- "Here are the different dynamic state cases verified by this test:\n"
- "-Line Width\n-Depth Bias\n-Viewport State\n-Scissor State\n-Blend "
- "State\n-Depth Bounds\n-Stencil Read Mask\n-Stencil Write "
- "Mask\n-Stencil Reference");
+ "Run a simple draw calls to validate failure when Depth Bias dynamic "
+ "state is required but not correctly bound.");
+
+ // Dynamic depth bias
+ m_errorMonitor->SetDesiredFailureMsg(
+ VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ "Dynamic depth bias state not set for this command buffer");
+ VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
+ BsoFailDepthBias);
+ m_errorMonitor->VerifyFound();
+}
+
+TEST_F(VkLayerTest, DynamicLineWidthNotBound) {
+ TEST_DESCRIPTION(
+ "Run a simple draw calls to validate failure when Line Width dynamic "
+ "state is required but not correctly bound.");
// Dynamic line width
m_errorMonitor->SetDesiredFailureMsg(
@@ -3923,13 +3932,13 @@
VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
BsoFailLineWidth);
m_errorMonitor->VerifyFound();
- // Dynamic depth bias
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "Dynamic depth bias state not set for this command buffer");
- VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
- BsoFailDepthBias);
- m_errorMonitor->VerifyFound();
+}
+
+TEST_F(VkLayerTest, DynamicViewportNotBound) {
+ TEST_DESCRIPTION(
+ "Run a simple draw calls to validate failure when Viewport dynamic "
+ "state is required but not correctly bound.");
+
// Dynamic viewport state
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -3937,6 +3946,13 @@
VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
BsoFailViewport);
m_errorMonitor->VerifyFound();
+}
+
+TEST_F(VkLayerTest, DynamicScissorNotBound) {
+ TEST_DESCRIPTION(
+ "Run a simple draw calls to validate failure when Scissor dynamic "
+ "state is required but not correctly bound.");
+
// Dynamic scissor state
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -3944,6 +3960,12 @@
VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
BsoFailScissor);
m_errorMonitor->VerifyFound();
+}
+
+TEST_F(VkLayerTest, DynamicColorBlendNotBound) {
+ TEST_DESCRIPTION(
+ "Run a simple draw calls to validate failure when Color Blend dynamic "
+ "state is required but not correctly bound.");
// Dynamic blend state
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -3951,6 +3973,12 @@
VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
BsoFailDepthBounds);
m_errorMonitor->VerifyFound();
+}
+
+TEST_F(VkLayerTest, DynamicStencilReadNotBound) {
+ TEST_DESCRIPTION(
+ "Run a simple draw calls to validate failure when Stencil Read dynamic "
+ "state is required but not correctly bound.");
// Dynamic stencil read mask
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -3958,6 +3986,12 @@
VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
BsoFailStencilReadMask);
m_errorMonitor->VerifyFound();
+}
+
+TEST_F(VkLayerTest, DynamicStencilWriteNotBound) {
+ TEST_DESCRIPTION(
+ "Run a simple draw calls to validate failure when Stencil Write dynamic"
+ " state is required but not correctly bound.");
// Dynamic stencil write mask
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -3965,6 +3999,12 @@
VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText,
BsoFailStencilWriteMask);
m_errorMonitor->VerifyFound();
+}
+
+TEST_F(VkLayerTest, DynamicStencilRefNotBound) {
+ TEST_DESCRIPTION(
+ "Run a simple draw calls to validate failure when Stencil Ref dynamic "
+ "state is required but not correctly bound.");
// Dynamic stencil reference
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,