Prepare the GL 4.6.1 branch for cleanup/reformat

Making this branch more similar to modern branches for the cleanup CL to
cleanly cherry pick.

Affects: *
Components: Framework, OpenGL, Vulkan
VK-GL-CTS issue: 2282

Change-Id: I7aafed1841ff130f5c0a4cf565f976629cdcd594
diff --git a/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp
index 479e28a..4ec5505 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp
@@ -596,7 +596,7 @@
 	{
 		int a = deRandom_getUint32(&m_random) % testCycles;
 		int b = deRandom_getUint32(&m_random) % testCycles;
-		DE_SWAP(int, order[a], order[b]);
+		std::swap(order[a], order[b]);
 	}
 
 	// Allocate objects in shuffled order
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp
index f3e0ceb..6202a50 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp
@@ -2048,7 +2048,7 @@
 
 	// There are two different renderpasses, each of them draw
 	// one half of the colors.
-	deBool skippedColors = 0u;
+	deUint32 skippedColors = 0u;
 	for (deUint32 color = 0; color < DE_LENGTH_OF_ARRAY(srcColors)/2; color++)
 	{
 		// Skip ill-formed colors when we have non-premultiplied destination colors.
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationCacheControlTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationCacheControlTests.cpp
index 8e2673f..9774da4 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationCacheControlTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationCacheControlTests.cpp
@@ -1117,8 +1117,6 @@
 
 using namespace test_common;
 
-// Disable formatting on this next block for readability
-// clang-format off
 /*--------------------------------------------------------------------*//*!
  * \brief Duplicate single pipeline recreation with explicit caching
  *//*--------------------------------------------------------------------*/
@@ -1343,7 +1341,6 @@
 	DUPLICATE_BATCH_PIPELINES_NO_CACHE,
 	DUPLICATE_BATCH_PIPELINES_DERIVATIVE_INDEX
 };
-// clang-format on
 
 /*--------------------------------------------------------------------*//*!
  * \brief Variadic version of de::newMovePtr
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm64bitCompareTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm64bitCompareTests.cpp
index ec073bd..4dc7016 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm64bitCompareTests.cpp
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm64bitCompareTests.cpp
@@ -150,43 +150,43 @@
 	const Implementation& m_impl;
 };
 
-#define GEN_INT_IMPL(INTTYPE, TYPECHAR, OPNAME, OPERATOR)															\
-	struct INTTYPE##OPNAME##IntImplClass : public IntCompareOperation<INTTYPE>::Implementation						\
+#define GEN_INT_IMPL(INTTYPE, PREFIX, TYPECHAR, OPNAME, OPERATOR)													\
+	struct PREFIX##OPNAME##IntImplClass : public IntCompareOperation<INTTYPE>::Implementation						\
 	{																												\
 		virtual std::string	typeChar	()								const	{ return #TYPECHAR;	}				\
 		virtual std::string	opName		()								const	{ return #OPNAME;	}				\
 		virtual bool		run			(INTTYPE left, INTTYPE right)	const	{ return left OPERATOR right; }		\
 	};																												\
-	INTTYPE##OPNAME##IntImplClass INTTYPE##OPNAME##IntImplInstance;
+	PREFIX##OPNAME##IntImplClass PREFIX##OPNAME##IntImplInstance;
 
-#define GEN_ALL_INT_TYPE_IMPL(INTTYPE, TYPECHAR)				\
-	GEN_INT_IMPL(INTTYPE, I,		Equal,				==	)	\
-	GEN_INT_IMPL(INTTYPE, I,		NotEqual,			!=	)	\
-	GEN_INT_IMPL(INTTYPE, TYPECHAR,	GreaterThan,		>	)	\
-	GEN_INT_IMPL(INTTYPE, TYPECHAR,	GreaterThanEqual,	>=	)	\
-	GEN_INT_IMPL(INTTYPE, TYPECHAR,	LessThan,			<	)	\
-	GEN_INT_IMPL(INTTYPE, TYPECHAR,	LessThanEqual,		<=	)
+#define GEN_ALL_INT_TYPE_IMPL(INTTYPE, PREFIX, TYPECHAR)				\
+	GEN_INT_IMPL(INTTYPE, PREFIX, I,		Equal,				==	)	\
+	GEN_INT_IMPL(INTTYPE, PREFIX, I,		NotEqual,			!=	)	\
+	GEN_INT_IMPL(INTTYPE, PREFIX, TYPECHAR,	GreaterThan,		>	)	\
+	GEN_INT_IMPL(INTTYPE, PREFIX, TYPECHAR,	GreaterThanEqual,	>=	)	\
+	GEN_INT_IMPL(INTTYPE, PREFIX, TYPECHAR,	LessThan,			<	)	\
+	GEN_INT_IMPL(INTTYPE, PREFIX, TYPECHAR,	LessThanEqual,		<=	)
 
-GEN_ALL_INT_TYPE_IMPL(deInt64,	S)
-GEN_ALL_INT_TYPE_IMPL(deUint64,	U)
+GEN_ALL_INT_TYPE_IMPL(deInt64,	int64, S)
+GEN_ALL_INT_TYPE_IMPL(deUint64,	uint64, U)
 
-#define GEN_INT_OP(INTTYPE, OPNAME)																			\
-	struct INTTYPE##OPNAME##OpClass: public IntCompareOperation<INTTYPE>									\
-	{																										\
-		INTTYPE##OPNAME##OpClass () : IntCompareOperation<INTTYPE>(INTTYPE##OPNAME##IntImplInstance) {}		\
-	};																										\
-	INTTYPE##OPNAME##OpClass INTTYPE##OPNAME##Op;
+#define GEN_INT_OP(INTTYPE, PREFIX, OPNAME)																\
+	struct PREFIX##OPNAME##OpClass: public IntCompareOperation<INTTYPE>									\
+	{																									\
+		PREFIX##OPNAME##OpClass () : IntCompareOperation<INTTYPE>(PREFIX##OPNAME##IntImplInstance) {}	\
+	};																									\
+	PREFIX##OPNAME##OpClass PREFIX##OPNAME##Op;
 
-#define GEN_ALL_INT_OPS(INTTYPE)				\
-	GEN_INT_OP(INTTYPE, Equal				)	\
-	GEN_INT_OP(INTTYPE, NotEqual			)	\
-	GEN_INT_OP(INTTYPE, GreaterThan			)	\
-	GEN_INT_OP(INTTYPE, GreaterThanEqual	)	\
-	GEN_INT_OP(INTTYPE, LessThan			)	\
-	GEN_INT_OP(INTTYPE, LessThanEqual		)
+#define GEN_ALL_INT_OPS(INTTYPE, PREFIX)				\
+	GEN_INT_OP(INTTYPE, PREFIX, Equal				)	\
+	GEN_INT_OP(INTTYPE, PREFIX, NotEqual			)	\
+	GEN_INT_OP(INTTYPE, PREFIX, GreaterThan			)	\
+	GEN_INT_OP(INTTYPE, PREFIX, GreaterThanEqual	)	\
+	GEN_INT_OP(INTTYPE, PREFIX, LessThan			)	\
+	GEN_INT_OP(INTTYPE, PREFIX, LessThanEqual		)
 
-GEN_ALL_INT_OPS(deInt64)
-GEN_ALL_INT_OPS(deUint64)
+GEN_ALL_INT_OPS(deInt64, int64)
+GEN_ALL_INT_OPS(deUint64, uint64)
 
 enum DataType {
 	DATA_TYPE_SINGLE = 0,
@@ -1815,12 +1815,12 @@
 {
 	static const std::vector<const CompareOperation<deInt64>*> operationList =
 	{
-		&deInt64EqualOp,
-		&deInt64NotEqualOp,
-		&deInt64LessThanOp,
-		&deInt64LessThanEqualOp,
-		&deInt64GreaterThanOp,
-		&deInt64GreaterThanEqualOp,
+		&int64EqualOp,
+		&int64NotEqualOp,
+		&int64LessThanOp,
+		&int64LessThanEqualOp,
+		&int64GreaterThanOp,
+		&int64GreaterThanEqualOp,
 	};
 
 	for (const auto&	stageNamePair	: *stageNames)
@@ -1837,12 +1837,12 @@
 {
 	static const std::vector<const CompareOperation<deUint64>*> operationList =
 	{
-		&deUint64EqualOp,
-		&deUint64NotEqualOp,
-		&deUint64LessThanOp,
-		&deUint64LessThanEqualOp,
-		&deUint64GreaterThanOp,
-		&deUint64GreaterThanEqualOp,
+		&uint64EqualOp,
+		&uint64NotEqualOp,
+		&uint64LessThanOp,
+		&uint64LessThanEqualOp,
+		&uint64GreaterThanOp,
+		&uint64GreaterThanEqualOp,
 	};
 
 	for (const auto&	stageNamePair	: *stageNames)
diff --git a/framework/common/tcuWaiverUtil.cpp b/framework/common/tcuWaiverUtil.cpp
index 09a1f19..4f61c48 100644
--- a/framework/common/tcuWaiverUtil.cpp
+++ b/framework/common/tcuWaiverUtil.cpp
@@ -345,7 +345,7 @@
 	deUint32 parentIndex = 0;
 
 	// construct root node
-	m_buildTree.emplace_back("root", DE_NULL);
+	m_buildTree.emplace_back("root", 0);
 
 	for (const auto& path : m_testList)
 	{
diff --git a/framework/delibs/decpp/deRingBuffer.hpp b/framework/delibs/decpp/deRingBuffer.hpp
index 7160e40..f50930f 100644
--- a/framework/delibs/decpp/deRingBuffer.hpp
+++ b/framework/delibs/decpp/deRingBuffer.hpp
@@ -108,7 +108,7 @@
 		m_back		= 0;
 		m_size		= newSize;
 
-		DE_SWAP(T*, buf, m_buffer);
+		std::swap(buf, m_buffer);
 		delete[] buf;
 	}
 	catch (...)
diff --git a/modules/gles3/functional/es3fMultiviewTests.cpp b/modules/gles3/functional/es3fMultiviewTests.cpp
index 06b1805..a2ddd83 100644
--- a/modules/gles3/functional/es3fMultiviewTests.cpp
+++ b/modules/gles3/functional/es3fMultiviewTests.cpp
@@ -20,7 +20,6 @@
  * \file
  * \brief Multiview tests.
  * Tests functionality provided by the three multiview extensions.
- * Note that this file is formatted using external/openglcts/.clang-format
  */ /*--------------------------------------------------------------------*/
 
 #include "es3fMultiviewTests.hpp"
diff --git a/modules/gles3/functional/es3fMultiviewTests.hpp b/modules/gles3/functional/es3fMultiviewTests.hpp
index e13bcba..ae81e15 100644
--- a/modules/gles3/functional/es3fMultiviewTests.hpp
+++ b/modules/gles3/functional/es3fMultiviewTests.hpp
@@ -22,7 +22,6 @@
  * \file
  * \brief Multiview tests.
  * Tests functionality provided by the three multiview extensions.
- * Note that this file is formatted using external/openglcts/.clang-format
 */ /*--------------------------------------------------------------------*/
 
 #include "tcuDefs.hpp"