Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 1 | #include <hardware/hwvulkan.h> |
| 2 | |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 3 | #include <array> |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 4 | #include <algorithm> |
Jesse Hall | bde8ee3 | 2015-09-01 16:24:29 -0700 | [diff] [blame] | 5 | #include <inttypes.h> |
| 6 | #include <string.h> |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 7 | |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 8 | // #define LOG_NDEBUG 0 |
| 9 | #include <log/log.h> |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 10 | #include <utils/Errors.h> |
| 11 | |
| 12 | #include "null_driver.h" |
| 13 | |
| 14 | using namespace null_driver; |
| 15 | |
| 16 | struct VkPhysicalDevice_T { |
| 17 | hwvulkan_dispatch_t dispatch; |
| 18 | }; |
| 19 | |
| 20 | struct VkInstance_T { |
| 21 | hwvulkan_dispatch_t dispatch; |
| 22 | const VkAllocCallbacks* alloc; |
| 23 | VkPhysicalDevice_T physical_device; |
| 24 | }; |
| 25 | |
| 26 | struct VkQueue_T { |
| 27 | hwvulkan_dispatch_t dispatch; |
| 28 | }; |
| 29 | |
| 30 | struct VkCmdBuffer_T { |
| 31 | hwvulkan_dispatch_t dispatch; |
| 32 | }; |
| 33 | |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 34 | namespace { |
| 35 | // Handles for non-dispatchable objects are either pointers, or arbitrary |
| 36 | // 64-bit non-zero values. We only use pointers when we need to keep state for |
| 37 | // the object even in a null driver. For the rest, we form a handle as: |
| 38 | // [63:63] = 1 to distinguish from pointer handles* |
| 39 | // [62:56] = non-zero handle type enum value |
| 40 | // [55: 0] = per-handle-type incrementing counter |
| 41 | // * This works because virtual addresses with the high bit set are reserved |
| 42 | // for kernel data in all ABIs we run on. |
| 43 | // |
| 44 | // We never reclaim handles on vkDestroy*. It's not even necessary for us to |
| 45 | // have distinct handles for live objects, and practically speaking we won't |
| 46 | // ever create 2^56 objects of the same type from a single VkDevice in a null |
| 47 | // driver. |
| 48 | // |
| 49 | // Using a namespace here instead of 'enum class' since we want scoped |
| 50 | // constants but also want implicit conversions to integral types. |
| 51 | namespace HandleType { |
Jesse Hall | c7a6eb5 | 2015-08-31 12:52:03 -0700 | [diff] [blame] | 52 | enum Enum { |
| 53 | kAttachmentView, |
| 54 | kBufferView, |
| 55 | kCmdPool, |
| 56 | kDescriptorPool, |
| 57 | kDescriptorSet, |
| 58 | kDescriptorSetLayout, |
| 59 | kDynamicColorBlendState, |
| 60 | kDynamicDepthStencilState, |
| 61 | kDynamicRasterState, |
| 62 | kDynamicViewportState, |
| 63 | kEvent, |
| 64 | kFence, |
| 65 | kFramebuffer, |
| 66 | kImageView, |
| 67 | kPipeline, |
| 68 | kPipelineCache, |
| 69 | kPipelineLayout, |
| 70 | kQueryPool, |
| 71 | kRenderPass, |
| 72 | kSampler, |
| 73 | kSemaphore, |
| 74 | kShader, |
| 75 | kShaderModule, |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 76 | |
Jesse Hall | c7a6eb5 | 2015-08-31 12:52:03 -0700 | [diff] [blame] | 77 | kNumTypes |
| 78 | }; |
| 79 | } // namespace HandleType |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 80 | uint64_t AllocHandle(VkDevice device, HandleType::Enum type); |
Jesse Hall | bde8ee3 | 2015-09-01 16:24:29 -0700 | [diff] [blame] | 81 | |
| 82 | const VkDeviceSize kMaxDeviceMemory = VkDeviceSize(INTPTR_MAX) + 1; |
| 83 | |
Jesse Hall | c7a6eb5 | 2015-08-31 12:52:03 -0700 | [diff] [blame] | 84 | } // anonymous namespace |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 85 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 86 | struct VkDevice_T { |
| 87 | hwvulkan_dispatch_t dispatch; |
| 88 | VkInstance_T* instance; |
| 89 | VkQueue_T queue; |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 90 | std::array<uint64_t, HandleType::kNumTypes> next_handle; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 91 | }; |
| 92 | |
| 93 | // ----------------------------------------------------------------------------- |
| 94 | // Declare HAL_MODULE_INFO_SYM early so it can be referenced by nulldrv_device |
| 95 | // later. |
| 96 | |
| 97 | namespace { |
| 98 | int OpenDevice(const hw_module_t* module, const char* id, hw_device_t** device); |
| 99 | hw_module_methods_t nulldrv_module_methods = {.open = OpenDevice}; |
| 100 | } // namespace |
| 101 | |
| 102 | #pragma clang diagnostic push |
| 103 | #pragma clang diagnostic ignored "-Wmissing-variable-declarations" |
| 104 | __attribute__((visibility("default"))) hwvulkan_module_t HAL_MODULE_INFO_SYM = { |
| 105 | .common = |
| 106 | { |
| 107 | .tag = HARDWARE_MODULE_TAG, |
| 108 | .module_api_version = HWVULKAN_MODULE_API_VERSION_0_1, |
| 109 | .hal_api_version = HARDWARE_HAL_API_VERSION, |
| 110 | .id = HWVULKAN_HARDWARE_MODULE_ID, |
| 111 | .name = "Null Vulkan Driver", |
| 112 | .author = "The Android Open Source Project", |
| 113 | .methods = &nulldrv_module_methods, |
| 114 | }, |
| 115 | }; |
| 116 | #pragma clang diagnostic pop |
| 117 | |
| 118 | // ----------------------------------------------------------------------------- |
| 119 | |
| 120 | namespace { |
| 121 | |
| 122 | VkResult CreateInstance(const VkInstanceCreateInfo* create_info, |
| 123 | VkInstance* out_instance) { |
| 124 | VkInstance_T* instance = |
| 125 | static_cast<VkInstance_T*>(create_info->pAllocCb->pfnAlloc( |
| 126 | create_info->pAllocCb->pUserData, sizeof(VkInstance_T), |
| 127 | alignof(VkInstance_T), VK_SYSTEM_ALLOC_TYPE_API_OBJECT)); |
| 128 | if (!instance) |
| 129 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 130 | |
| 131 | instance->dispatch.magic = HWVULKAN_DISPATCH_MAGIC; |
| 132 | instance->alloc = create_info->pAllocCb; |
| 133 | instance->physical_device.dispatch.magic = HWVULKAN_DISPATCH_MAGIC; |
| 134 | |
| 135 | *out_instance = instance; |
| 136 | return VK_SUCCESS; |
| 137 | } |
| 138 | |
| 139 | int CloseDevice(struct hw_device_t* /*device*/) { |
| 140 | // nothing to do - opening a device doesn't allocate any resources |
| 141 | return 0; |
| 142 | } |
| 143 | |
| 144 | hwvulkan_device_t nulldrv_device = { |
| 145 | .common = |
| 146 | { |
| 147 | .tag = HARDWARE_DEVICE_TAG, |
| 148 | .version = HWVULKAN_DEVICE_API_VERSION_0_1, |
| 149 | .module = &HAL_MODULE_INFO_SYM.common, |
| 150 | .close = CloseDevice, |
| 151 | }, |
| 152 | .GetGlobalExtensionProperties = GetGlobalExtensionProperties, |
| 153 | .CreateInstance = CreateInstance, |
| 154 | .GetInstanceProcAddr = GetInstanceProcAddr}; |
| 155 | |
| 156 | int OpenDevice(const hw_module_t* /*module*/, |
| 157 | const char* id, |
| 158 | hw_device_t** device) { |
| 159 | if (strcmp(id, HWVULKAN_DEVICE_0) == 0) { |
| 160 | *device = &nulldrv_device.common; |
| 161 | return 0; |
| 162 | } |
| 163 | return -ENOENT; |
| 164 | } |
| 165 | |
| 166 | VkInstance_T* GetInstanceFromPhysicalDevice( |
| 167 | VkPhysicalDevice_T* physical_device) { |
| 168 | return reinterpret_cast<VkInstance_T*>( |
| 169 | reinterpret_cast<uintptr_t>(physical_device) - |
| 170 | offsetof(VkInstance_T, physical_device)); |
| 171 | } |
| 172 | |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 173 | uint64_t AllocHandle(VkDevice device, HandleType::Enum type) { |
| 174 | const uint64_t kHandleMask = (UINT64_C(1) << 56) - 1; |
| 175 | ALOGE_IF(device->next_handle[type] == kHandleMask, |
Jesse Hall | bde8ee3 | 2015-09-01 16:24:29 -0700 | [diff] [blame] | 176 | "non-dispatchable handles of type=%u are about to overflow", type); |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 177 | return (UINT64_C(1) << 63) | ((uint64_t(type) & 0x7) << 56) | |
| 178 | (device->next_handle[type]++ & kHandleMask); |
| 179 | } |
| 180 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 181 | } // namespace |
| 182 | |
| 183 | namespace null_driver { |
| 184 | |
Jesse Hall | f657874 | 2015-08-29 17:06:12 +0100 | [diff] [blame] | 185 | template <typename HandleT> |
| 186 | struct HandleTraits {}; |
| 187 | |
| 188 | template <typename HandleT> |
| 189 | typename HandleTraits<HandleT>::PointerType GetObjectFromHandle( |
| 190 | const HandleT& h) { |
| 191 | return reinterpret_cast<typename HandleTraits<HandleT>::PointerType>( |
| 192 | uintptr_t(h.handle)); |
| 193 | } |
| 194 | |
| 195 | template <typename T> |
| 196 | typename T::HandleType GetHandleToObject(const T* obj) { |
| 197 | return typename T::HandleType(reinterpret_cast<uintptr_t>(obj)); |
| 198 | } |
| 199 | |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 200 | // ----------------------------------------------------------------------------- |
| 201 | // Global |
| 202 | |
| 203 | VkResult GetGlobalExtensionProperties(const char*, |
| 204 | uint32_t* count, |
| 205 | VkExtensionProperties*) { |
| 206 | *count = 0; |
| 207 | return VK_SUCCESS; |
| 208 | } |
| 209 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 210 | PFN_vkVoidFunction GetInstanceProcAddr(VkInstance, const char* name) { |
| 211 | PFN_vkVoidFunction proc = LookupInstanceProcAddr(name); |
| 212 | if (!proc && strcmp(name, "vkGetDeviceProcAddr") == 0) |
| 213 | proc = reinterpret_cast<PFN_vkVoidFunction>(GetDeviceProcAddr); |
| 214 | return proc; |
| 215 | } |
| 216 | |
| 217 | PFN_vkVoidFunction GetDeviceProcAddr(VkDevice, const char* name) { |
| 218 | return LookupDeviceProcAddr(name); |
| 219 | } |
| 220 | |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 221 | // ----------------------------------------------------------------------------- |
| 222 | // Instance |
| 223 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 224 | VkResult DestroyInstance(VkInstance instance) { |
| 225 | instance->alloc->pfnFree(instance->alloc->pUserData, instance); |
| 226 | return VK_SUCCESS; |
| 227 | } |
| 228 | |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 229 | // ----------------------------------------------------------------------------- |
| 230 | // PhysicalDevice |
| 231 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 232 | VkResult EnumeratePhysicalDevices(VkInstance instance, |
| 233 | uint32_t* physical_device_count, |
| 234 | VkPhysicalDevice* physical_devices) { |
| 235 | if (physical_devices && *physical_device_count >= 1) |
| 236 | physical_devices[0] = &instance->physical_device; |
| 237 | *physical_device_count = 1; |
| 238 | return VK_SUCCESS; |
| 239 | } |
| 240 | |
| 241 | VkResult GetPhysicalDeviceProperties(VkPhysicalDevice, |
| 242 | VkPhysicalDeviceProperties* properties) { |
| 243 | properties->apiVersion = VK_API_VERSION; |
| 244 | properties->driverVersion = VK_MAKE_VERSION(0, 0, 1); |
| 245 | properties->vendorId = 0xC0DE; |
| 246 | properties->deviceId = 0xCAFE; |
| 247 | properties->deviceType = VK_PHYSICAL_DEVICE_TYPE_OTHER; |
| 248 | strcpy(properties->deviceName, "Android Vulkan Null Driver"); |
| 249 | memset(properties->pipelineCacheUUID, 0, |
| 250 | sizeof(properties->pipelineCacheUUID)); |
| 251 | return VK_SUCCESS; |
| 252 | } |
| 253 | |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 254 | VkResult GetPhysicalDeviceMemoryProperties( |
| 255 | VkPhysicalDevice, |
| 256 | VkPhysicalDeviceMemoryProperties* properties) { |
| 257 | properties->memoryTypeCount = 1; |
| 258 | properties->memoryTypes[0].propertyFlags = |
| 259 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; |
| 260 | properties->memoryTypes[0].heapIndex = 0; |
| 261 | properties->memoryHeapCount = 1; |
Jesse Hall | bde8ee3 | 2015-09-01 16:24:29 -0700 | [diff] [blame] | 262 | properties->memoryHeaps[0].size = kMaxDeviceMemory; |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 263 | properties->memoryHeaps[0].flags = VK_MEMORY_HEAP_HOST_LOCAL; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 264 | return VK_SUCCESS; |
| 265 | } |
| 266 | |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 267 | // ----------------------------------------------------------------------------- |
| 268 | // Device |
| 269 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 270 | VkResult CreateDevice(VkPhysicalDevice physical_device, |
| 271 | const VkDeviceCreateInfo*, |
| 272 | VkDevice* out_device) { |
| 273 | VkInstance_T* instance = GetInstanceFromPhysicalDevice(physical_device); |
| 274 | VkDevice_T* device = static_cast<VkDevice_T*>(instance->alloc->pfnAlloc( |
| 275 | instance->alloc->pUserData, sizeof(VkDevice_T), alignof(VkDevice_T), |
| 276 | VK_SYSTEM_ALLOC_TYPE_API_OBJECT)); |
| 277 | if (!device) |
| 278 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 279 | |
| 280 | device->dispatch.magic = HWVULKAN_DISPATCH_MAGIC; |
| 281 | device->instance = instance; |
| 282 | device->queue.dispatch.magic = HWVULKAN_DISPATCH_MAGIC; |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 283 | std::fill(device->next_handle.begin(), device->next_handle.end(), |
| 284 | UINT64_C(0)); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 285 | |
| 286 | *out_device = device; |
| 287 | return VK_SUCCESS; |
| 288 | } |
| 289 | |
| 290 | VkResult DestroyDevice(VkDevice device) { |
| 291 | if (!device) |
| 292 | return VK_SUCCESS; |
| 293 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 294 | alloc->pfnFree(alloc->pUserData, device); |
| 295 | return VK_SUCCESS; |
| 296 | } |
| 297 | |
| 298 | VkResult GetDeviceQueue(VkDevice device, uint32_t, uint32_t, VkQueue* queue) { |
| 299 | *queue = &device->queue; |
| 300 | return VK_SUCCESS; |
| 301 | } |
| 302 | |
| 303 | // ----------------------------------------------------------------------------- |
Jesse Hall | c7a6eb5 | 2015-08-31 12:52:03 -0700 | [diff] [blame] | 304 | // CmdBuffer |
| 305 | |
| 306 | VkResult CreateCommandBuffer(VkDevice device, |
| 307 | const VkCmdBufferCreateInfo*, |
| 308 | VkCmdBuffer* out_cmdbuf) { |
| 309 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 310 | VkCmdBuffer_T* cmdbuf = static_cast<VkCmdBuffer_T*>(alloc->pfnAlloc( |
| 311 | alloc->pUserData, sizeof(VkCmdBuffer_T), alignof(VkCmdBuffer_T), |
| 312 | VK_SYSTEM_ALLOC_TYPE_API_OBJECT)); |
| 313 | if (!cmdbuf) |
| 314 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 315 | cmdbuf->dispatch.magic = HWVULKAN_DISPATCH_MAGIC; |
| 316 | *out_cmdbuf = cmdbuf; |
| 317 | return VK_SUCCESS; |
| 318 | } |
| 319 | |
| 320 | VkResult DestroyCommandBuffer(VkDevice device, VkCmdBuffer cmdbuf) { |
| 321 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 322 | alloc->pfnFree(alloc->pUserData, cmdbuf); |
| 323 | return VK_SUCCESS; |
| 324 | } |
| 325 | |
| 326 | // ----------------------------------------------------------------------------- |
Jesse Hall | 2077ce0 | 2015-08-29 18:10:59 +0100 | [diff] [blame] | 327 | // DeviceMemory |
| 328 | |
| 329 | struct DeviceMemory { |
| 330 | typedef VkDeviceMemory HandleType; |
| 331 | VkDeviceSize size; |
| 332 | alignas(16) uint8_t data[0]; |
| 333 | }; |
| 334 | template <> |
| 335 | struct HandleTraits<VkDeviceMemory> { |
| 336 | typedef DeviceMemory* PointerType; |
| 337 | }; |
| 338 | |
| 339 | VkResult AllocMemory(VkDevice device, |
| 340 | const VkMemoryAllocInfo* alloc_info, |
| 341 | VkDeviceMemory* mem_handle) { |
| 342 | if (SIZE_MAX - sizeof(DeviceMemory) <= alloc_info->allocationSize) |
| 343 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 344 | |
| 345 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 346 | size_t size = sizeof(DeviceMemory) + size_t(alloc_info->allocationSize); |
| 347 | DeviceMemory* mem = static_cast<DeviceMemory*>( |
| 348 | alloc->pfnAlloc(alloc->pUserData, size, alignof(DeviceMemory), |
| 349 | VK_SYSTEM_ALLOC_TYPE_API_OBJECT)); |
| 350 | if (!mem) |
| 351 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 352 | mem->size = size; |
| 353 | *mem_handle = GetHandleToObject(mem); |
| 354 | return VK_SUCCESS; |
| 355 | } |
| 356 | |
| 357 | VkResult FreeMemory(VkDevice device, VkDeviceMemory mem_handle) { |
| 358 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 359 | DeviceMemory* mem = GetObjectFromHandle(mem_handle); |
| 360 | alloc->pfnFree(alloc->pUserData, mem); |
| 361 | return VK_SUCCESS; |
| 362 | } |
| 363 | |
| 364 | VkResult MapMemory(VkDevice, |
| 365 | VkDeviceMemory mem_handle, |
| 366 | VkDeviceSize offset, |
| 367 | VkDeviceSize, |
| 368 | VkMemoryMapFlags, |
| 369 | void** out_ptr) { |
| 370 | DeviceMemory* mem = GetObjectFromHandle(mem_handle); |
| 371 | *out_ptr = &mem->data[0] + offset; |
| 372 | return VK_SUCCESS; |
| 373 | } |
| 374 | |
| 375 | // ----------------------------------------------------------------------------- |
Jesse Hall | f657874 | 2015-08-29 17:06:12 +0100 | [diff] [blame] | 376 | // Buffer |
| 377 | |
| 378 | struct Buffer { |
| 379 | typedef VkBuffer HandleType; |
| 380 | VkDeviceSize size; |
| 381 | }; |
| 382 | template <> |
| 383 | struct HandleTraits<VkBuffer> { |
| 384 | typedef Buffer* PointerType; |
| 385 | }; |
| 386 | |
| 387 | VkResult CreateBuffer(VkDevice device, |
| 388 | const VkBufferCreateInfo* create_info, |
| 389 | VkBuffer* buffer_handle) { |
Jesse Hall | bde8ee3 | 2015-09-01 16:24:29 -0700 | [diff] [blame] | 390 | ALOGW_IF(create_info->size > kMaxDeviceMemory, |
| 391 | "CreateBuffer: requested size 0x%" PRIx64 |
| 392 | " exceeds max device memory size 0x%" PRIx64, |
| 393 | create_info->size, kMaxDeviceMemory); |
| 394 | |
Jesse Hall | f657874 | 2015-08-29 17:06:12 +0100 | [diff] [blame] | 395 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 396 | Buffer* buffer = static_cast<Buffer*>( |
| 397 | alloc->pfnAlloc(alloc->pUserData, sizeof(Buffer), alignof(Buffer), |
| 398 | VK_SYSTEM_ALLOC_TYPE_API_OBJECT)); |
| 399 | if (!buffer) |
| 400 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 401 | buffer->size = create_info->size; |
| 402 | *buffer_handle = GetHandleToObject(buffer); |
| 403 | return VK_SUCCESS; |
| 404 | } |
| 405 | |
| 406 | VkResult GetBufferMemoryRequirements(VkDevice, |
| 407 | VkBuffer buffer_handle, |
| 408 | VkMemoryRequirements* requirements) { |
| 409 | Buffer* buffer = GetObjectFromHandle(buffer_handle); |
| 410 | requirements->size = buffer->size; |
| 411 | requirements->alignment = 16; // allow fast Neon/SSE memcpy |
| 412 | requirements->memoryTypeBits = 0x1; |
| 413 | return VK_SUCCESS; |
| 414 | } |
| 415 | |
| 416 | VkResult DestroyBuffer(VkDevice device, VkBuffer buffer_handle) { |
| 417 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 418 | Buffer* buffer = GetObjectFromHandle(buffer_handle); |
| 419 | alloc->pfnFree(alloc->pUserData, buffer); |
| 420 | return VK_SUCCESS; |
| 421 | } |
| 422 | |
| 423 | // ----------------------------------------------------------------------------- |
Jesse Hall | 85c05b6 | 2015-09-01 18:07:41 -0700 | [diff] [blame^] | 424 | // Image |
| 425 | |
| 426 | struct Image { |
| 427 | typedef VkImage HandleType; |
| 428 | VkDeviceSize size; |
| 429 | }; |
| 430 | template <> |
| 431 | struct HandleTraits<VkImage> { |
| 432 | typedef Image* PointerType; |
| 433 | }; |
| 434 | |
| 435 | VkResult CreateImage(VkDevice device, |
| 436 | const VkImageCreateInfo* create_info, |
| 437 | VkImage* image_handle) { |
| 438 | if (create_info->imageType != VK_IMAGE_TYPE_2D || |
| 439 | create_info->format != VK_FORMAT_R8G8B8A8_UNORM || |
| 440 | create_info->mipLevels != 1) { |
| 441 | ALOGE("CreateImage: not yet implemented: type=%d format=%d mips=%u", |
| 442 | create_info->imageType, create_info->format, |
| 443 | create_info->mipLevels); |
| 444 | return VK_ERROR_UNAVAILABLE; |
| 445 | } |
| 446 | |
| 447 | VkDeviceSize size = |
| 448 | VkDeviceSize(create_info->extent.width * create_info->extent.height) * |
| 449 | create_info->arraySize * create_info->samples * 4u; |
| 450 | ALOGW_IF(size > kMaxDeviceMemory, |
| 451 | "CreateImage: image size 0x%" PRIx64 |
| 452 | " exceeds max device memory size 0x%" PRIx64, |
| 453 | size, kMaxDeviceMemory); |
| 454 | |
| 455 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 456 | Image* image = static_cast<Image*>( |
| 457 | alloc->pfnAlloc(alloc->pUserData, sizeof(Image), alignof(Image), |
| 458 | VK_SYSTEM_ALLOC_TYPE_API_OBJECT)); |
| 459 | if (!image) |
| 460 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 461 | image->size = size; |
| 462 | *image_handle = GetHandleToObject(image); |
| 463 | return VK_SUCCESS; |
| 464 | } |
| 465 | |
| 466 | VkResult GetImageMemoryRequirements(VkDevice, |
| 467 | VkImage image_handle, |
| 468 | VkMemoryRequirements* requirements) { |
| 469 | Image* image = GetObjectFromHandle(image_handle); |
| 470 | requirements->size = image->size; |
| 471 | requirements->alignment = 16; // allow fast Neon/SSE memcpy |
| 472 | requirements->memoryTypeBits = 0x1; |
| 473 | return VK_SUCCESS; |
| 474 | } |
| 475 | |
| 476 | VkResult DestroyImage(VkDevice device, VkImage image_handle) { |
| 477 | const VkAllocCallbacks* alloc = device->instance->alloc; |
| 478 | Image* image = GetObjectFromHandle(image_handle); |
| 479 | alloc->pfnFree(alloc->pUserData, image); |
| 480 | return VK_SUCCESS; |
| 481 | } |
| 482 | |
| 483 | // ----------------------------------------------------------------------------- |
Jesse Hall | f8faf0c | 2015-08-31 11:34:32 -0700 | [diff] [blame] | 484 | // No-op types |
| 485 | |
| 486 | VkResult CreateAttachmentView(VkDevice device, |
| 487 | const VkAttachmentViewCreateInfo*, |
| 488 | VkAttachmentView* view) { |
| 489 | *view = AllocHandle(device, HandleType::kAttachmentView); |
| 490 | return VK_SUCCESS; |
| 491 | } |
| 492 | |
| 493 | VkResult CreateBufferView(VkDevice device, |
| 494 | const VkBufferViewCreateInfo*, |
| 495 | VkBufferView* view) { |
| 496 | *view = AllocHandle(device, HandleType::kBufferView); |
| 497 | return VK_SUCCESS; |
| 498 | } |
| 499 | |
| 500 | VkResult CreateCommandPool(VkDevice device, |
| 501 | const VkCmdPoolCreateInfo*, |
| 502 | VkCmdPool* pool) { |
| 503 | *pool = AllocHandle(device, HandleType::kCmdPool); |
| 504 | return VK_SUCCESS; |
| 505 | } |
| 506 | |
| 507 | VkResult CreateDescriptorPool(VkDevice device, |
| 508 | VkDescriptorPoolUsage, |
| 509 | uint32_t, |
| 510 | const VkDescriptorPoolCreateInfo*, |
| 511 | VkDescriptorPool* pool) { |
| 512 | *pool = AllocHandle(device, HandleType::kDescriptorPool); |
| 513 | return VK_SUCCESS; |
| 514 | } |
| 515 | |
| 516 | VkResult AllocDescriptorSets(VkDevice device, |
| 517 | VkDescriptorPool, |
| 518 | VkDescriptorSetUsage, |
| 519 | uint32_t count, |
| 520 | const VkDescriptorSetLayout*, |
| 521 | VkDescriptorSet* sets, |
| 522 | uint32_t* out_count) { |
| 523 | for (uint32_t i = 0; i < count; i++) |
| 524 | sets[i] = AllocHandle(device, HandleType::kDescriptorSet); |
| 525 | *out_count = count; |
| 526 | return VK_SUCCESS; |
| 527 | } |
| 528 | |
| 529 | VkResult CreateDescriptorSetLayout(VkDevice device, |
| 530 | const VkDescriptorSetLayoutCreateInfo*, |
| 531 | VkDescriptorSetLayout* layout) { |
| 532 | *layout = AllocHandle(device, HandleType::kDescriptorSetLayout); |
| 533 | return VK_SUCCESS; |
| 534 | } |
| 535 | |
| 536 | VkResult CreateDynamicColorBlendState(VkDevice device, |
| 537 | const VkDynamicColorBlendStateCreateInfo*, |
| 538 | VkDynamicColorBlendState* state) { |
| 539 | *state = AllocHandle(device, HandleType::kDynamicColorBlendState); |
| 540 | return VK_SUCCESS; |
| 541 | } |
| 542 | |
| 543 | VkResult CreateDynamicDepthStencilState( |
| 544 | VkDevice device, |
| 545 | const VkDynamicDepthStencilStateCreateInfo*, |
| 546 | VkDynamicDepthStencilState* state) { |
| 547 | *state = AllocHandle(device, HandleType::kDynamicDepthStencilState); |
| 548 | return VK_SUCCESS; |
| 549 | } |
| 550 | |
| 551 | VkResult CreateDynamicRasterState(VkDevice device, |
| 552 | const VkDynamicRasterStateCreateInfo*, |
| 553 | VkDynamicRasterState* state) { |
| 554 | *state = AllocHandle(device, HandleType::kDynamicRasterState); |
| 555 | return VK_SUCCESS; |
| 556 | } |
| 557 | |
| 558 | VkResult CreateDynamicViewportState(VkDevice device, |
| 559 | const VkDynamicViewportStateCreateInfo*, |
| 560 | VkDynamicViewportState* state) { |
| 561 | *state = AllocHandle(device, HandleType::kDynamicViewportState); |
| 562 | return VK_SUCCESS; |
| 563 | } |
| 564 | |
| 565 | VkResult CreateEvent(VkDevice device, |
| 566 | const VkEventCreateInfo*, |
| 567 | VkEvent* event) { |
| 568 | *event = AllocHandle(device, HandleType::kEvent); |
| 569 | return VK_SUCCESS; |
| 570 | } |
| 571 | |
| 572 | VkResult CreateFence(VkDevice device, |
| 573 | const VkFenceCreateInfo*, |
| 574 | VkFence* fence) { |
| 575 | *fence = AllocHandle(device, HandleType::kFence); |
| 576 | return VK_SUCCESS; |
| 577 | } |
| 578 | |
| 579 | VkResult CreateFramebuffer(VkDevice device, |
| 580 | const VkFramebufferCreateInfo*, |
| 581 | VkFramebuffer* framebuffer) { |
| 582 | *framebuffer = AllocHandle(device, HandleType::kFramebuffer); |
| 583 | return VK_SUCCESS; |
| 584 | } |
| 585 | |
| 586 | VkResult CreateImageView(VkDevice device, |
| 587 | const VkImageViewCreateInfo*, |
| 588 | VkImageView* view) { |
| 589 | *view = AllocHandle(device, HandleType::kImageView); |
| 590 | return VK_SUCCESS; |
| 591 | } |
| 592 | |
| 593 | VkResult CreateGraphicsPipelines(VkDevice device, |
| 594 | VkPipelineCache, |
| 595 | uint32_t count, |
| 596 | const VkGraphicsPipelineCreateInfo*, |
| 597 | VkPipeline* pipelines) { |
| 598 | for (uint32_t i = 0; i < count; i++) |
| 599 | pipelines[i] = AllocHandle(device, HandleType::kPipeline); |
| 600 | return VK_SUCCESS; |
| 601 | } |
| 602 | |
| 603 | VkResult CreateComputePipelines(VkDevice device, |
| 604 | VkPipelineCache, |
| 605 | uint32_t count, |
| 606 | const VkComputePipelineCreateInfo*, |
| 607 | VkPipeline* pipelines) { |
| 608 | for (uint32_t i = 0; i < count; i++) |
| 609 | pipelines[i] = AllocHandle(device, HandleType::kPipeline); |
| 610 | return VK_SUCCESS; |
| 611 | } |
| 612 | |
| 613 | VkResult CreatePipelineCache(VkDevice device, |
| 614 | const VkPipelineCacheCreateInfo*, |
| 615 | VkPipelineCache* cache) { |
| 616 | *cache = AllocHandle(device, HandleType::kPipelineCache); |
| 617 | return VK_SUCCESS; |
| 618 | } |
| 619 | |
| 620 | VkResult CreatePipelineLayout(VkDevice device, |
| 621 | const VkPipelineLayoutCreateInfo*, |
| 622 | VkPipelineLayout* layout) { |
| 623 | *layout = AllocHandle(device, HandleType::kPipelineLayout); |
| 624 | return VK_SUCCESS; |
| 625 | } |
| 626 | |
| 627 | VkResult CreateQueryPool(VkDevice device, |
| 628 | const VkQueryPoolCreateInfo*, |
| 629 | VkQueryPool* pool) { |
| 630 | *pool = AllocHandle(device, HandleType::kQueryPool); |
| 631 | return VK_SUCCESS; |
| 632 | } |
| 633 | |
| 634 | VkResult CreateRenderPass(VkDevice device, |
| 635 | const VkRenderPassCreateInfo*, |
| 636 | VkRenderPass* renderpass) { |
| 637 | *renderpass = AllocHandle(device, HandleType::kRenderPass); |
| 638 | return VK_SUCCESS; |
| 639 | } |
| 640 | |
| 641 | VkResult CreateSampler(VkDevice device, |
| 642 | const VkSamplerCreateInfo*, |
| 643 | VkSampler* sampler) { |
| 644 | *sampler = AllocHandle(device, HandleType::kSampler); |
| 645 | return VK_SUCCESS; |
| 646 | } |
| 647 | |
| 648 | VkResult CreateSemaphore(VkDevice device, |
| 649 | const VkSemaphoreCreateInfo*, |
| 650 | VkSemaphore* semaphore) { |
| 651 | *semaphore = AllocHandle(device, HandleType::kSemaphore); |
| 652 | return VK_SUCCESS; |
| 653 | } |
| 654 | |
| 655 | VkResult CreateShader(VkDevice device, |
| 656 | const VkShaderCreateInfo*, |
| 657 | VkShader* shader) { |
| 658 | *shader = AllocHandle(device, HandleType::kShader); |
| 659 | return VK_SUCCESS; |
| 660 | } |
| 661 | |
| 662 | VkResult CreateShaderModule(VkDevice device, |
| 663 | const VkShaderModuleCreateInfo*, |
| 664 | VkShaderModule* module) { |
| 665 | *module = AllocHandle(device, HandleType::kShaderModule); |
| 666 | return VK_SUCCESS; |
| 667 | } |
| 668 | |
| 669 | // ----------------------------------------------------------------------------- |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 670 | // No-op entrypoints |
| 671 | |
| 672 | // clang-format off |
| 673 | #pragma clang diagnostic push |
| 674 | #pragma clang diagnostic ignored "-Wunused-parameter" |
| 675 | |
| 676 | VkResult GetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 677 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 678 | return VK_SUCCESS; |
| 679 | } |
| 680 | |
| 681 | VkResult GetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 682 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 683 | return VK_SUCCESS; |
| 684 | } |
| 685 | |
| 686 | VkResult GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 687 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 688 | return VK_SUCCESS; |
| 689 | } |
| 690 | |
| 691 | VkResult GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 692 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 693 | return VK_SUCCESS; |
| 694 | } |
| 695 | |
| 696 | VkResult GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageFormatProperties* pImageFormatProperties) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 697 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 698 | return VK_SUCCESS; |
| 699 | } |
| 700 | |
| 701 | VkResult GetPhysicalDeviceLimits(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 702 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 703 | return VK_SUCCESS; |
| 704 | } |
| 705 | |
| 706 | VkResult GetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 707 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 708 | return VK_SUCCESS; |
| 709 | } |
| 710 | |
| 711 | VkResult GetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 712 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 713 | return VK_SUCCESS; |
| 714 | } |
| 715 | |
| 716 | VkResult GetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 717 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 718 | return VK_SUCCESS; |
| 719 | } |
| 720 | |
| 721 | VkResult QueueSubmit(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence) { |
| 722 | return VK_SUCCESS; |
| 723 | } |
| 724 | |
| 725 | VkResult QueueWaitIdle(VkQueue queue) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 726 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 727 | return VK_SUCCESS; |
| 728 | } |
| 729 | |
| 730 | VkResult DeviceWaitIdle(VkDevice device) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 731 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 732 | return VK_SUCCESS; |
| 733 | } |
| 734 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 735 | VkResult UnmapMemory(VkDevice device, VkDeviceMemory mem) { |
| 736 | return VK_SUCCESS; |
| 737 | } |
| 738 | |
| 739 | VkResult FlushMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 740 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 741 | return VK_SUCCESS; |
| 742 | } |
| 743 | |
| 744 | VkResult InvalidateMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 745 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 746 | return VK_SUCCESS; |
| 747 | } |
| 748 | |
| 749 | VkResult GetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 750 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 751 | return VK_SUCCESS; |
| 752 | } |
| 753 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 754 | VkResult BindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memOffset) { |
| 755 | return VK_SUCCESS; |
| 756 | } |
| 757 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 758 | VkResult BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize memOffset) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 759 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 760 | return VK_SUCCESS; |
| 761 | } |
| 762 | |
| 763 | VkResult GetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pNumRequirements, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 764 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 765 | return VK_SUCCESS; |
| 766 | } |
| 767 | |
| 768 | VkResult GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, uint32_t samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pNumProperties, VkSparseImageFormatProperties* pProperties) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 769 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 770 | return VK_SUCCESS; |
| 771 | } |
| 772 | |
| 773 | VkResult QueueBindSparseBufferMemory(VkQueue queue, VkBuffer buffer, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 774 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 775 | return VK_SUCCESS; |
| 776 | } |
| 777 | |
| 778 | VkResult QueueBindSparseImageOpaqueMemory(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 779 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 780 | return VK_SUCCESS; |
| 781 | } |
| 782 | |
| 783 | VkResult QueueBindSparseImageMemory(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseImageMemoryBindInfo* pBindInfo) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 784 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 785 | return VK_SUCCESS; |
| 786 | } |
| 787 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 788 | VkResult DestroyFence(VkDevice device, VkFence fence) { |
| 789 | return VK_SUCCESS; |
| 790 | } |
| 791 | |
| 792 | VkResult ResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) { |
| 793 | return VK_SUCCESS; |
| 794 | } |
| 795 | |
| 796 | VkResult GetFenceStatus(VkDevice device, VkFence fence) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 797 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 798 | return VK_SUCCESS; |
| 799 | } |
| 800 | |
| 801 | VkResult WaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout) { |
| 802 | return VK_SUCCESS; |
| 803 | } |
| 804 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 805 | VkResult DestroySemaphore(VkDevice device, VkSemaphore semaphore) { |
| 806 | return VK_SUCCESS; |
| 807 | } |
| 808 | |
| 809 | VkResult QueueSignalSemaphore(VkQueue queue, VkSemaphore semaphore) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 810 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 811 | return VK_SUCCESS; |
| 812 | } |
| 813 | |
| 814 | VkResult QueueWaitSemaphore(VkQueue queue, VkSemaphore semaphore) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 815 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 816 | return VK_SUCCESS; |
| 817 | } |
| 818 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 819 | VkResult DestroyEvent(VkDevice device, VkEvent event) { |
| 820 | return VK_SUCCESS; |
| 821 | } |
| 822 | |
| 823 | VkResult GetEventStatus(VkDevice device, VkEvent event) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 824 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 825 | return VK_SUCCESS; |
| 826 | } |
| 827 | |
| 828 | VkResult SetEvent(VkDevice device, VkEvent event) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 829 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 830 | return VK_SUCCESS; |
| 831 | } |
| 832 | |
| 833 | VkResult ResetEvent(VkDevice device, VkEvent event) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 834 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 835 | return VK_SUCCESS; |
| 836 | } |
| 837 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 838 | VkResult DestroyQueryPool(VkDevice device, VkQueryPool queryPool) { |
| 839 | return VK_SUCCESS; |
| 840 | } |
| 841 | |
| 842 | VkResult GetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 843 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 844 | return VK_SUCCESS; |
| 845 | } |
| 846 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 847 | VkResult DestroyBufferView(VkDevice device, VkBufferView bufferView) { |
| 848 | return VK_SUCCESS; |
| 849 | } |
| 850 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 851 | VkResult GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 852 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 853 | return VK_SUCCESS; |
| 854 | } |
| 855 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 856 | VkResult DestroyImageView(VkDevice device, VkImageView imageView) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 857 | return VK_SUCCESS; |
| 858 | } |
| 859 | |
| 860 | VkResult DestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 861 | return VK_SUCCESS; |
| 862 | } |
| 863 | |
| 864 | VkResult DestroyShaderModule(VkDevice device, VkShaderModule shaderModule) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 865 | return VK_SUCCESS; |
| 866 | } |
| 867 | |
| 868 | VkResult DestroyShader(VkDevice device, VkShader shader) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 869 | return VK_SUCCESS; |
| 870 | } |
| 871 | |
| 872 | VkResult DestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) { |
| 873 | return VK_SUCCESS; |
| 874 | } |
| 875 | |
| 876 | size_t GetPipelineCacheSize(VkDevice device, VkPipelineCache pipelineCache) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 877 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 878 | return VK_SUCCESS; |
| 879 | } |
| 880 | |
| 881 | VkResult GetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, void* pData) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 882 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 883 | return VK_SUCCESS; |
| 884 | } |
| 885 | |
| 886 | VkResult MergePipelineCaches(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 887 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 888 | return VK_SUCCESS; |
| 889 | } |
| 890 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 891 | VkResult DestroyPipeline(VkDevice device, VkPipeline pipeline) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 892 | return VK_SUCCESS; |
| 893 | } |
| 894 | |
| 895 | VkResult DestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 896 | return VK_SUCCESS; |
| 897 | } |
| 898 | |
| 899 | VkResult DestroySampler(VkDevice device, VkSampler sampler) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 900 | return VK_SUCCESS; |
| 901 | } |
| 902 | |
| 903 | VkResult DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 904 | return VK_SUCCESS; |
| 905 | } |
| 906 | |
| 907 | VkResult DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) { |
| 908 | return VK_SUCCESS; |
| 909 | } |
| 910 | |
| 911 | VkResult ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 912 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 913 | return VK_SUCCESS; |
| 914 | } |
| 915 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 916 | VkResult UpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 917 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 918 | return VK_SUCCESS; |
| 919 | } |
| 920 | |
| 921 | VkResult FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 922 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 923 | return VK_SUCCESS; |
| 924 | } |
| 925 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 926 | VkResult DestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 927 | return VK_SUCCESS; |
| 928 | } |
| 929 | |
| 930 | VkResult DestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 931 | return VK_SUCCESS; |
| 932 | } |
| 933 | |
| 934 | VkResult DestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 935 | return VK_SUCCESS; |
| 936 | } |
| 937 | |
| 938 | VkResult DestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 939 | return VK_SUCCESS; |
| 940 | } |
| 941 | |
| 942 | VkResult DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) { |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 943 | return VK_SUCCESS; |
| 944 | } |
| 945 | |
| 946 | VkResult DestroyRenderPass(VkDevice device, VkRenderPass renderPass) { |
| 947 | return VK_SUCCESS; |
| 948 | } |
| 949 | |
| 950 | VkResult GetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 951 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 952 | return VK_SUCCESS; |
| 953 | } |
| 954 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 955 | VkResult DestroyCommandPool(VkDevice device, VkCmdPool cmdPool) { |
| 956 | return VK_SUCCESS; |
| 957 | } |
| 958 | |
| 959 | VkResult ResetCommandPool(VkDevice device, VkCmdPool cmdPool, VkCmdPoolResetFlags flags) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 960 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 961 | return VK_SUCCESS; |
| 962 | } |
| 963 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 964 | VkResult BeginCommandBuffer(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo) { |
| 965 | return VK_SUCCESS; |
| 966 | } |
| 967 | |
| 968 | VkResult EndCommandBuffer(VkCmdBuffer cmdBuffer) { |
| 969 | return VK_SUCCESS; |
| 970 | } |
| 971 | |
| 972 | VkResult ResetCommandBuffer(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags) { |
Jesse Hall | 73ab0ac | 2015-08-25 15:09:15 +0100 | [diff] [blame] | 973 | ALOGV("TODO: vk%s", __FUNCTION__); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 974 | return VK_SUCCESS; |
| 975 | } |
| 976 | |
| 977 | void CmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { |
| 978 | } |
| 979 | |
| 980 | void CmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState) { |
| 981 | } |
| 982 | |
| 983 | void CmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState) { |
| 984 | } |
| 985 | |
| 986 | void CmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState) { |
| 987 | } |
| 988 | |
| 989 | void CmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 990 | } |
| 991 | |
| 992 | void CmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { |
| 993 | } |
| 994 | |
| 995 | void CmdBindIndexBuffer(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) { |
| 996 | } |
| 997 | |
| 998 | void CmdBindVertexBuffers(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { |
| 999 | } |
| 1000 | |
| 1001 | void CmdDraw(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) { |
| 1002 | } |
| 1003 | |
| 1004 | void CmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount) { |
| 1005 | } |
| 1006 | |
| 1007 | void CmdDrawIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) { |
| 1008 | } |
| 1009 | |
| 1010 | void CmdDrawIndexedIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) { |
| 1011 | } |
| 1012 | |
| 1013 | void CmdDispatch(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z) { |
| 1014 | } |
| 1015 | |
| 1016 | void CmdDispatchIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset) { |
| 1017 | } |
| 1018 | |
| 1019 | void CmdCopyBuffer(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) { |
| 1020 | } |
| 1021 | |
| 1022 | void CmdCopyImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) { |
| 1023 | } |
| 1024 | |
| 1025 | void CmdBlitImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkTexFilter filter) { |
| 1026 | } |
| 1027 | |
| 1028 | void CmdCopyBufferToImage(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) { |
| 1029 | } |
| 1030 | |
| 1031 | void CmdCopyImageToBuffer(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) { |
| 1032 | } |
| 1033 | |
| 1034 | void CmdUpdateBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData) { |
| 1035 | } |
| 1036 | |
| 1037 | void CmdFillBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data) { |
| 1038 | } |
| 1039 | |
| 1040 | void CmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 1041 | } |
| 1042 | |
| 1043 | void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 1044 | } |
| 1045 | |
| 1046 | void CmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects) { |
| 1047 | } |
| 1048 | |
| 1049 | void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects) { |
| 1050 | } |
| 1051 | |
| 1052 | void CmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) { |
| 1053 | } |
| 1054 | |
| 1055 | void CmdSetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask) { |
| 1056 | } |
| 1057 | |
| 1058 | void CmdResetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask) { |
| 1059 | } |
| 1060 | |
| 1061 | void CmdWaitEvents(VkCmdBuffer cmdBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags destStageMask, uint32_t memBarrierCount, const void* const* ppMemBarriers) { |
| 1062 | } |
| 1063 | |
| 1064 | void CmdPipelineBarrier(VkCmdBuffer cmdBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags destStageMask, VkBool32 byRegion, uint32_t memBarrierCount, const void* const* ppMemBarriers) { |
| 1065 | } |
| 1066 | |
| 1067 | void CmdBeginQuery(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags) { |
| 1068 | } |
| 1069 | |
| 1070 | void CmdEndQuery(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot) { |
| 1071 | } |
| 1072 | |
| 1073 | void CmdResetQueryPool(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount) { |
| 1074 | } |
| 1075 | |
| 1076 | void CmdWriteTimestamp(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset) { |
| 1077 | } |
| 1078 | |
| 1079 | void CmdCopyQueryPoolResults(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkQueryResultFlags flags) { |
| 1080 | } |
| 1081 | |
| 1082 | void CmdPushConstants(VkCmdBuffer cmdBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t start, uint32_t length, const void* values) { |
| 1083 | } |
| 1084 | |
| 1085 | void CmdBeginRenderPass(VkCmdBuffer cmdBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkRenderPassContents contents) { |
| 1086 | } |
| 1087 | |
| 1088 | void CmdNextSubpass(VkCmdBuffer cmdBuffer, VkRenderPassContents contents) { |
| 1089 | } |
| 1090 | |
| 1091 | void CmdEndRenderPass(VkCmdBuffer cmdBuffer) { |
| 1092 | } |
| 1093 | |
| 1094 | void CmdExecuteCommands(VkCmdBuffer cmdBuffer, uint32_t cmdBuffersCount, const VkCmdBuffer* pCmdBuffers) { |
| 1095 | } |
| 1096 | |
| 1097 | #pragma clang diagnostic pop |
| 1098 | // clang-format on |
| 1099 | |
| 1100 | } // namespace null_driver |