static bool performWritesInVertex (VkDescriptorType descriptorType);
+ static bool performWritesInVertex (VkDescriptorType descriptorType,
+ const Context& context);
static std::string getShaderSource (VkShaderStageFlagBits shaderType,
const TestCaseParams& testCaseParams,
bool allowVertexStoring);
int CommonDescriptorInstance::constructShaderModules (void)
{
int result = 0;
- ut::DeviceProperties dp (m_context);
- const VkPhysicalDeviceFeatures& feats = dp.physicalDeviceFeatures();
tcu::TestLog& log = m_context.getTestContext().getLog();
if (m_testParams.stageFlags & VK_SHADER_STAGE_COMPUTE_BIT)
if (m_testParams.stageFlags & VK_SHADER_STAGE_FRAGMENT_BIT)
{
++result;
- const std::string name = ut::buildShaderName(VK_SHADER_STAGE_FRAGMENT_BIT, m_testParams.descriptorType, m_testParams.updateAfterBind, m_testParams.calculateInLoop, (feats.vertexPipelineStoresAndAtomics != DE_FALSE && m_testParams.allowVertexStoring));
+ const std::string name = ut::buildShaderName(VK_SHADER_STAGE_FRAGMENT_BIT, m_testParams.descriptorType, m_testParams.updateAfterBind, m_testParams.calculateInLoop, m_testParams.allowVertexStoring);
m_fragmentModule = vk::createShaderModule(m_vki, m_vkd, m_context.getBinaryCollection().get(name), (VkShaderModuleCreateFlags)0);
log << tcu::TestLog::Message << "Finally used fragment shader: " << name << '\n' << tcu::TestLog::EndMessage;
}
if (m_testParams.stageFlags & VK_SHADER_STAGE_VERTEX_BIT)
{
++result;
- const std::string name = ut::buildShaderName(VK_SHADER_STAGE_VERTEX_BIT, m_testParams.descriptorType, m_testParams.updateAfterBind, m_testParams.calculateInLoop, (feats.vertexPipelineStoresAndAtomics != DE_FALSE && m_testParams.allowVertexStoring));
+ const std::string name = ut::buildShaderName(VK_SHADER_STAGE_VERTEX_BIT, m_testParams.descriptorType, m_testParams.updateAfterBind, m_testParams.calculateInLoop, m_testParams.allowVertexStoring);
m_vertexModule = vk::createShaderModule(m_vki, m_vkd, m_context.getBinaryCollection().get(name), (VkShaderModuleCreateFlags)0);
log << tcu::TestLog::Message << "Finally used vertex shader: " << name << '\n' << tcu::TestLog::EndMessage;
}
return result;
}
+bool CommonDescriptorInstance::performWritesInVertex (VkDescriptorType descriptorType,
+ const Context& context)
+{
+ bool result = false;
+
+ ut::DeviceProperties dp (context);
+ const VkPhysicalDeviceFeatures& feats = dp.physicalDeviceFeatures();
+
+ if (feats.vertexPipelineStoresAndAtomics != DE_FALSE)
+ {
+ result = CommonDescriptorInstance::performWritesInVertex(descriptorType);
+ }
+
+ return result;
+}
+
std::string CommonDescriptorInstance::getShaderSource (VkShaderStageFlagBits shaderType,
const TestCaseParams& testCaseParams,
bool allowVertexStoring)
VK_DESCRIPTOR_TYPE_UNDEFINED,
BINDING_Undefined,
false,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
{
}
VK_DESCRIPTOR_TYPE_UNDEFINED,
BINDING_Undefined,
false,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
{
}
VK_DESCRIPTOR_TYPE_UNDEFINED,
BINDING_Undefined,
false,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
{
}
VK_DESCRIPTOR_TYPE_UNDEFINED,
BINDING_Undefined,
false,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
{
}
VK_DESCRIPTOR_TYPE_UNDEFINED,
BINDING_Undefined,
false,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams)),
DynamicBuffersInstance(context, m_testParams), StorageBufferInstance(context, testCaseParams)
{
VK_DESCRIPTOR_TYPE_UNDEFINED,
BINDING_Undefined,
false,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams)),
DynamicBuffersInstance(context, m_testParams), UniformBufferInstance(context, testCaseParams)
{
VK_DESCRIPTOR_TYPE_UNDEFINED,
BINDING_Undefined,
true,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
{
}
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
BINDING_SampledImage,
true,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
{
}
VK_DESCRIPTOR_TYPE_SAMPLER,
BINDING_Sampler,
true,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
{
}
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
(BINDING_StorageImage + 1),
true,
- performWritesInVertex(testCaseParams.descriptorType),
+ performWritesInVertex(testCaseParams.descriptorType, context),
testCaseParams))
, m_buffer ()
, m_fillColor (10)