From 92294611250ee5de6f62c7a5d51ab29b99ae609c Mon Sep 17 00:00:00 2001 From: John Anthony Date: Wed, 29 Jan 2020 16:33:53 +0100 Subject: [PATCH] Only require geometryStreams feature in XFB query tests if needed Change transform feedback query tests to only require the geometryStreams feature for test cases using stream ID != 0. Affects: - dEQP-VK.transform_feedback.simple.query_0_* - dEQP-VK.transform_feedback.simple.host_query_reset_0_* Components: Vulkan VK-GL-CTS Issue: 2197 Change-Id: Id1378f58e6634dd70ad89843e000d047af0ea496 --- .../vktTransformFeedbackSimpleTests.cpp | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp b/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp index 8c33f21..4ed22a3 100644 --- a/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp +++ b/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp @@ -1512,7 +1512,7 @@ TransformFeedbackQueryTestInstance::TransformFeedbackQueryTestInstance (Context& if (!features.geometryShader) TCU_THROW(NotSupportedError, "Missing feature: geometryShader"); - if (transformFeedbackFeatures.geometryStreams == DE_FALSE) + if (streamsRequired > 1 && transformFeedbackFeatures.geometryStreams == DE_FALSE) TCU_THROW(NotSupportedError, "geometryStreams feature is not supported"); if (streamsSupported < streamsRequired) @@ -2079,6 +2079,28 @@ void TransformFeedbackTestCase::initPrograms (SourceCollections& programCollecti } // geometry shader + if (m_parameters.streamId == 0) + { + std::ostringstream src; + + src << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_450) << "\n" + << "\n" + << "layout(points) in;\n" + << "layout(location = 0) in vec4 in0[];\n" + << "\n" + << "layout(points, max_vertices = 1) out;\n" + << "layout(xfb_buffer = 0, xfb_offset = 0, xfb_stride = 16, location = 0) out vec4 out0;\n" + << "\n" + << "void main(void)\n" + << "{\n" + << " out0 = in0[0];\n" + << " EmitVertex();\n" + << " EndPrimitive();\n" + << "}\n"; + + programCollection.glslSources.add("geom") << glu::GeometrySource(src.str()); + } + else { const deUint32 s = m_parameters.streamId; std::ostringstream src; -- 2.7.4