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