for (vector<ConvertCase>::const_iterator test = testCases.begin(); test != testCases.end(); ++test)
{
- ComputeShaderSpec spec;
-
- spec.assembly = getConvertCaseShaderStr(instruction, *test);
- spec.inputs.push_back(test->m_inputBuffer);
- spec.outputs.push_back(test->m_outputBuffer);
- spec.numWorkGroups = IVec3(1, 1, 1);
-
- if (test->m_features == COMPUTE_TEST_USES_INT16 || test->m_features == COMPUTE_TEST_USES_INT16_INT64)
+ map<string, string> fragments = getConvertCaseFragments(instruction, *test);
+ vector<string> features = getFeatureStringVector(test->m_features);
+ GraphicsResources resources;
+ vector<string> extensions;
+ vector<deInt32> noSpecConstants;
+ PushConstants noPushConstants;
+ VulkanFeatures vulkanFeatures;
+ GraphicsInterfaces noInterfaces;
+ tcu::RGBA defaultColors[4];
+
+ getDefaultColors (defaultColors);
+ resources.inputs.push_back (std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, test->m_inputBuffer));
+ resources.outputs.push_back (std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, test->m_outputBuffer));
+ extensions.push_back ("VK_KHR_storage_buffer_storage_class");
+
- if (test->m_features == COMPUTE_TEST_USES_INT16 || test->m_features == COMPUTE_TEST_USES_INT16_INT64 || usesInt16(test->m_fromType, test->m_toType)) {
++ if (test->m_features == COMPUTE_TEST_USES_INT16 || test->m_features == COMPUTE_TEST_USES_INT16_INT64 || usesInt16(test->m_fromType, test->m_toType))
+ {
- spec.extensions.push_back("VK_KHR_16bit_storage");
- spec.requestedVulkanFeatures.ext16BitStorage = EXT16BITSTORAGEFEATURES_UNIFORM_BUFFER_BLOCK;
+ extensions.push_back("VK_KHR_16bit_storage");
+ vulkanFeatures.ext16BitStorage = EXT16BITSTORAGEFEATURES_UNIFORM_BUFFER_BLOCK;
}
- group->addChild(new SpvAsmComputeShaderCase(testCtx, test->m_name.c_str(), "Convert integers with OpUConvert.", spec, test->m_features));
+ createTestsForAllStages(
+ test->m_name, defaultColors, defaultColors, fragments, noSpecConstants,
+ noPushConstants, resources, noInterfaces, extensions, features, vulkanFeatures, group.get());
}
return group.release();
}