Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "vk/GrVkInterface.h" |
jvanverth | fd7bd45 | 2016-03-25 06:29:52 -0700 | [diff] [blame] | 9 | #include "vk/GrVkBackendContext.h" |
jvanverth | d2497f3 | 2016-03-18 12:39:05 -0700 | [diff] [blame] | 10 | #include "vk/GrVkUtil.h" |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 11 | |
Michael Jurka | 3251ed8 | 2017-04-05 09:52:55 -0700 | [diff] [blame] | 12 | #define ACQUIRE_PROC(name, instance, device) fFunctions.f##name = \ |
| 13 | reinterpret_cast<PFN_vk##name>(getProc("vk"#name, instance, device)); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 14 | |
Michael Jurka | 3251ed8 | 2017-04-05 09:52:55 -0700 | [diff] [blame] | 15 | GrVkInterface::GrVkInterface(GetProc getProc, |
| 16 | VkInstance instance, |
| 17 | VkDevice device, |
| 18 | uint32_t extensionFlags) { |
| 19 | if (getProc == nullptr) { |
| 20 | return; |
| 21 | } |
| 22 | // Global/Loader Procs. |
| 23 | ACQUIRE_PROC(CreateInstance, VK_NULL_HANDLE, VK_NULL_HANDLE); |
| 24 | ACQUIRE_PROC(EnumerateInstanceExtensionProperties, VK_NULL_HANDLE, VK_NULL_HANDLE); |
| 25 | ACQUIRE_PROC(EnumerateInstanceLayerProperties, VK_NULL_HANDLE, VK_NULL_HANDLE); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 26 | |
Michael Jurka | 3251ed8 | 2017-04-05 09:52:55 -0700 | [diff] [blame] | 27 | // Instance Procs. |
| 28 | ACQUIRE_PROC(EnumeratePhysicalDevices, instance, VK_NULL_HANDLE); |
| 29 | ACQUIRE_PROC(GetPhysicalDeviceFeatures, instance, VK_NULL_HANDLE); |
| 30 | ACQUIRE_PROC(GetPhysicalDeviceFormatProperties, instance, VK_NULL_HANDLE); |
| 31 | ACQUIRE_PROC(GetPhysicalDeviceImageFormatProperties, instance, VK_NULL_HANDLE); |
| 32 | ACQUIRE_PROC(GetPhysicalDeviceProperties, instance, VK_NULL_HANDLE); |
| 33 | ACQUIRE_PROC(GetPhysicalDeviceQueueFamilyProperties, instance, VK_NULL_HANDLE); |
| 34 | ACQUIRE_PROC(GetPhysicalDeviceMemoryProperties, instance, VK_NULL_HANDLE); |
| 35 | ACQUIRE_PROC(GetPhysicalDeviceSparseImageFormatProperties, instance, VK_NULL_HANDLE); |
| 36 | ACQUIRE_PROC(DestroyInstance, instance, VK_NULL_HANDLE); |
| 37 | ACQUIRE_PROC(CreateDevice, instance, VK_NULL_HANDLE); |
| 38 | ACQUIRE_PROC(DestroyDevice, instance, VK_NULL_HANDLE); |
| 39 | ACQUIRE_PROC(EnumerateDeviceExtensionProperties, instance, VK_NULL_HANDLE); |
| 40 | ACQUIRE_PROC(EnumerateDeviceLayerProperties, instance, VK_NULL_HANDLE); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 41 | |
jvanverth | fd7bd45 | 2016-03-25 06:29:52 -0700 | [diff] [blame] | 42 | if (extensionFlags & kEXT_debug_report_GrVkExtensionFlag) { |
Michael Jurka | 3251ed8 | 2017-04-05 09:52:55 -0700 | [diff] [blame] | 43 | // Also instance Procs. |
| 44 | ACQUIRE_PROC(CreateDebugReportCallbackEXT, instance, VK_NULL_HANDLE); |
| 45 | ACQUIRE_PROC(DebugReportMessageEXT, instance, VK_NULL_HANDLE); |
| 46 | ACQUIRE_PROC(DestroyDebugReportCallbackEXT, instance, VK_NULL_HANDLE); |
jvanverth | d2497f3 | 2016-03-18 12:39:05 -0700 | [diff] [blame] | 47 | } |
| 48 | |
Michael Jurka | 3251ed8 | 2017-04-05 09:52:55 -0700 | [diff] [blame] | 49 | // Device Procs. |
| 50 | ACQUIRE_PROC(GetDeviceQueue, VK_NULL_HANDLE, device); |
| 51 | ACQUIRE_PROC(QueueSubmit, VK_NULL_HANDLE, device); |
| 52 | ACQUIRE_PROC(QueueWaitIdle, VK_NULL_HANDLE, device); |
| 53 | ACQUIRE_PROC(DeviceWaitIdle, VK_NULL_HANDLE, device); |
| 54 | ACQUIRE_PROC(AllocateMemory, VK_NULL_HANDLE, device); |
| 55 | ACQUIRE_PROC(FreeMemory, VK_NULL_HANDLE, device); |
| 56 | ACQUIRE_PROC(MapMemory, VK_NULL_HANDLE, device); |
| 57 | ACQUIRE_PROC(UnmapMemory, VK_NULL_HANDLE, device); |
| 58 | ACQUIRE_PROC(FlushMappedMemoryRanges, VK_NULL_HANDLE, device); |
| 59 | ACQUIRE_PROC(InvalidateMappedMemoryRanges, VK_NULL_HANDLE, device); |
| 60 | ACQUIRE_PROC(GetDeviceMemoryCommitment, VK_NULL_HANDLE, device); |
| 61 | ACQUIRE_PROC(BindBufferMemory, VK_NULL_HANDLE, device); |
| 62 | ACQUIRE_PROC(BindImageMemory, VK_NULL_HANDLE, device); |
| 63 | ACQUIRE_PROC(GetBufferMemoryRequirements, VK_NULL_HANDLE, device); |
| 64 | ACQUIRE_PROC(GetImageMemoryRequirements, VK_NULL_HANDLE, device); |
| 65 | ACQUIRE_PROC(GetImageSparseMemoryRequirements, VK_NULL_HANDLE, device); |
| 66 | ACQUIRE_PROC(QueueBindSparse, VK_NULL_HANDLE, device); |
| 67 | ACQUIRE_PROC(CreateFence, VK_NULL_HANDLE, device); |
| 68 | ACQUIRE_PROC(DestroyFence, VK_NULL_HANDLE, device); |
| 69 | ACQUIRE_PROC(ResetFences, VK_NULL_HANDLE, device); |
| 70 | ACQUIRE_PROC(GetFenceStatus, VK_NULL_HANDLE, device); |
| 71 | ACQUIRE_PROC(WaitForFences, VK_NULL_HANDLE, device); |
| 72 | ACQUIRE_PROC(CreateSemaphore, VK_NULL_HANDLE, device); |
| 73 | ACQUIRE_PROC(DestroySemaphore, VK_NULL_HANDLE, device); |
| 74 | ACQUIRE_PROC(CreateEvent, VK_NULL_HANDLE, device); |
| 75 | ACQUIRE_PROC(DestroyEvent, VK_NULL_HANDLE, device); |
| 76 | ACQUIRE_PROC(GetEventStatus, VK_NULL_HANDLE, device); |
| 77 | ACQUIRE_PROC(SetEvent, VK_NULL_HANDLE, device); |
| 78 | ACQUIRE_PROC(ResetEvent, VK_NULL_HANDLE, device); |
| 79 | ACQUIRE_PROC(CreateQueryPool, VK_NULL_HANDLE, device); |
| 80 | ACQUIRE_PROC(DestroyQueryPool, VK_NULL_HANDLE, device); |
| 81 | ACQUIRE_PROC(GetQueryPoolResults, VK_NULL_HANDLE, device); |
| 82 | ACQUIRE_PROC(CreateBuffer, VK_NULL_HANDLE, device); |
| 83 | ACQUIRE_PROC(DestroyBuffer, VK_NULL_HANDLE, device); |
| 84 | ACQUIRE_PROC(CreateBufferView, VK_NULL_HANDLE, device); |
| 85 | ACQUIRE_PROC(DestroyBufferView, VK_NULL_HANDLE, device); |
| 86 | ACQUIRE_PROC(CreateImage, VK_NULL_HANDLE, device); |
| 87 | ACQUIRE_PROC(DestroyImage, VK_NULL_HANDLE, device); |
| 88 | ACQUIRE_PROC(GetImageSubresourceLayout, VK_NULL_HANDLE, device); |
| 89 | ACQUIRE_PROC(CreateImageView, VK_NULL_HANDLE, device); |
| 90 | ACQUIRE_PROC(DestroyImageView, VK_NULL_HANDLE, device); |
| 91 | ACQUIRE_PROC(CreateShaderModule, VK_NULL_HANDLE, device); |
| 92 | ACQUIRE_PROC(DestroyShaderModule, VK_NULL_HANDLE, device); |
| 93 | ACQUIRE_PROC(CreatePipelineCache, VK_NULL_HANDLE, device); |
| 94 | ACQUIRE_PROC(DestroyPipelineCache, VK_NULL_HANDLE, device); |
| 95 | ACQUIRE_PROC(GetPipelineCacheData, VK_NULL_HANDLE, device); |
| 96 | ACQUIRE_PROC(MergePipelineCaches, VK_NULL_HANDLE, device); |
| 97 | ACQUIRE_PROC(CreateGraphicsPipelines, VK_NULL_HANDLE, device); |
| 98 | ACQUIRE_PROC(CreateComputePipelines, VK_NULL_HANDLE, device); |
| 99 | ACQUIRE_PROC(DestroyPipeline, VK_NULL_HANDLE, device); |
| 100 | ACQUIRE_PROC(CreatePipelineLayout, VK_NULL_HANDLE, device); |
| 101 | ACQUIRE_PROC(DestroyPipelineLayout, VK_NULL_HANDLE, device); |
| 102 | ACQUIRE_PROC(CreateSampler, VK_NULL_HANDLE, device); |
| 103 | ACQUIRE_PROC(DestroySampler, VK_NULL_HANDLE, device); |
| 104 | ACQUIRE_PROC(CreateDescriptorSetLayout, VK_NULL_HANDLE, device); |
| 105 | ACQUIRE_PROC(DestroyDescriptorSetLayout, VK_NULL_HANDLE, device); |
| 106 | ACQUIRE_PROC(CreateDescriptorPool, VK_NULL_HANDLE, device); |
| 107 | ACQUIRE_PROC(DestroyDescriptorPool, VK_NULL_HANDLE, device); |
| 108 | ACQUIRE_PROC(ResetDescriptorPool, VK_NULL_HANDLE, device); |
| 109 | ACQUIRE_PROC(AllocateDescriptorSets, VK_NULL_HANDLE, device); |
| 110 | ACQUIRE_PROC(FreeDescriptorSets, VK_NULL_HANDLE, device); |
| 111 | ACQUIRE_PROC(UpdateDescriptorSets, VK_NULL_HANDLE, device); |
| 112 | ACQUIRE_PROC(CreateFramebuffer, VK_NULL_HANDLE, device); |
| 113 | ACQUIRE_PROC(DestroyFramebuffer, VK_NULL_HANDLE, device); |
| 114 | ACQUIRE_PROC(CreateRenderPass, VK_NULL_HANDLE, device); |
| 115 | ACQUIRE_PROC(DestroyRenderPass, VK_NULL_HANDLE, device); |
| 116 | ACQUIRE_PROC(GetRenderAreaGranularity, VK_NULL_HANDLE, device); |
| 117 | ACQUIRE_PROC(CreateCommandPool, VK_NULL_HANDLE, device); |
| 118 | ACQUIRE_PROC(DestroyCommandPool, VK_NULL_HANDLE, device); |
| 119 | ACQUIRE_PROC(ResetCommandPool, VK_NULL_HANDLE, device); |
| 120 | ACQUIRE_PROC(AllocateCommandBuffers, VK_NULL_HANDLE, device); |
| 121 | ACQUIRE_PROC(FreeCommandBuffers, VK_NULL_HANDLE, device); |
| 122 | ACQUIRE_PROC(BeginCommandBuffer, VK_NULL_HANDLE, device); |
| 123 | ACQUIRE_PROC(EndCommandBuffer, VK_NULL_HANDLE, device); |
| 124 | ACQUIRE_PROC(ResetCommandBuffer, VK_NULL_HANDLE, device); |
| 125 | ACQUIRE_PROC(CmdBindPipeline, VK_NULL_HANDLE, device); |
| 126 | ACQUIRE_PROC(CmdSetViewport, VK_NULL_HANDLE, device); |
| 127 | ACQUIRE_PROC(CmdSetScissor, VK_NULL_HANDLE, device); |
| 128 | ACQUIRE_PROC(CmdSetLineWidth, VK_NULL_HANDLE, device); |
| 129 | ACQUIRE_PROC(CmdSetDepthBias, VK_NULL_HANDLE, device); |
| 130 | ACQUIRE_PROC(CmdSetBlendConstants, VK_NULL_HANDLE, device); |
| 131 | ACQUIRE_PROC(CmdSetDepthBounds, VK_NULL_HANDLE, device); |
| 132 | ACQUIRE_PROC(CmdSetStencilCompareMask, VK_NULL_HANDLE, device); |
| 133 | ACQUIRE_PROC(CmdSetStencilWriteMask, VK_NULL_HANDLE, device); |
| 134 | ACQUIRE_PROC(CmdSetStencilReference, VK_NULL_HANDLE, device); |
| 135 | ACQUIRE_PROC(CmdBindDescriptorSets, VK_NULL_HANDLE, device); |
| 136 | ACQUIRE_PROC(CmdBindIndexBuffer, VK_NULL_HANDLE, device); |
| 137 | ACQUIRE_PROC(CmdBindVertexBuffers, VK_NULL_HANDLE, device); |
| 138 | ACQUIRE_PROC(CmdDraw, VK_NULL_HANDLE, device); |
| 139 | ACQUIRE_PROC(CmdDrawIndexed, VK_NULL_HANDLE, device); |
| 140 | ACQUIRE_PROC(CmdDrawIndirect, VK_NULL_HANDLE, device); |
| 141 | ACQUIRE_PROC(CmdDrawIndexedIndirect, VK_NULL_HANDLE, device); |
| 142 | ACQUIRE_PROC(CmdDispatch, VK_NULL_HANDLE, device); |
| 143 | ACQUIRE_PROC(CmdDispatchIndirect, VK_NULL_HANDLE, device); |
| 144 | ACQUIRE_PROC(CmdCopyBuffer, VK_NULL_HANDLE, device); |
| 145 | ACQUIRE_PROC(CmdCopyImage, VK_NULL_HANDLE, device); |
| 146 | ACQUIRE_PROC(CmdBlitImage, VK_NULL_HANDLE, device); |
| 147 | ACQUIRE_PROC(CmdCopyBufferToImage, VK_NULL_HANDLE, device); |
| 148 | ACQUIRE_PROC(CmdCopyImageToBuffer, VK_NULL_HANDLE, device); |
| 149 | ACQUIRE_PROC(CmdUpdateBuffer, VK_NULL_HANDLE, device); |
| 150 | ACQUIRE_PROC(CmdFillBuffer, VK_NULL_HANDLE, device); |
| 151 | ACQUIRE_PROC(CmdClearColorImage, VK_NULL_HANDLE, device); |
| 152 | ACQUIRE_PROC(CmdClearDepthStencilImage, VK_NULL_HANDLE, device); |
| 153 | ACQUIRE_PROC(CmdClearAttachments, VK_NULL_HANDLE, device); |
| 154 | ACQUIRE_PROC(CmdResolveImage, VK_NULL_HANDLE, device); |
| 155 | ACQUIRE_PROC(CmdSetEvent, VK_NULL_HANDLE, device); |
| 156 | ACQUIRE_PROC(CmdResetEvent, VK_NULL_HANDLE, device); |
| 157 | ACQUIRE_PROC(CmdWaitEvents, VK_NULL_HANDLE, device); |
| 158 | ACQUIRE_PROC(CmdPipelineBarrier, VK_NULL_HANDLE, device); |
| 159 | ACQUIRE_PROC(CmdBeginQuery, VK_NULL_HANDLE, device); |
| 160 | ACQUIRE_PROC(CmdEndQuery, VK_NULL_HANDLE, device); |
| 161 | ACQUIRE_PROC(CmdResetQueryPool, VK_NULL_HANDLE, device); |
| 162 | ACQUIRE_PROC(CmdWriteTimestamp, VK_NULL_HANDLE, device); |
| 163 | ACQUIRE_PROC(CmdCopyQueryPoolResults, VK_NULL_HANDLE, device); |
| 164 | ACQUIRE_PROC(CmdPushConstants, VK_NULL_HANDLE, device); |
| 165 | ACQUIRE_PROC(CmdBeginRenderPass, VK_NULL_HANDLE, device); |
| 166 | ACQUIRE_PROC(CmdNextSubpass, VK_NULL_HANDLE, device); |
| 167 | ACQUIRE_PROC(CmdEndRenderPass, VK_NULL_HANDLE, device); |
| 168 | ACQUIRE_PROC(CmdExecuteCommands, VK_NULL_HANDLE, device); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 169 | } |
| 170 | |
Greg Daniel | fe2965a | 2016-10-11 16:31:05 -0400 | [diff] [blame] | 171 | #ifdef SK_DEBUG |
| 172 | static int kIsDebug = 1; |
| 173 | #else |
| 174 | static int kIsDebug = 0; |
| 175 | #endif |
| 176 | |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 177 | #define RETURN_FALSE_INTERFACE \ |
| 178 | if (kIsDebug) { SkDebugf("%s:%d GrVkInterface::validate() failed.\n", __FILE__, __LINE__); } \ |
| 179 | return false; |
| 180 | |
Greg Daniel | fe2965a | 2016-10-11 16:31:05 -0400 | [diff] [blame] | 181 | bool GrVkInterface::validate(uint32_t extensionFlags) const { |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 182 | // functions that are always required |
| 183 | if (NULL == fFunctions.fCreateInstance || |
| 184 | NULL == fFunctions.fDestroyInstance || |
| 185 | NULL == fFunctions.fEnumeratePhysicalDevices || |
| 186 | NULL == fFunctions.fGetPhysicalDeviceFeatures || |
| 187 | NULL == fFunctions.fGetPhysicalDeviceFormatProperties || |
| 188 | NULL == fFunctions.fGetPhysicalDeviceImageFormatProperties || |
| 189 | NULL == fFunctions.fGetPhysicalDeviceProperties || |
| 190 | NULL == fFunctions.fGetPhysicalDeviceQueueFamilyProperties || |
| 191 | NULL == fFunctions.fGetPhysicalDeviceMemoryProperties || |
| 192 | NULL == fFunctions.fCreateDevice || |
| 193 | NULL == fFunctions.fDestroyDevice || |
| 194 | NULL == fFunctions.fEnumerateInstanceExtensionProperties || |
| 195 | NULL == fFunctions.fEnumerateDeviceExtensionProperties || |
| 196 | NULL == fFunctions.fEnumerateInstanceLayerProperties || |
| 197 | NULL == fFunctions.fEnumerateDeviceLayerProperties || |
| 198 | NULL == fFunctions.fGetDeviceQueue || |
| 199 | NULL == fFunctions.fQueueSubmit || |
| 200 | NULL == fFunctions.fQueueWaitIdle || |
| 201 | NULL == fFunctions.fDeviceWaitIdle || |
| 202 | NULL == fFunctions.fAllocateMemory || |
| 203 | NULL == fFunctions.fFreeMemory || |
| 204 | NULL == fFunctions.fMapMemory || |
| 205 | NULL == fFunctions.fUnmapMemory || |
| 206 | NULL == fFunctions.fFlushMappedMemoryRanges || |
| 207 | NULL == fFunctions.fInvalidateMappedMemoryRanges || |
| 208 | NULL == fFunctions.fGetDeviceMemoryCommitment || |
| 209 | NULL == fFunctions.fBindBufferMemory || |
| 210 | NULL == fFunctions.fBindImageMemory || |
| 211 | NULL == fFunctions.fGetBufferMemoryRequirements || |
| 212 | NULL == fFunctions.fGetImageMemoryRequirements || |
| 213 | NULL == fFunctions.fGetImageSparseMemoryRequirements || |
| 214 | NULL == fFunctions.fGetPhysicalDeviceSparseImageFormatProperties || |
| 215 | NULL == fFunctions.fQueueBindSparse || |
| 216 | NULL == fFunctions.fCreateFence || |
| 217 | NULL == fFunctions.fDestroyFence || |
| 218 | NULL == fFunctions.fResetFences || |
| 219 | NULL == fFunctions.fGetFenceStatus || |
| 220 | NULL == fFunctions.fWaitForFences || |
| 221 | NULL == fFunctions.fCreateSemaphore || |
| 222 | NULL == fFunctions.fDestroySemaphore || |
| 223 | NULL == fFunctions.fCreateEvent || |
| 224 | NULL == fFunctions.fDestroyEvent || |
| 225 | NULL == fFunctions.fGetEventStatus || |
| 226 | NULL == fFunctions.fSetEvent || |
| 227 | NULL == fFunctions.fResetEvent || |
| 228 | NULL == fFunctions.fCreateQueryPool || |
| 229 | NULL == fFunctions.fDestroyQueryPool || |
| 230 | NULL == fFunctions.fGetQueryPoolResults || |
| 231 | NULL == fFunctions.fCreateBuffer || |
| 232 | NULL == fFunctions.fDestroyBuffer || |
| 233 | NULL == fFunctions.fCreateBufferView || |
| 234 | NULL == fFunctions.fDestroyBufferView || |
| 235 | NULL == fFunctions.fCreateImage || |
| 236 | NULL == fFunctions.fDestroyImage || |
| 237 | NULL == fFunctions.fGetImageSubresourceLayout || |
| 238 | NULL == fFunctions.fCreateImageView || |
| 239 | NULL == fFunctions.fDestroyImageView || |
| 240 | NULL == fFunctions.fCreateShaderModule || |
| 241 | NULL == fFunctions.fDestroyShaderModule || |
| 242 | NULL == fFunctions.fCreatePipelineCache || |
| 243 | NULL == fFunctions.fDestroyPipelineCache || |
| 244 | NULL == fFunctions.fGetPipelineCacheData || |
| 245 | NULL == fFunctions.fMergePipelineCaches || |
| 246 | NULL == fFunctions.fCreateGraphicsPipelines || |
| 247 | NULL == fFunctions.fCreateComputePipelines || |
| 248 | NULL == fFunctions.fDestroyPipeline || |
| 249 | NULL == fFunctions.fCreatePipelineLayout || |
| 250 | NULL == fFunctions.fDestroyPipelineLayout || |
| 251 | NULL == fFunctions.fCreateSampler || |
| 252 | NULL == fFunctions.fDestroySampler || |
| 253 | NULL == fFunctions.fCreateDescriptorSetLayout || |
| 254 | NULL == fFunctions.fDestroyDescriptorSetLayout || |
| 255 | NULL == fFunctions.fCreateDescriptorPool || |
| 256 | NULL == fFunctions.fDestroyDescriptorPool || |
| 257 | NULL == fFunctions.fResetDescriptorPool || |
| 258 | NULL == fFunctions.fAllocateDescriptorSets || |
| 259 | NULL == fFunctions.fFreeDescriptorSets || |
| 260 | NULL == fFunctions.fUpdateDescriptorSets || |
| 261 | NULL == fFunctions.fCreateFramebuffer || |
| 262 | NULL == fFunctions.fDestroyFramebuffer || |
| 263 | NULL == fFunctions.fCreateRenderPass || |
| 264 | NULL == fFunctions.fDestroyRenderPass || |
| 265 | NULL == fFunctions.fGetRenderAreaGranularity || |
| 266 | NULL == fFunctions.fCreateCommandPool || |
| 267 | NULL == fFunctions.fDestroyCommandPool || |
| 268 | NULL == fFunctions.fResetCommandPool || |
| 269 | NULL == fFunctions.fAllocateCommandBuffers || |
| 270 | NULL == fFunctions.fFreeCommandBuffers || |
| 271 | NULL == fFunctions.fBeginCommandBuffer || |
| 272 | NULL == fFunctions.fEndCommandBuffer || |
| 273 | NULL == fFunctions.fResetCommandBuffer || |
| 274 | NULL == fFunctions.fCmdBindPipeline || |
| 275 | NULL == fFunctions.fCmdSetViewport || |
| 276 | NULL == fFunctions.fCmdSetScissor || |
| 277 | NULL == fFunctions.fCmdSetLineWidth || |
| 278 | NULL == fFunctions.fCmdSetDepthBias || |
| 279 | NULL == fFunctions.fCmdSetBlendConstants || |
| 280 | NULL == fFunctions.fCmdSetDepthBounds || |
| 281 | NULL == fFunctions.fCmdSetStencilCompareMask || |
| 282 | NULL == fFunctions.fCmdSetStencilWriteMask || |
| 283 | NULL == fFunctions.fCmdSetStencilReference || |
| 284 | NULL == fFunctions.fCmdBindDescriptorSets || |
| 285 | NULL == fFunctions.fCmdBindIndexBuffer || |
| 286 | NULL == fFunctions.fCmdBindVertexBuffers || |
| 287 | NULL == fFunctions.fCmdDraw || |
| 288 | NULL == fFunctions.fCmdDrawIndexed || |
| 289 | NULL == fFunctions.fCmdDrawIndirect || |
| 290 | NULL == fFunctions.fCmdDrawIndexedIndirect || |
| 291 | NULL == fFunctions.fCmdDispatch || |
| 292 | NULL == fFunctions.fCmdDispatchIndirect || |
| 293 | NULL == fFunctions.fCmdCopyBuffer || |
| 294 | NULL == fFunctions.fCmdCopyImage || |
| 295 | NULL == fFunctions.fCmdBlitImage || |
| 296 | NULL == fFunctions.fCmdCopyBufferToImage || |
| 297 | NULL == fFunctions.fCmdCopyImageToBuffer || |
| 298 | NULL == fFunctions.fCmdUpdateBuffer || |
| 299 | NULL == fFunctions.fCmdFillBuffer || |
| 300 | NULL == fFunctions.fCmdClearColorImage || |
| 301 | NULL == fFunctions.fCmdClearDepthStencilImage || |
| 302 | NULL == fFunctions.fCmdClearAttachments || |
| 303 | NULL == fFunctions.fCmdResolveImage || |
| 304 | NULL == fFunctions.fCmdSetEvent || |
| 305 | NULL == fFunctions.fCmdResetEvent || |
| 306 | NULL == fFunctions.fCmdWaitEvents || |
| 307 | NULL == fFunctions.fCmdPipelineBarrier || |
| 308 | NULL == fFunctions.fCmdBeginQuery || |
| 309 | NULL == fFunctions.fCmdEndQuery || |
| 310 | NULL == fFunctions.fCmdResetQueryPool || |
| 311 | NULL == fFunctions.fCmdWriteTimestamp || |
| 312 | NULL == fFunctions.fCmdCopyQueryPoolResults || |
| 313 | NULL == fFunctions.fCmdPushConstants || |
| 314 | NULL == fFunctions.fCmdBeginRenderPass || |
| 315 | NULL == fFunctions.fCmdNextSubpass || |
| 316 | NULL == fFunctions.fCmdEndRenderPass || |
Greg Daniel | fe2965a | 2016-10-11 16:31:05 -0400 | [diff] [blame] | 317 | NULL == fFunctions.fCmdExecuteCommands) { |
| 318 | RETURN_FALSE_INTERFACE |
| 319 | } |
jvanverth | e50f3e7 | 2016-03-28 07:03:06 -0700 | [diff] [blame] | 320 | |
Greg Daniel | fe2965a | 2016-10-11 16:31:05 -0400 | [diff] [blame] | 321 | if (extensionFlags & kEXT_debug_report_GrVkExtensionFlag) { |
| 322 | if (NULL == fFunctions.fCreateDebugReportCallbackEXT || |
| 323 | NULL == fFunctions.fDebugReportMessageEXT || |
| 324 | NULL == fFunctions.fDestroyDebugReportCallbackEXT) { |
| 325 | RETURN_FALSE_INTERFACE |
| 326 | } |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 327 | } |
| 328 | return true; |
| 329 | } |
Greg Daniel | fe2965a | 2016-10-11 16:31:05 -0400 | [diff] [blame] | 330 | |