layers: block members do not express extra array level in member type
Fixes GH #377.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 0bad845..1b45b82 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -5658,6 +5658,60 @@
m_errorMonitor->VerifyNotFound();
}
+TEST_F(VkLayerTest, CreatePipelineGeometryInputBlockPositive)
+{
+ m_errorMonitor->ExpectSuccess();
+
+ ASSERT_NO_FATAL_FAILURE(InitState());
+ ASSERT_NO_FATAL_FAILURE(InitRenderTarget());
+
+ if (!m_device->phy().features().geometryShader) {
+ printf("Device does not support geometry shaders; skipped.\n");
+ return;
+ }
+
+ char const *vsSource =
+ "#version 450\n"
+ "layout(location=0) out VertexData { vec4 x; } vs_out;\n"
+ "void main(){\n"
+ " vs_out.x = vec4(1);\n"
+ "}\n";
+ char const *gsSource =
+ "#version 450\n"
+ "layout(triangles) in;\n"
+ "layout(triangle_strip, max_vertices=3) out;\n"
+ "layout(location=0) in VertexData { vec4 x; } gs_in[];\n"
+ "out gl_PerVertex { vec4 gl_Position; };\n"
+ "void main() {\n"
+ " gl_Position = gs_in[0].x;\n"
+ " EmitVertex();\n"
+ "}\n";
+ char const *fsSource =
+ "#version 450\n"
+ "layout(location=0) out vec4 color;\n"
+ "void main(){\n"
+ " color = vec4(1);\n"
+ "}\n";
+
+ VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this);
+ VkShaderObj gs(m_device, gsSource, VK_SHADER_STAGE_GEOMETRY_BIT, this);
+ VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this);
+
+ VkPipelineObj pipe(m_device);
+ pipe.AddColorAttachment();
+ pipe.AddShader(&vs);
+ pipe.AddShader(&gs);
+ pipe.AddShader(&fs);
+
+ VkDescriptorSetObj descriptorSet(m_device);
+ descriptorSet.AppendDummy();
+ descriptorSet.CreateVKDescriptorSet(m_commandBuffer);
+
+ pipe.CreateVKPipeline(descriptorSet.GetPipelineLayout(), renderPass());
+
+ m_errorMonitor->VerifyNotFound();
+}
+
TEST_F(VkLayerTest, CreatePipelineTessPatchDecorationMismatch)
{
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,