Skip to content

Commit

Permalink
update size and format
Browse files Browse the repository at this point in the history
  • Loading branch information
qbojj committed Jun 25, 2024
1 parent c5b0e76 commit a05bad7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
32 changes: 16 additions & 16 deletions renderdoc/driver/vulkan/vk_dispatchtables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion renderdoc/driver/vulkan/vk_dispatchtables.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
15 changes: 8 additions & 7 deletions renderdoc/driver/vulkan/vk_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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) \
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion renderdoc/replay/renderdoc_serialise.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a05bad7

Please sign in to comment.