Add VK_NULL_HANDLE definition to vkDefs.hpp
authorRicardo Garcia <rgarcia@igalia.com>
Thu, 1 Dec 2022 12:26:33 +0000 (13:26 +0100)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 1 Dec 2022 23:40:28 +0000 (23:40 +0000)
VK_NULL_HANDLE was notably missing for usage in CTS tests, and in most
of them it was being replaced by DE_NULL, which in the past also doubled
as NULL and nullptr.

Since VK-GL-CTS was updated to support C++11, nullptr was available as a
more natural way of using null pointers, but DE_NULL still had to be
used as the VK_NULL_HANDLE replacement.

This commit defines VK_NULL_HANDLE to be DE_NULL, which is known to
work, and makes its definition available globally as expected.

No test results should be affected.

VK-GL-CTS issue: 1701
Components: Vulkan

Change-Id: I188ab0ae8764ba25be38048479d62831909fbe29

external/vulkancts/framework/vulkan/vkDefs.hpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationCacheControlTests.cpp
external/vulkancts/modules/vulkan/renderpass/vktDynamicRenderingTests.cpp

index bfec365..88a61fd 100644 (file)
@@ -37,6 +37,7 @@
 #      define VKAPI_CALL
 #endif
 
+#define VK_NULL_HANDLE                                                                 DE_NULL
 #define VK_DEFINE_HANDLE(NAME, TYPE)                                   typedef struct NAME##_s* NAME
 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(NAME, TYPE)  typedef Handle<TYPE> NAME
 
index 49b840f..e4e82ce 100644 (file)
@@ -62,8 +62,6 @@ using ::std::vector;
  *//*--------------------------------------------------------------------*/
 namespace test_common
 {
-static constexpr auto VK_NULL_HANDLE = DE_NULL;
-
 using ::std::chrono::high_resolution_clock;
 using ::std::chrono::microseconds;
 
index cbe744a..502f784 100644 (file)
@@ -64,7 +64,6 @@ using tcu::Vec4;
 using tcu::IVec4;
 using tcu::UVec4;
 
-constexpr auto         VK_NULL_HANDLE                          = DE_NULL;
  // maxColorAttachments is guaranteed to be at least 4.
 constexpr deUint32     COLOR_ATTACHMENTS_NUMBER        = 4;