return features;
}
-bool computeCheckBuffers (const std::vector<BufferSp>& originalInts,
+bool computeCheckBuffers (const std::vector<Resource>& originalInts,
const vector<AllocationSp>& outputAllocs,
- const std::vector<BufferSp>& /*expectedOutputs*/,
+ const std::vector<Resource>& /*expectedOutputs*/,
tcu::TestLog& /*log*/)
{
std::vector<deUint8> result;
- originalInts.front()->getBytes(result);
+ originalInts.front().getBytes(result);
return deMemCmp(&result[0], outputAllocs.front()->getHostPtr(), result.size()) == 0;
}
}
template<typename originType, typename resultType, ShaderTemplate funcOrigin, ShaderTemplate funcResult>
-bool computeCheckStruct (const std::vector<BufferSp>& originalFloats,
- const vector<AllocationSp>& outputAllocs,
- const std::vector<BufferSp>& /* expectedOutputs */,
- tcu::TestLog& /*log*/)
+bool checkStruct (const std::vector<Resource>& originalFloats,
+ const vector<AllocationSp>& outputAllocs,
+ const std::vector<Resource>& /* expectedOutputs */,
+ tcu::TestLog& /* log */)
{
for (deUint32 outputNdx = 0; outputNdx < outputAllocs.size(); ++outputNdx)
{
vector<deUint8> originalBytes;
- originalFloats[outputNdx]->getBytes(originalBytes);
+ originalFloats[outputNdx].getBytes(originalBytes);
const resultType* returned = static_cast<const resultType*>(outputAllocs[outputNdx]->getHostPtr());
const originType* original = reinterpret_cast<const originType*>(&originalBytes.front());
return true;
}
-template<typename originType, typename resultType, ShaderTemplate funcOrigin, ShaderTemplate funcResult>
-bool graphicsCheckStruct (const std::vector<Resource>& originalFloats,
- const vector<AllocationSp>& outputAllocs,
- const std::vector<Resource>& /* expectedOutputs */,
- tcu::TestLog& /* log */)
-{
- for (deUint32 outputNdx = 0; outputNdx < outputAllocs.size(); ++outputNdx)
- {
- vector<deUint8> originalBytes;
- originalFloats[outputNdx].second->getBytes(originalBytes);
-
- const resultType* returned = static_cast<const resultType*>(outputAllocs[outputNdx]->getHostPtr());
- const originType* original = reinterpret_cast<const originType*>(&originalBytes.front());
-
- if(!compareStruct<originType, resultType, funcOrigin, funcResult>(returned, original))
- return false;
- }
- return true;
-}
-
-template<typename originType, typename resultType, deUint32 compositCount>
-bool computeCheckUniformsArray (const std::vector<BufferSp>& originalFloats,
- const vector<AllocationSp>& outputAllocs,
- const std::vector<BufferSp>& /* expectedOutputs */,
- tcu::TestLog& /* log */)
-{
- const deUint32 originTypeSize = static_cast<deUint32>(sizeof(originType));
-
- DE_ASSERT((originTypeSize * compositCount) <= arrayStrideInBytesUniform); // one element of array can't be bigger then 16B
-
- for (deUint32 outputNdx = 0; outputNdx < static_cast<deUint32>(outputAllocs.size()); ++outputNdx)
- {
- vector<deUint8> originalBytes;
- originalFloats[outputNdx]->getBytes(originalBytes);
- const int elemntsNumber = (static_cast<deUint32>(originalBytes.size()) / arrayStrideInBytesUniform) / compositCount;
-
- const resultType* returned = static_cast<const resultType*>(outputAllocs[outputNdx]->getHostPtr());
- const originType* original = reinterpret_cast<const originType*>(&originalBytes.front());
-
- for (int ndx = 0; ndx < elemntsNumber; ++ndx)
- {
- for (deUint32 ndxData = 0; ndxData < compositCount; ++ndxData)
- {
- if (static_cast<deInt8>(*original) != static_cast<deInt8>(*returned))
- return false;
- original++;
- returned++;
- }
- original += arrayStrideInBytesUniform / originTypeSize - compositCount;
- }
- }
- return true;
-}
-
template<typename originType, typename resultType, deUint32 compositCount>
-bool graphicsCheckUniformsArray (const std::vector<Resource>& originalFloats,
- const vector<AllocationSp>& outputAllocs,
- const std::vector<Resource>& /* expectedOutputs */,
- tcu::TestLog& /* log */)
+bool checkUniformsArray (const std::vector<Resource>& originalFloats,
+ const vector<AllocationSp>& outputAllocs,
+ const std::vector<Resource>& /* expectedOutputs */,
+ tcu::TestLog& /* log */)
{
const deUint32 originTypeSize = static_cast<deUint32>(sizeof(originType));
for (deUint32 outputNdx = 0; outputNdx < static_cast<deUint32>(outputAllocs.size()); ++outputNdx)
{
vector<deUint8> originalBytes;
- originalFloats[outputNdx].second->getBytes(originalBytes);
+ originalFloats[outputNdx].getBytes(originalBytes);
const int elemntsNumber = (static_cast<int>(originalBytes.size()) / arrayStrideInBytesUniform) / compositCount;
const resultType* returned = static_cast<const resultType*>(outputAllocs[outputNdx]->getHostPtr());
}
template<typename originType, typename resultType, int compositCount, int ndxConts>
-bool graphicsCheckUniformsArrayConstNdx(const std::vector<Resource>& originalFloats,
- const vector<AllocationSp>& outputAllocs,
- const std::vector<Resource>& /* expectedOutputs */,
- tcu::TestLog& /* log */)
+bool checkUniformsArrayConstNdx (const std::vector<Resource>& originalFloats,
+ const vector<AllocationSp>& outputAllocs,
+ const std::vector<Resource>& /* expectedOutputs */,
+ tcu::TestLog& /* log */)
{
const deUint32 originTypeSize = static_cast<deUint32>(sizeof(originType));
for (deUint32 outputNdx = 0; outputNdx < static_cast<deUint32>(outputAllocs.size()); ++outputNdx)
{
vector<deUint8> originalBytes;
- originalFloats[outputNdx].second->getBytes(originalBytes);
+ originalFloats[outputNdx].getBytes(originalBytes);
const int elemntsNumber = (static_cast<int>(originalBytes.size()) / arrayStrideInBytesUniform) / compositCount;
const resultType* returned = static_cast<const resultType*>(outputAllocs[outputNdx]->getHostPtr());
spec.assembly = shaderTemplate.specialize(specs);
spec.numWorkGroups = IVec3(cTypes[tyIdx].count, 1, 1);
- spec.inputTypes[0] = CAPABILITIES[STORAGE_BUFFER_TEST].dtype;
- spec.inputs.push_back(BufferSp(new Int32Buffer(inputs)));
- spec.outputs.push_back(BufferSp(new Int8Buffer(outputs)));
+ spec.inputs.push_back(Resource(BufferSp(new Int32Buffer(inputs)), CAPABILITIES[STORAGE_BUFFER_TEST].dtype));
+ spec.outputs.push_back(Resource(BufferSp(new Int8Buffer(outputs))));
spec.extensions.push_back("VK_KHR_8bit_storage");
spec.extensions.push_back("VK_KHR_storage_buffer_storage_class");
spec.requestedVulkanFeatures = get8BitStorageFeatures(CAPABILITIES[STORAGE_BUFFER_TEST].name);
spec.assembly = shaderTemplate.specialize(specs);
spec.numWorkGroups = IVec3(numElements / cTypes[tyIdx].componentsCount, 1, 1);
- spec.inputTypes[0] = CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype;
- spec.inputs.push_back(BufferSp(new Int8Buffer(inputs)));
- spec.outputs.push_back(BufferSp(new Int32Buffer(outputs)));
+ spec.inputs.push_back(Resource(BufferSp(new Int8Buffer(inputs)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
+ spec.outputs.push_back(Resource(BufferSp(new Int32Buffer(outputs))));
spec.extensions.push_back("VK_KHR_8bit_storage");
spec.extensions.push_back("VK_KHR_storage_buffer_storage_class");
spec.requestedVulkanFeatures = get8BitStorageFeatures(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].name);
if (cTypes[tyIdx].componentsCount == 4)
- spec.verifyIO = computeCheckUniformsArray<deInt8, deInt32, 4>;
+ spec.verifyIO = checkUniformsArray<deInt8, deInt32, 4>;
else
- spec.verifyIO = computeCheckUniformsArray<deInt8, deInt32, 1>;
+ spec.verifyIO = checkUniformsArray<deInt8, deInt32, 1>;
group->addChild(new SpvAsmComputeShaderCase(testCtx, testName.c_str(), testName.c_str(), spec));
}
spec.assembly = shaderTemplate.specialize(specs);
spec.numWorkGroups = IVec3(cTypes[tyIdx].count, 1, 1);
- spec.inputTypes[0] = CAPABILITIES[STORAGE_BUFFER_TEST].dtype;
- spec.inputs.push_back(BufferSp(new Int16Buffer(inputs)));
- spec.outputs.push_back(BufferSp(new Int8Buffer(outputs)));
+ spec.inputs.push_back(Resource(BufferSp(new Int16Buffer(inputs)), CAPABILITIES[STORAGE_BUFFER_TEST].dtype));
+ spec.outputs.push_back(Resource(BufferSp(new Int8Buffer(outputs))));
spec.extensions.push_back("VK_KHR_16bit_storage");
spec.extensions.push_back("VK_KHR_8bit_storage");
spec.extensions.push_back("VK_KHR_storage_buffer_storage_class");
spec.assembly = shaderTemplate.specialize(specs);
spec.numWorkGroups = IVec3(numElements / cTypes[tyIdx].componentsCount, 1, 1);
- spec.inputTypes[0] = CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype;
- spec.inputs.push_back(BufferSp(new Int8Buffer(inputs)));
- spec.outputs.push_back(BufferSp(new Int16Buffer(outputs)));
+ spec.inputs.push_back(Resource(BufferSp(new Int8Buffer(inputs)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
+ spec.outputs.push_back(Resource(BufferSp(new Int16Buffer(outputs))));
spec.extensions.push_back("VK_KHR_8bit_storage");
spec.extensions.push_back("VK_KHR_16bit_storage");
spec.extensions.push_back("VK_KHR_storage_buffer_storage_class");
spec.requestedVulkanFeatures = get8BitStorageFeatures(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].name);
if (cTypes[tyIdx].componentsCount == 4)
- spec.verifyIO = computeCheckUniformsArray<deInt8, deInt16, 4>;
+ spec.verifyIO = checkUniformsArray<deInt8, deInt16, 4>;
else
- spec.verifyIO = computeCheckUniformsArray<deInt8, deInt16, 1>;
+ spec.verifyIO = checkUniformsArray<deInt8, deInt16, 1>;
group->addChild(new SpvAsmComputeShaderCase(testCtx, testName.c_str(), testName.c_str(), spec));
}
spec.assembly = shaderTemplate.specialize(specs);
spec.numWorkGroups = IVec3(structData.structArraySize, structData.nestedArraySize, 1);
- spec.verifyIO = computeCheckStruct<deInt8, deInt32, SHADERTEMPLATE_STRIDE8BIT_STD140, SHADERTEMPLATE_STRIDE32BIT_STD430>;
- spec.inputTypes[0] = CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype;
- spec.inputs.push_back(BufferSp(new Int8Buffer(in8DData)));
- spec.outputs.push_back(BufferSp(new Int32Buffer(int32Data)));
+ spec.verifyIO = checkStruct<deInt8, deInt32, SHADERTEMPLATE_STRIDE8BIT_STD140, SHADERTEMPLATE_STRIDE32BIT_STD430>;
+ spec.inputs.push_back(Resource(BufferSp(new Int8Buffer(in8DData)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
+ spec.outputs.push_back(Resource(BufferSp(new Int32Buffer(int32Data))));
spec.extensions.push_back("VK_KHR_8bit_storage");
spec.requestedVulkanFeatures = get8BitStorageFeatures(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].name);
spec.assembly = shaderTemplate.specialize(specs);
spec.numWorkGroups = IVec3(structData.structArraySize, structData.nestedArraySize, 1);
- spec.verifyIO = computeCheckStruct<deInt32, deInt8, SHADERTEMPLATE_STRIDE32BIT_STD140, SHADERTEMPLATE_STRIDE8BIT_STD430>;
- spec.inputTypes[0] = CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype;
+ spec.verifyIO = checkStruct<deInt32, deInt8, SHADERTEMPLATE_STRIDE32BIT_STD140, SHADERTEMPLATE_STRIDE8BIT_STD430>;
- spec.inputs.push_back(BufferSp(new Int32Buffer(int32DData)));
- spec.outputs.push_back(BufferSp(new Int8Buffer(int8Data)));
+ spec.inputs.push_back(Resource(BufferSp(new Int32Buffer(int32DData)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
+ spec.outputs.push_back(Resource(BufferSp(new Int8Buffer(int8Data))));
spec.extensions.push_back("VK_KHR_8bit_storage");
spec.extensions.push_back("VK_KHR_storage_buffer_storage_class");
spec.requestedVulkanFeatures = get8BitStorageFeatures(CAPABILITIES[STORAGE_BUFFER_TEST].name);
spec.assembly = shaderTemplate.specialize(specs);
spec.numWorkGroups = IVec3(structData.structArraySize, structData.nestedArraySize, 1);
- spec.verifyIO = isUniform ? computeCheckStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD140, SHADERTEMPLATE_STRIDEMIX_STD430> : computeCheckStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD430, SHADERTEMPLATE_STRIDEMIX_STD430>;
- spec.inputTypes[0] = CAPABILITIES[capIdx].dtype;
- spec.inputs.push_back (BufferSp(new Int8Buffer(inData)));
- spec.outputs.push_back (BufferSp(new Int8Buffer(outData)));
+ spec.verifyIO = isUniform ? checkStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD140, SHADERTEMPLATE_STRIDEMIX_STD430> : checkStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD430, SHADERTEMPLATE_STRIDEMIX_STD430>;
+ spec.inputs.push_back (Resource(BufferSp(new Int8Buffer(inData)), CAPABILITIES[capIdx].dtype));
+ spec.outputs.push_back (Resource(BufferSp(new Int8Buffer(outData))));
spec.extensions.push_back ("VK_KHR_8bit_storage");
spec.extensions.push_back ("VK_KHR_storage_buffer_storage_class");
spec.requestedVulkanFeatures = get8BitStorageFeatures(CAPABILITIES[capIdx].name);
vector<deInt32> inputs = getInt32s(rnd, ((arrayStrideInBytesUniform / static_cast<deUint32>(sizeof(deInt32))) * numDataPoints) / categories[catIdx].numElements);
if ( 0 != (arrayStrideInBytesUniform - static_cast<deUint32>(sizeof(deInt32)) * categories[catIdx].numElements))
- resources.verifyIO = graphicsCheckUniformsArray<deInt32, deInt8, 1>;
+ resources.verifyIO = checkUniformsArray<deInt32, deInt8, 1>;
else
{
resources.verifyIO = DE_NULL;
outputs[numNdx] = static_cast<deInt8>(0xffff & inputs[numNdx]);
}
- resources.inputs.push_back(std::make_pair(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype, BufferSp(new Int32Buffer(inputs))));
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int8Buffer(outputs))));
+ resources.inputs.push_back(Resource(BufferSp(new Int32Buffer(inputs)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
+ resources.outputs.push_back(Resource(BufferSp(new Int8Buffer(outputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
for (deUint32 factIdx = 0; factIdx < DE_LENGTH_OF_ARRAY(intFacts); ++factIdx)
{
{
resources.inputs.clear();
vector<deInt8> inputs = getInt8s(rnd, (arrayStrideInBytesUniform / static_cast<deUint32>(sizeof(deInt8))) * (numDataPoints / categories[catIdx].numElements));
- resources.inputs.push_back(std::make_pair(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype, BufferSp(new Int8Buffer(inputs))));
+ resources.inputs.push_back(Resource(BufferSp(new Int8Buffer(inputs)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
for (deUint32 factIdx = 0; factIdx < DE_LENGTH_OF_ARRAY(intFacts); ++factIdx)
for (deUint32 constIndexIdx = 0; constIndexIdx < DE_LENGTH_OF_ARRAY(constantIndices); ++constIndexIdx)
{
name += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int32Buffer(outputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int32Buffer(outputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
if (useConstIdx)
{
switch(constantIndices[constIndexIdx].constantIndex)
{
case 0:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 2, 0>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 2, 0>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 1, 0>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 1, 0>;
break;
case 4:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 2, 4>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 2, 4>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 1, 4>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 1, 4>;
break;
case 5:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 2, 5>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 2, 5>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 1, 5>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 1, 5>;
break;
case 6:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 2, 6>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 2, 6>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt32, 1, 6>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt32, 1, 6>;
break;
default:
DE_FATAL("Impossible");
else
{
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArray<deInt8, deInt32, 2>;
+ resources.verifyIO = checkUniformsArray<deInt8, deInt32, 2>;
else
- resources.verifyIO = graphicsCheckUniformsArray<deInt8, deInt32, 1>;
+ resources.verifyIO = checkUniformsArray<deInt8, deInt32, 1>;
}
createTestsForAllStages(name, defaultColors, defaultColors, fragments, resources, extensions, testGroup, get8BitStorageFeatures(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].name));
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int32Buffer(useConstIdx ? constIdxData : sOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int32Buffer(useConstIdx ? constIdxData : sOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int32Buffer(useConstIdx ? constIdxData : uOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int32Buffer(useConstIdx ? constIdxData : uOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int32Buffer(useConstIdx ? constIdxData : sOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int32Buffer(useConstIdx ? constIdxData : sOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int32Buffer(useConstIdx ? constIdxData : uOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int32Buffer(useConstIdx ? constIdxData : uOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
switch (categories[catIdx].numElements)
{
case 1:
- resources.verifyIO = graphicsCheckUniformsArray<deInt16, deInt8, 1>;
+ resources.verifyIO = checkUniformsArray<deInt16, deInt8, 1>;
break;
case 4:
- resources.verifyIO = graphicsCheckUniformsArray<deInt16, deInt8, 4>;
+ resources.verifyIO = checkUniformsArray<deInt16, deInt8, 4>;
break;
default:
DE_FATAL("Impossible");
break;
}
- resources.inputs.push_back(std::make_pair(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype, BufferSp(new Int16Buffer(inputs))));
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int8Buffer(outputs))));
+ resources.inputs.push_back(Resource(BufferSp(new Int16Buffer(inputs)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
+ resources.outputs.push_back(Resource(BufferSp(new Int8Buffer(outputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
for (deUint32 factIdx = 0; factIdx < DE_LENGTH_OF_ARRAY(intFacts); ++factIdx)
{
{
resources.inputs.clear();
vector<deInt8> inputs = getInt8s(rnd, (arrayStrideInBytesUniform / static_cast<deUint32>(sizeof(deInt8))) * (numDataPoints / categories[catIdx].numElements));
- resources.inputs.push_back(std::make_pair(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype, BufferSp(new Int8Buffer(inputs))));
+ resources.inputs.push_back(Resource(BufferSp(new Int8Buffer(inputs)), CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].dtype));
for (deUint32 factIdx = 0; factIdx < DE_LENGTH_OF_ARRAY(intFacts); ++factIdx)
for (deUint32 constIndexIdx = 0; constIndexIdx < DE_LENGTH_OF_ARRAY(constantIndices); ++constIndexIdx)
{
name += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int16Buffer(outputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int16Buffer(outputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
if (useConstIdx)
{
switch (constantIndices[constIndexIdx].constantIndex)
{
case 0:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 2, 0>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 2, 0>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 1, 0>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 1, 0>;
break;
case 4:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 2, 4>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 2, 4>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 1, 4>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 1, 4>;
break;
case 5:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 2, 5>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 2, 5>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 1, 5>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 1, 5>;
break;
case 6:
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 2, 6>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 2, 6>;
else
- resources.verifyIO = graphicsCheckUniformsArrayConstNdx<deInt8, deInt16, 1, 6>;
+ resources.verifyIO = checkUniformsArrayConstNdx<deInt8, deInt16, 1, 6>;
break;
default:
DE_FATAL("Impossible");
else
{
if (categories[catIdx].numElements == 2)
- resources.verifyIO = graphicsCheckUniformsArray<deInt8, deInt16, 2>;
+ resources.verifyIO = checkUniformsArray<deInt8, deInt16, 2>;
else
- resources.verifyIO = graphicsCheckUniformsArray<deInt8, deInt16, 1>;
+ resources.verifyIO = checkUniformsArray<deInt8, deInt16, 1>;
}
createTestsForAllStages(name, defaultColors, defaultColors, fragments, resources, extensions, testGroup, get8BitStorageFeatures(CAPABILITIES[UNIFORM_AND_STORAGEBUFFER_TEST].name));
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int16Buffer(useConstIdx ? constIdxData : sOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int16Buffer(useConstIdx ? constIdxData : sOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int16Buffer(useConstIdx ? constIdxData : uOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int16Buffer(useConstIdx ? constIdxData : uOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int16Buffer(useConstIdx ? constIdxData : sOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int16Buffer(useConstIdx ? constIdxData : sOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
testName += string("_const_idx_") + de::toString(constIdx);
resources.outputs.clear();
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int16Buffer(useConstIdx ? constIdxData : uOutputs))));
+ resources.outputs.push_back(Resource(BufferSp(new Int16Buffer(useConstIdx ? constIdxData : uOutputs)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
fragments["testfun"] = testFun.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
fragments["pre_main"] = preMain.specialize(specs);
fragments["testfun"] = testFun.specialize(specs);
- resources.inputs.push_back(std::make_pair(CAPABILITIES[capIdx].dtype, BufferSp(new Int8Buffer(i8Data))));
- resources.outputs.push_back(std::make_pair(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, BufferSp(new Int32Buffer(i32Data))));
+ resources.inputs.push_back(Resource(BufferSp(new Int8Buffer(i8Data)), CAPABILITIES[capIdx].dtype));
+ resources.outputs.push_back(Resource(BufferSp(new Int32Buffer(i32Data)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
if (isUniform)
- resources.verifyIO = graphicsCheckStruct<deInt8, deInt32, SHADERTEMPLATE_STRIDE8BIT_STD140, SHADERTEMPLATE_STRIDE32BIT_STD430>;
+ resources.verifyIO = checkStruct<deInt8, deInt32, SHADERTEMPLATE_STRIDE8BIT_STD140, SHADERTEMPLATE_STRIDE32BIT_STD430>;
else
- resources.verifyIO = graphicsCheckStruct<deInt8, deInt32, SHADERTEMPLATE_STRIDE8BIT_STD430, SHADERTEMPLATE_STRIDE32BIT_STD430>;
+ resources.verifyIO = checkStruct<deInt8, deInt32, SHADERTEMPLATE_STRIDE8BIT_STD430, SHADERTEMPLATE_STRIDE32BIT_STD430>;
createTestsForAllStages(testName, defaultColors, defaultColors, fragments, resources, extensions, testGroup, get8BitStorageFeatures(CAPABILITIES[capIdx].name));
}
fragments["pre_main"] = preMain.specialize(specs);
fragments["testfun"] = testFun.specialize(specs);
- resources.inputs.push_back(std::make_pair( CAPABILITIES[capIdx].dtype, BufferSp(new Int32Buffer(i32Data))));
- resources.outputs.push_back(std::make_pair(CAPABILITIES[STORAGE_BUFFER_TEST].dtype, BufferSp(new Int8Buffer(i8Data))));
+ resources.inputs.push_back(Resource(BufferSp(new Int32Buffer(i32Data)), CAPABILITIES[capIdx].dtype));
+ resources.outputs.push_back(Resource(BufferSp(new Int8Buffer(i8Data)), CAPABILITIES[STORAGE_BUFFER_TEST].dtype));
if (isUniform)
- resources.verifyIO = graphicsCheckStruct<deInt32, deInt8, SHADERTEMPLATE_STRIDE32BIT_STD140, SHADERTEMPLATE_STRIDE8BIT_STD430>;
+ resources.verifyIO = checkStruct<deInt32, deInt8, SHADERTEMPLATE_STRIDE32BIT_STD140, SHADERTEMPLATE_STRIDE8BIT_STD430>;
else
- resources.verifyIO = graphicsCheckStruct<deInt32, deInt8, SHADERTEMPLATE_STRIDE32BIT_STD430, SHADERTEMPLATE_STRIDE8BIT_STD430>;
+ resources.verifyIO = checkStruct<deInt32, deInt8, SHADERTEMPLATE_STRIDE32BIT_STD430, SHADERTEMPLATE_STRIDE8BIT_STD430>;
createTestsForAllStages(testName, defaultColors, defaultColors, fragments, resources, extensions, testGroup, get8BitStorageFeatures(CAPABILITIES[STORAGE_BUFFER_TEST].name));
}
fragments["pre_main"] = preMain.specialize(specs);
fragments["testfun"] = testFun.specialize(specs);
- resources.verifyIO = isUniform ? graphicsCheckStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD140, SHADERTEMPLATE_STRIDEMIX_STD430> : graphicsCheckStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD430, SHADERTEMPLATE_STRIDEMIX_STD430>;
- resources.inputs.push_back(std::make_pair( CAPABILITIES[capIdx].dtype, BufferSp(new Int8Buffer(inData))));
- resources.outputs.push_back(std::make_pair(CAPABILITIES[STORAGE_BUFFER_TEST].dtype, BufferSp(new Int8Buffer(outData))));
+ resources.verifyIO = isUniform ? checkStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD140, SHADERTEMPLATE_STRIDEMIX_STD430> : checkStruct<deInt8, deInt8, SHADERTEMPLATE_STRIDEMIX_STD430, SHADERTEMPLATE_STRIDEMIX_STD430>;
+ resources.inputs.push_back(Resource(BufferSp(new Int8Buffer(inData)), CAPABILITIES[capIdx].dtype));
+ resources.outputs.push_back(Resource(BufferSp(new Int8Buffer(outData)), CAPABILITIES[STORAGE_BUFFER_TEST].dtype));
createTestsForAllStages(testName, defaultColors, defaultColors, fragments, resources, extensions, group, get8BitStorageFeatures(CAPABILITIES[capIdx].name));
}