static tcu::Matrix<glw::GLdouble, Size - 1, Size - 1> eliminate(const tcu::Matrix<glw::GLdouble, Size, Size>& matrix,
glw::GLuint column, glw::GLuint row)
{
+ // GCC sometimes diagnoses an incorrect out of bounds write here. The code has been verified to be correct.
+#if (DE_COMPILER == DE_COMPILER_GCC)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
+ const glw::GLint eCol = static_cast<glw::GLint>(column);
+ const glw::GLint eRow = static_cast<glw::GLint>(row);
+
tcu::Matrix<glw::GLdouble, Size - 1, Size - 1> result;
- for (glw::GLuint c = 0; c < Size; ++c)
+ for (glw::GLint c = 0; c < Size; ++c)
{
/* Skip eliminated column */
- if (column == c)
+ if (eCol == c)
{
continue;
}
- for (glw::GLuint r = 0; r < Size; ++r)
+ for (glw::GLint r = 0; r < Size; ++r)
{
/* Skip eliminated row */
- if (row == r)
+ if (eRow == r)
{
continue;
}
- const glw::GLint r_offset = (r > row) ? -1 : 0;
- const glw::GLint c_offset = (c > column) ? -1 : 0;
+ const glw::GLint r_offset = (r > eRow) ? -1 : 0;
+ const glw::GLint c_offset = (c > eCol) ? -1 : 0;
result(r + r_offset, c + c_offset) = matrix(r, c);
}
}
return result;
+
+#if (DE_COMPILER == DE_COMPILER_GCC)
+# pragma GCC diagnostic pop
+#endif
}
template <int Size>
/** Comparator that is used to compare two tessellation coordinates using FP value
* equal operator.
*/
- struct _comparator_exact_tess_coordinate_match : public std::unary_function<float, bool>
+ struct _comparator_exact_tess_coordinate_match
{
/* Constructor.
*
Synchronization sync;
Requirements requirements;
+ CaseDef (const std::string& extraTypes_,
+ const std::string& writeDesc_,
+ const std::string& writeType_,
+ const std::string& writeValue_,
+ const std::string& readDesc_,
+ const std::string& readType_,
+ const std::string& readValue_,
+ LayoutFlags layout_,
+ Function func_,
+ Synchronization sync_,
+ Requirements requirements_)
+ : extraTypes (extraTypes_)
+ , writeDesc (writeDesc_)
+ , writeType (writeType_)
+ , writeValue (writeValue_)
+ , readDesc (readDesc_)
+ , readType (readType_)
+ , readValue (readValue_)
+ , layout (layout_)
+ , func (func_)
+ , sync (sync_)
+ , requirements (requirements_)
+ {}
+
std::string testName() const
{
std::string name = writeDesc + "_to_" + readDesc;
#define CASE(L, R, D1, T1, V1, D2, T2, V2) CASE_EXTRA(L, R, "", D1, T1, V1, D2, T2, V2)
- std::vector<AliasTest::CaseDef> cases =
+ const std::vector<AliasTest::CaseDef> cases
{
CASE_SAME_TYPE(0, "bool_true", "bool v", "true"),
CASE_SAME_TYPE(0, "bool_false", "bool v", "false"),
std::string assignment;
deUint32 elements;
std::vector<deUint32> specValues;
+
+ CompositeCaseDef (uint32_t index_, const std::string& typeDefinition_, const std::string& assignment_, uint32_t elements_, const std::vector<uint32_t>& specValues_)
+ : index (index_)
+ , typeDefinition (typeDefinition_)
+ , assignment (assignment_)
+ , elements (elements_)
+ , specValues (specValues_)
+ {}
};
class CompositeTestInstance : public vkt::TestInstance
void AddCompositeTests(tcu::TestCaseGroup* group)
{
- std::vector<CompositeCaseDef> cases =
+ const std::vector<CompositeCaseDef> cases
{
{0,
"shared uint wg_mem[specId0] = {};\n",
{
de::MovePtr<tcu::TestCaseGroup> testGroup(new tcu::TestCaseGroup(testCtx, "aligned_mip_size", "Aligned mip size"));
- const std::vector<TestImageParameters> imageParameters =
+ const std::vector<TestImageParameters> imageParameters
{
{ IMAGE_TYPE_2D, { tcu::UVec3(512u, 256u, 1u) }, getTestFormats(IMAGE_TYPE_2D) },
{ IMAGE_TYPE_2D_ARRAY, { tcu::UVec3(512u, 256u, 6u) }, getTestFormats(IMAGE_TYPE_2D_ARRAY) },
{
de::MovePtr<tcu::TestCaseGroup> testGroup(new tcu::TestCaseGroup(testCtx, "image_block_shapes", "Standard block shape"));
- const std::vector<TestImageParameters> imageParameters =
+ const std::vector<TestImageParameters> imageParameters
{
{ IMAGE_TYPE_2D, { tcu::UVec3(512u, 256u, 1u) }, getTestFormats(IMAGE_TYPE_2D) },
{ IMAGE_TYPE_2D_ARRAY, { tcu::UVec3(512u, 256u, 6u) }, getTestFormats(IMAGE_TYPE_2D_ARRAY) },
tcu::TestCaseGroup* createImageSparseMemoryAliasingTestsCommon(tcu::TestContext& testCtx, de::MovePtr<tcu::TestCaseGroup> testGroup, const bool useDeviceGroup = false)
{
- const std::vector<TestImageParameters> imageParameters =
+ const std::vector<TestImageParameters> imageParameters
{
{ IMAGE_TYPE_2D, { tcu::UVec3(512u, 256u, 1u), tcu::UVec3(128u, 128u, 1u), tcu::UVec3(503u, 137u, 1u), tcu::UVec3(11u, 37u, 1u) }, getTestFormats(IMAGE_TYPE_2D) },
{ IMAGE_TYPE_2D_ARRAY, { tcu::UVec3(512u, 256u, 6u), tcu::UVec3(128u, 128u, 8u), tcu::UVec3(503u, 137u, 3u), tcu::UVec3(11u, 37u, 3u) }, getTestFormats(IMAGE_TYPE_2D_ARRAY) },
tcu::TestCaseGroup* createImageSparseBindingTestsCommon(tcu::TestContext& testCtx, de::MovePtr<tcu::TestCaseGroup> testGroup, const bool useDeviceGroup = false)
{
- const std::vector<TestImageParameters> imageParameters =
+ const std::vector<TestImageParameters> imageParameters
{
{ IMAGE_TYPE_1D, { tcu::UVec3(512u, 1u, 1u ), tcu::UVec3(1024u, 1u, 1u), tcu::UVec3(11u, 1u, 1u) }, getTestFormats(IMAGE_TYPE_1D) },
{ IMAGE_TYPE_1D_ARRAY, { tcu::UVec3(512u, 1u, 64u), tcu::UVec3(1024u, 1u, 8u), tcu::UVec3(11u, 1u, 3u) }, getTestFormats(IMAGE_TYPE_1D_ARRAY) },
tcu::TestCaseGroup* createImageSparseResidencyTestsCommon (tcu::TestContext& testCtx, de::MovePtr<tcu::TestCaseGroup> testGroup, const bool useDeviceGroup = false)
{
- const std::vector<TestImageParameters> imageParameters =
+ const std::vector<TestImageParameters> imageParameters
{
{ IMAGE_TYPE_2D, { tcu::UVec3(512u, 256u, 1u), tcu::UVec3(1024u, 128u, 1u), tcu::UVec3(11u, 137u, 1u) }, getTestFormats(IMAGE_TYPE_2D) },
{ IMAGE_TYPE_2D_ARRAY, { tcu::UVec3(512u, 256u, 6u), tcu::UVec3(1024u, 128u, 8u), tcu::UVec3(11u, 137u, 3u) }, getTestFormats(IMAGE_TYPE_2D_ARRAY) },
tcu::TestCaseGroup* createMipmapSparseResidencyTestsCommon (tcu::TestContext& testCtx, de::MovePtr<tcu::TestCaseGroup> testGroup, const bool useDeviceGroup = false)
{
- const std::vector<TestImageParameters> imageParameters =
+ const std::vector<TestImageParameters> imageParameters
{
{ IMAGE_TYPE_2D, { tcu::UVec3(512u, 256u, 1u), tcu::UVec3(1024u, 128u, 1u), tcu::UVec3(11u, 137u, 1u) }, getTestFormats(IMAGE_TYPE_2D) },
{ IMAGE_TYPE_2D_ARRAY, { tcu::UVec3(512u, 256u, 6u), tcu::UVec3(1024u, 128u, 8u), tcu::UVec3(11u, 137u, 3u) }, getTestFormats(IMAGE_TYPE_2D_ARRAY) },
{
de::MovePtr<tcu::TestCaseGroup> testGroup(new tcu::TestCaseGroup(testCtx, "shader_intrinsics", "Sparse Resources Shader Intrinsics"));
- const std::vector<TestImageParameters> imageParameters =
+ const std::vector<TestImageParameters> imageParameters
{
{ IMAGE_TYPE_2D, { tcu::UVec3(512u, 256u, 1u), tcu::UVec3(128u, 128u, 1u), tcu::UVec3(503u, 137u, 1u), tcu::UVec3(11u, 37u, 1u) }, getTestFormats(IMAGE_TYPE_2D) },
{ IMAGE_TYPE_2D_ARRAY, { tcu::UVec3(512u, 256u, 6u), tcu::UVec3(128u, 128u, 8u), tcu::UVec3(503u, 137u, 3u), tcu::UVec3(11u, 37u, 3u) }, getTestFormats(IMAGE_TYPE_2D_ARRAY) },
ImageType imageType;
std::vector<tcu::UVec3> imageSizes;
std::vector<TestFormat> formats;
+
+ TestImageParameters (ImageType imageType_, const std::vector<tcu::UVec3>& imageSizes_, const std::vector<TestFormat>& formats_)
+ : imageType (imageType_)
+ , imageSizes (imageSizes_)
+ , formats (formats_)
+ {}
};
bool formatIsR64 (const vk::VkFormat& format);
std::vector<int> expectedOutput;
std::string spirvVariables;
std::string spirvCopyObject;
+
+ BufferType (const std::string& name_,
+ VkDescriptorType descriptorType_,
+ const std::vector<uint32_t>& offsets_,
+ const std::vector<int>& input_,
+ const std::vector<int>& expectedOutput_,
+ const std::string& spirvVariables_,
+ const std::string& spirvCopyObject_)
+ : name (name_)
+ , descriptorType (descriptorType_)
+ , offsets (offsets_)
+ , input (input_)
+ , expectedOutput (expectedOutput_)
+ , spirvVariables (spirvVariables_)
+ , spirvCopyObject (spirvCopyObject_)
+ {}
};
- std::vector<BufferType> bufferTypes
+ const std::vector<BufferType> bufferTypes
{
{
"ubo",
{
std::string name;
std::string spirvCopyCode;
+
+ CopyingMethod (const std::string& name_, const std::string& spirvCopyCode_)
+ : name (name_)
+ , spirvCopyCode (spirvCopyCode_)
+ {}
};
- std::vector<CopyingMethod> copyingMethods
+ const std::vector<CopyingMethod> copyingMethods
{
{
"copy_object",