diff options
Diffstat (limited to 'layers')
-rw-r--r-- | layers/linux/VkLayer_core_validation.json | 2 | ||||
-rw-r--r-- | layers/linux/VkLayer_object_tracker.json | 2 | ||||
-rw-r--r-- | layers/linux/VkLayer_parameter_validation.json | 2 | ||||
-rw-r--r-- | layers/linux/VkLayer_swapchain.json | 2 | ||||
-rw-r--r-- | layers/linux/VkLayer_threading.json | 2 | ||||
-rw-r--r-- | layers/linux/VkLayer_unique_objects.json | 2 | ||||
-rw-r--r-- | layers/object_tracker.cpp | 61 | ||||
-rw-r--r-- | layers/parameter_validation.cpp | 40 | ||||
-rw-r--r-- | layers/windows/VkLayer_core_validation.json | 2 | ||||
-rw-r--r-- | layers/windows/VkLayer_object_tracker.json | 2 | ||||
-rw-r--r-- | layers/windows/VkLayer_parameter_validation.json | 2 | ||||
-rw-r--r-- | layers/windows/VkLayer_swapchain.json | 2 | ||||
-rw-r--r-- | layers/windows/VkLayer_threading.json | 2 | ||||
-rw-r--r-- | layers/windows/VkLayer_unique_objects.json | 2 |
14 files changed, 113 insertions, 12 deletions
diff --git a/layers/linux/VkLayer_core_validation.json b/layers/linux/VkLayer_core_validation.json index 2bab6a42..a9f30deb 100644 --- a/layers/linux/VkLayer_core_validation.json +++ b/layers/linux/VkLayer_core_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_core_validation", "type": "GLOBAL", "library_path": "./libVkLayer_core_validation.so", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_object_tracker.json b/layers/linux/VkLayer_object_tracker.json index c7776731..3898ec63 100644 --- a/layers/linux/VkLayer_object_tracker.json +++ b/layers/linux/VkLayer_object_tracker.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_object_tracker", "type": "GLOBAL", "library_path": "./libVkLayer_object_tracker.so", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_parameter_validation.json b/layers/linux/VkLayer_parameter_validation.json index 7d0dfd11..6f5140a8 100644 --- a/layers/linux/VkLayer_parameter_validation.json +++ b/layers/linux/VkLayer_parameter_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_parameter_validation", "type": "GLOBAL", "library_path": "./libVkLayer_parameter_validation.so", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_swapchain.json b/layers/linux/VkLayer_swapchain.json index 235673fa..4c71fcde 100644 --- a/layers/linux/VkLayer_swapchain.json +++ b/layers/linux/VkLayer_swapchain.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_swapchain", "type": "GLOBAL", "library_path": "./libVkLayer_swapchain.so", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_threading.json b/layers/linux/VkLayer_threading.json index 81c7c9f4..2e57dad5 100644 --- a/layers/linux/VkLayer_threading.json +++ b/layers/linux/VkLayer_threading.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_threading", "type": "GLOBAL", "library_path": "./libVkLayer_threading.so", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "Google Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_unique_objects.json b/layers/linux/VkLayer_unique_objects.json index dc5eef8a..37258a2b 100644 --- a/layers/linux/VkLayer_unique_objects.json +++ b/layers/linux/VkLayer_unique_objects.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_unique_objects", "type": "GLOBAL", "library_path": "./libVkLayer_unique_objects.so", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "Google Validation Layer" } diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp index 62d9e044..8949cca5 100644 --- a/layers/object_tracker.cpp +++ b/layers/object_tracker.cpp @@ -5146,6 +5146,64 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhy } } +VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + uint32_t *pPresentationTimingCount, + VkPastPresentationTimingGOOGLE *pPresentationTimings) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + bool skip = false; + { + std::unique_lock<std::mutex> lock(global_lock); + skip |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, swapchain, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + } + + if (!skip) { + result = get_dispatch_table(ot_device_table_map, device) + ->GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings); + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE *pDisplayTimingProperties) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + bool skip = false; + { + std::unique_lock<std::mutex> lock(global_lock); + skip |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, swapchain, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + } + + if (!skip) { + result = get_dispatch_table(ot_device_table_map, device) + ->GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); + } + return result; +} + +VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR *pSwapchains, + const VkHdrMetadataEXT *pMetadata) { + bool skip = false; + { + std::lock_guard<std::mutex> lock(global_lock); + if (pSwapchains) { + for (uint32_t idx0 = 0; idx0 < swapchainCount; ++idx0) { + skip |= ValidateObject(device, pSwapchains[idx0], VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, false, + VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + } + } + skip |= ValidateObject(device, device, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + } + if (!skip) { + get_dispatch_table(ot_device_table_map, device)->SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); + } +} + static inline PFN_vkVoidFunction InterceptCoreDeviceCommand(const char *name) { if (!name || name[0] != 'v' || name[1] != 'k') return NULL; @@ -5281,6 +5339,9 @@ static inline PFN_vkVoidFunction InterceptCoreDeviceCommand(const char *name) { #endif // VK_USE_PLATFORM_WIN32_KHR if (!strcmp(name, "CmdDrawIndirectCountAMD")) return (PFN_vkVoidFunction)CmdDrawIndirectCountAMD; if (!strcmp(name, "CmdDrawIndexedIndirectCountAMD")) return (PFN_vkVoidFunction)CmdDrawIndexedIndirectCountAMD; + if (!strcmp(name, "GetPastPresentationTimingGOOGLE")) return (PFN_vkVoidFunction)GetPastPresentationTimingGOOGLE; + if (!strcmp(name, "GetRefreshCycleDurationGOOGLE")) return (PFN_vkVoidFunction)GetRefreshCycleDurationGOOGLE; + if (!strcmp(name, "SetHdrMetadataEXT")) return (PFN_vkVoidFunction)SetHdrMetadataEXT; return NULL; } diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 16598ed1..0db8be02 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -6921,6 +6921,46 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhy } } +VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + uint32_t *pPresentationTimingCount, + VkPastPresentationTimingGOOGLE *pPresentationTimings) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + bool skip = false; + auto my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + assert(my_data != NULL); + skip |= parameter_validation_vkGetPastPresentationTimingGOOGLE(my_data->report_data, swapchain, pPresentationTimingCount, + pPresentationTimings); + if (!skip) { + result = my_data->dispatch_table.GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, + pPresentationTimings); + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE *pDisplayTimingProperties) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + bool skip = false; + auto my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + assert(my_data != NULL); + skip |= parameter_validation_vkGetRefreshCycleDurationGOOGLE(my_data->report_data, swapchain, pDisplayTimingProperties); + if (!skip) { + result = my_data->dispatch_table.GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); + } + return result; +} + +VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR *pSwapchains, + const VkHdrMetadataEXT *pMetadata) { + bool skip = false; + auto my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + assert(my_data != NULL); + skip |= parameter_validation_vkSetHdrMetadataEXT(my_data->report_data, swapchainCount, pSwapchains, pMetadata); + if (!skip) { + my_data->dispatch_table.SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); + } +} + static inline PFN_vkVoidFunction layer_intercept_proc(const char *name) { for (unsigned int i = 0; i < sizeof(procmap) / sizeof(procmap[0]); i++) { if (!strcmp(name, procmap[i].name)) return procmap[i].pFunc; diff --git a/layers/windows/VkLayer_core_validation.json b/layers/windows/VkLayer_core_validation.json index 9af363e2..fdc2c29d 100644 --- a/layers/windows/VkLayer_core_validation.json +++ b/layers/windows/VkLayer_core_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_core_validation", "type": "GLOBAL", "library_path": ".\\VkLayer_core_validation.dll", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_object_tracker.json b/layers/windows/VkLayer_object_tracker.json index c63f1b7e..1747c965 100644 --- a/layers/windows/VkLayer_object_tracker.json +++ b/layers/windows/VkLayer_object_tracker.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_object_tracker", "type": "GLOBAL", "library_path": ".\\VkLayer_object_tracker.dll", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_parameter_validation.json b/layers/windows/VkLayer_parameter_validation.json index 9df8ccde..bbc51c02 100644 --- a/layers/windows/VkLayer_parameter_validation.json +++ b/layers/windows/VkLayer_parameter_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_parameter_validation", "type": "GLOBAL", "library_path": ".\\VkLayer_parameter_validation.dll", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_swapchain.json b/layers/windows/VkLayer_swapchain.json index c76e201d..576db80a 100644 --- a/layers/windows/VkLayer_swapchain.json +++ b/layers/windows/VkLayer_swapchain.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_swapchain", "type": "GLOBAL", "library_path": ".\\VkLayer_swapchain.dll", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_threading.json b/layers/windows/VkLayer_threading.json index 756c7ddf..1dbcd5bf 100644 --- a/layers/windows/VkLayer_threading.json +++ b/layers/windows/VkLayer_threading.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_threading", "type": "GLOBAL", "library_path": ".\\VkLayer_threading.dll", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "Google Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_unique_objects.json b/layers/windows/VkLayer_unique_objects.json index b6eaa5ae..c7a4bde7 100644 --- a/layers/windows/VkLayer_unique_objects.json +++ b/layers/windows/VkLayer_unique_objects.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_unique_objects", "type": "GLOBAL", "library_path": ".\\VkLayer_unique_objects.dll", - "api_version": "1.0.42", + "api_version": "1.0.43", "implementation_version": "1", "description": "Google Validation Layer" } |