Merge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7

Change-Id: I7535fbad6813c7a6dfec1324a2656329de792ebe
diff --git a/external/vulkancts/modules/vulkan/compute/vktComputeWorkgroupMemoryExplicitLayoutTests.cpp b/external/vulkancts/modules/vulkan/compute/vktComputeWorkgroupMemoryExplicitLayoutTests.cpp
index 4f7e9b1..6cebf37 100644
--- a/external/vulkancts/modules/vulkan/compute/vktComputeWorkgroupMemoryExplicitLayoutTests.cpp
+++ b/external/vulkancts/modules/vulkan/compute/vktComputeWorkgroupMemoryExplicitLayoutTests.cpp
@@ -675,7 +675,7 @@
 		CASE_WITH_REVERSE(DEFAULT | STD430 | SCALAR, INT16,
 			"u32",			"uint32_t v",		"uint32_t(0x12345678)",
 			"u16_array",	"uint16_t v[2]",	makeU16Array({0x5678, 0x1234})),
-		CASE_WITH_REVERSE(DEFAULT | STD430 | SCALAR, INT8,
+		CASE_WITH_REVERSE(DEFAULT | STD430 | SCALAR, INT64 | INT8,
 			"u64",			"uint64_t v",		"uint64_t(0x1234567890ABCDEFUL)",
 			"u8_array",		"uint8_t v[8]",		makeU8Array({0xEF, 0xCD, 0xAB, 0x90, 0x78, 0x56, 0x34, 0x12})),
 		CASE_WITH_REVERSE(DEFAULT | STD430 | SCALAR, INT64 | INT16,
diff --git a/external/vulkancts/modules/vulkan/ray_query/vktRayQueryAccelerationStructuresTests.cpp b/external/vulkancts/modules/vulkan/ray_query/vktRayQueryAccelerationStructuresTests.cpp
index 0105ceb..3985bcf 100644
--- a/external/vulkancts/modules/vulkan/ray_query/vktRayQueryAccelerationStructuresTests.cpp
+++ b/external/vulkancts/modules/vulkan/ray_query/vktRayQueryAccelerationStructuresTests.cpp
@@ -2846,12 +2846,11 @@
 	// #version 460 core
 	// #extension GL_EXT_ray_query : require
 	// #extension GL_EXT_nonuniform_qualifier : enable
-	// #extension GL_ARB_gpu_shader_int64 : enable			// needed only to generate spir-v
 
 	// #define ARRAY_SIZE 500
 	// layout(set = 0, binding = 0) uniform accelerationStructureEXT tlasArray[ARRAY_SIZE];
 	// layout(set = 0, binding = 1) readonly buffer topLevelASPointers {
-	//     uint64_t ptr[];
+	//     uvec2 ptr[];
 	// } tlasPointers;
 	// layout(set = 0, binding = 2) readonly buffer topLevelASIndices {
 	//     uint idx[];
@@ -2890,7 +2889,6 @@
 	// }
 
 	const std::string compSource =
-		"OpCapability Int64\n"
 		"OpCapability Shader\n"
 		"OpCapability RayQueryKHR\n"
 		"OpCapability ShaderNonUniform\n"
@@ -2986,12 +2984,12 @@
 		"%124						= OpConstant %type_uint32 7\n"
 
 		// <changed_section>
-		"%type_uint64				= OpTypeInt 64 0\n"
-		"%127						= OpTypeRuntimeArray %type_uint64\n"
+		"%v2uint					= OpTypeVector %type_uint32 2\n"
+		"%127						= OpTypeRuntimeArray %v2uint\n"
 		"%128						= OpTypeStruct %127\n"
 		"%129						= OpTypePointer StorageBuffer %128\n"
 		"%var_as_pointers_ssbo		= OpVariable %129 StorageBuffer\n"
-		"%type_uint64_ssbo_ptr		= OpTypePointer StorageBuffer %type_uint64\n"
+		"%type_uint64_ssbo_ptr		= OpTypePointer StorageBuffer %v2uint\n"
 		// </changed_section>
 
 		// void main()
@@ -3060,7 +3058,7 @@
 
 		// <changed_section>
 		"%as_device_addres_ptr		= OpAccessChain %type_uint64_ssbo_ptr %var_as_pointers_ssbo %c_int32_0 %as_index\n"
-		"%as_device_addres			= OpLoad %type_uint64 %as_device_addres_ptr Aligned 8\n"
+		"%as_device_addres			= OpLoad %v2uint %as_device_addres_ptr\n"
 		"%as_to_use					= OpConvertUToAccelerationStructureKHR %type_as %as_device_addres\n"
 		// </changed_section>
 
diff --git a/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingAccelerationStructuresTests.cpp b/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingAccelerationStructuresTests.cpp
index da6784e..13dbeb6 100644
--- a/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingAccelerationStructuresTests.cpp
+++ b/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingAccelerationStructuresTests.cpp
@@ -1919,13 +1919,12 @@
 	// #version 460 core
 	// #extension GL_EXT_ray_tracing : require
 	// #extension GL_EXT_nonuniform_qualifier : enable
-	// #extension GL_ARB_gpu_shader_int64 : enable			// needed only to generate spir-v
 	// #define ARRAY_SIZE 500
 	// layout(location = 0) rayPayloadEXT uvec2 payload;	// offset and flag indicating if we are using descriptors or pointers
 
 	// layout(set = 0, binding = 0) uniform accelerationStructureEXT tlasArray[ARRAY_SIZE];
 	// layout(set = 0, binding = 1) readonly buffer topLevelASPointers {
-	//     uint64_t ptr[];
+	//     uvec2 ptr[];
 	// } tlasPointers;
 	// layout(set = 0, binding = 2) readonly buffer topLevelASIndices {
 	//     uint idx[];
@@ -1955,7 +1954,6 @@
 	// };
 
 	const std::string rgenSource =
-		"OpCapability Int64\n"
 		"OpCapability RayTracingKHR\n"
 		"OpCapability ShaderNonUniform\n"
 		"OpExtension \"SPV_EXT_descriptor_indexing\"\n"
@@ -2047,12 +2045,11 @@
 		"%91							= OpConstant %type_uint32 3\n"
 
 		// <changed_section>
-		"%type_uint64					= OpTypeInt 64 0\n"
-		"%104							= OpTypeRuntimeArray %type_uint64\n"
+		"%104							= OpTypeRuntimeArray %58\n"
 		"%105							= OpTypeStruct %104\n"
 		"%106							= OpTypePointer StorageBuffer %105\n"
 		"%var_as_pointers_ssbo			= OpVariable %106 StorageBuffer\n"
-		"%type_uint64_ssbo_ptr			= OpTypePointer StorageBuffer %type_uint64\n"
+		"%type_uint64_ssbo_ptr			= OpTypePointer StorageBuffer %58\n"
 		// </changed_section>
 
 		// void main()
@@ -2122,7 +2119,7 @@
 
 		// <changed_section> OLD
 		"%as_device_addres_ptr			= OpAccessChain %type_uint64_ssbo_ptr %var_as_pointers_ssbo %c_int32_0 %as_index\n"
-		"%as_device_addres				= OpLoad %type_uint64 %as_device_addres_ptr Aligned 8\n"
+		"%as_device_addres				= OpLoad %58 %as_device_addres_ptr\n"
 		"%as_to_use						= OpConvertUToAccelerationStructureKHR %type_as %as_device_addres\n"
 		// </changed_section>
 
diff --git a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp
index e89f07a..60b1de3 100644
--- a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp
+++ b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp
@@ -94,12 +94,10 @@
 class ShaderClockTestInstance : public TestInstance
 {
 public:
-	ShaderClockTestInstance(Context& context, bool realtimeTest, const ShaderSpec& shaderSpec, glu::ShaderType shaderType)
+	ShaderClockTestInstance(Context& context, const ShaderSpec& shaderSpec, glu::ShaderType shaderType)
 		: TestInstance(context)
-		, m_realtime_test(realtimeTest)
 		, m_executor(createExecutor(m_context, shaderType, shaderSpec))
 	{
-		checkSupported();
 	}
 
 	virtual tcu::TestStatus iterate(void)
@@ -120,34 +118,12 @@
 	}
 
 private:
-	void checkSupported(void)
-	{
-		m_context.requireDeviceFunctionality("VK_KHR_shader_clock");
-
-		VkPhysicalDeviceShaderClockFeaturesKHR shaderClockFeatures;
-		shaderClockFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR;
-		shaderClockFeatures.pNext = DE_NULL;
-
-		VkPhysicalDeviceFeatures2 features;
-		features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
-		features.pNext = &shaderClockFeatures;
-
-		m_context.getInstanceInterface().getPhysicalDeviceFeatures2(m_context.getPhysicalDevice(), &features);
-
-		if (m_realtime_test && !shaderClockFeatures.shaderDeviceClock)
-			TCU_THROW(NotSupportedError, "Shader device clock is not supported");
-
-		if (!m_realtime_test && !shaderClockFeatures.shaderSubgroupClock)
-			TCU_THROW(NotSupportedError, "Shader subgroup clock is not supported");
-	}
-
 	bool validateOutput(std::vector<deUint64>& outputs)
 	{
 		// The shader will write a 1 in the output if the clock did not increase
 		return (outputs.size() == deUint64(std::count(std::begin(outputs), std::end(outputs), 0)));
 	}
 
-	const bool							m_realtime_test;
 	de::UniquePtr<ShaderExecutor>		m_executor;
 };
 
@@ -163,16 +139,33 @@
 		initShaderSpec();
 	}
 
-	TestInstance* createInstance(Context& ctx) const
+	TestInstance* createInstance (Context& ctx) const override
 	{
-		return new ShaderClockTestInstance(ctx, (m_operation.testClockType == DEVICE), m_shaderSpec, m_shaderType);
+		return new ShaderClockTestInstance(ctx, m_shaderSpec, m_shaderType);
 	}
 
-	void initPrograms(vk::SourceCollections& programCollection) const
+	void initPrograms (vk::SourceCollections& programCollection) const override
 	{
 		generateSources(m_shaderType, m_shaderSpec, programCollection);
 	}
 
+	void checkSupport (Context& context) const override
+	{
+		context.requireDeviceFunctionality("VK_KHR_shader_clock");
+
+		if (m_operation.testBitType == BIT_64)
+			context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_SHADER_INT64);
+
+		const auto&	shaderClockFeatures	= context.getShaderClockFeatures();
+		const auto	realTimeTest		= (m_operation.testClockType == DEVICE);
+
+		if (realTimeTest && !shaderClockFeatures.shaderDeviceClock)
+			TCU_THROW(NotSupportedError, "Shader device clock is not supported");
+
+		if (!realTimeTest && !shaderClockFeatures.shaderSubgroupClock)
+			TCU_THROW(NotSupportedError, "Shader subgroup clock is not supported");
+	}
+
 private:
 	void initShaderSpec()
 	{
diff --git a/external/vulkancts/modules/vulkan/tessellation/vktTessellationGeometryGridRenderTests.cpp b/external/vulkancts/modules/vulkan/tessellation/vktTessellationGeometryGridRenderTests.cpp
index 2c38280..97eb8ba 100644
--- a/external/vulkancts/modules/vulkan/tessellation/vktTessellationGeometryGridRenderTests.cpp
+++ b/external/vulkancts/modules/vulkan/tessellation/vktTessellationGeometryGridRenderTests.cpp
@@ -98,70 +98,29 @@
 {
 	DE_ASSERT(((flags & (FLAG_GEOMETRY_SCATTER_PRIMITIVES | FLAG_GEOMETRY_SCATTER_LAYERS)) != 0) == ((flags & FLAG_GEOMETRY_SEPARATE_PRIMITIVES) != 0));
 
-	testCtx.getLog()
-		<< tcu::TestLog::Message
-		<< "Testing tessellation and geometry shaders that output a large number of primitives.\n"
-		<< getDescription()
-		<< tcu::TestLog::EndMessage;
-
-	if (m_flags & FLAG_GEOMETRY_SCATTER_LAYERS)
-		m_testCtx.getLog() << tcu::TestLog::Message << "Rendering to 2d texture array, numLayers = " << m_numLayers << tcu::TestLog::EndMessage;
-
-	m_testCtx.getLog()
-		<< tcu::TestLog::Message
-		<< "Tessellation level: " << m_tessGenLevel << ", mode = quad.\n"
-		<< "\tEach input patch produces " << (m_tessGenLevel*m_tessGenLevel) << " (" << (m_tessGenLevel*m_tessGenLevel*2) << " triangles)\n"
-		<< tcu::TestLog::EndMessage;
-
-	int geometryOutputComponents	  = 0;
 	int geometryOutputVertices		  = 0;
 	int geometryTotalOutputComponents = 0;
 
 	if (m_flags & FLAG_GEOMETRY_MAX_SPEC)
 	{
-		m_testCtx.getLog() << tcu::TestLog::Message << "Using geometry shader minimum maximum output limits." << tcu::TestLog::EndMessage;
-
-		geometryOutputComponents	  = 64;
 		geometryOutputVertices		  = 256;
 		geometryTotalOutputComponents = 1024;
 	}
 	else
 	{
-		geometryOutputComponents	  = 64;
 		geometryOutputVertices		  = 16;
 		geometryTotalOutputComponents = 1024;
 	}
 
-	if ((m_flags & FLAG_GEOMETRY_MAX_SPEC) || (m_flags & FLAG_GEOMETRY_INVOCATIONS_MAX_SPEC))
-	{
-		tcu::MessageBuilder msg(&m_testCtx.getLog());
-
-		msg << "Geometry shader, targeting following limits:\n";
-
-		if (m_flags & FLAG_GEOMETRY_MAX_SPEC)
-			msg	<< "\tmaxGeometryOutputComponents = "	   << geometryOutputComponents << "\n"
-				<< "\tmaxGeometryOutputVertices = "		   << geometryOutputVertices << "\n"
-				<< "\tmaxGeometryTotalOutputComponents = " << geometryTotalOutputComponents << "\n";
-
-		if (m_flags & FLAG_GEOMETRY_INVOCATIONS_MAX_SPEC)
-			msg << "\tmaxGeometryShaderInvocations = "	   << m_numGeometryInvocations;
-
-		msg << tcu::TestLog::EndMessage;
-	}
-
 	const bool	separatePrimitives				  = (m_flags & FLAG_GEOMETRY_SEPARATE_PRIMITIVES) != 0;
 	const int	numComponentsPerVertex			  = 8; // vec4 pos, vec4 color
-	int			numVerticesPerInvocation		  = 0;
-	int			geometryVerticesPerPrimitive	  = 0;
-	int			geometryPrimitivesOutPerPrimitive = 0;
 
 	if (separatePrimitives)
 	{
-		const int	numComponentLimit		 = geometryTotalOutputComponents / (4 * numComponentsPerVertex);
-		const int	numOutputLimit			 = geometryOutputVertices / 4;
+		const int	numComponentLimit	= geometryTotalOutputComponents / (4 * numComponentsPerVertex);
+		const int	numOutputLimit		= geometryOutputVertices / 4;
 
 		m_numGeometryPrimitivesPerInvocation = de::min(numComponentLimit, numOutputLimit);
-		numVerticesPerInvocation			 = m_numGeometryPrimitivesPerInvocation * 4;
 	}
 	else
 	{
@@ -172,33 +131,13 @@
 		//    |\ |\ |\ |
 		//    |_\|_\|_\|
 
-		const int	numSliceNodesComponentLimit	= geometryTotalOutputComponents / (2 * numComponentsPerVertex);			// each node 2 vertices
+		const int	numSliceNodesComponentLimit	= geometryTotalOutputComponents / (2 * numComponentsPerVertex + 2);		// each node 2 vertices
 		const int	numSliceNodesOutputLimit	= geometryOutputVertices / 2;											// each node 2 vertices
 		const int	numSliceNodes				= de::min(numSliceNodesComponentLimit, numSliceNodesOutputLimit);
 
-		numVerticesPerInvocation				= numSliceNodes * 2;
 		m_numGeometryPrimitivesPerInvocation	= (numSliceNodes - 1) * 2;
 	}
 
-	geometryVerticesPerPrimitive	  = numVerticesPerInvocation * m_numGeometryInvocations;
-	geometryPrimitivesOutPerPrimitive = m_numGeometryPrimitivesPerInvocation * m_numGeometryInvocations;
-
-	m_testCtx.getLog()
-		<< tcu::TestLog::Message
-		<< "Geometry shader:\n"
-		<< "\tTotal output vertex count per invocation: "		  << numVerticesPerInvocation << "\n"
-		<< "\tTotal output primitive count per invocation: "	  << m_numGeometryPrimitivesPerInvocation << "\n"
-		<< "\tNumber of invocations per primitive: "			  << m_numGeometryInvocations << "\n"
-		<< "\tTotal output vertex count per input primitive: "	  << geometryVerticesPerPrimitive << "\n"
-		<< "\tTotal output primitive count per input primitive: " << geometryPrimitivesOutPerPrimitive << "\n"
-		<< tcu::TestLog::EndMessage;
-
-	m_testCtx.getLog()
-		<< tcu::TestLog::Message
-		<< "Program:\n"
-		<< "\tTotal program output vertices count per input patch: "  << (m_tessGenLevel*m_tessGenLevel*2 * geometryVerticesPerPrimitive) << "\n"
-		<< "\tTotal program output primitive count per input patch: " << (m_tessGenLevel*m_tessGenLevel*2 * geometryPrimitivesOutPerPrimitive) << "\n"
-		<< tcu::TestLog::EndMessage;
 }
 
 void GridRenderTestCase::initPrograms (SourceCollections& programCollection) const
@@ -459,24 +398,134 @@
 public:
 	struct Params
 	{
-		Flags	flags;
-		int		numLayers;
+		tcu::TestContext&	testCtx;
+		Flags				flags;
+		const char*			description;
+		int					tessGenLevel;
+		int					numGeometryInvocations;
+		int					numLayers;
+		int					numGeometryPrimitivesPerInvocation;
 
-		Params (void) : flags(), numLayers() {}
+		Params (tcu::TestContext& testContext) : testCtx(testContext), flags(), description(), tessGenLevel(), numGeometryInvocations(), numLayers(), numGeometryPrimitivesPerInvocation() {}
 	};
-						GridRenderTestInstance	(Context& context, const Params& params) : TestInstance(context), m_params(params) {}
+						GridRenderTestInstance	(Context& context, const Params& params);
 	tcu::TestStatus		iterate					(void);
 
 private:
 	Params				m_params;
 };
 
+GridRenderTestInstance::GridRenderTestInstance (Context& context, const Params& params) : TestInstance(context), m_params(params)
+{
+	tcu::TestContext& testCtx = m_params.testCtx;
+	testCtx.getLog()
+		<< tcu::TestLog::Message
+		<< "Testing tessellation and geometry shaders that output a large number of primitives.\n"
+		<< m_params.description
+		<< tcu::TestLog::EndMessage;
+
+	if (m_params.flags & FLAG_GEOMETRY_SCATTER_LAYERS)
+		testCtx.getLog() << tcu::TestLog::Message << "Rendering to 2d texture array, numLayers = " << m_params.numLayers << tcu::TestLog::EndMessage;
+
+	testCtx.getLog()
+		<< tcu::TestLog::Message
+		<< "Tessellation level: " << m_params.tessGenLevel << ", mode = quad.\n"
+		<< "\tEach input patch produces " << (m_params.tessGenLevel * m_params.tessGenLevel) << " (" << (m_params.tessGenLevel * m_params.tessGenLevel * 2) << " triangles)\n"
+		<< tcu::TestLog::EndMessage;
+
+	int geometryOutputComponents		= 0;
+	int geometryOutputVertices			= 0;
+	int geometryTotalOutputComponents	= 0;
+
+	if (m_params.flags & FLAG_GEOMETRY_MAX_SPEC)
+	{
+		testCtx.getLog() << tcu::TestLog::Message << "Using geometry shader minimum maximum output limits." << tcu::TestLog::EndMessage;
+
+		geometryOutputComponents		= 64;
+		geometryOutputVertices			= 256;
+		geometryTotalOutputComponents	= 1024;
+	}
+	else
+	{
+		geometryOutputComponents		= 64;
+		geometryOutputVertices			= 16;
+		geometryTotalOutputComponents	= 1024;
+	}
+
+	if ((m_params.flags & FLAG_GEOMETRY_MAX_SPEC) || (m_params.flags & FLAG_GEOMETRY_INVOCATIONS_MAX_SPEC))
+	{
+		tcu::MessageBuilder msg(&testCtx.getLog());
+
+		msg << "Geometry shader, targeting following limits:\n";
+
+		if (m_params.flags & FLAG_GEOMETRY_MAX_SPEC)
+			msg << "\tmaxGeometryOutputComponents = "		<< geometryOutputComponents << "\n"
+				<< "\tmaxGeometryOutputVertices = "			<< geometryOutputVertices << "\n"
+				<< "\tmaxGeometryTotalOutputComponents = "	<< geometryTotalOutputComponents << "\n";
+
+		if (m_params.flags & FLAG_GEOMETRY_INVOCATIONS_MAX_SPEC)
+			msg << "\tmaxGeometryShaderInvocations = " << m_params.numGeometryInvocations;
+
+		msg << tcu::TestLog::EndMessage;
+	}
+
+	const bool	separatePrimitives					= (m_params.flags & FLAG_GEOMETRY_SEPARATE_PRIMITIVES) != 0;
+	const int	numComponentsPerVertex				= 8; // vec4 pos, vec4 color
+	int			numVerticesPerInvocation			= 0;
+	int			geometryVerticesPerPrimitive		= 0;
+	int			geometryPrimitivesOutPerPrimitive	= 0;
+
+	if (separatePrimitives)
+	{
+		numVerticesPerInvocation = m_params.numGeometryPrimitivesPerInvocation * 4;
+	}
+	else
+	{
+		// If FLAG_GEOMETRY_SEPARATE_PRIMITIVES is not set, geometry shader fills a rectangle area in slices.
+		// Each slice is a triangle strip and is generated by a single shader invocation.
+		// One slice with 4 segment ends (nodes) and 3 segments:
+		//    .__.__.__.
+		//    |\ |\ |\ |
+		//    |_\|_\|_\|
+
+		const int	numSliceNodesComponentLimit		= geometryTotalOutputComponents / (2 * numComponentsPerVertex);			// each node 2 vertices
+		const int	numSliceNodesOutputLimit		= geometryOutputVertices / 2;											// each node 2 vertices
+		const int	numSliceNodes					= de::min(numSliceNodesComponentLimit, numSliceNodesOutputLimit);
+
+		numVerticesPerInvocation = numSliceNodes * 2;
+	}
+
+	geometryVerticesPerPrimitive		= numVerticesPerInvocation * m_params.numGeometryInvocations;
+	geometryPrimitivesOutPerPrimitive	= m_params.numGeometryPrimitivesPerInvocation * m_params.numGeometryInvocations;
+
+	testCtx.getLog()
+		<< tcu::TestLog::Message
+		<< "Geometry shader:\n"
+		<< "\tTotal output vertex count per invocation: " << numVerticesPerInvocation << "\n"
+		<< "\tTotal output primitive count per invocation: " << m_params.numGeometryPrimitivesPerInvocation << "\n"
+		<< "\tNumber of invocations per primitive: " << m_params.numGeometryInvocations << "\n"
+		<< "\tTotal output vertex count per input primitive: " << geometryVerticesPerPrimitive << "\n"
+		<< "\tTotal output primitive count per input primitive: " << geometryPrimitivesOutPerPrimitive << "\n"
+		<< tcu::TestLog::EndMessage;
+
+	testCtx.getLog()
+		<< tcu::TestLog::Message
+		<< "Program:\n"
+		<< "\tTotal program output vertices count per input patch: " << (m_params.tessGenLevel * m_params.tessGenLevel * 2 * geometryVerticesPerPrimitive) << "\n"
+		<< "\tTotal program output primitive count per input patch: " << (m_params.tessGenLevel * m_params.tessGenLevel * 2 * geometryPrimitivesOutPerPrimitive) << "\n"
+		<< tcu::TestLog::EndMessage;
+}
+
 TestInstance* GridRenderTestCase::createInstance (Context& context) const
 {
-	GridRenderTestInstance::Params params;
+	GridRenderTestInstance::Params params(m_testCtx);
 
-	params.flags	 = m_flags;
-	params.numLayers = m_numLayers;
+	params.flags								= m_flags;
+	params.description							= getDescription();
+	params.tessGenLevel							= m_tessGenLevel;
+	params.numGeometryInvocations				= m_numGeometryInvocations;
+	params.numLayers							= m_numLayers;
+	params.numGeometryPrimitivesPerInvocation	= m_numGeometryPrimitivesPerInvocation;
 
 	return new GridRenderTestInstance(context, params);
 }