From a05bad7e0496d9ccfe7402c50ad5580f1e1e1957 Mon Sep 17 00:00:00 2001 From: Jakub Janeczko Date: Tue, 25 Jun 2024 15:24:06 +0200 Subject: [PATCH] update size and format --- renderdoc/driver/vulkan/vk_dispatchtables.cpp | 32 +++++++++---------- renderdoc/driver/vulkan/vk_dispatchtables.h | 3 +- renderdoc/driver/vulkan/vk_layer.cpp | 15 +++++---- renderdoc/replay/renderdoc_serialise.inl | 2 +- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_dispatchtables.cpp b/renderdoc/driver/vulkan/vk_dispatchtables.cpp index 6f2402c7bdd..b2fcc812715 100644 --- a/renderdoc/driver/vulkan/vk_dispatchtables.cpp +++ b/renderdoc/driver/vulkan/vk_dispatchtables.cpp @@ -91,14 +91,14 @@ void InitInstanceExtensionTables(VkInstance instance, InstanceDeviceInfo *info) #undef HookInitPromotedExtension #define HookInitPromotedExtension(cond, func, suffix) \ - if(cond) \ - { \ - InstanceGPA(func); \ - InstanceGPA(CONCAT(func, suffix)); \ - if(table->func == NULL) \ - table->func = table->CONCAT(func, suffix); \ - if(table->CONCAT(func, suffix) == NULL) \ - table->CONCAT(func, suffix) = table->func; \ + if(cond) \ + { \ + InstanceGPA(func); \ + InstanceGPA(CONCAT(func, suffix)); \ + if(table->func == NULL) \ + table->func = table->CONCAT(func, suffix); \ + if(table->CONCAT(func, suffix) == NULL) \ + table->CONCAT(func, suffix) = table->func; \ } #undef HookInitExtensionEXTtoKHR @@ -141,14 +141,14 @@ void InitDeviceExtensionTables(VkDevice device, InstanceDeviceInfo *info) #undef HookInitPromotedExtension #define HookInitPromotedExtension(cond, func, suffix) \ - if(cond) \ - { \ - DeviceGPA(func); \ - DeviceGPA(CONCAT(func, suffix)); \ - if(table->func == NULL) \ - table->func = table->CONCAT(func, suffix); \ - if(table->CONCAT(func, suffix) == NULL) \ - table->CONCAT(func, suffix) = table->func; \ + if(cond) \ + { \ + DeviceGPA(func); \ + DeviceGPA(CONCAT(func, suffix)); \ + if(table->func == NULL) \ + table->func = table->CONCAT(func, suffix); \ + if(table->CONCAT(func, suffix) == NULL) \ + table->CONCAT(func, suffix) = table->func; \ } #undef HookInitExtensionEXTtoKHR diff --git a/renderdoc/driver/vulkan/vk_dispatchtables.h b/renderdoc/driver/vulkan/vk_dispatchtables.h index c884f915bcd..1e7ed5cc48a 100644 --- a/renderdoc/driver/vulkan/vk_dispatchtables.h +++ b/renderdoc/driver/vulkan/vk_dispatchtables.h @@ -39,7 +39,8 @@ void InitReplayTables(void *vulkanModule); // bitmask of extension enabled status -enum ExtensionStatusFlagBits { +enum ExtensionStatusFlagBits +{ NotEnabled = 0, ExplicitEnabled = 1 << 0, PromotionEnabled = 1 << 1, diff --git a/renderdoc/driver/vulkan/vk_layer.cpp b/renderdoc/driver/vulkan/vk_layer.cpp index d1462517ef6..a8031418348 100644 --- a/renderdoc/driver/vulkan/vk_layer.cpp +++ b/renderdoc/driver/vulkan/vk_layer.cpp @@ -374,12 +374,13 @@ VK_LAYER_RENDERDOC_CaptureEnumerateInstanceExtensionProperties( } #undef DeclExt -#define DeclExt(name) \ - ExtensionStatusFlags name = ExtensionStatusFlagBits::NotEnabled; \ +#define DeclExt(name) \ + ExtensionStatusFlags name = ExtensionStatusFlagBits::NotEnabled; \ (void)name; #undef CheckExt -#define CheckExt(name, ver) name = instDevInfo == NULL ? ExtensionStatusFlagBits::NotEnabled : instDevInfo->ext_##name; +#define CheckExt(name, ver) \ + name = instDevInfo == NULL ? ExtensionStatusFlagBits::NotEnabled : instDevInfo->ext_##name; #undef HookInit #define HookInit(function) \ @@ -396,7 +397,7 @@ VK_LAYER_RENDERDOC_CaptureEnumerateInstanceExtensionProperties( // for promoted extensions, we return the function pointer for either name as an alias. #undef HookInitPromotedExtension -#define HookInitPromotedExtension(cond, function, suffix) \ +#define HookInitPromotedExtension(cond, function, suffix) \ if(!strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \ { \ if(ExtensionStatusFlagBits::ExplicitEnabled & cond) \ @@ -515,9 +516,9 @@ VK_LAYER_RENDERDOC_CaptureGetInstanceProcAddr(VkInstance instance, const char *p return (PFN_vkVoidFunction)&CONCAT(hooked_vk, function); #undef HookInitPromotedExtension -#define HookInitPromotedExtension(cond, function, suffix) \ +#define HookInitPromotedExtension(cond, function, suffix) \ if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \ - !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \ + !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \ return (PFN_vkVoidFunction)&CONCAT(hooked_vk, function); #undef HookInitExtensionEXTtoKHR @@ -596,7 +597,7 @@ VK_LAYER_RENDERDOC_Capture_layerGetPhysicalDeviceProcAddr(VkInstance instance, c return NULL; #undef HookInitPromotedExtension -#define HookInitPromotedExtension(cond, function, suffix) \ +#define HookInitPromotedExtension(cond, function, suffix) \ if(!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \ !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \ return NULL; diff --git a/renderdoc/replay/renderdoc_serialise.inl b/renderdoc/replay/renderdoc_serialise.inl index 311f8d41ce3..a0cf7ed8ace 100644 --- a/renderdoc/replay/renderdoc_serialise.inl +++ b/renderdoc/replay/renderdoc_serialise.inl @@ -2287,7 +2287,7 @@ void DoSerialise(SerialiserType &ser, VKPipe::State &el) SERIALISE_MEMBER(conditionalRendering); - SIZE_CHECK(1752); + SIZE_CHECK(1820); } #pragma endregion Vulkan pipeline state