tests: Fix unexpected errors in CGP scissor check
Fixed 3 issues in PSOViewportCountWithoutDataAndDynScissorMismatch,
fixed some clang-format stuff.
Change-Id: I65ad1ff193acc18a6ee9e96521b5dd5f2f196eb9
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 9f56210..8251eec 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -7346,9 +7346,9 @@
vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL);
vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL);
}
-// Create PSO w/o non-zero viewportCount but no viewport data
-// Then run second test where dynamic scissor count doesn't match PSO scissor
-// count
+
+// Create PSO w/o non-zero viewportCount but no viewport data, then run second test where dynamic scissor count doesn't match PSO
+// scissor count
TEST_F(VkLayerTest, PSOViewportCountWithoutDataAndDynScissorMismatch) {
VkResult err;
@@ -7424,12 +7424,20 @@
dyn_state_ci.dynamicStateCount = 1;
dyn_state_ci.pDynamicStates = &sc_state;
+ VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {};
+ pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
+ pipe_ms_state_ci.pNext = NULL;
+ pipe_ms_state_ci.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
+ pipe_ms_state_ci.sampleShadingEnable = 0;
+ pipe_ms_state_ci.minSampleShading = 1.0;
+ pipe_ms_state_ci.pSampleMask = NULL;
+
VkPipelineShaderStageCreateInfo shaderStages[2];
memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo));
VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this);
- VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); // We shouldn't need a fragment shader
- // but add it to be able to run on more devices
+ VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this);
+ // We shouldn't need a fragment shader but add it to be able to run on more devices
shaderStages[0] = vs.GetStageCreateInfo();
shaderStages[1] = fs.GetStageCreateInfo();
@@ -7447,6 +7455,7 @@
VkPipelineRasterizationStateCreateInfo rs_ci = {};
rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
+ rs_ci.lineWidth = m_device->props.limits.lineWidthRange[0];
rs_ci.pNext = nullptr;
VkPipelineColorBlendAttachmentState att = {};
@@ -7469,6 +7478,7 @@
gp_ci.pRasterizationState = &rs_ci;
gp_ci.pColorBlendState = &cb_ci;
gp_ci.pDynamicState = &dyn_state_ci;
+ gp_ci.pMultisampleState = &pipe_ms_state_ci;
gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT;
gp_ci.layout = pipeline_layout;
gp_ci.renderPass = renderPass();