• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2015-2019 The Khronos Group Inc.
2  * Copyright (c) 2015-2019 Valve Corporation
3  * Copyright (c) 2015-2019 LunarG, Inc.
4  * Copyright (C) 2015-2019 Google Inc.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Author: Courtney Goeltzenleuchter <courtneygo@google.com>
19  * Author: Tobin Ehlis <tobine@google.com>
20  * Author: Chris Forbes <chrisf@ijw.co.nz>
21  * Author: Mark Lobodzinski <mark@lunarg.com>
22  * Author: Dave Houlton <daveh@lunarg.com>
23  */
24 
25 #pragma once
26 #include "core_validation_error_enums.h"
27 #include "core_validation_types.h"
28 #include "descriptor_sets.h"
29 #include "shader_validation.h"
30 #include "gpu_validation.h"
31 #include "vk_layer_logging.h"
32 #include "vulkan/vk_layer.h"
33 #include "vk_typemap_helper.h"
34 #include "vk_layer_data.h"
35 #include <atomic>
36 #include <functional>
37 #include <memory>
38 #include <unordered_map>
39 #include <unordered_set>
40 #include <vector>
41 #include <list>
42 #include <deque>
43 
44 enum SyncScope {
45     kSyncScopeInternal,
46     kSyncScopeExternalTemporary,
47     kSyncScopeExternalPermanent,
48 };
49 
50 enum FENCE_STATE { FENCE_UNSIGNALED, FENCE_INFLIGHT, FENCE_RETIRED };
51 
52 class FENCE_NODE {
53    public:
54     VkFence fence;
55     VkFenceCreateInfo createInfo;
56     std::pair<VkQueue, uint64_t> signaler;
57     FENCE_STATE state;
58     SyncScope scope;
59 
60     // Default constructor
FENCE_NODE()61     FENCE_NODE() : state(FENCE_UNSIGNALED), scope(kSyncScopeInternal) {}
62 };
63 
64 class SEMAPHORE_NODE : public BASE_NODE {
65    public:
66     std::pair<VkQueue, uint64_t> signaler;
67     bool signaled;
68     SyncScope scope;
69 };
70 
71 class EVENT_STATE : public BASE_NODE {
72    public:
73     int write_in_use;
74     bool needsSignaled;
75     VkPipelineStageFlags stageMask;
76 };
77 
78 class QUEUE_STATE {
79    public:
80     VkQueue queue;
81     uint32_t queueFamilyIndex;
82     std::unordered_map<VkEvent, VkPipelineStageFlags> eventToStageMap;
83     std::unordered_map<QueryObject, bool> queryToStateMap;  // 0 is unavailable, 1 is available
84 
85     uint64_t seq;
86     std::deque<CB_SUBMISSION> submissions;
87 };
88 
89 class QUERY_POOL_NODE : public BASE_NODE {
90    public:
91     VkQueryPoolCreateInfo createInfo;
92 };
93 
94 struct PHYSICAL_DEVICE_STATE {
95     // Track the call state and array sizes for various query functions
96     CALL_STATE vkGetPhysicalDeviceQueueFamilyPropertiesState = UNCALLED;
97     CALL_STATE vkGetPhysicalDeviceLayerPropertiesState = UNCALLED;
98     CALL_STATE vkGetPhysicalDeviceExtensionPropertiesState = UNCALLED;
99     CALL_STATE vkGetPhysicalDeviceFeaturesState = UNCALLED;
100     CALL_STATE vkGetPhysicalDeviceSurfaceCapabilitiesKHRState = UNCALLED;
101     CALL_STATE vkGetPhysicalDeviceSurfacePresentModesKHRState = UNCALLED;
102     CALL_STATE vkGetPhysicalDeviceSurfaceFormatsKHRState = UNCALLED;
103     CALL_STATE vkGetPhysicalDeviceDisplayPlanePropertiesKHRState = UNCALLED;
104     safe_VkPhysicalDeviceFeatures2 features2 = {};
105     VkPhysicalDevice phys_device = VK_NULL_HANDLE;
106     uint32_t queue_family_count = 0;
107     std::vector<VkQueueFamilyProperties> queue_family_properties;
108     VkSurfaceCapabilitiesKHR surfaceCapabilities = {};
109     std::vector<VkPresentModeKHR> present_modes;
110     std::vector<VkSurfaceFormatKHR> surface_formats;
111     uint32_t display_plane_property_count = 0;
112 };
113 
114 // This structure is used to save data across the CreateGraphicsPipelines down-chain API call
115 struct create_graphics_pipeline_api_state {
116     std::vector<safe_VkGraphicsPipelineCreateInfo> gpu_create_infos;
117     std::vector<std::unique_ptr<PIPELINE_STATE>> pipe_state;
118     const VkGraphicsPipelineCreateInfo* pCreateInfos;
119 };
120 
121 // This structure is used modify parameters for the CreatePipelineLayout down-chain API call
122 struct create_pipeline_layout_api_state {
123     std::vector<VkDescriptorSetLayout> new_layouts;
124     VkPipelineLayoutCreateInfo modified_create_info;
125 };
126 
127 // This structure is used modify and pass parameters for the CreateShaderModule down-chain API call
128 
129 struct create_shader_module_api_state {
130     uint32_t unique_shader_id;
131     VkShaderModuleCreateInfo instrumented_create_info;
132     std::vector<unsigned int> instrumented_pgm;
133 };
134 
135 struct GpuQueue {
136     VkPhysicalDevice gpu;
137     uint32_t queue_family_index;
138 };
139 
140 struct SubresourceRangeErrorCodes {
141     const char *base_mip_err, *mip_count_err, *base_layer_err, *layer_count_err;
142 };
143 
144 inline bool operator==(GpuQueue const& lhs, GpuQueue const& rhs) {
145     return (lhs.gpu == rhs.gpu && lhs.queue_family_index == rhs.queue_family_index);
146 }
147 
148 namespace std {
149 template <>
150 struct hash<GpuQueue> {
151     size_t operator()(GpuQueue gq) const throw() {
152         return hash<uint64_t>()((uint64_t)(gq.gpu)) ^ hash<uint32_t>()(gq.queue_family_index);
153     }
154 };
155 }  // namespace std
156 
157 struct SURFACE_STATE {
158     VkSurfaceKHR surface = VK_NULL_HANDLE;
159     SWAPCHAIN_NODE* swapchain = nullptr;
160     std::unordered_map<GpuQueue, bool> gpu_queue_support;
161 
162     SURFACE_STATE() {}
163     SURFACE_STATE(VkSurfaceKHR surface) : surface(surface) {}
164 };
165 
166 using std::unordered_map;
167 
168 class CoreChecks : public ValidationObject {
169    public:
170     std::unordered_set<VkQueue> queues;  // All queues under given device
171     unordered_map<VkSampler, std::unique_ptr<SAMPLER_STATE>> samplerMap;
172     unordered_map<VkImageView, std::unique_ptr<IMAGE_VIEW_STATE>> imageViewMap;
173     unordered_map<VkImage, std::unique_ptr<IMAGE_STATE>> imageMap;
174     unordered_map<VkBufferView, std::unique_ptr<BUFFER_VIEW_STATE>> bufferViewMap;
175     unordered_map<VkBuffer, std::unique_ptr<BUFFER_STATE>> bufferMap;
176     unordered_map<VkPipeline, std::unique_ptr<PIPELINE_STATE>> pipelineMap;
177     unordered_map<VkCommandPool, COMMAND_POOL_NODE> commandPoolMap;
178     unordered_map<VkDescriptorPool, DESCRIPTOR_POOL_STATE*> descriptorPoolMap;
179     unordered_map<VkDescriptorSet, cvdescriptorset::DescriptorSet*> setMap;
180     unordered_map<VkDescriptorSetLayout, std::shared_ptr<cvdescriptorset::DescriptorSetLayout>> descriptorSetLayoutMap;
181     unordered_map<VkPipelineLayout, PIPELINE_LAYOUT_NODE> pipelineLayoutMap;
182     unordered_map<VkDeviceMemory, std::unique_ptr<DEVICE_MEM_INFO>> memObjMap;
183     unordered_map<VkFence, FENCE_NODE> fenceMap;
184     unordered_map<VkQueue, QUEUE_STATE> queueMap;
185     unordered_map<VkEvent, EVENT_STATE> eventMap;
186     unordered_map<QueryObject, bool> queryToStateMap;
187     unordered_map<VkQueryPool, QUERY_POOL_NODE> queryPoolMap;
188     unordered_map<VkSemaphore, SEMAPHORE_NODE> semaphoreMap;
189     unordered_map<VkCommandBuffer, GLOBAL_CB_NODE*> commandBufferMap;
190     unordered_map<VkFramebuffer, std::unique_ptr<FRAMEBUFFER_STATE>> frameBufferMap;
191     unordered_map<VkImage, std::vector<ImageSubresourcePair>> imageSubresourceMap;
192     unordered_map<ImageSubresourcePair, IMAGE_LAYOUT_NODE> imageLayoutMap;
193     unordered_map<VkRenderPass, std::shared_ptr<RENDER_PASS_STATE>> renderPassMap;
194     unordered_map<VkShaderModule, std::unique_ptr<shader_module>> shaderModuleMap;
195     unordered_map<VkDescriptorUpdateTemplateKHR, std::unique_ptr<TEMPLATE_STATE>> desc_template_map;
196     unordered_map<VkSwapchainKHR, std::unique_ptr<SWAPCHAIN_NODE>> swapchainMap;
197     unordered_map<VkSamplerYcbcrConversion, uint64_t> ycbcr_conversion_ahb_fmt_map;
198     std::unordered_set<uint64_t> ahb_ext_formats_set;
199     GlobalQFOTransferBarrierMap<VkImageMemoryBarrier> qfo_release_image_barrier_map;
200     GlobalQFOTransferBarrierMap<VkBufferMemoryBarrier> qfo_release_buffer_barrier_map;
201     // Map for queue family index to queue count
202     unordered_map<uint32_t, uint32_t> queue_family_index_map;
203 
204     // Used for instance versions of this object
205     unordered_map<VkPhysicalDevice, PHYSICAL_DEVICE_STATE> physical_device_map;
206     // Link to the device's physical-device data
207     PHYSICAL_DEVICE_STATE* physical_device_state;
208     unordered_map<VkSurfaceKHR, SURFACE_STATE> surface_map;
209 
210     // Link for derived device objects back to their parent instance object
211     CoreChecks* instance_state;
212 
213     // Temporary object pointers
214     layer_data* device_data = this;
215     layer_data* instance_data = this;
216     layer_data* dev_data = this;
217     std::unordered_map<void*, layer_data*> layer_data_map;
218     std::unordered_map<void*, layer_data*> instance_layer_data_map;
219 
220     dispatch_key get_dispatch_key(const void* object) { return nullptr; }
221 
222     template <typename DATA_T>
223     DATA_T* GetLayerDataPtr(void* data_key, std::unordered_map<void*, DATA_T*>& layer_data_map) {
224         return this;
225     }
226 
227     DeviceFeatures enabled_features = {};
228     // Device specific data
229     VkPhysicalDeviceMemoryProperties phys_dev_mem_props = {};
230     VkPhysicalDeviceProperties phys_dev_props = {};
231     // Device extension properties -- storing properties gathered from VkPhysicalDeviceProperties2KHR::pNext chain
232     struct DeviceExtensionProperties {
233         uint32_t max_push_descriptors;  // from VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors
234         VkPhysicalDeviceDescriptorIndexingPropertiesEXT descriptor_indexing_props;
235         VkPhysicalDeviceShadingRateImagePropertiesNV shading_rate_image_props;
236         VkPhysicalDeviceMeshShaderPropertiesNV mesh_shader_props;
237         VkPhysicalDeviceInlineUniformBlockPropertiesEXT inline_uniform_block_props;
238         VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT vtx_attrib_divisor_props;
239         VkPhysicalDeviceDepthStencilResolvePropertiesKHR depth_stencil_resolve_props;
240     };
241     DeviceExtensionProperties phys_dev_ext_props = {};
242     bool external_sync_warning = false;
243     uint32_t api_version = 0;
244     GpuValidationState gpu_validation_state = {};
245     uint32_t physical_device_count;
246 
247     // Class Declarations for helper functions
248     cvdescriptorset::DescriptorSet* GetSetNode(VkDescriptorSet);
249     DESCRIPTOR_POOL_STATE* GetDescriptorPoolState(const VkDescriptorPool);
250     BUFFER_STATE* GetBufferState(VkBuffer);
251     IMAGE_STATE* GetImageState(VkImage);
252     DEVICE_MEM_INFO* GetMemObjInfo(VkDeviceMemory);
253     BUFFER_VIEW_STATE* GetBufferViewState(VkBufferView);
254     SAMPLER_STATE* GetSamplerState(VkSampler);
255     IMAGE_VIEW_STATE* GetAttachmentImageViewState(FRAMEBUFFER_STATE* framebuffer, uint32_t index);
256     IMAGE_VIEW_STATE* GetImageViewState(VkImageView);
257     SWAPCHAIN_NODE* GetSwapchainNode(VkSwapchainKHR);
258     GLOBAL_CB_NODE* GetCBNode(const VkCommandBuffer cb);
259     PIPELINE_STATE* GetPipelineState(VkPipeline pipeline);
260     RENDER_PASS_STATE* GetRenderPassState(VkRenderPass renderpass);
261     std::shared_ptr<RENDER_PASS_STATE> GetRenderPassStateSharedPtr(VkRenderPass renderpass);
262     FRAMEBUFFER_STATE* GetFramebufferState(VkFramebuffer framebuffer);
263     COMMAND_POOL_NODE* GetCommandPoolNode(VkCommandPool pool);
264     shader_module const* GetShaderModuleState(VkShaderModule module);
265     const DeviceFeatures* GetEnabledFeatures();
266     FENCE_NODE* GetFenceNode(VkFence fence);
267     EVENT_STATE* GetEventNode(VkEvent event);
268     QUERY_POOL_NODE* GetQueryPoolNode(VkQueryPool query_pool);
269     QUEUE_STATE* GetQueueState(VkQueue queue);
270     SEMAPHORE_NODE* GetSemaphoreNode(VkSemaphore semaphore);
271     PHYSICAL_DEVICE_STATE* GetPhysicalDeviceState(VkPhysicalDevice phys);
272     PHYSICAL_DEVICE_STATE* GetPhysicalDeviceState();
273     SURFACE_STATE* GetSurfaceState(VkSurfaceKHR surface);
274     BINDABLE* GetObjectMemBinding(uint64_t handle, VulkanObjectType type);
275 
276     bool VerifyQueueStateToSeq(layer_data* dev_data, QUEUE_STATE* initial_queue, uint64_t initial_seq);
277     void ClearCmdBufAndMemReferences(layer_data* dev_data, GLOBAL_CB_NODE* cb_node);
278     void ClearMemoryObjectBinding(uint64_t handle, VulkanObjectType type, VkDeviceMemory mem);
279     void ResetCommandBufferState(layer_data* dev_data, const VkCommandBuffer cb);
280     void SetMemBinding(layer_data* dev_data, VkDeviceMemory mem, BINDABLE* mem_binding, VkDeviceSize memory_offset, uint64_t handle,
281                        VulkanObjectType type);
282     bool ValidateSetMemBinding(layer_data* dev_data, VkDeviceMemory mem, uint64_t handle, VulkanObjectType type,
283                                const char* apiName);
284     bool SetSparseMemBinding(layer_data* dev_data, MEM_BINDING binding, uint64_t handle, VulkanObjectType type);
285     bool ValidateDeviceQueueFamily(layer_data* device_data, uint32_t queue_family, const char* cmd_name, const char* parameter_name,
286                                    const char* error_code, bool optional);
287     BASE_NODE* GetStateStructPtrFromObject(layer_data* dev_data, VK_OBJECT object_struct);
288     void RemoveCommandBufferBinding(layer_data* dev_data, VK_OBJECT const* object, GLOBAL_CB_NODE* cb_node);
289     bool ValidateBindBufferMemory(layer_data* device_data, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memoryOffset,
290                                   const char* api_name);
291     void RecordGetBufferMemoryRequirementsState(layer_data* device_data, VkBuffer buffer,
292                                                 VkMemoryRequirements* pMemoryRequirements);
293     void UpdateBindBufferMemoryState(layer_data* device_data, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memoryOffset);
294     PIPELINE_LAYOUT_NODE const* GetPipelineLayout(layer_data const* dev_data, VkPipelineLayout pipeLayout);
295     const TEMPLATE_STATE* GetDescriptorTemplateState(const layer_data* dev_data,
296                                                      VkDescriptorUpdateTemplateKHR descriptor_update_template);
297     bool ValidateGetImageMemoryRequirements2(layer_data* dev_data, const VkImageMemoryRequirementsInfo2* pInfo);
298     void RecordGetImageMemoryRequiementsState(layer_data* device_data, VkImage image, VkMemoryRequirements* pMemoryRequirements);
299     void FreeCommandBufferStates(layer_data* dev_data, COMMAND_POOL_NODE* pool_state, const uint32_t command_buffer_count,
300                                  const VkCommandBuffer* command_buffers);
301     bool CheckCommandBuffersInFlight(layer_data* dev_data, COMMAND_POOL_NODE* pPool, const char* action, const char* error_code);
302     bool CheckCommandBufferInFlight(layer_data* dev_data, const GLOBAL_CB_NODE* cb_node, const char* action,
303                                     const char* error_code);
304     bool VerifyQueueStateToFence(layer_data* dev_data, VkFence fence);
305     void DecrementBoundResources(layer_data* dev_data, GLOBAL_CB_NODE const* cb_node);
306     bool VerifyWaitFenceState(layer_data* dev_data, VkFence fence, const char* apiCall);
307     void RetireFence(layer_data* dev_data, VkFence fence);
308     void StoreMemRanges(layer_data* dev_data, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size);
309     bool ValidateIdleDescriptorSet(const layer_data* dev_data, VkDescriptorSet set, const char* func_str);
310     void InitializeAndTrackMemory(layer_data* dev_data, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, void** ppData);
311     bool ValidatePipelineLocked(layer_data* dev_data, std::vector<std::unique_ptr<PIPELINE_STATE>> const& pPipelines,
312                                 int pipelineIndex);
313     bool ValidatePipelineUnlocked(layer_data* dev_data, std::vector<std::unique_ptr<PIPELINE_STATE>> const& pPipelines,
314                                   int pipelineIndex);
315     void FreeDescriptorSet(layer_data* dev_data, cvdescriptorset::DescriptorSet* descriptor_set);
316     void DeletePools(layer_data* dev_data);
317     bool ValidImageBufferQueue(layer_data* dev_data, GLOBAL_CB_NODE* cb_node, const VK_OBJECT* object, VkQueue queue,
318                                uint32_t count, const uint32_t* indices);
319     bool ValidateFenceForSubmit(layer_data* dev_data, FENCE_NODE* pFence);
320     void AddMemObjInfo(layer_data* dev_data, void* object, const VkDeviceMemory mem, const VkMemoryAllocateInfo* pAllocateInfo);
321     bool ValidateStatus(layer_data* dev_data, GLOBAL_CB_NODE* pNode, CBStatusFlags status_mask, VkFlags msg_flags,
322                         const char* fail_msg, const char* msg_code);
323     bool ValidateDrawStateFlags(layer_data* dev_data, GLOBAL_CB_NODE* pCB, const PIPELINE_STATE* pPipe, bool indexed,
324                                 const char* msg_code);
325     bool LogInvalidAttachmentMessage(layer_data const* dev_data, const char* type1_string, const RENDER_PASS_STATE* rp1_state,
326                                      const char* type2_string, const RENDER_PASS_STATE* rp2_state, uint32_t primary_attach,
327                                      uint32_t secondary_attach, const char* msg, const char* caller, const char* error_code);
328     bool ValidateAttachmentCompatibility(layer_data const* dev_data, const char* type1_string, const RENDER_PASS_STATE* rp1_state,
329                                          const char* type2_string, const RENDER_PASS_STATE* rp2_state, uint32_t primary_attach,
330                                          uint32_t secondary_attach, const char* caller, const char* error_code);
331     bool ValidateSubpassCompatibility(layer_data const* dev_data, const char* type1_string, const RENDER_PASS_STATE* rp1_state,
332                                       const char* type2_string, const RENDER_PASS_STATE* rp2_state, const int subpass,
333                                       const char* caller, const char* error_code);
334     bool ValidateRenderPassCompatibility(layer_data const* dev_data, const char* type1_string, const RENDER_PASS_STATE* rp1_state,
335                                          const char* type2_string, const RENDER_PASS_STATE* rp2_state, const char* caller,
336                                          const char* error_code);
337     void UpdateDrawState(layer_data* dev_data, GLOBAL_CB_NODE* cb_state, const VkPipelineBindPoint bind_point);
338     bool ReportInvalidCommandBuffer(layer_data* dev_data, const GLOBAL_CB_NODE* cb_state, const char* call_source);
339     void InitGpuValidation(layer_data* instance_data);
340 
341     bool ValidatePipelineVertexDivisors(layer_data* dev_data, std::vector<std::unique_ptr<PIPELINE_STATE>> const& pipe_state_vec,
342                                         const uint32_t count, const VkGraphicsPipelineCreateInfo* pipe_cis);
343     void AddFramebufferBinding(layer_data* dev_data, GLOBAL_CB_NODE* cb_state, FRAMEBUFFER_STATE* fb_state);
344     bool ValidateImageBarrierImage(layer_data* device_data, const char* funcName, GLOBAL_CB_NODE const* cb_state,
345                                    VkFramebuffer framebuffer, uint32_t active_subpass,
346                                    const safe_VkSubpassDescription2KHR& sub_desc, uint64_t rp_handle, uint32_t img_index,
347                                    const VkImageMemoryBarrier& img_barrier);
348     void RecordCmdBeginRenderPassState(layer_data* device_data, VkCommandBuffer commandBuffer,
349                                        const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassContents contents);
350     bool ValidateCmdBeginRenderPass(layer_data* device_data, VkCommandBuffer commandBuffer, RenderPassCreateVersion rp_version,
351                                     const VkRenderPassBeginInfo* pRenderPassBegin);
352     bool ValidateDependencies(layer_data* dev_data, FRAMEBUFFER_STATE const* framebuffer, RENDER_PASS_STATE const* renderPass);
353     bool ValidateBarriers(layer_data* device_data, const char* funcName, GLOBAL_CB_NODE* cb_state,
354                           VkPipelineStageFlags src_stage_mask, VkPipelineStageFlags dst_stage_mask, uint32_t memBarrierCount,
355                           const VkMemoryBarrier* pMemBarriers, uint32_t bufferBarrierCount,
356                           const VkBufferMemoryBarrier* pBufferMemBarriers, uint32_t imageMemBarrierCount,
357                           const VkImageMemoryBarrier* pImageMemBarriers);
358     bool ValidateCreateSwapchain(layer_data* device_data, const char* func_name, VkSwapchainCreateInfoKHR const* pCreateInfo,
359                                  SURFACE_STATE* surface_state, SWAPCHAIN_NODE* old_swapchain_state);
360     void RecordCmdPushDescriptorSetState(layer_data* device_data, GLOBAL_CB_NODE* cb_state, VkPipelineBindPoint pipelineBindPoint,
361                                          VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount,
362                                          const VkWriteDescriptorSet* pDescriptorWrites);
363     bool ValidatePipelineBindPoint(layer_data* device_data, GLOBAL_CB_NODE* cb_state, VkPipelineBindPoint bind_point,
364                                    const char* func_name, const std::map<VkPipelineBindPoint, std::string>& bind_errors);
365     bool ValidateMemoryIsMapped(layer_data* dev_data, const char* funcName, uint32_t memRangeCount,
366                                 const VkMappedMemoryRange* pMemRanges);
367     bool ValidateAndCopyNoncoherentMemoryToDriver(layer_data* dev_data, uint32_t mem_range_count,
368                                                   const VkMappedMemoryRange* mem_ranges);
369     void CopyNoncoherentMemoryFromDriver(layer_data* dev_data, uint32_t mem_range_count, const VkMappedMemoryRange* mem_ranges);
370     bool ValidateMappedMemoryRangeDeviceLimits(layer_data* dev_data, const char* func_name, uint32_t mem_range_count,
371                                                const VkMappedMemoryRange* mem_ranges);
372     BarrierOperationsType ComputeBarrierOperationsType(layer_data* device_data, GLOBAL_CB_NODE* cb_state,
373                                                        uint32_t buffer_barrier_count, const VkBufferMemoryBarrier* buffer_barriers,
374                                                        uint32_t image_barrier_count, const VkImageMemoryBarrier* image_barriers);
375     bool ValidateStageMasksAgainstQueueCapabilities(layer_data* dev_data, GLOBAL_CB_NODE const* cb_state,
376                                                     VkPipelineStageFlags source_stage_mask, VkPipelineStageFlags dest_stage_mask,
377                                                     BarrierOperationsType barrier_op_type, const char* function,
378                                                     const char* error_code);
379     bool SetEventStageMask(VkQueue queue, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
380     bool ValidateRenderPassImageBarriers(layer_data* device_data, const char* funcName, GLOBAL_CB_NODE* cb_state,
381                                          uint32_t active_subpass, const safe_VkSubpassDescription2KHR& sub_desc, uint64_t rp_handle,
382                                          const safe_VkSubpassDependency2KHR* dependencies,
383                                          const std::vector<uint32_t>& self_dependencies, uint32_t image_mem_barrier_count,
384                                          const VkImageMemoryBarrier* image_barriers);
385     bool ValidateSecondaryCommandBufferState(layer_data* dev_data, GLOBAL_CB_NODE* pCB, GLOBAL_CB_NODE* pSubCB);
386     bool ValidateFramebuffer(layer_data* dev_data, VkCommandBuffer primaryBuffer, const GLOBAL_CB_NODE* pCB,
387                              VkCommandBuffer secondaryBuffer, const GLOBAL_CB_NODE* pSubCB, const char* caller);
388     bool ValidateDescriptorUpdateTemplate(const char* func_name, layer_data* device_data,
389                                           const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo);
390     bool ValidateCreateSamplerYcbcrConversion(const layer_data* device_data, const char* func_name,
391                                               const VkSamplerYcbcrConversionCreateInfo* create_info);
392     void RecordCreateSamplerYcbcrConversionState(layer_data* device_data, const VkSamplerYcbcrConversionCreateInfo* create_info,
393                                                  VkSamplerYcbcrConversion ycbcr_conversion);
394     bool ValidateImportFence(layer_data* device_data, VkFence fence, const char* caller_name);
395     void RecordImportFenceState(layer_data* device_data, VkFence fence, VkExternalFenceHandleTypeFlagBitsKHR handle_type,
396                                 VkFenceImportFlagsKHR flags);
397     void RecordGetExternalFenceState(layer_data* device_data, VkFence fence, VkExternalFenceHandleTypeFlagBitsKHR handle_type);
398     bool ValidateAcquireNextImage(layer_data* device_data, VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout,
399                                   VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex, const char* func_name);
400     void RecordAcquireNextImageState(layer_data* device_data, VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout,
401                                      VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex);
402     bool VerifyRenderAreaBounds(const layer_data* dev_data, const VkRenderPassBeginInfo* pRenderPassBegin);
403     bool ValidatePrimaryCommandBuffer(const layer_data* dev_data, const GLOBAL_CB_NODE* pCB, char const* cmd_name,
404                                       const char* error_code);
405     void RecordCmdNextSubpass(layer_data* device_data, VkCommandBuffer commandBuffer, VkSubpassContents contents);
406     bool ValidateCmdEndRenderPass(layer_data* device_data, RenderPassCreateVersion rp_version, VkCommandBuffer commandBuffer);
407     void RecordCmdEndRenderPassState(layer_data* device_data, VkCommandBuffer commandBuffer);
408     bool ValidateFramebufferCreateInfo(layer_data* dev_data, const VkFramebufferCreateInfo* pCreateInfo);
409     bool MatchUsage(layer_data* dev_data, uint32_t count, const VkAttachmentReference2KHR* attachments,
410                     const VkFramebufferCreateInfo* fbci, VkImageUsageFlagBits usage_flag, const char* error_code);
411     bool CheckDependencyExists(const layer_data* dev_data, const uint32_t subpass, const std::vector<uint32_t>& dependent_subpasses,
412                                const std::vector<DAGNode>& subpass_to_node, bool& skip);
413     bool CheckPreserved(const layer_data* dev_data, const VkRenderPassCreateInfo2KHR* pCreateInfo, const int index,
414                         const uint32_t attachment, const std::vector<DAGNode>& subpass_to_node, int depth, bool& skip);
415     bool ValidateBindImageMemory(layer_data* device_data, VkImage image, VkDeviceMemory mem, VkDeviceSize memoryOffset,
416                                  const char* api_name);
417     void UpdateBindImageMemoryState(layer_data* device_data, VkImage image, VkDeviceMemory mem, VkDeviceSize memoryOffset);
418     void RecordGetPhysicalDeviceDisplayPlanePropertiesState(instance_layer_data* instance_data, VkPhysicalDevice physicalDevice,
419                                                             uint32_t* pPropertyCount, void* pProperties);
420     bool ValidateGetPhysicalDeviceDisplayPlanePropertiesKHRQuery(instance_layer_data* instance_data,
421                                                                  VkPhysicalDevice physicalDevice, uint32_t planeIndex,
422                                                                  const char* api_name);
423     bool ValidateQuery(VkQueue queue, GLOBAL_CB_NODE* pCB, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
424     bool IsQueryInvalid(layer_data* dev_data, QUEUE_STATE* queue_data, VkQueryPool queryPool, uint32_t queryIndex);
425     bool ValidateImportSemaphore(layer_data* device_data, VkSemaphore semaphore, const char* caller_name);
426     void RecordImportSemaphoreState(layer_data* device_data, VkSemaphore semaphore,
427                                     VkExternalSemaphoreHandleTypeFlagBitsKHR handle_type, VkSemaphoreImportFlagsKHR flags);
428     void RecordGetExternalSemaphoreState(layer_data* device_data, VkSemaphore semaphore,
429                                          VkExternalSemaphoreHandleTypeFlagBitsKHR handle_type);
430     bool SetQueryState(VkQueue queue, VkCommandBuffer commandBuffer, QueryObject object, bool value);
431     bool ValidateCmdDrawType(layer_data* dev_data, VkCommandBuffer cmd_buffer, bool indexed, VkPipelineBindPoint bind_point,
432                              CMD_TYPE cmd_type, const char* caller, VkQueueFlags queue_flags, const char* queue_flag_code,
433                              const char* renderpass_msg_code, const char* pipebound_msg_code, const char* dynamic_state_msg_code);
434     void UpdateStateCmdDrawDispatchType(layer_data* dev_data, GLOBAL_CB_NODE* cb_state, VkPipelineBindPoint bind_point);
435     void UpdateStateCmdDrawType(layer_data* dev_data, GLOBAL_CB_NODE* cb_state, VkPipelineBindPoint bind_point);
436     bool ValidateCmdNextSubpass(layer_data* device_data, RenderPassCreateVersion rp_version, VkCommandBuffer commandBuffer);
437     bool RangesIntersect(layer_data const* dev_data, MEMORY_RANGE const* range1, VkDeviceSize offset, VkDeviceSize end);
438     bool RangesIntersect(layer_data const* dev_data, MEMORY_RANGE const* range1, MEMORY_RANGE const* range2, bool* skip,
439                          bool skip_checks);
440     bool ValidateInsertMemoryRange(layer_data const* dev_data, uint64_t handle, DEVICE_MEM_INFO* mem_info,
441                                    VkDeviceSize memoryOffset, VkMemoryRequirements memRequirements, bool is_image, bool is_linear,
442                                    const char* api_name);
443     void InsertMemoryRange(layer_data const* dev_data, uint64_t handle, DEVICE_MEM_INFO* mem_info, VkDeviceSize memoryOffset,
444                            VkMemoryRequirements memRequirements, bool is_image, bool is_linear);
445     bool ValidateInsertImageMemoryRange(layer_data const* dev_data, VkImage image, DEVICE_MEM_INFO* mem_info,
446                                         VkDeviceSize mem_offset, VkMemoryRequirements mem_reqs, bool is_linear,
447                                         const char* api_name);
448     void InsertImageMemoryRange(layer_data const* dev_data, VkImage image, DEVICE_MEM_INFO* mem_info, VkDeviceSize mem_offset,
449                                 VkMemoryRequirements mem_reqs, bool is_linear);
450     bool ValidateInsertBufferMemoryRange(layer_data const* dev_data, VkBuffer buffer, DEVICE_MEM_INFO* mem_info,
451                                          VkDeviceSize mem_offset, VkMemoryRequirements mem_reqs, const char* api_name);
452     void InsertBufferMemoryRange(layer_data const* dev_data, VkBuffer buffer, DEVICE_MEM_INFO* mem_info, VkDeviceSize mem_offset,
453                                  VkMemoryRequirements mem_reqs);
454     bool ValidateMemoryTypes(const layer_data* dev_data, const DEVICE_MEM_INFO* mem_info, const uint32_t memory_type_bits,
455                              const char* funcName, const char* msgCode);
456     bool ValidateCommandBufferState(layer_data* dev_data, GLOBAL_CB_NODE* cb_state, const char* call_source,
457                                     int current_submit_count, const char* vu_id);
458     bool ValidateCommandBufferSimultaneousUse(layer_data* dev_data, GLOBAL_CB_NODE* pCB, int current_submit_count);
459     bool ValidateGetDeviceQueue(layer_data* device_data, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue,
460                                 const char* valid_qfi_vuid, const char* qfi_in_range_vuid);
461     void RecordGetDeviceQueueState(layer_data* device_data, uint32_t queue_family_index, VkQueue queue);
462     bool ValidateRenderpassAttachmentUsage(const layer_data* dev_data, RenderPassCreateVersion rp_version,
463                                            const VkRenderPassCreateInfo2KHR* pCreateInfo);
464     bool AddAttachmentUse(const layer_data* dev_data, RenderPassCreateVersion rp_version, uint32_t subpass,
465                           std::vector<uint8_t>& attachment_uses, std::vector<VkImageLayout>& attachment_layouts,
466                           uint32_t attachment, uint8_t new_use, VkImageLayout new_layout);
467     bool ValidateAttachmentIndex(const layer_data* dev_data, RenderPassCreateVersion rp_version, uint32_t attachment,
468                                  uint32_t attachment_count, const char* type);
469     bool ValidateCreateRenderPass(layer_data* dev_data, VkDevice device, RenderPassCreateVersion rp_version,
470                                   const VkRenderPassCreateInfo2KHR* pCreateInfo, RENDER_PASS_STATE* render_pass);
471     bool ValidateRenderPassPipelineBarriers(layer_data* device_data, const char* funcName, GLOBAL_CB_NODE* cb_state,
472                                             VkPipelineStageFlags src_stage_mask, VkPipelineStageFlags dst_stage_mask,
473                                             VkDependencyFlags dependency_flags, uint32_t mem_barrier_count,
474                                             const VkMemoryBarrier* mem_barriers, uint32_t buffer_mem_barrier_count,
475                                             const VkBufferMemoryBarrier* buffer_mem_barriers, uint32_t image_mem_barrier_count,
476                                             const VkImageMemoryBarrier* image_barriers);
477     bool CheckStageMaskQueueCompatibility(layer_data* dev_data, VkCommandBuffer command_buffer, VkPipelineStageFlags stage_mask,
478                                           VkQueueFlags queue_flags, const char* function, const char* src_or_dest,
479                                           const char* error_code);
480     void RecordUpdateDescriptorSetWithTemplateState(layer_data* device_data, VkDescriptorSet descriptorSet,
481                                                     VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData);
482     bool ValidateUpdateDescriptorSetWithTemplate(layer_data* device_data, VkDescriptorSet descriptorSet,
483                                                  VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData);
484     bool ValidateMemoryIsBoundToBuffer(const layer_data*, const BUFFER_STATE*, const char*, const char*);
485     bool ValidateMemoryIsBoundToImage(const layer_data*, const IMAGE_STATE*, const char*, const char*);
486     void AddCommandBufferBindingSampler(GLOBAL_CB_NODE*, SAMPLER_STATE*);
487     void AddCommandBufferBindingImage(const layer_data*, GLOBAL_CB_NODE*, IMAGE_STATE*);
488     void AddCommandBufferBindingImageView(const layer_data*, GLOBAL_CB_NODE*, IMAGE_VIEW_STATE*);
489     void AddCommandBufferBindingBuffer(const layer_data*, GLOBAL_CB_NODE*, BUFFER_STATE*);
490     void AddCommandBufferBindingBufferView(const layer_data*, GLOBAL_CB_NODE*, BUFFER_VIEW_STATE*);
491     bool ValidateObjectNotInUse(const layer_data* dev_data, BASE_NODE* obj_node, VK_OBJECT obj_struct, const char* caller_name,
492                                 const char* error_code);
493     void InvalidateCommandBuffers(const layer_data* dev_data, std::unordered_set<GLOBAL_CB_NODE*> const& cb_nodes, VK_OBJECT obj);
494     void RemoveImageMemoryRange(uint64_t handle, DEVICE_MEM_INFO* mem_info);
495     void RemoveBufferMemoryRange(uint64_t handle, DEVICE_MEM_INFO* mem_info);
496     void ClearMemoryObjectBindings(uint64_t handle, VulkanObjectType type);
497     bool ValidateCmdQueueFlags(layer_data* dev_data, const GLOBAL_CB_NODE* cb_node, const char* caller_name, VkQueueFlags flags,
498                                const char* error_code);
499     bool InsideRenderPass(const layer_data* my_data, const GLOBAL_CB_NODE* pCB, const char* apiName, const char* msgCode);
500     bool OutsideRenderPass(const layer_data* my_data, GLOBAL_CB_NODE* pCB, const char* apiName, const char* msgCode);
501 
502     void SetLayout(layer_data* device_data, GLOBAL_CB_NODE* pCB, ImageSubresourcePair imgpair, const VkImageLayout& layout);
503     void SetLayout(layer_data* device_data, GLOBAL_CB_NODE* pCB, ImageSubresourcePair imgpair,
504                    const IMAGE_CMD_BUF_LAYOUT_NODE& node);
505     void SetLayout(std::unordered_map<ImageSubresourcePair, IMAGE_LAYOUT_NODE>& imageLayoutMap, ImageSubresourcePair imgpair,
506                    VkImageLayout layout);
507 
508     bool ValidateImageSampleCount(layer_data* dev_data, IMAGE_STATE* image_state, VkSampleCountFlagBits sample_count,
509                                   const char* location, const std::string& msgCode);
510     bool ValidateCmdSubpassState(const layer_data* dev_data, const GLOBAL_CB_NODE* pCB, const CMD_TYPE cmd_type);
511     bool ValidateCmd(layer_data* dev_data, const GLOBAL_CB_NODE* cb_state, const CMD_TYPE cmd, const char* caller_name);
512 
513     // Prototypes for layer_data accessor functions.  These should be in their own header file at some point
514     VkFormatProperties GetPDFormatProperties(const VkFormat format);
515     VkResult GetPDImageFormatProperties(const VkImageCreateInfo*, VkImageFormatProperties*);
516     VkResult GetPDImageFormatProperties2(const VkPhysicalDeviceImageFormatInfo2*, VkImageFormatProperties2*);
517     const debug_report_data* GetReportData();
518     const VkLayerDispatchTable* GetDispatchTable();
519     const VkPhysicalDeviceProperties* GetPDProperties();
520     const VkPhysicalDeviceMemoryProperties* GetPhysicalDeviceMemoryProperties();
521     const CHECK_DISABLED* GetDisables();
522     const CHECK_ENABLED* GetEnables();
523     std::unordered_map<VkImage, std::unique_ptr<IMAGE_STATE>>* GetImageMap();
524     std::unordered_map<VkImage, std::vector<ImageSubresourcePair>>* GetImageSubresourceMap();
525     std::unordered_map<ImageSubresourcePair, IMAGE_LAYOUT_NODE>* GetImageLayoutMap();
526     std::unordered_map<VkBuffer, std::unique_ptr<BUFFER_STATE>>* GetBufferMap();
527     std::unordered_map<VkBufferView, std::unique_ptr<BUFFER_VIEW_STATE>>* GetBufferViewMap();
528     std::unordered_map<VkImageView, std::unique_ptr<IMAGE_VIEW_STATE>>* GetImageViewMap();
529     std::unordered_map<VkSamplerYcbcrConversion, uint64_t>* GetYcbcrConversionFormatMap();
530     std::unordered_set<uint64_t>* GetAHBExternalFormatsSet();
531 
532     const DeviceExtensions* GetDeviceExtensions();
533     GpuValidationState* GetGpuValidationState();
534     VkDevice GetDevice();
535 
536     uint32_t GetApiVersion();
537 
538     GlobalQFOTransferBarrierMap<VkImageMemoryBarrier>& GetGlobalQFOReleaseBarrierMap(
539         const QFOTransferBarrier<VkImageMemoryBarrier>::Tag& type_tag);
540     GlobalQFOTransferBarrierMap<VkBufferMemoryBarrier>& GetGlobalQFOReleaseBarrierMap(
541         const QFOTransferBarrier<VkBufferMemoryBarrier>::Tag& type_tag);
542     template <typename Barrier>
543     void RecordQueuedQFOTransferBarriers(layer_data* device_data, GLOBAL_CB_NODE* cb_state);
544     template <typename Barrier>
545     bool ValidateQueuedQFOTransferBarriers(layer_data* device_data, GLOBAL_CB_NODE* cb_state,
546                                            QFOTransferCBScoreboards<Barrier>* scoreboards);
547     bool ValidateQueuedQFOTransfers(layer_data* device_data, GLOBAL_CB_NODE* cb_state,
548                                     QFOTransferCBScoreboards<VkImageMemoryBarrier>* qfo_image_scoreboards,
549                                     QFOTransferCBScoreboards<VkBufferMemoryBarrier>* qfo_buffer_scoreboards);
550     template <typename BarrierRecord, typename Scoreboard>
551     bool ValidateAndUpdateQFOScoreboard(const debug_report_data* report_data, const GLOBAL_CB_NODE* cb_state, const char* operation,
552                                         const BarrierRecord& barrier, Scoreboard* scoreboard);
553     template <typename Barrier>
554     void RecordQFOTransferBarriers(layer_data* device_data, GLOBAL_CB_NODE* cb_state, uint32_t barrier_count,
555                                    const Barrier* barriers);
556     void RecordBarriersQFOTransfers(layer_data* device_data, GLOBAL_CB_NODE* cb_state, uint32_t bufferBarrierCount,
557                                     const VkBufferMemoryBarrier* pBufferMemBarriers, uint32_t imageMemBarrierCount,
558                                     const VkImageMemoryBarrier* pImageMemBarriers);
559     template <typename Barrier>
560     bool ValidateQFOTransferBarrierUniqueness(layer_data* device_data, const char* func_name, GLOBAL_CB_NODE* cb_state,
561                                               uint32_t barrier_count, const Barrier* barriers);
562     bool IsReleaseOp(GLOBAL_CB_NODE* cb_state, VkImageMemoryBarrier const* barrier);
563     bool ValidateBarriersQFOTransferUniqueness(layer_data* device_data, const char* func_name, GLOBAL_CB_NODE* cb_state,
564                                                uint32_t bufferBarrierCount, const VkBufferMemoryBarrier* pBufferMemBarriers,
565                                                uint32_t imageMemBarrierCount, const VkImageMemoryBarrier* pImageMemBarriers);
566     bool ValidatePrimaryCommandBufferState(layer_data* dev_data, GLOBAL_CB_NODE* pCB, int current_submit_count,
567                                            QFOTransferCBScoreboards<VkImageMemoryBarrier>* qfo_image_scoreboards,
568                                            QFOTransferCBScoreboards<VkBufferMemoryBarrier>* qfo_buffer_scoreboards);
569     bool ValidatePipelineDrawtimeState(layer_data const* dev_data, LAST_BOUND_STATE const& state, const GLOBAL_CB_NODE* pCB,
570                                        CMD_TYPE cmd_type, PIPELINE_STATE const* pPipeline, const char* caller);
571     bool ValidateCmdBufDrawState(layer_data* dev_data, GLOBAL_CB_NODE* cb_node, CMD_TYPE cmd_type, const bool indexed,
572                                  const VkPipelineBindPoint bind_point, const char* function, const char* pipe_err_code,
573                                  const char* state_err_code);
574     void IncrementBoundObjects(layer_data* dev_data, GLOBAL_CB_NODE const* cb_node);
575     void IncrementResources(layer_data* dev_data, GLOBAL_CB_NODE* cb_node);
576     bool ValidateEventStageMask(VkQueue queue, GLOBAL_CB_NODE* pCB, uint32_t eventCount, size_t firstEventIndex,
577                                 VkPipelineStageFlags sourceStageMask);
578     void RetireWorkOnQueue(layer_data* dev_data, QUEUE_STATE* pQueue, uint64_t seq);
579     bool ValidateResources(layer_data* dev_data, GLOBAL_CB_NODE* cb_node);
580     bool ValidateQueueFamilyIndices(layer_data* dev_data, GLOBAL_CB_NODE* pCB, VkQueue queue);
581     VkResult CoreLayerCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo,
582                                                const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache);
583     void CoreLayerDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache,
584                                             const VkAllocationCallbacks* pAllocator);
585     VkResult CoreLayerMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount,
586                                                const VkValidationCacheEXT* pSrcCaches);
587     VkResult CoreLayerGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize,
588                                                 void* pData);
589 
590     // Descriptor Set Validation Functions
591     bool ValidateUpdateDescriptorSetsWithTemplateKHR(layer_data* device_data, VkDescriptorSet descriptorSet,
592                                                      const TEMPLATE_STATE* template_state, const void* pData);
593     void PerformUpdateDescriptorSetsWithTemplateKHR(layer_data* device_data, VkDescriptorSet descriptorSet,
594                                                     const TEMPLATE_STATE* template_state, const void* pData);
595     void UpdateAllocateDescriptorSetsData(const layer_data* dev_data, const VkDescriptorSetAllocateInfo*,
596                                           cvdescriptorset::AllocateDescriptorSetsData*);
597     bool ValidateAllocateDescriptorSets(const layer_data*, const VkDescriptorSetAllocateInfo*,
598                                         const cvdescriptorset::AllocateDescriptorSetsData*);
599     void PerformAllocateDescriptorSets(const VkDescriptorSetAllocateInfo*, const VkDescriptorSet*,
600                                        const cvdescriptorset::AllocateDescriptorSetsData*,
601                                        std::unordered_map<VkDescriptorPool, DESCRIPTOR_POOL_STATE*>*,
602                                        std::unordered_map<VkDescriptorSet, cvdescriptorset::DescriptorSet*>*, layer_data*);
603     bool ValidateUpdateDescriptorSets(const debug_report_data* report_data, const layer_data* dev_data, uint32_t write_count,
604                                       const VkWriteDescriptorSet* p_wds, uint32_t copy_count, const VkCopyDescriptorSet* p_cds,
605                                       const char* func_name);
606 
607     // Stuff from shader_validation
608     bool ValidateAndCapturePipelineShaderState(layer_data* dev_data, PIPELINE_STATE* pPipeline);
609     bool ValidateComputePipeline(layer_data* dev_data, PIPELINE_STATE* pPipeline);
610     bool ValidateRayTracingPipelineNV(layer_data* dev_data, PIPELINE_STATE* pipeline);
611     bool PreCallValidateCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo,
612                                            const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule);
613     void PreCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo,
614                                          const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, void* csm_state);
615     void PostCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo,
616                                           const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, VkResult result,
617                                           void* csm_state);
618     bool ValidatePipelineShaderStage(layer_data* dev_data, VkPipelineShaderStageCreateInfo const* pStage, PIPELINE_STATE* pipeline,
619                                      shader_module const** out_module, spirv_inst_iter* out_entrypoint, bool check_point_size);
620     bool ValidatePointListShaderState(const layer_data* dev_data, const PIPELINE_STATE* pipeline, shader_module const* src,
621                                       spirv_inst_iter entrypoint, VkShaderStageFlagBits stage);
622     bool ValidateShaderCapabilities(layer_data* dev_data, shader_module const* src, VkShaderStageFlagBits stage,
623                                     bool has_writable_descriptor);
624     bool ValidateShaderStageInputOutputLimits(layer_data* dev_data, shader_module const* src,
625                                               VkPipelineShaderStageCreateInfo const* pStage, PIPELINE_STATE* pipeline);
626 
627     // Gpu Validation Functions
628     void GpuPreCallRecordCreateDevice(VkPhysicalDevice gpu, std::unique_ptr<safe_VkDeviceCreateInfo>& modified_create_info,
629                                       VkPhysicalDeviceFeatures* supported_features);
630     void GpuPostCallRecordCreateDevice(layer_data* dev_data);
631     void GpuPreCallRecordDestroyDevice(layer_data* dev_data);
632     void GpuPreCallRecordFreeCommandBuffers(layer_data* dev_data, uint32_t commandBufferCount,
633                                             const VkCommandBuffer* pCommandBuffers);
634     bool GpuPreCallCreateShaderModule(layer_data* dev_data, const VkShaderModuleCreateInfo* pCreateInfo,
635                                       const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule,
636                                       uint32_t* unique_shader_id, VkShaderModuleCreateInfo* instrumented_create_info,
637                                       std::vector<unsigned int>* instrumented_pgm);
638     bool GpuPreCallCreatePipelineLayout(layer_data* device_data, const VkPipelineLayoutCreateInfo* pCreateInfo,
639                                         const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout,
640                                         std::vector<VkDescriptorSetLayout>* new_layouts,
641                                         VkPipelineLayoutCreateInfo* modified_create_info);
642     void GpuPostCallCreatePipelineLayout(layer_data* device_data, VkResult result);
643     void GpuPostCallQueueSubmit(layer_data* dev_data, VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits,
644                                 VkFence fence);
645     void GpuPreCallValidateCmdWaitEvents(layer_data* dev_data, VkPipelineStageFlags sourceStageMask);
646     std::vector<safe_VkGraphicsPipelineCreateInfo> GpuPreCallRecordCreateGraphicsPipelines(
647         layer_data* dev_data, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos,
648         const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, std::vector<std::unique_ptr<PIPELINE_STATE>>& pipe_state);
649     void GpuPostCallRecordCreateGraphicsPipelines(layer_data* dev_data, const uint32_t count,
650                                                   const VkGraphicsPipelineCreateInfo* pCreateInfos,
651                                                   const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
652     void GpuPreCallRecordDestroyPipeline(layer_data* dev_data, const VkPipeline pipeline);
653     void GpuAllocateValidationResources(layer_data* dev_data, const VkCommandBuffer cmd_buffer, VkPipelineBindPoint bind_point);
654     void AnalyzeAndReportError(const layer_data* dev_data, GLOBAL_CB_NODE* cb_node, VkQueue queue, uint32_t draw_index,
655                                uint32_t* const debug_output_buffer);
656     void ProcessInstrumentationBuffer(const layer_data* dev_data, VkQueue queue, GLOBAL_CB_NODE* cb_node);
657     void SubmitBarrier(layer_data* dev_data, VkQueue queue);
658     bool GpuInstrumentShader(layer_data* dev_data, const VkShaderModuleCreateInfo* pCreateInfo, std::vector<unsigned int>& new_pgm,
659                              uint32_t* unique_shader_id);
660     void ReportSetupProblem(const layer_data* dev_data, VkDebugReportObjectTypeEXT object_type, uint64_t object_handle,
661                             const char* const specific_message);
662 
663     // Buffer Validation Functions
664     template <class OBJECT, class LAYOUT>
665     void SetLayout(layer_data* device_data, OBJECT* pObject, VkImage image, VkImageSubresource range, const LAYOUT& layout);
666     template <class OBJECT, class LAYOUT>
667     void SetLayout(layer_data* device_data, OBJECT* pObject, ImageSubresourcePair imgpair, const LAYOUT& layout,
668                    VkImageAspectFlags aspectMask);
669     // Remove the pending QFO release records from the global set
670     // Note that the type of the handle argument constrained to match Barrier type
671     // The defaulted BarrierRecord argument allows use to declare the type once, but is not intended to be specified by the caller
672     template <typename Barrier, typename BarrierRecord = QFOTransferBarrier<Barrier>>
673     void EraseQFOReleaseBarriers(layer_data* device_data, const typename BarrierRecord::HandleType& handle) {
674         GlobalQFOTransferBarrierMap<Barrier>& global_release_barriers =
675             GetGlobalQFOReleaseBarrierMap(typename BarrierRecord::Tag());
676         global_release_barriers.erase(handle);
677     }
678     bool ValidateCopyImageTransferGranularityRequirements(layer_data* device_data, const GLOBAL_CB_NODE* cb_node,
679                                                           const IMAGE_STATE* src_img, const IMAGE_STATE* dst_img,
680                                                           const VkImageCopy* region, const uint32_t i, const char* function);
681     bool ValidateIdleBuffer(layer_data* device_data, VkBuffer buffer);
682     bool ValidateUsageFlags(const layer_data* device_data, VkFlags actual, VkFlags desired, VkBool32 strict, uint64_t obj_handle,
683                             VulkanObjectType obj_type, const char* msgCode, char const* func_name, char const* usage_str);
684     bool ValidateImageSubresourceRange(const layer_data* device_data, const uint32_t image_mip_count,
685                                        const uint32_t image_layer_count, const VkImageSubresourceRange& subresourceRange,
686                                        const char* cmd_name, const char* param_name, const char* image_layer_count_var_name,
687                                        const uint64_t image_handle, SubresourceRangeErrorCodes errorCodes);
688     void SetImageLayout(layer_data* device_data, GLOBAL_CB_NODE* cb_node, const IMAGE_STATE* image_state,
689                         VkImageSubresourceRange image_subresource_range, const VkImageLayout& layout);
690     void SetImageLayout(layer_data* device_data, GLOBAL_CB_NODE* cb_node, const IMAGE_STATE* image_state,
691                         VkImageSubresourceLayers image_subresource_layers, const VkImageLayout& layout);
692     bool ValidateRenderPassLayoutAgainstFramebufferImageUsage(layer_data* device_data, RenderPassCreateVersion rp_version,
693                                                               VkImageLayout layout, VkImage image, VkImageView image_view,
694                                                               VkFramebuffer framebuffer, VkRenderPass renderpass,
695                                                               uint32_t attachment_index, const char* variable_name);
696     bool ValidateBufferImageCopyData(const debug_report_data* report_data, uint32_t regionCount, const VkBufferImageCopy* pRegions,
697                                      IMAGE_STATE* image_state, const char* function);
698     bool ValidateBufferViewRange(const layer_data* device_data, const BUFFER_STATE* buffer_state,
699                                  const VkBufferViewCreateInfo* pCreateInfo, const VkPhysicalDeviceLimits* device_limits);
700     bool ValidateBufferViewBuffer(const layer_data* device_data, const BUFFER_STATE* buffer_state,
701                                   const VkBufferViewCreateInfo* pCreateInfo);
702 
703     bool PreCallValidateCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
704                                     VkImage* pImage);
705 
706     void PostCallRecordCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
707                                    VkImage* pImage, VkResult result);
708 
709     void PreCallRecordDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator);
710 
711     bool PreCallValidateDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator);
712 
713     bool ValidateImageAttributes(layer_data* device_data, IMAGE_STATE* image_state, VkImageSubresourceRange range);
714 
715     bool ValidateClearAttachmentExtent(layer_data* device_data, VkCommandBuffer command_buffer, uint32_t attachment_index,
716                                        FRAMEBUFFER_STATE* framebuffer, uint32_t fb_attachment, const VkRect2D& render_area,
717                                        uint32_t rect_count, const VkClearRect* clear_rects);
718     bool ValidateImageCopyData(const layer_data* device_data, const debug_report_data* report_data, const uint32_t regionCount,
719                                const VkImageCopy* ic_regions, const IMAGE_STATE* src_state, const IMAGE_STATE* dst_state);
720 
721     bool VerifyClearImageLayout(layer_data* device_data, GLOBAL_CB_NODE* cb_node, IMAGE_STATE* image_state,
722                                 VkImageSubresourceRange range, VkImageLayout dest_image_layout, const char* func_name);
723 
724     bool VerifyImageLayout(layer_data const* device_data, GLOBAL_CB_NODE const* cb_node, IMAGE_STATE* image_state,
725                            VkImageSubresourceLayers subLayers, VkImageLayout explicit_layout, VkImageLayout optimal_layout,
726                            const char* caller, const char* layout_invalid_msg_code, const char* layout_mismatch_msg_code,
727                            bool* error);
728 
729     bool CheckItgExtent(layer_data* device_data, const GLOBAL_CB_NODE* cb_node, const VkExtent3D* extent, const VkOffset3D* offset,
730                         const VkExtent3D* granularity, const VkExtent3D* subresource_extent, const VkImageType image_type,
731                         const uint32_t i, const char* function, const char* member, const char* vuid);
732 
733     bool CheckItgOffset(layer_data* device_data, const GLOBAL_CB_NODE* cb_node, const VkOffset3D* offset,
734                         const VkExtent3D* granularity, const uint32_t i, const char* function, const char* member,
735                         const char* vuid);
736     VkExtent3D GetScaledItg(layer_data* device_data, const GLOBAL_CB_NODE* cb_node, const IMAGE_STATE* img);
737     bool CopyImageMultiplaneValidation(const layer_data* dev_data, VkCommandBuffer command_buffer,
738                                        const IMAGE_STATE* src_image_state, const IMAGE_STATE* dst_image_state,
739                                        const VkImageCopy region);
740 
741     void RecordClearImageLayout(layer_data* dev_data, GLOBAL_CB_NODE* cb_node, VkImage image, VkImageSubresourceRange range,
742                                 VkImageLayout dest_image_layout);
743 
744     bool PreCallValidateCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
745                                            const VkClearColorValue* pColor, uint32_t rangeCount,
746                                            const VkImageSubresourceRange* pRanges);
747 
748     void PreCallRecordCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
749                                          const VkClearColorValue* pColor, uint32_t rangeCount,
750                                          const VkImageSubresourceRange* pRanges);
751 
752     bool PreCallValidateCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
753                                                   const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount,
754                                                   const VkImageSubresourceRange* pRanges);
755 
756     void PreCallRecordCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
757                                                 const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount,
758                                                 const VkImageSubresourceRange* pRanges);
759 
760     bool FindLayoutVerifyNode(layer_data const* device_data, GLOBAL_CB_NODE const* pCB, ImageSubresourcePair imgpair,
761                               IMAGE_CMD_BUF_LAYOUT_NODE& node, const VkImageAspectFlags aspectMask);
762 
763     bool FindLayoutVerifyLayout(layer_data const* device_data, ImageSubresourcePair imgpair, VkImageLayout& layout,
764                                 const VkImageAspectFlags aspectMask);
765 
766     bool FindCmdBufLayout(layer_data const* device_data, GLOBAL_CB_NODE const* pCB, VkImage image, VkImageSubresource range,
767                           IMAGE_CMD_BUF_LAYOUT_NODE& node);
768 
769     bool FindGlobalLayout(layer_data* device_data, ImageSubresourcePair imgpair, VkImageLayout& layout);
770 
771     bool FindLayouts(layer_data* device_data, VkImage image, std::vector<VkImageLayout>& layouts);
772 
773     bool FindLayout(layer_data* device_data, const std::unordered_map<ImageSubresourcePair, IMAGE_LAYOUT_NODE>& imageLayoutMap,
774                     ImageSubresourcePair imgpair, VkImageLayout& layout);
775 
776     bool FindLayout(const std::unordered_map<ImageSubresourcePair, IMAGE_LAYOUT_NODE>& imageLayoutMap, ImageSubresourcePair imgpair,
777                     VkImageLayout& layout, const VkImageAspectFlags aspectMask);
778 
779     void SetGlobalLayout(layer_data* device_data, ImageSubresourcePair imgpair, const VkImageLayout& layout);
780 
781     void SetImageViewLayout(layer_data* device_data, GLOBAL_CB_NODE* pCB, VkImageView imageView, const VkImageLayout& layout);
782 
783     void SetImageViewLayout(layer_data* device_data, GLOBAL_CB_NODE* cb_node, IMAGE_VIEW_STATE* view_state,
784                             const VkImageLayout& layout);
785 
786     bool VerifyFramebufferAndRenderPassLayouts(layer_data* dev_data, RenderPassCreateVersion rp_version, GLOBAL_CB_NODE* pCB,
787                                                const VkRenderPassBeginInfo* pRenderPassBegin,
788                                                const FRAMEBUFFER_STATE* framebuffer_state);
789 
790     void TransitionAttachmentRefLayout(layer_data* dev_data, GLOBAL_CB_NODE* pCB, FRAMEBUFFER_STATE* pFramebuffer,
791                                        const safe_VkAttachmentReference2KHR& ref);
792 
793     void TransitionSubpassLayouts(layer_data*, GLOBAL_CB_NODE*, const RENDER_PASS_STATE*, const int, FRAMEBUFFER_STATE*);
794 
795     void TransitionBeginRenderPassLayouts(layer_data*, GLOBAL_CB_NODE*, const RENDER_PASS_STATE*, FRAMEBUFFER_STATE*);
796 
797     bool ValidateImageAspectLayout(layer_data* device_data, GLOBAL_CB_NODE const* pCB, const VkImageMemoryBarrier* mem_barrier,
798                                    uint32_t level, uint32_t layer, VkImageAspectFlags aspect);
799 
800     void TransitionImageAspectLayout(layer_data* device_data, GLOBAL_CB_NODE* pCB, const VkImageMemoryBarrier* mem_barrier,
801                                      uint32_t level, uint32_t layer, VkImageAspectFlags aspect_mask, VkImageAspectFlags aspect);
802 
803     bool ValidateBarrierLayoutToImageUsage(layer_data* device_data, const VkImageMemoryBarrier* img_barrier, bool new_not_old,
804                                            VkImageUsageFlags usage, const char* func_name);
805 
806     bool ValidateBarriersToImages(layer_data* device_data, GLOBAL_CB_NODE const* cb_state, uint32_t imageMemoryBarrierCount,
807                                   const VkImageMemoryBarrier* pImageMemoryBarriers, const char* func_name);
808 
809     void RecordQueuedQFOTransfers(layer_data* dev_data, GLOBAL_CB_NODE* pCB);
810     void EraseQFOImageRelaseBarriers(layer_data* device_data, const VkImage& image);
811 
812     void TransitionImageLayouts(layer_data* device_data, GLOBAL_CB_NODE* cb_state, uint32_t memBarrierCount,
813                                 const VkImageMemoryBarrier* pImgMemBarriers);
814 
815     void TransitionFinalSubpassLayouts(layer_data* dev_data, GLOBAL_CB_NODE* pCB, const VkRenderPassBeginInfo* pRenderPassBegin,
816                                        FRAMEBUFFER_STATE* framebuffer_state);
817 
818     bool PreCallValidateCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
819                                      VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount,
820                                      const VkImageCopy* pRegions);
821 
822     bool PreCallValidateCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount,
823                                             const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects);
824 
825     bool PreCallValidateCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
826                                         VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount,
827                                         const VkImageResolve* pRegions);
828 
829     void PreCallRecordCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
830                                       VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount,
831                                       const VkImageResolve* pRegions);
832 
833     bool PreCallValidateCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
834                                      VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount,
835                                      const VkImageBlit* pRegions, VkFilter filter);
836 
837     void PreCallRecordCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
838                                    VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions,
839                                    VkFilter filter);
840 
841     bool ValidateCmdBufImageLayouts(layer_data* device_data, GLOBAL_CB_NODE* pCB,
842                                     std::unordered_map<ImageSubresourcePair, IMAGE_LAYOUT_NODE> const& globalImageLayoutMap,
843                                     std::unordered_map<ImageSubresourcePair, IMAGE_LAYOUT_NODE>& overlayLayoutMap);
844 
845     void UpdateCmdBufImageLayouts(layer_data* device_data, GLOBAL_CB_NODE* pCB);
846 
847     bool ValidateMaskBitsFromLayouts(layer_data* device_data, VkCommandBuffer cmdBuffer, const VkAccessFlags& accessMask,
848                                      const VkImageLayout& layout, const char* type);
849 
850     bool ValidateLayoutVsAttachmentDescription(const debug_report_data* report_data, RenderPassCreateVersion rp_version,
851                                                const VkImageLayout first_layout, const uint32_t attachment,
852                                                const VkAttachmentDescription2KHR& attachment_description);
853 
854     bool ValidateLayouts(layer_data* dev_data, RenderPassCreateVersion rp_version, VkDevice device,
855                          const VkRenderPassCreateInfo2KHR* pCreateInfo);
856 
857     bool ValidateMapImageLayouts(layer_data* dev_data, VkDevice device, DEVICE_MEM_INFO const* mem_info, VkDeviceSize offset,
858                                  VkDeviceSize end_offset);
859 
860     bool ValidateImageUsageFlags(layer_data* dev_data, IMAGE_STATE const* image_state, VkFlags desired, bool strict,
861                                  const char* msgCode, char const* func_name, char const* usage_string);
862 
863     bool ValidateImageFormatFeatureFlags(layer_data* dev_data, IMAGE_STATE const* image_state, VkFormatFeatureFlags desired,
864                                          char const* func_name, const char* linear_vuid, const char* optimal_vuid);
865 
866     bool ValidateImageSubresourceLayers(layer_data* dev_data, const GLOBAL_CB_NODE* cb_node,
867                                         const VkImageSubresourceLayers* subresource_layers, char const* func_name,
868                                         char const* member, uint32_t i);
869 
870     bool ValidateBufferUsageFlags(const layer_data* dev_data, BUFFER_STATE const* buffer_state, VkFlags desired, bool strict,
871                                   const char* msgCode, char const* func_name, char const* usage_string);
872 
873     bool PreCallValidateCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo,
874                                      const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer);
875 
876     void PostCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
877                                     VkBuffer* pBuffer, VkResult result);
878 
879     bool PreCallValidateCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo,
880                                          const VkAllocationCallbacks* pAllocator, VkBufferView* pView);
881 
882     void PostCallRecordCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo,
883                                         const VkAllocationCallbacks* pAllocator, VkBufferView* pView, VkResult result);
884 
885     bool ValidateImageAspectMask(const layer_data* device_data, VkImage image, VkFormat format, VkImageAspectFlags aspect_mask,
886                                  const char* func_name, const char* vuid = "VUID-VkImageSubresource-aspectMask-parameter");
887 
888     bool ValidateCreateImageViewSubresourceRange(const layer_data* device_data, const IMAGE_STATE* image_state,
889                                                  bool is_imageview_2d_type, const VkImageSubresourceRange& subresourceRange);
890 
891     bool ValidateCmdClearColorSubresourceRange(const layer_data* device_data, const IMAGE_STATE* image_state,
892                                                const VkImageSubresourceRange& subresourceRange, const char* param_name);
893 
894     bool ValidateCmdClearDepthSubresourceRange(const layer_data* device_data, const IMAGE_STATE* image_state,
895                                                const VkImageSubresourceRange& subresourceRange, const char* param_name);
896 
897     bool ValidateImageBarrierSubresourceRange(const layer_data* device_data, const IMAGE_STATE* image_state,
898                                               const VkImageSubresourceRange& subresourceRange, const char* cmd_name,
899                                               const char* param_name);
900 
901     bool PreCallValidateCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo,
902                                         const VkAllocationCallbacks* pAllocator, VkImageView* pView);
903 
904     void PostCallRecordCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo,
905                                        const VkAllocationCallbacks* pAllocator, VkImageView* pView, VkResult result);
906 
907     bool ValidateCopyBufferImageTransferGranularityRequirements(layer_data* device_data, const GLOBAL_CB_NODE* cb_node,
908                                                                 const IMAGE_STATE* img, const VkBufferImageCopy* region,
909                                                                 const uint32_t i, const char* function, const char* vuid);
910 
911     bool ValidateImageMipLevel(layer_data* device_data, const GLOBAL_CB_NODE* cb_node, const IMAGE_STATE* img, uint32_t mip_level,
912                                const uint32_t i, const char* function, const char* member, const char* vuid);
913 
914     bool ValidateImageArrayLayerRange(layer_data* device_data, const GLOBAL_CB_NODE* cb_node, const IMAGE_STATE* img,
915                                       const uint32_t base_layer, const uint32_t layer_count, const uint32_t i, const char* function,
916                                       const char* member, const char* vuid);
917 
918     void PreCallRecordCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
919                                    VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
920 
921     bool PreCallValidateCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount,
922                                       const VkBufferCopy* pRegions);
923 
924     void PreCallRecordCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount,
925                                     const VkBufferCopy* pRegions);
926 
927     bool PreCallValidateDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator);
928 
929     void PreCallRecordDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator);
930 
931     bool PreCallValidateDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator);
932 
933     void PreCallRecordDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator);
934 
935     bool PreCallValidateDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator);
936 
937     void PreCallRecordDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator);
938 
939     bool PreCallValidateCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size,
940                                       uint32_t data);
941 
942     void PreCallRecordCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size,
943                                     uint32_t data);
944 
945     bool PreCallValidateCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
946                                              VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
947 
948     void PreCallRecordCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
949                                            VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
950 
951     bool PreCallValidateCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage,
952                                              VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
953 
954     void PreCallRecordCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage,
955                                            VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
956 
957     bool PreCallValidateGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource,
958                                                   VkSubresourceLayout* pLayout);
959     bool ValidateCreateImageANDROID(layer_data* device_data, const debug_report_data* report_data,
960                                     const VkImageCreateInfo* create_info);
961     void RecordCreateImageANDROID(const VkImageCreateInfo* create_info, IMAGE_STATE* is_node);
962     bool ValidateCreateImageViewANDROID(layer_data* device_data, const VkImageViewCreateInfo* create_info);
963     bool ValidateGetImageSubresourceLayoutANDROID(layer_data* device_data, const VkImage image);
964     bool ValidateQueueFamilies(layer_data* device_data, uint32_t queue_family_count, const uint32_t* queue_families,
965                                const char* cmd_name, const char* array_parameter_name, const char* unique_error_code,
966                                const char* valid_error_code, bool optional);
967     bool ValidateAllocateMemoryANDROID(layer_data* dev_data, const VkMemoryAllocateInfo* alloc_info);
968     bool ValidateGetImageMemoryRequirements2ANDROID(layer_data* dev_data, const VkImage image);
969     bool ValidateCreateSamplerYcbcrConversionANDROID(const layer_data* dev_data,
970                                                      const VkSamplerYcbcrConversionCreateInfo* create_info);
971     void RecordCreateSamplerYcbcrConversionANDROID(layer_data* dev_data, const VkSamplerYcbcrConversionCreateInfo* create_info,
972                                                    VkSamplerYcbcrConversion ycbcr_conversion);
973     void RecordDestroySamplerYcbcrConversionANDROID(layer_data* dev_data, VkSamplerYcbcrConversion ycbcr_conversion);
974     bool PreCallValidateCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
975                                                 const VkGraphicsPipelineCreateInfo* pCreateInfos,
976                                                 const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, void* cgpl_state);
977     void PreCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
978                                               const VkGraphicsPipelineCreateInfo* pCreateInfos,
979                                               const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, void* cgpl_state);
980     void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
981                                                const VkGraphicsPipelineCreateInfo* pCreateInfos,
982                                                const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, VkResult result,
983                                                void* cgpl_state);
984     bool PreCallValidateCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
985                                                const VkComputePipelineCreateInfo* pCreateInfos,
986                                                const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, void* pipe_state);
987     void PostCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
988                                               const VkComputePipelineCreateInfo* pCreateInfos,
989                                               const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, VkResult result,
990                                               void* pipe_state);
991     bool PreCallValidateCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo,
992                                              const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout);
993     void PreCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo,
994                                            const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout,
995                                            void* cpl_state);
996     void PostCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo,
997                                             const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout,
998                                             VkResult result);
999     bool PreCallValidateAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo,
1000                                                VkDescriptorSet* pDescriptorSets, void* ads_state);
1001     void PostCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo,
1002                                               VkDescriptorSet* pDescriptorSets, VkResult result, void* ads_state);
1003     bool PreCallValidateCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
1004                                                     const VkRayTracingPipelineCreateInfoNV* pCreateInfos,
1005                                                     const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines,
1006                                                     void* pipe_state);
1007     void PostCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
1008                                                    const VkRayTracingPipelineCreateInfoNV* pCreateInfos,
1009                                                    const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, VkResult result,
1010                                                    void* pipe_state);
1011     void PostCallRecordCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
1012                                       VkInstance* pInstance, VkResult result);
1013     bool PreCallValidateCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo,
1014                                      const VkAllocationCallbacks* pAllocator, VkDevice* pDevice);
1015     void PreCallRecordCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo,
1016                                    const VkAllocationCallbacks* pAllocator, VkDevice* pDevice,
1017                                    std::unique_ptr<safe_VkDeviceCreateInfo>& modified_create_info);
1018     void PostCallRecordCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo,
1019                                     const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, VkResult result);
1020     bool PreCallValidateCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset,
1021                                         VkDeviceSize dataSize, const void* pData);
1022     void PostCallRecordCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset,
1023                                        VkDeviceSize dataSize, const void* pData);
1024     void PostCallRecordCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
1025                                    VkFence* pFence, VkResult result);
1026     bool PreCallValidateGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
1027     void PostCallRecordGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
1028     void PostCallRecordGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue);
1029     bool PreCallValidateCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
1030                                                      const VkAllocationCallbacks* pAllocator,
1031                                                      VkSamplerYcbcrConversion* pYcbcrConversion);
1032     void PostCallRecordCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
1033                                                     const VkAllocationCallbacks* pAllocator,
1034                                                     VkSamplerYcbcrConversion* pYcbcrConversion, VkResult result);
1035     bool PreCallValidateCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
1036                                                         const VkAllocationCallbacks* pAllocator,
1037                                                         VkSamplerYcbcrConversion* pYcbcrConversion);
1038     void PostCallRecordCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
1039                                                        const VkAllocationCallbacks* pAllocator,
1040                                                        VkSamplerYcbcrConversion* pYcbcrConversion, VkResult result);
1041     bool PreCallValidateCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
1042     void PreCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator);
1043     bool PreCallValidateQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence);
1044     void PostCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence,
1045                                    VkResult result);
1046     bool PreCallValidateAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo,
1047                                        const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory);
1048     void PostCallRecordAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo,
1049                                       const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory, VkResult result);
1050     bool PreCallValidateFreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks* pAllocator);
1051     void PreCallRecordFreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks* pAllocator);
1052     bool PreCallValidateWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll,
1053                                       uint64_t timeout);
1054     void PostCallRecordWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll,
1055                                      uint64_t timeout, VkResult result);
1056     bool PreCallValidateGetFenceStatus(VkDevice device, VkFence fence);
1057     void PostCallRecordGetFenceStatus(VkDevice device, VkFence fence, VkResult result);
1058     bool PreCallValidateQueueWaitIdle(VkQueue queue);
1059     void PostCallRecordQueueWaitIdle(VkQueue queue, VkResult result);
1060     bool PreCallValidateDeviceWaitIdle(VkDevice device);
1061     void PostCallRecordDeviceWaitIdle(VkDevice device, VkResult result);
1062     bool PreCallValidateDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator);
1063     void PreCallRecordDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator);
1064     bool PreCallValidateDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator);
1065     void PreCallRecordDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator);
1066     bool PreCallValidateDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator);
1067     void PreCallRecordDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator);
1068     bool PreCallValidateDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator);
1069     void PreCallRecordDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator);
1070     bool PreCallValidateGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount,
1071                                             size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags);
1072     void PostCallRecordGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount,
1073                                            size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags,
1074                                            VkResult result);
1075     bool PreCallValidateBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR* pBindInfos);
1076     void PostCallRecordBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR* pBindInfos,
1077                                             VkResult result);
1078     bool PreCallValidateBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR* pBindInfos);
1079     void PostCallRecordBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR* pBindInfos,
1080                                          VkResult result);
1081     bool PreCallValidateBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memoryOffset);
1082     void PostCallRecordBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memoryOffset,
1083                                         VkResult result);
1084     void PostCallRecordGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements);
1085     void PostCallRecordGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2KHR* pInfo,
1086                                                     VkMemoryRequirements2KHR* pMemoryRequirements);
1087     void PostCallRecordGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2KHR* pInfo,
1088                                                        VkMemoryRequirements2KHR* pMemoryRequirements);
1089     bool PreCallValidateGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo,
1090                                                     VkMemoryRequirements2* pMemoryRequirements);
1091     bool PreCallValidateGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo,
1092                                                        VkMemoryRequirements2* pMemoryRequirements);
1093     void PostCallRecordGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements);
1094     void PostCallRecordGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo,
1095                                                    VkMemoryRequirements2* pMemoryRequirements);
1096     void PostCallRecordGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo,
1097                                                       VkMemoryRequirements2* pMemoryRequirements);
1098     void PostCallRecordGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount,
1099                                                         VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
1100     void PostCallRecordGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2KHR* pInfo,
1101                                                          uint32_t* pSparseMemoryRequirementCount,
1102                                                          VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements);
1103     void PostCallRecordGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2KHR* pInfo,
1104                                                             uint32_t* pSparseMemoryRequirementCount,
1105                                                             VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements);
1106     bool PreCallValidateGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice,
1107                                                                 const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
1108                                                                 VkImageFormatProperties2* pImageFormatProperties);
1109     bool PreCallValidateGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice,
1110                                                                    const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
1111                                                                    VkImageFormatProperties2* pImageFormatProperties);
1112     void PreCallRecordDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator);
1113     bool PreCallValidateDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator);
1114     void PreCallRecordDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator);
1115     void PreCallRecordDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout,
1116                                             const VkAllocationCallbacks* pAllocator);
1117     bool PreCallValidateDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator);
1118     void PreCallRecordDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator);
1119     void PreCallRecordDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout,
1120                                                  const VkAllocationCallbacks* pAllocator);
1121     bool PreCallValidateDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool,
1122                                               const VkAllocationCallbacks* pAllocator);
1123     void PreCallRecordDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool,
1124                                             const VkAllocationCallbacks* pAllocator);
1125     bool PreCallValidateFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount,
1126                                            const VkCommandBuffer* pCommandBuffers);
1127     void PreCallRecordFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount,
1128                                          const VkCommandBuffer* pCommandBuffers);
1129     bool PreCallValidateCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo,
1130                                           const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool);
1131     void PostCallRecordCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo,
1132                                          const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool, VkResult result);
1133     bool PreCallValidateCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo,
1134                                         const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool);
1135     void PostCallRecordCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo,
1136                                        const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool, VkResult result);
1137     bool PreCallValidateDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator);
1138     void PreCallRecordDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator);
1139     bool PreCallValidateResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags);
1140     void PostCallRecordResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags, VkResult result);
1141     bool PreCallValidateResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
1142     void PostCallRecordResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkResult result);
1143     bool PreCallValidateDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator);
1144     void PreCallRecordDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator);
1145     bool PreCallValidateDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator);
1146     void PreCallRecordDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator);
1147     void PostCallRecordCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo,
1148                                      const VkAllocationCallbacks* pAllocator, VkSampler* pSampler, VkResult result);
1149     bool PreCallValidateCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
1150                                                   const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout);
1151     void PostCallRecordCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
1152                                                  const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout,
1153                                                  VkResult result);
1154     void PostCallRecordCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo,
1155                                             const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool,
1156                                             VkResult result);
1157     bool PreCallValidateResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags);
1158     void PostCallRecordResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags,
1159                                            VkResult result);
1160     bool PreCallValidateFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count,
1161                                            const VkDescriptorSet* pDescriptorSets);
1162     void PreCallRecordFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count,
1163                                          const VkDescriptorSet* pDescriptorSets);
1164     bool PreCallValidateUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount,
1165                                              const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount,
1166                                              const VkCopyDescriptorSet* pDescriptorCopies);
1167     void PreCallRecordUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount,
1168                                            const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount,
1169                                            const VkCopyDescriptorSet* pDescriptorCopies);
1170     void PostCallRecordAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pCreateInfo,
1171                                               VkCommandBuffer* pCommandBuffer, VkResult result);
1172     bool PreCallValidateBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo);
1173     void PreCallRecordBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo);
1174     bool PreCallValidateEndCommandBuffer(VkCommandBuffer commandBuffer);
1175     void PostCallRecordEndCommandBuffer(VkCommandBuffer commandBuffer, VkResult result);
1176     bool PreCallValidateResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags);
1177     void PostCallRecordResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, VkResult result);
1178     bool PreCallValidateCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
1179     void PreCallRecordCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
1180     bool PreCallValidateCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount,
1181                                        const VkViewport* pViewports);
1182     void PreCallRecordCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount,
1183                                      const VkViewport* pViewports);
1184     bool PreCallValidateCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount,
1185                                       const VkRect2D* pScissors);
1186     void PreCallRecordCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount,
1187                                     const VkRect2D* pScissors);
1188     bool PreCallValidateCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor,
1189                                                  uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors);
1190     void PreCallRecordCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor,
1191                                                uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors);
1192     bool PreCallValidateCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout);
1193     void PreCallRecordCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout);
1194     bool PreCallValidateCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport,
1195                                                            uint32_t viewportCount,
1196                                                            const VkShadingRatePaletteNV* pShadingRatePalettes);
1197     void PreCallRecordCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport,
1198                                                          uint32_t viewportCount,
1199                                                          const VkShadingRatePaletteNV* pShadingRatePalettes);
1200     bool PreCallValidateCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth);
1201     void PreCallRecordCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth);
1202     bool PreCallValidateCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp,
1203                                         float depthBiasSlopeFactor);
1204     void PreCallRecordCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp,
1205                                       float depthBiasSlopeFactor);
1206     bool PreCallValidateCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]);
1207     void PreCallRecordCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]);
1208     bool PreCallValidateCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
1209     void PreCallRecordCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
1210     bool PreCallValidateCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
1211     void PreCallRecordCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
1212     bool PreCallValidateCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
1213     void PreCallRecordCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
1214     bool PreCallValidateCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
1215     void PreCallRecordCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
1216     bool PreCallValidateCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint,
1217                                               VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount,
1218                                               const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount,
1219                                               const uint32_t* pDynamicOffsets);
1220     void PreCallRecordCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint,
1221                                             VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount,
1222                                             const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount,
1223                                             const uint32_t* pDynamicOffsets);
1224     bool PreCallValidateCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint,
1225                                                 VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount,
1226                                                 const VkWriteDescriptorSet* pDescriptorWrites);
1227     void PreCallRecordCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint,
1228                                               VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount,
1229                                               const VkWriteDescriptorSet* pDescriptorWrites);
1230     bool PreCallValidateCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1231                                            VkIndexType indexType);
1232     void PreCallRecordCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1233                                          VkIndexType indexType);
1234     bool PreCallValidateCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount,
1235                                              const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
1236     void PreCallRecordCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount,
1237                                            const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
1238     bool PreCallValidateCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex,
1239                                 uint32_t firstInstance);
1240     void PreCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex,
1241                               uint32_t firstInstance);
1242     void PostCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex,
1243                                uint32_t firstInstance);
1244     bool PreCallValidateCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount,
1245                                        uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
1246     void PreCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount,
1247                                      uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
1248     void PostCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount,
1249                                       uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
1250     bool PreCallValidateCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count,
1251                                                uint32_t stride);
1252     void PreCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count,
1253                                              uint32_t stride);
1254     void PostCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count,
1255                                               uint32_t stride);
1256     bool PreCallValidateCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1257                                                        VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1258                                                        uint32_t stride);
1259     bool PreCallValidateCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z);
1260     void PreCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z);
1261     void PostCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z);
1262     bool PreCallValidateCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
1263     void PreCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
1264     void PostCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
1265     bool PreCallValidateCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count,
1266                                         uint32_t stride);
1267     void PreCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count,
1268                                       uint32_t stride);
1269     void PostCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count,
1270                                        uint32_t stride);
1271     bool PreCallValidateCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
1272     void PreCallRecordCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
1273     bool PreCallValidateCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
1274     void PreCallRecordCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
1275     bool PreCallValidateCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents,
1276                                       VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags dstStageMask,
1277                                       uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers,
1278                                       uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers,
1279                                       uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers);
1280     void PreCallRecordCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents,
1281                                     VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags dstStageMask,
1282                                     uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers,
1283                                     uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers,
1284                                     uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers);
1285     void PostCallRecordCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents,
1286                                      VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags dstStageMask,
1287                                      uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers,
1288                                      uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers,
1289                                      uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers);
1290     bool PreCallValidateCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask,
1291                                            VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags,
1292                                            uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers,
1293                                            uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers,
1294                                            uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers);
1295     void PreCallRecordCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask,
1296                                          VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags,
1297                                          uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers,
1298                                          uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers,
1299                                          uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers);
1300     bool PreCallValidateCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot, VkFlags flags);
1301     void PostCallRecordCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot, VkFlags flags);
1302     bool PreCallValidateCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot);
1303     void PostCallRecordCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot);
1304     bool PreCallValidateCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery,
1305                                           uint32_t queryCount);
1306     void PostCallRecordCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery,
1307                                          uint32_t queryCount);
1308     bool PreCallValidateCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery,
1309                                                 uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset,
1310                                                 VkDeviceSize stride, VkQueryResultFlags flags);
1311     void PostCallRecordCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery,
1312                                                uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride,
1313                                                VkQueryResultFlags flags);
1314     bool PreCallValidateCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags,
1315                                          uint32_t offset, uint32_t size, const void* pValues);
1316     bool PreCallValidateCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage,
1317                                           VkQueryPool queryPool, uint32_t slot);
1318     void PostCallRecordCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage,
1319                                          VkQueryPool queryPool, uint32_t slot);
1320     bool PreCallValidateCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo,
1321                                           const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer);
1322     void PostCallRecordCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo,
1323                                          const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer, VkResult result);
1324     bool PreCallValidateCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo,
1325                                          const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
1326     void PostCallRecordCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo,
1327                                         const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, VkResult result);
1328     bool PreCallValidateGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory mem, VkDeviceSize* pCommittedMem);
1329     bool PreCallValidateCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo,
1330                                              const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
1331     void PostCallRecordCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo,
1332                                             const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, VkResult result);
1333     bool PreCallValidateCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin,
1334                                            VkSubpassContents contents);
1335     void PreCallRecordCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin,
1336                                          VkSubpassContents contents);
1337     bool PreCallValidateCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin,
1338                                                const VkSubpassBeginInfoKHR* pSubpassBeginInfo);
1339     void PreCallRecordCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin,
1340                                              const VkSubpassBeginInfoKHR* pSubpassBeginInfo);
1341     bool PreCallValidateCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents);
1342     void PostCallRecordCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents);
1343     bool PreCallValidateCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo,
1344                                            const VkSubpassEndInfoKHR* pSubpassEndInfo);
1345     void PostCallRecordCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo,
1346                                           const VkSubpassEndInfoKHR* pSubpassEndInfo);
1347     bool PreCallValidateCmdEndRenderPass(VkCommandBuffer commandBuffer);
1348     void PostCallRecordCmdEndRenderPass(VkCommandBuffer commandBuffer);
1349     bool PreCallValidateCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo);
1350     void PostCallRecordCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo);
1351     bool PreCallValidateCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount,
1352                                            const VkCommandBuffer* pCommandBuffers);
1353     void PreCallRecordCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount,
1354                                          const VkCommandBuffer* pCommandBuffers);
1355     bool PreCallValidateMapMemory(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkFlags flags,
1356                                   void** ppData);
1357     void PostCallRecordMapMemory(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkFlags flags,
1358                                  void** ppData, VkResult result);
1359     bool PreCallValidateUnmapMemory(VkDevice device, VkDeviceMemory mem);
1360     void PreCallRecordUnmapMemory(VkDevice device, VkDeviceMemory mem);
1361     bool PreCallValidateFlushMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
1362     bool PreCallValidateInvalidateMappedMemoryRanges(VkDevice device, uint32_t memRangeCount,
1363                                                      const VkMappedMemoryRange* pMemRanges);
1364     void PostCallRecordInvalidateMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges,
1365                                                     VkResult result);
1366     bool PreCallValidateBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize memoryOffset);
1367     void PostCallRecordBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize memoryOffset,
1368                                        VkResult result);
1369     bool PreCallValidateBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR* pBindInfos);
1370     void PostCallRecordBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR* pBindInfos,
1371                                         VkResult result);
1372     bool PreCallValidateBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR* pBindInfos);
1373     void PostCallRecordBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR* pBindInfos,
1374                                            VkResult result);
1375     bool PreCallValidateSetEvent(VkDevice device, VkEvent event);
1376     void PreCallRecordSetEvent(VkDevice device, VkEvent event);
1377     bool PreCallValidateQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence);
1378     void PostCallRecordQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence,
1379                                        VkResult result);
1380     void PostCallRecordCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo,
1381                                        const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore, VkResult result);
1382     bool PreCallValidateImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
1383     void PostCallRecordImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo,
1384                                             VkResult result);
1385 #ifdef VK_USE_PLATFORM_WIN32_KHR
1386     void PostCallRecordImportSemaphoreWin32HandleKHR(VkDevice device,
1387                                                      const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo,
1388                                                      VkResult result);
1389     bool PreCallValidateImportSemaphoreWin32HandleKHR(VkDevice device,
1390                                                       const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
1391     bool PreCallValidateImportFenceWin32HandleKHR(VkDevice device,
1392                                                   const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
1393     void PostCallRecordImportFenceWin32HandleKHR(VkDevice device,
1394                                                  const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo,
1395                                                  VkResult result);
1396     void PostCallRecordGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
1397                                                   HANDLE* pHandle, VkResult result);
1398     void PostCallRecordGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
1399                                               HANDLE* pHandle, VkResult result);
1400 #endif  // VK_USE_PLATFORM_WIN32_KHR
1401     bool PreCallValidateImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo);
1402     void PostCallRecordImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo, VkResult result);
1403 
1404     void PostCallRecordGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, VkResult result);
1405     void PostCallRecordGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd, VkResult result);
1406     void PostCallRecordCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
1407                                    VkEvent* pEvent, VkResult result);
1408     bool PreCallValidateCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo,
1409                                            const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain);
1410     void PostCallRecordCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo,
1411                                           const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain, VkResult result);
1412     void PreCallRecordDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator);
1413     bool PreCallValidateGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount,
1414                                               VkImage* pSwapchainImages);
1415     void PostCallRecordGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount,
1416                                              VkImage* pSwapchainImages, VkResult result);
1417     bool PreCallValidateQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo);
1418     void PostCallRecordQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo, VkResult result);
1419     bool PreCallValidateCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount,
1420                                                   const VkSwapchainCreateInfoKHR* pCreateInfos,
1421                                                   const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains);
1422     void PostCallRecordCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount,
1423                                                  const VkSwapchainCreateInfoKHR* pCreateInfos,
1424                                                  const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains,
1425                                                  VkResult result);
1426     bool PreCallValidateAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore,
1427                                             VkFence fence, uint32_t* pImageIndex);
1428     bool PreCallValidateAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex);
1429     void PostCallRecordAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore,
1430                                            VkFence fence, uint32_t* pImageIndex, VkResult result);
1431     void PostCallRecordAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex,
1432                                             VkResult result);
1433     void PostCallRecordEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount,
1434                                                 VkPhysicalDevice* pPhysicalDevices, VkResult result);
1435     bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount,
1436                                                                VkQueueFamilyProperties* pQueueFamilyProperties);
1437     void PostCallRecordGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount,
1438                                                               VkQueueFamilyProperties* pQueueFamilyProperties);
1439     bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice,
1440                                                                 uint32_t* pQueueFamilyPropertyCount,
1441                                                                 VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
1442     void PostCallRecordGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount,
1443                                                                VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
1444     bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice,
1445                                                                    uint32_t* pQueueFamilyPropertyCount,
1446                                                                    VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
1447     void PostCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice,
1448                                                                   uint32_t* pQueueFamilyPropertyCount,
1449                                                                   VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
1450     bool PreCallValidateDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator);
1451     void PreCallRecordValidateDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator);
1452     void PostCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
1453                                                                VkSurfaceCapabilitiesKHR* pSurfaceCapabilities, VkResult result);
1454     void PostCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice,
1455                                                                 const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
1456                                                                 VkSurfaceCapabilities2KHR* pSurfaceCapabilities, VkResult result);
1457     void PostCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
1458                                                                 VkSurfaceCapabilities2EXT* pSurfaceCapabilities, VkResult result);
1459     bool PreCallValidateGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
1460                                                            VkSurfaceKHR surface, VkBool32* pSupported);
1461     void PostCallRecordGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
1462                                                           VkSurfaceKHR surface, VkBool32* pSupported, VkResult result);
1463     void PostCallRecordGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
1464                                                                uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes,
1465                                                                VkResult result);
1466     bool PreCallValidateGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
1467                                                            uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats);
1468     void PostCallRecordGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
1469                                                           uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats,
1470                                                           VkResult result);
1471     void PostCallRecordGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice,
1472                                                            const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
1473                                                            uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats,
1474                                                            VkResult result);
1475     void PostCallRecordCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
1476                                                     const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface,
1477                                                     VkResult result);
1478     void PreCallRecordQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo);
1479     void PostCallRecordQueueEndDebugUtilsLabelEXT(VkQueue queue);
1480     void PreCallRecordQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo);
1481     void PreCallRecordCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo);
1482     void PostCallRecordCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer);
1483     void PreCallRecordCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo);
1484     void PostCallRecordCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo,
1485                                                     const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger,
1486                                                     VkResult result);
1487     void PostCallRecordDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger,
1488                                                      const VkAllocationCallbacks* pAllocator);
1489     void PostCallRecordDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT msgCallback,
1490                                                      const VkAllocationCallbacks* pAllocator);
1491     void PostCallRecordEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount,
1492                                                      VkPhysicalDeviceGroupPropertiesKHR* pPhysicalDeviceGroupProperties,
1493                                                      VkResult result);
1494     void PostCallRecordEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount,
1495                                                         VkPhysicalDeviceGroupPropertiesKHR* pPhysicalDeviceGroupProperties,
1496                                                         VkResult result);
1497     bool PreCallValidateCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
1498                                                        const VkAllocationCallbacks* pAllocator,
1499                                                        VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate);
1500     void PostCallRecordCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
1501                                                       const VkAllocationCallbacks* pAllocator,
1502                                                       VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate, VkResult result);
1503     bool PreCallValidateCreateDescriptorUpdateTemplateKHR(VkDevice device,
1504                                                           const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
1505                                                           const VkAllocationCallbacks* pAllocator,
1506                                                           VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate);
1507     void PostCallRecordCreateDescriptorUpdateTemplateKHR(VkDevice device,
1508                                                          const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
1509                                                          const VkAllocationCallbacks* pAllocator,
1510                                                          VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate, VkResult result);
1511     void PreCallRecordDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
1512                                                       const VkAllocationCallbacks* pAllocator);
1513     void PreCallRecordDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
1514                                                          const VkAllocationCallbacks* pAllocator);
1515     bool PreCallValidateUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet,
1516                                                         VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData);
1517     void PreCallRecordUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet,
1518                                                       VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData);
1519     bool PreCallValidateUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet,
1520                                                            VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
1521                                                            const void* pData);
1522     void PreCallRecordUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet,
1523                                                          VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData);
1524 
1525     bool PreCallValidateCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer,
1526                                                             VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
1527                                                             VkPipelineLayout layout, uint32_t set, const void* pData);
1528     void PreCallRecordCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer,
1529                                                           VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
1530                                                           VkPipelineLayout layout, uint32_t set, const void* pData);
1531     void PostCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount,
1532                                                                   VkDisplayPlanePropertiesKHR* pProperties, VkResult result);
1533     void PostCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount,
1534                                                                    VkDisplayPlaneProperties2KHR* pProperties, VkResult result);
1535     bool PreCallValidateGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex,
1536                                                             uint32_t* pDisplayCount, VkDisplayKHR* pDisplays);
1537     bool PreCallValidateGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex,
1538                                                        VkDisplayPlaneCapabilitiesKHR* pCapabilities);
1539     bool PreCallValidateGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice,
1540                                                         const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo,
1541                                                         VkDisplayPlaneCapabilities2KHR* pCapabilities);
1542     bool PreCallValidateCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer);
1543     bool PreCallValidateCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle,
1544                                                   uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles);
1545     bool PreCallValidateCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer,
1546                                                  const VkSampleLocationsInfoEXT* pSampleLocationsInfo);
1547     bool PreCallValidateCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1548                                                 VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1549                                                 uint32_t stride);
1550     void PreCallRecordCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1551                                               VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1552                                               uint32_t stride);
1553     void PreCallRecordCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1554                                                      VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1555                                                      uint32_t stride);
1556     bool PreCallValidateCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask);
1557     void PreCallRecordCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask);
1558     bool PreCallValidateCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1559                                                    uint32_t drawCount, uint32_t stride);
1560     void PreCallRecordCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1561                                                  uint32_t drawCount, uint32_t stride);
1562     bool PreCallValidateCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1563                                                         VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1564                                                         uint32_t stride);
1565     void PreCallRecordCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
1566                                                       VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount,
1567                                                       uint32_t stride);
1568     void PostCallRecordDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion,
1569                                                      const VkAllocationCallbacks* pAllocator);
1570     void PreCallRecordGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
1571                                                   VkPhysicalDeviceProperties* pPhysicalDeviceProperties);
1572     void PostCallRecordDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion,
1573                                                         const VkAllocationCallbacks* pAllocator);
1574     bool PreCallValidateGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo);
1575 #ifdef VK_USE_PLATFORM_ANDROID_KHR
1576     bool PreCallValidateGetAndroidHardwareBufferProperties(VkDevice device, const struct AHardwareBuffer* buffer,
1577                                                            VkAndroidHardwareBufferPropertiesANDROID* pProperties);
1578     void PostCallRecordGetAndroidHardwareBufferProperties(VkDevice device, const struct AHardwareBuffer* buffer,
1579                                                           VkAndroidHardwareBufferPropertiesANDROID* pProperties, VkResult result);
1580     bool PreCallValidateGetMemoryAndroidHardwareBuffer(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
1581                                                        struct AHardwareBuffer** pBuffer);
1582     void PostCallRecordCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
1583                                                const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, VkResult result);
1584 #endif  // VK_USE_PLATFORM_ANDROID_KHR
1585 #ifdef VK_USE_PLATFORM_IOS_MVK
1586     void PostCallRecordCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
1587                                            const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, VkResult result);
1588 #endif  // VK_USE_PLATFORM_IOS_MVK
1589 #ifdef VK_USE_PLATFORM_MACOS_MVK
1590     void PostCallRecordCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
1591                                              const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, VkResult result);
1592 #endif  // VK_USE_PLATFORM_MACOS_MVK
1593 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
1594     bool PreCallValidateGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
1595                                                                        struct wl_display* display);
1596     void PostCallRecordCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
1597                                                const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, VkResult result);
1598 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
1599 #ifdef VK_USE_PLATFORM_WIN32_KHR
1600     bool PreCallValidateGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
1601     void PostCallRecordCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
1602                                              const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, VkResult result);
1603 #endif  // VK_USE_PLATFORM_WIN32_KHR
1604 #ifdef VK_USE_PLATFORM_XCB_KHR
1605     bool PreCallValidateGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
1606                                                                    xcb_connection_t* connection, xcb_visualid_t visual_id);
1607     void PostCallRecordCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
1608                                            const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, VkResult result);
1609 #endif  // VK_USE_PLATFORM_XCB_KHR
1610 #ifdef VK_USE_PLATFORM_XLIB_KHR
1611     bool PreCallValidateGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
1612                                                                     Display* dpy, VisualID visualID);
1613     void PostCallRecordCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
1614                                             const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, VkResult result);
1615 #endif  // VK_USE_PLATFORM_XLIB_KHR
1616 
1617 };  // Class CoreChecks
1618