David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1 | /* |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 2 | * Vulkan null driver |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2015 LunarG, Inc. |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included |
| 14 | * in all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 22 | * DEALINGS IN THE SOFTWARE. |
| 23 | * |
| 24 | */ |
| 25 | |
| 26 | #include "nulldrv.h" |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 27 | #include <stdio.h> |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 28 | |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 29 | #if 0 |
| 30 | #define NULLDRV_LOG_FUNC \ |
| 31 | do { \ |
| 32 | fflush(stdout); \ |
| 33 | fflush(stderr); \ |
| 34 | printf("null driver: %s\n", __FUNCTION__); \ |
| 35 | fflush(stdout); \ |
| 36 | } while (0) |
| 37 | #else |
| 38 | #define NULLDRV_LOG_FUNC do { } while (0) |
| 39 | #endif |
| 40 | |
| 41 | // The null driver supports all WSI extenstions ... for now ... |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 42 | static const char * const nulldrv_gpu_exts[NULLDRV_EXT_COUNT] = { |
Ian Elliott | 53bd3dc | 2015-07-06 14:29:31 -0600 | [diff] [blame] | 43 | [NULLDRV_EXT_WSI_SWAPCHAIN] = VK_WSI_SWAPCHAIN_EXTENSION_NAME, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 44 | }; |
Courtney Goeltzenleuchter | e023ff4 | 2015-06-01 15:10:03 -0600 | [diff] [blame] | 45 | static const VkExtensionProperties intel_gpu_exts[NULLDRV_EXT_COUNT] = { |
| 46 | { |
Ian Elliott | 53bd3dc | 2015-07-06 14:29:31 -0600 | [diff] [blame] | 47 | .extName = VK_WSI_SWAPCHAIN_EXTENSION_NAME, |
| 48 | .specVersion = VK_WSI_SWAPCHAIN_REVISION, |
Courtney Goeltzenleuchter | e023ff4 | 2015-06-01 15:10:03 -0600 | [diff] [blame] | 49 | } |
| 50 | }; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 51 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 52 | static struct nulldrv_base *nulldrv_base(void* base) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 53 | { |
| 54 | return (struct nulldrv_base *) base; |
| 55 | } |
| 56 | |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 57 | static struct nulldrv_base *nulldrv_base_create( |
| 58 | struct nulldrv_dev *dev, |
| 59 | size_t obj_size, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 60 | VkDbgObjectType type) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 61 | { |
| 62 | struct nulldrv_base *base; |
| 63 | |
| 64 | if (!obj_size) |
| 65 | obj_size = sizeof(*base); |
| 66 | |
| 67 | assert(obj_size >= sizeof(*base)); |
| 68 | |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 69 | base = (struct nulldrv_base*)malloc(obj_size); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 70 | if (!base) |
| 71 | return NULL; |
| 72 | |
| 73 | memset(base, 0, obj_size); |
| 74 | |
| 75 | // Initialize pointer to loader's dispatch table with ICD_LOADER_MAGIC |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 76 | set_loader_magic_value(base); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 77 | |
| 78 | if (dev == NULL) { |
| 79 | /* |
| 80 | * dev is NULL when we are creating the base device object |
| 81 | * Set dev now so that debug setup happens correctly |
| 82 | */ |
| 83 | dev = (struct nulldrv_dev *) base; |
| 84 | } |
| 85 | |
| 86 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 87 | base->get_memory_requirements = NULL; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 88 | |
| 89 | return base; |
| 90 | } |
| 91 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 92 | static VkResult nulldrv_gpu_add(int devid, const char *primary_node, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 93 | const char *render_node, struct nulldrv_gpu **gpu_ret) |
| 94 | { |
| 95 | struct nulldrv_gpu *gpu; |
| 96 | |
Chia-I Wu | 493a175 | 2015-02-22 14:40:25 +0800 | [diff] [blame] | 97 | gpu = malloc(sizeof(*gpu)); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 98 | if (!gpu) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 99 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 100 | memset(gpu, 0, sizeof(*gpu)); |
Mark Lobodzinski | 97dcd04 | 2015-04-16 08:52:00 -0500 | [diff] [blame] | 101 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 102 | // Initialize pointer to loader's dispatch table with ICD_LOADER_MAGIC |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 103 | set_loader_magic_value(gpu); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 104 | |
| 105 | *gpu_ret = gpu; |
| 106 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 107 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 108 | } |
| 109 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 110 | static VkResult nulldrv_queue_create(struct nulldrv_dev *dev, |
Chia-I Wu | b5ed9e6 | 2015-03-05 14:26:54 -0700 | [diff] [blame] | 111 | uint32_t node_index, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 112 | struct nulldrv_queue **queue_ret) |
| 113 | { |
| 114 | struct nulldrv_queue *queue; |
| 115 | |
| 116 | queue = (struct nulldrv_queue *) nulldrv_base_create(dev, sizeof(*queue), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 117 | VK_OBJECT_TYPE_QUEUE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 118 | if (!queue) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 119 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 120 | |
| 121 | queue->dev = dev; |
| 122 | |
| 123 | *queue_ret = queue; |
| 124 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 125 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 126 | } |
| 127 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 128 | static VkResult dev_create_queues(struct nulldrv_dev *dev, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 129 | const VkDeviceQueueCreateInfo *queues, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 130 | uint32_t count) |
| 131 | { |
| 132 | uint32_t i; |
| 133 | |
| 134 | if (!count) |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 135 | return VK_ERROR_INVALID_POINTER; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 136 | |
| 137 | for (i = 0; i < count; i++) { |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 138 | const VkDeviceQueueCreateInfo *q = &queues[i]; |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 139 | VkResult ret = VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 140 | |
Tony Barbour | 29b1206 | 2015-07-13 13:37:24 -0600 | [diff] [blame] | 141 | if (q->queueCount == 1 && !dev->queues[q->queueFamilyIndex]) { |
| 142 | ret = nulldrv_queue_create(dev, q->queueFamilyIndex, |
| 143 | &dev->queues[q->queueFamilyIndex]); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 144 | } |
| 145 | else { |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 146 | ret = VK_ERROR_INVALID_POINTER; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 147 | } |
| 148 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 149 | if (ret != VK_SUCCESS) { |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 150 | return ret; |
| 151 | } |
| 152 | } |
| 153 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 154 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 155 | } |
| 156 | |
Courtney Goeltzenleuchter | e023ff4 | 2015-06-01 15:10:03 -0600 | [diff] [blame] | 157 | static enum nulldrv_ext_type nulldrv_gpu_lookup_extension( |
| 158 | const struct nulldrv_gpu *gpu, |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 159 | const char* extName) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 160 | { |
| 161 | enum nulldrv_ext_type type; |
| 162 | |
| 163 | for (type = 0; type < ARRAY_SIZE(nulldrv_gpu_exts); type++) { |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 164 | if (strcmp(nulldrv_gpu_exts[type], extName) == 0) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 165 | break; |
| 166 | } |
| 167 | |
| 168 | assert(type < NULLDRV_EXT_COUNT || type == NULLDRV_EXT_INVALID); |
| 169 | |
| 170 | return type; |
| 171 | } |
| 172 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 173 | static VkResult nulldrv_desc_ooxx_create(struct nulldrv_dev *dev, |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 174 | struct nulldrv_desc_ooxx **ooxx_ret) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 175 | { |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 176 | struct nulldrv_desc_ooxx *ooxx; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 177 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 178 | ooxx = malloc(sizeof(*ooxx)); |
| 179 | if (!ooxx) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 180 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 181 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 182 | memset(ooxx, 0, sizeof(*ooxx)); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 183 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 184 | ooxx->surface_desc_size = 0; |
| 185 | ooxx->sampler_desc_size = 0; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 186 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 187 | *ooxx_ret = ooxx; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 188 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 189 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 190 | } |
| 191 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 192 | static VkResult nulldrv_dev_create(struct nulldrv_gpu *gpu, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 193 | const VkDeviceCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 194 | struct nulldrv_dev **dev_ret) |
| 195 | { |
| 196 | struct nulldrv_dev *dev; |
| 197 | uint32_t i; |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 198 | VkResult ret; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 199 | |
| 200 | dev = (struct nulldrv_dev *) nulldrv_base_create(NULL, sizeof(*dev), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 201 | VK_OBJECT_TYPE_DEVICE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 202 | if (!dev) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 203 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 204 | |
Courtney Goeltzenleuchter | e023ff4 | 2015-06-01 15:10:03 -0600 | [diff] [blame] | 205 | for (i = 0; i < info->extensionCount; i++) { |
| 206 | const enum nulldrv_ext_type ext = nulldrv_gpu_lookup_extension( |
| 207 | gpu, |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 208 | info->ppEnabledExtensionNames[i]); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 209 | |
Courtney Goeltzenleuchter | e023ff4 | 2015-06-01 15:10:03 -0600 | [diff] [blame] | 210 | if (ext == NULLDRV_EXT_INVALID) |
| 211 | return VK_ERROR_INVALID_EXTENSION; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 212 | |
Courtney Goeltzenleuchter | e023ff4 | 2015-06-01 15:10:03 -0600 | [diff] [blame] | 213 | dev->exts[ext] = true; |
| 214 | } |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 215 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 216 | ret = nulldrv_desc_ooxx_create(dev, &dev->desc_ooxx); |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 217 | if (ret != VK_SUCCESS) { |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 218 | return ret; |
| 219 | } |
| 220 | |
| 221 | ret = dev_create_queues(dev, info->pRequestedQueues, |
| 222 | info->queueRecordCount); |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 223 | if (ret != VK_SUCCESS) { |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 224 | return ret; |
| 225 | } |
| 226 | |
| 227 | *dev_ret = dev; |
| 228 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 229 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 230 | } |
| 231 | |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 232 | static struct nulldrv_gpu *nulldrv_gpu(VkPhysicalDevice gpu) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 233 | { |
| 234 | return (struct nulldrv_gpu *) gpu; |
| 235 | } |
| 236 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 237 | static VkResult nulldrv_rt_view_create(struct nulldrv_dev *dev, |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 238 | const VkAttachmentViewCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 239 | struct nulldrv_rt_view **view_ret) |
| 240 | { |
| 241 | struct nulldrv_rt_view *view; |
| 242 | |
| 243 | view = (struct nulldrv_rt_view *) nulldrv_base_create(dev, sizeof(*view), |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 244 | VK_OBJECT_TYPE_ATTACHMENT_VIEW); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 245 | if (!view) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 246 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 247 | |
| 248 | *view_ret = view; |
| 249 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 250 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 251 | } |
| 252 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 253 | static VkResult nulldrv_fence_create(struct nulldrv_dev *dev, |
| 254 | const VkFenceCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 255 | struct nulldrv_fence **fence_ret) |
| 256 | { |
| 257 | struct nulldrv_fence *fence; |
| 258 | |
| 259 | fence = (struct nulldrv_fence *) nulldrv_base_create(dev, sizeof(*fence), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 260 | VK_OBJECT_TYPE_FENCE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 261 | if (!fence) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 262 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 263 | |
| 264 | *fence_ret = fence; |
| 265 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 266 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 267 | } |
| 268 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 269 | static struct nulldrv_dev *nulldrv_dev(VkDevice dev) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 270 | { |
| 271 | return (struct nulldrv_dev *) dev; |
| 272 | } |
| 273 | |
| 274 | static struct nulldrv_img *nulldrv_img_from_base(struct nulldrv_base *base) |
| 275 | { |
| 276 | return (struct nulldrv_img *) base; |
| 277 | } |
| 278 | |
| 279 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 280 | static VkResult img_get_memory_requirements(struct nulldrv_base *base, |
| 281 | VkMemoryRequirements *pRequirements) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 282 | { |
| 283 | struct nulldrv_img *img = nulldrv_img_from_base(base); |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 284 | VkResult ret = VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 285 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 286 | pRequirements->size = img->total_size; |
| 287 | pRequirements->alignment = 4096; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 288 | |
| 289 | return ret; |
| 290 | } |
| 291 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 292 | static VkResult nulldrv_img_create(struct nulldrv_dev *dev, |
| 293 | const VkImageCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 294 | bool scanout, |
| 295 | struct nulldrv_img **img_ret) |
| 296 | { |
| 297 | struct nulldrv_img *img; |
| 298 | |
| 299 | img = (struct nulldrv_img *) nulldrv_base_create(dev, sizeof(*img), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 300 | VK_OBJECT_TYPE_IMAGE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 301 | if (!img) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 302 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 303 | |
| 304 | img->type = info->imageType; |
| 305 | img->depth = info->extent.depth; |
| 306 | img->mip_levels = info->mipLevels; |
| 307 | img->array_size = info->arraySize; |
| 308 | img->usage = info->usage; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 309 | img->samples = info->samples; |
| 310 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 311 | img->obj.base.get_memory_requirements = img_get_memory_requirements; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 312 | |
| 313 | *img_ret = img; |
| 314 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 315 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 316 | } |
| 317 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 318 | static struct nulldrv_img *nulldrv_img(VkImage image) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 319 | { |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 320 | return *(struct nulldrv_img **) ℑ |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 321 | } |
| 322 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 323 | static VkResult nulldrv_mem_alloc(struct nulldrv_dev *dev, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 324 | const VkMemoryAllocInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 325 | struct nulldrv_mem **mem_ret) |
| 326 | { |
| 327 | struct nulldrv_mem *mem; |
| 328 | |
| 329 | mem = (struct nulldrv_mem *) nulldrv_base_create(dev, sizeof(*mem), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 330 | VK_OBJECT_TYPE_DEVICE_MEMORY); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 331 | if (!mem) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 332 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 333 | |
Chia-I Wu | b5ed9e6 | 2015-03-05 14:26:54 -0700 | [diff] [blame] | 334 | mem->bo = malloc(info->allocationSize); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 335 | if (!mem->bo) { |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 336 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 337 | } |
| 338 | |
| 339 | mem->size = info->allocationSize; |
| 340 | |
| 341 | *mem_ret = mem; |
| 342 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 343 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 344 | } |
| 345 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 346 | static VkResult nulldrv_sampler_create(struct nulldrv_dev *dev, |
| 347 | const VkSamplerCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 348 | struct nulldrv_sampler **sampler_ret) |
| 349 | { |
| 350 | struct nulldrv_sampler *sampler; |
| 351 | |
| 352 | sampler = (struct nulldrv_sampler *) nulldrv_base_create(dev, |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 353 | sizeof(*sampler), VK_OBJECT_TYPE_SAMPLER); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 354 | if (!sampler) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 355 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 356 | |
| 357 | *sampler_ret = sampler; |
| 358 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 359 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 360 | } |
| 361 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 362 | static VkResult nulldrv_img_view_create(struct nulldrv_dev *dev, |
| 363 | const VkImageViewCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 364 | struct nulldrv_img_view **view_ret) |
| 365 | { |
| 366 | struct nulldrv_img *img = nulldrv_img(info->image); |
| 367 | struct nulldrv_img_view *view; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 368 | |
| 369 | view = (struct nulldrv_img_view *) nulldrv_base_create(dev, sizeof(*view), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 370 | VK_OBJECT_TYPE_IMAGE_VIEW); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 371 | if (!view) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 372 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 373 | |
| 374 | view->img = img; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 375 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 376 | view->cmd_len = 8; |
| 377 | |
| 378 | *view_ret = view; |
| 379 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 380 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 381 | } |
| 382 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 383 | static void *nulldrv_mem_map(struct nulldrv_mem *mem, VkFlags flags) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 384 | { |
| 385 | return mem->bo; |
| 386 | } |
| 387 | |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 388 | static struct nulldrv_mem *nulldrv_mem(VkDeviceMemory mem) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 389 | { |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 390 | return *(struct nulldrv_mem **) &mem; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 391 | } |
| 392 | |
| 393 | static struct nulldrv_buf *nulldrv_buf_from_base(struct nulldrv_base *base) |
| 394 | { |
| 395 | return (struct nulldrv_buf *) base; |
| 396 | } |
| 397 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 398 | static VkResult buf_get_memory_requirements(struct nulldrv_base *base, |
| 399 | VkMemoryRequirements* pMemoryRequirements) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 400 | { |
| 401 | struct nulldrv_buf *buf = nulldrv_buf_from_base(base); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 402 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 403 | if (pMemoryRequirements == NULL) |
| 404 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 405 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 406 | pMemoryRequirements->size = buf->size; |
| 407 | pMemoryRequirements->alignment = 4096; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 408 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 409 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 410 | } |
| 411 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 412 | static VkResult nulldrv_buf_create(struct nulldrv_dev *dev, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 413 | const VkBufferCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 414 | struct nulldrv_buf **buf_ret) |
| 415 | { |
| 416 | struct nulldrv_buf *buf; |
| 417 | |
| 418 | buf = (struct nulldrv_buf *) nulldrv_base_create(dev, sizeof(*buf), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 419 | VK_OBJECT_TYPE_BUFFER); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 420 | if (!buf) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 421 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 422 | |
| 423 | buf->size = info->size; |
| 424 | buf->usage = info->usage; |
| 425 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 426 | buf->obj.base.get_memory_requirements = buf_get_memory_requirements; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 427 | |
| 428 | *buf_ret = buf; |
| 429 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 430 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 431 | } |
| 432 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 433 | static VkResult nulldrv_desc_layout_create(struct nulldrv_dev *dev, |
| 434 | const VkDescriptorSetLayoutCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 435 | struct nulldrv_desc_layout **layout_ret) |
| 436 | { |
| 437 | struct nulldrv_desc_layout *layout; |
| 438 | |
| 439 | layout = (struct nulldrv_desc_layout *) |
| 440 | nulldrv_base_create(dev, sizeof(*layout), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 441 | VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 442 | if (!layout) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 443 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 444 | |
| 445 | *layout_ret = layout; |
| 446 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 447 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 448 | } |
| 449 | |
Mark Lobodzinski | 556f721 | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 450 | static VkResult nulldrv_pipeline_layout_create(struct nulldrv_dev *dev, |
| 451 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 452 | struct nulldrv_pipeline_layout **pipeline_layout_ret) |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 453 | { |
Mark Lobodzinski | 556f721 | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 454 | struct nulldrv_pipeline_layout *pipeline_layout; |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 455 | |
Mark Lobodzinski | 556f721 | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 456 | pipeline_layout = (struct nulldrv_pipeline_layout *) |
| 457 | nulldrv_base_create(dev, sizeof(*pipeline_layout), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 458 | VK_OBJECT_TYPE_PIPELINE_LAYOUT); |
Mark Lobodzinski | 556f721 | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 459 | if (!pipeline_layout) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 460 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 461 | |
Mark Lobodzinski | 556f721 | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 462 | *pipeline_layout_ret = pipeline_layout; |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 463 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 464 | return VK_SUCCESS; |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 465 | } |
| 466 | |
Tony Barbour | 8db6537 | 2015-07-10 18:32:33 -0600 | [diff] [blame] | 467 | static struct nulldrv_desc_layout *nulldrv_desc_layout(const VkDescriptorSetLayout layout) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 468 | { |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 469 | return *(struct nulldrv_desc_layout **) &layout; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 470 | } |
| 471 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 472 | static VkResult shader_create(struct nulldrv_dev *dev, |
| 473 | const VkShaderCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 474 | struct nulldrv_shader **sh_ret) |
| 475 | { |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 476 | struct nulldrv_shader *sh; |
| 477 | |
| 478 | sh = (struct nulldrv_shader *) nulldrv_base_create(dev, sizeof(*sh), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 479 | VK_OBJECT_TYPE_SHADER); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 480 | if (!sh) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 481 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 482 | |
| 483 | *sh_ret = sh; |
| 484 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 485 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 486 | } |
| 487 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 488 | static VkResult graphics_pipeline_create(struct nulldrv_dev *dev, |
| 489 | const VkGraphicsPipelineCreateInfo *info_, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 490 | struct nulldrv_pipeline **pipeline_ret) |
| 491 | { |
| 492 | struct nulldrv_pipeline *pipeline; |
| 493 | |
| 494 | pipeline = (struct nulldrv_pipeline *) |
| 495 | nulldrv_base_create(dev, sizeof(*pipeline), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 496 | VK_OBJECT_TYPE_PIPELINE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 497 | if (!pipeline) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 498 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 499 | |
| 500 | *pipeline_ret = pipeline; |
| 501 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 502 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 503 | } |
| 504 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 505 | static VkResult nulldrv_viewport_state_create(struct nulldrv_dev *dev, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 506 | const VkDynamicViewportStateCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 507 | struct nulldrv_dynamic_vp **state_ret) |
| 508 | { |
| 509 | struct nulldrv_dynamic_vp *state; |
| 510 | |
| 511 | state = (struct nulldrv_dynamic_vp *) nulldrv_base_create(dev, |
Tony Barbour | 2a199c1 | 2015-07-09 17:31:46 -0600 | [diff] [blame] | 512 | sizeof(*state), VK_OBJECT_TYPE_DYNAMIC_VIEWPORT_STATE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 513 | if (!state) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 514 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 515 | |
| 516 | *state_ret = state; |
| 517 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 518 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 519 | } |
| 520 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 521 | static VkResult nulldrv_raster_state_create(struct nulldrv_dev *dev, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 522 | const VkDynamicRasterStateCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 523 | struct nulldrv_dynamic_rs **state_ret) |
| 524 | { |
| 525 | struct nulldrv_dynamic_rs *state; |
| 526 | |
| 527 | state = (struct nulldrv_dynamic_rs *) nulldrv_base_create(dev, |
Tony Barbour | 2a199c1 | 2015-07-09 17:31:46 -0600 | [diff] [blame] | 528 | sizeof(*state), VK_OBJECT_TYPE_DYNAMIC_RASTER_STATE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 529 | if (!state) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 530 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 531 | |
| 532 | *state_ret = state; |
| 533 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 534 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 535 | } |
| 536 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 537 | static VkResult nulldrv_blend_state_create(struct nulldrv_dev *dev, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 538 | const VkDynamicColorBlendStateCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 539 | struct nulldrv_dynamic_cb **state_ret) |
| 540 | { |
| 541 | struct nulldrv_dynamic_cb *state; |
| 542 | |
| 543 | state = (struct nulldrv_dynamic_cb *) nulldrv_base_create(dev, |
Tony Barbour | 2a199c1 | 2015-07-09 17:31:46 -0600 | [diff] [blame] | 544 | sizeof(*state), VK_OBJECT_TYPE_DYNAMIC_COLOR_BLEND_STATE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 545 | if (!state) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 546 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 547 | |
| 548 | *state_ret = state; |
| 549 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 550 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 551 | } |
| 552 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 553 | static VkResult nulldrv_ds_state_create(struct nulldrv_dev *dev, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 554 | const VkDynamicDepthStencilStateCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 555 | struct nulldrv_dynamic_ds **state_ret) |
| 556 | { |
| 557 | struct nulldrv_dynamic_ds *state; |
| 558 | |
| 559 | state = (struct nulldrv_dynamic_ds *) nulldrv_base_create(dev, |
Tony Barbour | 2a199c1 | 2015-07-09 17:31:46 -0600 | [diff] [blame] | 560 | sizeof(*state), VK_OBJECT_TYPE_DYNAMIC_DEPTH_STENCIL_STATE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 561 | if (!state) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 562 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 563 | |
| 564 | *state_ret = state; |
| 565 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 566 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 567 | } |
| 568 | |
| 569 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 570 | static VkResult nulldrv_cmd_create(struct nulldrv_dev *dev, |
| 571 | const VkCmdBufferCreateInfo *info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 572 | struct nulldrv_cmd **cmd_ret) |
| 573 | { |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 574 | struct nulldrv_cmd *cmd; |
| 575 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 576 | cmd = (struct nulldrv_cmd *) nulldrv_base_create(dev, sizeof(*cmd), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 577 | VK_OBJECT_TYPE_COMMAND_BUFFER); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 578 | if (!cmd) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 579 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 580 | |
| 581 | *cmd_ret = cmd; |
| 582 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 583 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 584 | } |
| 585 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 586 | static VkResult nulldrv_desc_pool_create(struct nulldrv_dev *dev, |
| 587 | VkDescriptorPoolUsage usage, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 588 | uint32_t max_sets, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 589 | const VkDescriptorPoolCreateInfo *info, |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 590 | struct nulldrv_desc_pool **pool_ret) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 591 | { |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 592 | struct nulldrv_desc_pool *pool; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 593 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 594 | pool = (struct nulldrv_desc_pool *) |
| 595 | nulldrv_base_create(dev, sizeof(*pool), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 596 | VK_OBJECT_TYPE_DESCRIPTOR_POOL); |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 597 | if (!pool) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 598 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 599 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 600 | pool->dev = dev; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 601 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 602 | *pool_ret = pool; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 603 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 604 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 605 | } |
| 606 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 607 | static VkResult nulldrv_desc_set_create(struct nulldrv_dev *dev, |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 608 | struct nulldrv_desc_pool *pool, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 609 | VkDescriptorSetUsage usage, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 610 | const struct nulldrv_desc_layout *layout, |
| 611 | struct nulldrv_desc_set **set_ret) |
| 612 | { |
| 613 | struct nulldrv_desc_set *set; |
| 614 | |
| 615 | set = (struct nulldrv_desc_set *) |
| 616 | nulldrv_base_create(dev, sizeof(*set), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 617 | VK_OBJECT_TYPE_DESCRIPTOR_SET); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 618 | if (!set) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 619 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 620 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 621 | set->ooxx = dev->desc_ooxx; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 622 | set->layout = layout; |
| 623 | *set_ret = set; |
| 624 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 625 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 626 | } |
| 627 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 628 | static struct nulldrv_desc_pool *nulldrv_desc_pool(VkDescriptorPool pool) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 629 | { |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 630 | return *(struct nulldrv_desc_pool **) &pool; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 631 | } |
| 632 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 633 | static VkResult nulldrv_fb_create(struct nulldrv_dev *dev, |
| 634 | const VkFramebufferCreateInfo* info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 635 | struct nulldrv_framebuffer ** fb_ret) |
| 636 | { |
| 637 | |
| 638 | struct nulldrv_framebuffer *fb; |
| 639 | fb = (struct nulldrv_framebuffer *) nulldrv_base_create(dev, sizeof(*fb), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 640 | VK_OBJECT_TYPE_FRAMEBUFFER); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 641 | if (!fb) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 642 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 643 | |
| 644 | *fb_ret = fb; |
| 645 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 646 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 647 | |
| 648 | } |
| 649 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 650 | static VkResult nulldrv_render_pass_create(struct nulldrv_dev *dev, |
| 651 | const VkRenderPassCreateInfo* info, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 652 | struct nulldrv_render_pass** rp_ret) |
| 653 | { |
| 654 | struct nulldrv_render_pass *rp; |
| 655 | rp = (struct nulldrv_render_pass *) nulldrv_base_create(dev, sizeof(*rp), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 656 | VK_OBJECT_TYPE_RENDER_PASS); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 657 | if (!rp) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 658 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 659 | |
| 660 | *rp_ret = rp; |
| 661 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 662 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 663 | } |
| 664 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 665 | static struct nulldrv_buf *nulldrv_buf(VkBuffer buf) |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 666 | { |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 667 | return *(struct nulldrv_buf **) &buf; |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 668 | } |
| 669 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 670 | static VkResult nulldrv_buf_view_create(struct nulldrv_dev *dev, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 671 | const VkBufferViewCreateInfo *info, |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 672 | struct nulldrv_buf_view **view_ret) |
| 673 | { |
| 674 | struct nulldrv_buf *buf = nulldrv_buf(info->buffer); |
| 675 | struct nulldrv_buf_view *view; |
| 676 | |
| 677 | view = (struct nulldrv_buf_view *) nulldrv_base_create(dev, sizeof(*view), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 678 | VK_OBJECT_TYPE_BUFFER_VIEW); |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 679 | if (!view) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 680 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 681 | |
| 682 | view->buf = buf; |
| 683 | |
| 684 | *view_ret = view; |
| 685 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 686 | return VK_SUCCESS; |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 687 | } |
| 688 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 689 | |
| 690 | //********************************************* |
| 691 | // Driver entry points |
| 692 | //********************************************* |
| 693 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 694 | ICD_EXPORT VkResult VKAPI vkCreateBuffer( |
| 695 | VkDevice device, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 696 | const VkBufferCreateInfo* pCreateInfo, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 697 | VkBuffer* pBuffer) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 698 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 699 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 700 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 701 | |
| 702 | return nulldrv_buf_create(dev, pCreateInfo, (struct nulldrv_buf **) pBuffer); |
| 703 | } |
| 704 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 705 | ICD_EXPORT VkResult VKAPI vkDestroyBuffer( |
| 706 | VkDevice device, |
| 707 | VkBuffer buffer) |
| 708 | { |
| 709 | NULLDRV_LOG_FUNC; |
| 710 | return VK_SUCCESS; |
| 711 | } |
| 712 | |
Cody Northrop | f02f9f8 | 2015-07-09 18:08:05 -0600 | [diff] [blame] | 713 | ICD_EXPORT VkResult VKAPI vkCreateCommandPool( |
| 714 | VkDevice device, |
| 715 | const VkCmdPoolCreateInfo* pCreateInfo, |
| 716 | VkCmdPool* pCmdPool) |
| 717 | { |
| 718 | NULLDRV_LOG_FUNC; |
| 719 | return VK_SUCCESS; |
| 720 | } |
| 721 | |
| 722 | ICD_EXPORT VkResult VKAPI vkDestroyCommandPool( |
| 723 | VkDevice device, |
| 724 | VkCmdPool cmdPool) |
| 725 | { |
| 726 | NULLDRV_LOG_FUNC; |
| 727 | return VK_SUCCESS; |
| 728 | } |
| 729 | |
| 730 | ICD_EXPORT VkResult VKAPI vkResetCommandPool( |
| 731 | VkDevice device, |
| 732 | VkCmdPool cmdPool, |
| 733 | VkCmdPoolResetFlags flags) |
| 734 | { |
| 735 | NULLDRV_LOG_FUNC; |
| 736 | return VK_SUCCESS; |
| 737 | } |
| 738 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 739 | ICD_EXPORT VkResult VKAPI vkCreateCommandBuffer( |
| 740 | VkDevice device, |
| 741 | const VkCmdBufferCreateInfo* pCreateInfo, |
| 742 | VkCmdBuffer* pCmdBuffer) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 743 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 744 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 745 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 746 | |
| 747 | return nulldrv_cmd_create(dev, pCreateInfo, |
| 748 | (struct nulldrv_cmd **) pCmdBuffer); |
| 749 | } |
| 750 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 751 | ICD_EXPORT VkResult VKAPI vkDestroyCommandBuffer( |
| 752 | VkDevice device, |
| 753 | VkCmdBuffer cmdBuffer) |
| 754 | { |
| 755 | NULLDRV_LOG_FUNC; |
| 756 | return VK_SUCCESS; |
| 757 | } |
| 758 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 759 | ICD_EXPORT VkResult VKAPI vkBeginCommandBuffer( |
| 760 | VkCmdBuffer cmdBuffer, |
| 761 | const VkCmdBufferBeginInfo *info) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 762 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 763 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 764 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 765 | } |
| 766 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 767 | ICD_EXPORT VkResult VKAPI vkEndCommandBuffer( |
| 768 | VkCmdBuffer cmdBuffer) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 769 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 770 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 771 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 772 | } |
| 773 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 774 | ICD_EXPORT VkResult VKAPI vkResetCommandBuffer( |
Cody Northrop | f02f9f8 | 2015-07-09 18:08:05 -0600 | [diff] [blame] | 775 | VkCmdBuffer cmdBuffer, |
| 776 | VkCmdBufferResetFlags flags) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 777 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 778 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 779 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 780 | } |
| 781 | |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 782 | static const VkFormat nulldrv_presentable_formats[] = { |
| 783 | VK_FORMAT_B8G8R8A8_UNORM, |
| 784 | }; |
| 785 | |
Jon Ashburn | ba4a195 | 2015-06-16 12:44:51 -0600 | [diff] [blame] | 786 | #if 0 |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 787 | ICD_EXPORT VkResult VKAPI vkGetDisplayInfoWSI( |
| 788 | VkDisplayWSI display, |
| 789 | VkDisplayInfoTypeWSI infoType, |
| 790 | size_t* pDataSize, |
| 791 | void* pData) |
| 792 | { |
| 793 | VkResult ret = VK_SUCCESS; |
| 794 | |
| 795 | NULLDRV_LOG_FUNC; |
| 796 | |
| 797 | if (!pDataSize) |
| 798 | return VK_ERROR_INVALID_POINTER; |
| 799 | |
| 800 | switch (infoType) { |
| 801 | case VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI: |
| 802 | { |
| 803 | VkDisplayFormatPropertiesWSI *dst = pData; |
| 804 | size_t size_ret; |
| 805 | uint32_t i; |
| 806 | |
| 807 | size_ret = sizeof(*dst) * ARRAY_SIZE(nulldrv_presentable_formats); |
| 808 | |
| 809 | if (dst && *pDataSize < size_ret) |
| 810 | return VK_ERROR_INVALID_VALUE; |
| 811 | |
| 812 | *pDataSize = size_ret; |
| 813 | if (!dst) |
| 814 | return VK_SUCCESS; |
| 815 | |
| 816 | for (i = 0; i < ARRAY_SIZE(nulldrv_presentable_formats); i++) |
| 817 | dst[i].swapChainFormat = nulldrv_presentable_formats[i]; |
| 818 | } |
| 819 | break; |
| 820 | default: |
| 821 | ret = VK_ERROR_INVALID_VALUE; |
| 822 | break; |
| 823 | } |
| 824 | |
| 825 | return ret; |
| 826 | } |
Jon Ashburn | ba4a195 | 2015-06-16 12:44:51 -0600 | [diff] [blame] | 827 | #endif |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 828 | |
| 829 | ICD_EXPORT VkResult VKAPI vkCreateSwapChainWSI( |
| 830 | VkDevice device, |
| 831 | const VkSwapChainCreateInfoWSI* pCreateInfo, |
| 832 | VkSwapChainWSI* pSwapChain) |
| 833 | { |
| 834 | NULLDRV_LOG_FUNC; |
| 835 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 836 | struct nulldrv_swap_chain *sc; |
| 837 | |
| 838 | sc = (struct nulldrv_swap_chain *) nulldrv_base_create(dev, sizeof(*sc), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 839 | VK_OBJECT_TYPE_SWAP_CHAIN_WSI); |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 840 | if (!sc) { |
| 841 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 842 | } |
| 843 | sc->dev = dev; |
| 844 | |
Tony Barbour | 7910de7 | 2015-07-13 16:37:21 -0600 | [diff] [blame] | 845 | *(VkSwapChainWSI **)pSwapChain = *(VkSwapChainWSI **)≻ |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 846 | |
| 847 | return VK_SUCCESS; |
| 848 | } |
| 849 | |
| 850 | ICD_EXPORT VkResult VKAPI vkDestroySwapChainWSI( |
Ian Elliott | 53bd3dc | 2015-07-06 14:29:31 -0600 | [diff] [blame] | 851 | VkDevice device, |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 852 | VkSwapChainWSI swapChain) |
| 853 | { |
| 854 | NULLDRV_LOG_FUNC; |
Tony Barbour | 7910de7 | 2015-07-13 16:37:21 -0600 | [diff] [blame] | 855 | struct nulldrv_swap_chain *sc = *(struct nulldrv_swap_chain **) &swapChain; |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 856 | |
| 857 | free(sc); |
| 858 | |
| 859 | return VK_SUCCESS; |
| 860 | } |
| 861 | |
Ian Elliott | 3333bb4 | 2015-08-10 13:56:08 -0600 | [diff] [blame^] | 862 | ICD_EXPORT VkResult VKAPI vkGetSwapChainImagesWSI( |
| 863 | VkDevice device, |
| 864 | VkSwapChainWSI swapChain, |
| 865 | uint32_t* pCount, |
| 866 | VkImage* pSwapChainImages) |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 867 | { |
| 868 | NULLDRV_LOG_FUNC; |
Tony Barbour | 7910de7 | 2015-07-13 16:37:21 -0600 | [diff] [blame] | 869 | struct nulldrv_swap_chain *sc = *(struct nulldrv_swap_chain **) &swapChain; |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 870 | struct nulldrv_dev *dev = sc->dev; |
| 871 | VkResult ret = VK_SUCCESS; |
| 872 | |
Ian Elliott | 3333bb4 | 2015-08-10 13:56:08 -0600 | [diff] [blame^] | 873 | *pCount = 2; |
| 874 | if (pSwapChainImages) { |
| 875 | uint32_t i; |
| 876 | for (i = 0; i < 2; i++) { |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 877 | struct nulldrv_img *img; |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 878 | |
| 879 | img = (struct nulldrv_img *) nulldrv_base_create(dev, |
| 880 | sizeof(*img), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 881 | VK_OBJECT_TYPE_IMAGE); |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 882 | if (!img) |
| 883 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
Ian Elliott | 3333bb4 | 2015-08-10 13:56:08 -0600 | [diff] [blame^] | 884 | pSwapChainImages[i].handle = (uint64_t) &img; |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 885 | } |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 886 | } |
| 887 | |
| 888 | return ret; |
| 889 | } |
| 890 | |
Tony Barbour | 7910de7 | 2015-07-13 16:37:21 -0600 | [diff] [blame] | 891 | ICD_EXPORT VkResult VKAPI vkAcquireNextImageWSI( |
| 892 | VkDevice device, |
| 893 | VkSwapChainWSI swapChain, |
| 894 | uint64_t timeout, |
| 895 | VkSemaphore semaphore, |
| 896 | uint32_t* pImageIndex) |
| 897 | { |
| 898 | NULLDRV_LOG_FUNC; |
| 899 | |
| 900 | return VK_SUCCESS; |
| 901 | } |
| 902 | |
Ian Elliott | 3333bb4 | 2015-08-10 13:56:08 -0600 | [diff] [blame^] | 903 | VkResult VKAPI vkGetSurfacePropertiesWSI( |
Tony Barbour | 7910de7 | 2015-07-13 16:37:21 -0600 | [diff] [blame] | 904 | VkDevice device, |
| 905 | const VkSurfaceDescriptionWSI* pSurfaceDescription, |
Ian Elliott | 3333bb4 | 2015-08-10 13:56:08 -0600 | [diff] [blame^] | 906 | VkSurfacePropertiesWSI* pSurfaceProperties) |
| 907 | { |
| 908 | NULLDRV_LOG_FUNC; |
| 909 | |
| 910 | return VK_SUCCESS; |
| 911 | } |
| 912 | |
| 913 | VkResult VKAPI vkGetSurfaceFormatsWSI( |
| 914 | VkDevice device, |
| 915 | const VkSurfaceDescriptionWSI* pSurfaceDescription, |
| 916 | uint32_t* pCount, |
| 917 | VkSurfaceFormatWSI* pSurfaceFormats) |
| 918 | { |
| 919 | NULLDRV_LOG_FUNC; |
| 920 | |
| 921 | return VK_SUCCESS; |
| 922 | } |
| 923 | |
| 924 | VkResult VKAPI vkGetSurfacePresentModesWSI( |
| 925 | VkDevice device, |
| 926 | const VkSurfaceDescriptionWSI* pSurfaceDescription, |
| 927 | uint32_t* pCount, |
| 928 | VkPresentModeWSI* pPresentModes) |
Tony Barbour | 7910de7 | 2015-07-13 16:37:21 -0600 | [diff] [blame] | 929 | { |
| 930 | NULLDRV_LOG_FUNC; |
| 931 | |
| 932 | return VK_SUCCESS; |
| 933 | } |
| 934 | |
| 935 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceSurfaceSupportWSI( |
| 936 | VkPhysicalDevice physicalDevice, |
| 937 | uint32_t queueFamilyIndex, |
| 938 | const VkSurfaceDescriptionWSI* pSurfaceDescription, |
| 939 | VkBool32* pSupported) |
| 940 | { |
| 941 | NULLDRV_LOG_FUNC; |
| 942 | |
| 943 | return VK_SUCCESS; |
| 944 | } |
| 945 | |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 946 | ICD_EXPORT VkResult VKAPI vkQueuePresentWSI( |
Ian Elliott | 53bd3dc | 2015-07-06 14:29:31 -0600 | [diff] [blame] | 947 | VkQueue queue_, |
| 948 | VkPresentInfoWSI* pPresentInfo) |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 949 | { |
| 950 | NULLDRV_LOG_FUNC; |
| 951 | |
| 952 | return VK_SUCCESS; |
| 953 | } |
| 954 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 955 | ICD_EXPORT void VKAPI vkCmdCopyBuffer( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 956 | VkCmdBuffer cmdBuffer, |
| 957 | VkBuffer srcBuffer, |
| 958 | VkBuffer destBuffer, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 959 | uint32_t regionCount, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 960 | const VkBufferCopy* pRegions) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 961 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 962 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 963 | } |
| 964 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 965 | ICD_EXPORT void VKAPI vkCmdCopyImage( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 966 | VkCmdBuffer cmdBuffer, |
| 967 | VkImage srcImage, |
| 968 | VkImageLayout srcImageLayout, |
| 969 | VkImage destImage, |
| 970 | VkImageLayout destImageLayout, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 971 | uint32_t regionCount, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 972 | const VkImageCopy* pRegions) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 973 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 974 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 975 | } |
| 976 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 977 | ICD_EXPORT void VKAPI vkCmdBlitImage( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 978 | VkCmdBuffer cmdBuffer, |
Mark Lobodzinski | 20f6859 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 979 | VkImage srcImage, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 980 | VkImageLayout srcImageLayout, |
Mark Lobodzinski | 20f6859 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 981 | VkImage destImage, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 982 | VkImageLayout destImageLayout, |
Mark Lobodzinski | 20f6859 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 983 | uint32_t regionCount, |
| 984 | const VkImageBlit* pRegions, |
| 985 | VkTexFilter filter) |
Courtney Goeltzenleuchter | b787a1e | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 986 | { |
| 987 | NULLDRV_LOG_FUNC; |
| 988 | } |
| 989 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 990 | ICD_EXPORT void VKAPI vkCmdCopyBufferToImage( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 991 | VkCmdBuffer cmdBuffer, |
| 992 | VkBuffer srcBuffer, |
| 993 | VkImage destImage, |
| 994 | VkImageLayout destImageLayout, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 995 | uint32_t regionCount, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 996 | const VkBufferImageCopy* pRegions) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 997 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 998 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 999 | } |
| 1000 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1001 | ICD_EXPORT void VKAPI vkCmdCopyImageToBuffer( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1002 | VkCmdBuffer cmdBuffer, |
| 1003 | VkImage srcImage, |
| 1004 | VkImageLayout srcImageLayout, |
| 1005 | VkBuffer destBuffer, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1006 | uint32_t regionCount, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1007 | const VkBufferImageCopy* pRegions) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1008 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1009 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1010 | } |
| 1011 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1012 | ICD_EXPORT void VKAPI vkCmdUpdateBuffer( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1013 | VkCmdBuffer cmdBuffer, |
| 1014 | VkBuffer destBuffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1015 | VkDeviceSize destOffset, |
| 1016 | VkDeviceSize dataSize, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1017 | const uint32_t* pData) |
| 1018 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1019 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1020 | } |
| 1021 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1022 | ICD_EXPORT void VKAPI vkCmdFillBuffer( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1023 | VkCmdBuffer cmdBuffer, |
| 1024 | VkBuffer destBuffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1025 | VkDeviceSize destOffset, |
| 1026 | VkDeviceSize fillSize, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1027 | uint32_t data) |
| 1028 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1029 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1030 | } |
| 1031 | |
Ian Elliott | e924ab2 | 2015-07-08 13:24:30 -0600 | [diff] [blame] | 1032 | ICD_EXPORT void VKAPI vkCmdClearDepthStencilImage( |
| 1033 | VkCmdBuffer cmdBuffer, |
| 1034 | VkImage image, |
| 1035 | VkImageLayout imageLayout, |
| 1036 | float depth, |
| 1037 | uint32_t stencil, |
| 1038 | uint32_t rangeCount, |
| 1039 | const VkImageSubresourceRange* pRanges) |
| 1040 | { |
| 1041 | NULLDRV_LOG_FUNC; |
| 1042 | } |
| 1043 | |
| 1044 | ICD_EXPORT void VKAPI vkCmdClearColorAttachment( |
| 1045 | VkCmdBuffer cmdBuffer, |
| 1046 | uint32_t colorAttachment, |
| 1047 | VkImageLayout imageLayout, |
| 1048 | const VkClearColorValue *pColor, |
| 1049 | uint32_t rectCount, |
| 1050 | const VkRect3D *pRects) |
| 1051 | { |
| 1052 | NULLDRV_LOG_FUNC; |
| 1053 | } |
| 1054 | |
| 1055 | ICD_EXPORT void VKAPI vkCmdClearDepthStencilAttachment( |
| 1056 | VkCmdBuffer cmdBuffer, |
| 1057 | VkImageAspectFlags imageAspectMask, |
| 1058 | VkImageLayout imageLayout, |
| 1059 | float depth, |
| 1060 | uint32_t stencil, |
| 1061 | uint32_t rectCount, |
| 1062 | const VkRect3D *pRects) |
| 1063 | { |
| 1064 | NULLDRV_LOG_FUNC; |
| 1065 | } |
| 1066 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1067 | ICD_EXPORT void VKAPI vkCmdClearColorImage( |
Courtney Goeltzenleuchter | da4a99e | 2015-04-23 17:49:22 -0600 | [diff] [blame] | 1068 | VkCmdBuffer cmdBuffer, |
| 1069 | VkImage image, |
| 1070 | VkImageLayout imageLayout, |
Chris Forbes | e310597 | 2015-06-24 14:34:53 +1200 | [diff] [blame] | 1071 | const VkClearColorValue *pColor, |
Courtney Goeltzenleuchter | da4a99e | 2015-04-23 17:49:22 -0600 | [diff] [blame] | 1072 | uint32_t rangeCount, |
| 1073 | const VkImageSubresourceRange* pRanges) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1074 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1075 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1076 | } |
| 1077 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1078 | ICD_EXPORT void VKAPI vkCmdClearDepthStencil( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1079 | VkCmdBuffer cmdBuffer, |
| 1080 | VkImage image, |
| 1081 | VkImageLayout imageLayout, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1082 | float depth, |
| 1083 | uint32_t stencil, |
| 1084 | uint32_t rangeCount, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1085 | const VkImageSubresourceRange* pRanges) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1086 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1087 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1088 | } |
| 1089 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1090 | ICD_EXPORT void VKAPI vkCmdResolveImage( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1091 | VkCmdBuffer cmdBuffer, |
| 1092 | VkImage srcImage, |
| 1093 | VkImageLayout srcImageLayout, |
| 1094 | VkImage destImage, |
| 1095 | VkImageLayout destImageLayout, |
Tony Barbour | 11f7437 | 2015-04-13 15:02:52 -0600 | [diff] [blame] | 1096 | uint32_t regionCount, |
| 1097 | const VkImageResolve* pRegions) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1098 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1099 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1100 | } |
| 1101 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1102 | ICD_EXPORT void VKAPI vkCmdBeginQuery( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1103 | VkCmdBuffer cmdBuffer, |
| 1104 | VkQueryPool queryPool, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1105 | uint32_t slot, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1106 | VkFlags flags) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1107 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1108 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1109 | } |
| 1110 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1111 | ICD_EXPORT void VKAPI vkCmdEndQuery( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1112 | VkCmdBuffer cmdBuffer, |
| 1113 | VkQueryPool queryPool, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1114 | uint32_t slot) |
| 1115 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1116 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1117 | } |
| 1118 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1119 | ICD_EXPORT void VKAPI vkCmdResetQueryPool( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1120 | VkCmdBuffer cmdBuffer, |
| 1121 | VkQueryPool queryPool, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1122 | uint32_t startQuery, |
| 1123 | uint32_t queryCount) |
| 1124 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1125 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1126 | } |
| 1127 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1128 | ICD_EXPORT void VKAPI vkCmdSetEvent( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1129 | VkCmdBuffer cmdBuffer, |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1130 | VkEvent event_, |
| 1131 | VkPipelineStageFlags stageMask) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1132 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1133 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1134 | } |
| 1135 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1136 | ICD_EXPORT void VKAPI vkCmdResetEvent( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1137 | VkCmdBuffer cmdBuffer, |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1138 | VkEvent event_, |
| 1139 | VkPipelineStageFlags stageMask) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1140 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1141 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1142 | } |
| 1143 | |
Ian Elliott | 63f1edb | 2015-04-16 18:10:19 -0600 | [diff] [blame] | 1144 | ICD_EXPORT void VKAPI vkCmdCopyQueryPoolResults( |
| 1145 | VkCmdBuffer cmdBuffer, |
| 1146 | VkQueryPool queryPool, |
| 1147 | uint32_t startQuery, |
| 1148 | uint32_t queryCount, |
| 1149 | VkBuffer destBuffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1150 | VkDeviceSize destOffset, |
| 1151 | VkDeviceSize destStride, |
Ian Elliott | 63f1edb | 2015-04-16 18:10:19 -0600 | [diff] [blame] | 1152 | VkFlags flags) |
| 1153 | { |
| 1154 | NULLDRV_LOG_FUNC; |
| 1155 | } |
| 1156 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1157 | ICD_EXPORT void VKAPI vkCmdWriteTimestamp( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1158 | VkCmdBuffer cmdBuffer, |
| 1159 | VkTimestampType timestampType, |
| 1160 | VkBuffer destBuffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1161 | VkDeviceSize destOffset) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1162 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1163 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1164 | } |
| 1165 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1166 | ICD_EXPORT void VKAPI vkCmdBindPipeline( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1167 | VkCmdBuffer cmdBuffer, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1168 | VkPipelineBindPoint pipelineBindPoint, |
| 1169 | VkPipeline pipeline) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1170 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1171 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1172 | } |
| 1173 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1174 | ICD_EXPORT void VKAPI vkCmdBindDynamicViewportState( |
| 1175 | VkCmdBuffer cmdBuffer, |
| 1176 | VkDynamicViewportState state) |
| 1177 | { |
| 1178 | NULLDRV_LOG_FUNC; |
| 1179 | } |
| 1180 | |
| 1181 | ICD_EXPORT void VKAPI vkCmdBindDynamicRasterState( |
| 1182 | VkCmdBuffer cmdBuffer, |
| 1183 | VkDynamicRasterState state) |
| 1184 | { |
| 1185 | NULLDRV_LOG_FUNC; |
| 1186 | } |
| 1187 | |
| 1188 | ICD_EXPORT void VKAPI vkCmdBindDynamicColorBlendState( |
| 1189 | VkCmdBuffer cmdBuffer, |
| 1190 | VkDynamicColorBlendState state) |
| 1191 | { |
| 1192 | NULLDRV_LOG_FUNC; |
| 1193 | } |
| 1194 | |
| 1195 | ICD_EXPORT void VKAPI vkCmdBindDynamicDepthStencilState( |
| 1196 | VkCmdBuffer cmdBuffer, |
| 1197 | VkDynamicDepthStencilState state) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1198 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1199 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1200 | } |
| 1201 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1202 | ICD_EXPORT void VKAPI vkCmdBindDescriptorSets( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1203 | VkCmdBuffer cmdBuffer, |
| 1204 | VkPipelineBindPoint pipelineBindPoint, |
Mark Lobodzinski | a65c463 | 2015-06-15 13:21:21 -0600 | [diff] [blame] | 1205 | VkPipelineLayout layout, |
Cody Northrop | 1a01b1d | 2015-04-16 13:41:56 -0600 | [diff] [blame] | 1206 | uint32_t firstSet, |
| 1207 | uint32_t setCount, |
| 1208 | const VkDescriptorSet* pDescriptorSets, |
| 1209 | uint32_t dynamicOffsetCount, |
| 1210 | const uint32_t* pDynamicOffsets) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1211 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1212 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1213 | } |
| 1214 | |
Courtney Goeltzenleuchter | 4696294 | 2015-04-16 13:38:46 -0600 | [diff] [blame] | 1215 | ICD_EXPORT void VKAPI vkCmdBindVertexBuffers( |
| 1216 | VkCmdBuffer cmdBuffer, |
| 1217 | uint32_t startBinding, |
| 1218 | uint32_t bindingCount, |
| 1219 | const VkBuffer* pBuffers, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1220 | const VkDeviceSize* pOffsets) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1221 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1222 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1223 | } |
| 1224 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1225 | ICD_EXPORT void VKAPI vkCmdBindIndexBuffer( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1226 | VkCmdBuffer cmdBuffer, |
| 1227 | VkBuffer buffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1228 | VkDeviceSize offset, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1229 | VkIndexType indexType) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1230 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1231 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1232 | } |
| 1233 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1234 | ICD_EXPORT void VKAPI vkCmdDraw( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1235 | VkCmdBuffer cmdBuffer, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1236 | uint32_t firstVertex, |
| 1237 | uint32_t vertexCount, |
| 1238 | uint32_t firstInstance, |
| 1239 | uint32_t instanceCount) |
| 1240 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1241 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1242 | } |
| 1243 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1244 | ICD_EXPORT void VKAPI vkCmdDrawIndexed( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1245 | VkCmdBuffer cmdBuffer, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1246 | uint32_t firstIndex, |
| 1247 | uint32_t indexCount, |
| 1248 | int32_t vertexOffset, |
| 1249 | uint32_t firstInstance, |
| 1250 | uint32_t instanceCount) |
| 1251 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1252 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1253 | } |
| 1254 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1255 | ICD_EXPORT void VKAPI vkCmdDrawIndirect( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1256 | VkCmdBuffer cmdBuffer, |
| 1257 | VkBuffer buffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1258 | VkDeviceSize offset, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1259 | uint32_t count, |
| 1260 | uint32_t stride) |
| 1261 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1262 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1263 | } |
| 1264 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1265 | ICD_EXPORT void VKAPI vkCmdDrawIndexedIndirect( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1266 | VkCmdBuffer cmdBuffer, |
| 1267 | VkBuffer buffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1268 | VkDeviceSize offset, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1269 | uint32_t count, |
| 1270 | uint32_t stride) |
| 1271 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1272 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1273 | } |
| 1274 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1275 | ICD_EXPORT void VKAPI vkCmdDispatch( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1276 | VkCmdBuffer cmdBuffer, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1277 | uint32_t x, |
| 1278 | uint32_t y, |
| 1279 | uint32_t z) |
| 1280 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1281 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1282 | } |
| 1283 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1284 | ICD_EXPORT void VKAPI vkCmdDispatchIndirect( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1285 | VkCmdBuffer cmdBuffer, |
| 1286 | VkBuffer buffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1287 | VkDeviceSize offset) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1288 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1289 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1290 | } |
| 1291 | |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1292 | void VKAPI vkCmdWaitEvents( |
| 1293 | VkCmdBuffer cmdBuffer, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1294 | uint32_t eventCount, |
| 1295 | const VkEvent* pEvents, |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1296 | VkPipelineStageFlags sourceStageMask, |
| 1297 | VkPipelineStageFlags destStageMask, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1298 | uint32_t memBarrierCount, |
Courtney Goeltzenleuchter | d9ba342 | 2015-07-12 12:58:58 -0600 | [diff] [blame] | 1299 | const void* const* ppMemBarriers) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1300 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1301 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1302 | } |
| 1303 | |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1304 | void VKAPI vkCmdPipelineBarrier( |
| 1305 | VkCmdBuffer cmdBuffer, |
Courtney Goeltzenleuchter | 82b348f | 2015-07-12 13:07:46 -0600 | [diff] [blame] | 1306 | VkPipelineStageFlags srcStageMask, |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1307 | VkPipelineStageFlags destStageMask, |
Courtney Goeltzenleuchter | 1f41f54 | 2015-07-09 11:44:38 -0600 | [diff] [blame] | 1308 | VkBool32 byRegion, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1309 | uint32_t memBarrierCount, |
Courtney Goeltzenleuchter | 82b348f | 2015-07-12 13:07:46 -0600 | [diff] [blame] | 1310 | const void* const* ppMemBarriers) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1311 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1312 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1313 | } |
| 1314 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1315 | ICD_EXPORT VkResult VKAPI vkCreateDevice( |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1316 | VkPhysicalDevice gpu_, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 1317 | const VkDeviceCreateInfo* pCreateInfo, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1318 | VkDevice* pDevice) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1319 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1320 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1321 | struct nulldrv_gpu *gpu = nulldrv_gpu(gpu_); |
| 1322 | return nulldrv_dev_create(gpu, pCreateInfo, (struct nulldrv_dev**)pDevice); |
| 1323 | } |
| 1324 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1325 | ICD_EXPORT VkResult VKAPI vkDestroyDevice( |
| 1326 | VkDevice device) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1327 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1328 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1329 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1330 | } |
| 1331 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1332 | ICD_EXPORT VkResult VKAPI vkGetDeviceQueue( |
| 1333 | VkDevice device, |
Courtney Goeltzenleuchter | f316806 | 2015-03-05 18:09:39 -0700 | [diff] [blame] | 1334 | uint32_t queueNodeIndex, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1335 | uint32_t queueIndex, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1336 | VkQueue* pQueue) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1337 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1338 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1339 | struct nulldrv_dev *dev = nulldrv_dev(device); |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1340 | *pQueue = (VkQueue) dev->queues[0]; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1341 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1342 | } |
| 1343 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1344 | ICD_EXPORT VkResult VKAPI vkDeviceWaitIdle( |
| 1345 | VkDevice device) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1346 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1347 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1348 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1349 | } |
| 1350 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1351 | ICD_EXPORT VkResult VKAPI vkCreateEvent( |
| 1352 | VkDevice device, |
| 1353 | const VkEventCreateInfo* pCreateInfo, |
| 1354 | VkEvent* pEvent) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1355 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1356 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1357 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1358 | } |
| 1359 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1360 | ICD_EXPORT VkResult VKAPI vkDestroyEvent( |
| 1361 | VkDevice device, |
| 1362 | VkEvent event) |
| 1363 | { |
| 1364 | NULLDRV_LOG_FUNC; |
| 1365 | return VK_SUCCESS; |
| 1366 | } |
| 1367 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1368 | ICD_EXPORT VkResult VKAPI vkGetEventStatus( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1369 | VkDevice device, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1370 | VkEvent event_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1371 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1372 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1373 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1374 | } |
| 1375 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1376 | ICD_EXPORT VkResult VKAPI vkSetEvent( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1377 | VkDevice device, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1378 | VkEvent event_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1379 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1380 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1381 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1382 | } |
| 1383 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1384 | ICD_EXPORT VkResult VKAPI vkResetEvent( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1385 | VkDevice device, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1386 | VkEvent event_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1387 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1388 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1389 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1390 | } |
| 1391 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1392 | ICD_EXPORT VkResult VKAPI vkCreateFence( |
| 1393 | VkDevice device, |
| 1394 | const VkFenceCreateInfo* pCreateInfo, |
| 1395 | VkFence* pFence) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1396 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1397 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1398 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 1399 | |
| 1400 | return nulldrv_fence_create(dev, pCreateInfo, |
| 1401 | (struct nulldrv_fence **) pFence); |
| 1402 | } |
| 1403 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1404 | ICD_EXPORT VkResult VKAPI vkDestroyFence( |
| 1405 | VkDevice device, |
| 1406 | VkFence fence) |
| 1407 | { |
| 1408 | NULLDRV_LOG_FUNC; |
| 1409 | return VK_SUCCESS; |
| 1410 | } |
| 1411 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1412 | ICD_EXPORT VkResult VKAPI vkGetFenceStatus( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1413 | VkDevice device, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1414 | VkFence fence_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1415 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1416 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1417 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1418 | } |
| 1419 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1420 | ICD_EXPORT VkResult VKAPI vkResetFences( |
Courtney Goeltzenleuchter | f2e33ad | 2015-06-18 17:28:20 -0600 | [diff] [blame] | 1421 | VkDevice device, |
| 1422 | uint32_t fenceCount, |
| 1423 | const VkFence* pFences) |
Courtney Goeltzenleuchter | 1042b47 | 2015-04-14 19:07:06 -0600 | [diff] [blame] | 1424 | { |
| 1425 | NULLDRV_LOG_FUNC; |
| 1426 | return VK_SUCCESS; |
| 1427 | } |
| 1428 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1429 | ICD_EXPORT VkResult VKAPI vkWaitForFences( |
| 1430 | VkDevice device, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1431 | uint32_t fenceCount, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1432 | const VkFence* pFences, |
Courtney Goeltzenleuchter | 1f41f54 | 2015-07-09 11:44:38 -0600 | [diff] [blame] | 1433 | VkBool32 waitAll, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1434 | uint64_t timeout) |
| 1435 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1436 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1437 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1438 | } |
| 1439 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1440 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceProperties( |
| 1441 | VkPhysicalDevice gpu_, |
| 1442 | VkPhysicalDeviceProperties* pProperties) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1443 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1444 | NULLDRV_LOG_FUNC; |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 1445 | VkResult ret = VK_SUCCESS; |
| 1446 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1447 | pProperties->apiVersion = VK_API_VERSION; |
| 1448 | pProperties->driverVersion = 0; // Appropriate that the nulldrv have 0's |
| 1449 | pProperties->vendorId = 0; |
| 1450 | pProperties->deviceId = 0; |
| 1451 | pProperties->deviceType = VK_PHYSICAL_DEVICE_TYPE_OTHER; |
| 1452 | strncpy(pProperties->deviceName, "nulldrv", strlen("nulldrv")); |
Ian Elliott | 64a68e1 | 2015-04-16 11:57:46 -0600 | [diff] [blame] | 1453 | |
| 1454 | return ret; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1455 | } |
| 1456 | |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 1457 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceFeatures( |
| 1458 | VkPhysicalDevice physicalDevice, |
| 1459 | VkPhysicalDeviceFeatures* pFeatures) |
| 1460 | { |
| 1461 | NULLDRV_LOG_FUNC; |
| 1462 | VkResult ret = VK_SUCCESS; |
| 1463 | |
| 1464 | /* TODO: fill out features */ |
| 1465 | memset(pFeatures, 0, sizeof(*pFeatures)); |
| 1466 | |
| 1467 | return ret; |
| 1468 | } |
| 1469 | |
Courtney Goeltzenleuchter | 4da96aa | 2015-07-12 12:52:09 -0600 | [diff] [blame] | 1470 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceFormatProperties( |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 1471 | VkPhysicalDevice physicalDevice, |
| 1472 | VkFormat format, |
| 1473 | VkFormatProperties* pFormatInfo) |
| 1474 | { |
| 1475 | NULLDRV_LOG_FUNC; |
| 1476 | VkResult ret = VK_SUCCESS; |
| 1477 | |
| 1478 | pFormatInfo->linearTilingFeatures = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT; |
| 1479 | pFormatInfo->optimalTilingFeatures = pFormatInfo->linearTilingFeatures; |
| 1480 | |
| 1481 | return ret; |
| 1482 | } |
| 1483 | |
| 1484 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceLimits( |
| 1485 | VkPhysicalDevice physicalDevice, |
| 1486 | VkPhysicalDeviceLimits* pLimits) |
| 1487 | { |
| 1488 | NULLDRV_LOG_FUNC; |
| 1489 | VkResult ret = VK_SUCCESS; |
| 1490 | |
| 1491 | /* TODO: fill out limits */ |
| 1492 | memset(pLimits, 0, sizeof(*pLimits)); |
| 1493 | |
| 1494 | return ret; |
| 1495 | } |
| 1496 | |
Cody Northrop | ef72e2a | 2015-08-03 17:04:53 -0600 | [diff] [blame] | 1497 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceQueueFamilyProperties( |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1498 | VkPhysicalDevice gpu_, |
Cody Northrop | ef72e2a | 2015-08-03 17:04:53 -0600 | [diff] [blame] | 1499 | uint32_t* pCount, |
| 1500 | VkQueueFamilyProperties* pProperties) |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1501 | { |
Cody Northrop | ef72e2a | 2015-08-03 17:04:53 -0600 | [diff] [blame] | 1502 | if (pProperties == NULL) { |
| 1503 | *pCount = 1; |
| 1504 | return VK_SUCCESS; |
| 1505 | } |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1506 | pProperties->queueFlags = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_SPARSE_MEMMGR_BIT; |
| 1507 | pProperties->queueCount = 1; |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1508 | pProperties->supportsTimestamps = false; |
Tobin Ehlis | 0ef6ec5 | 2015-04-16 12:51:37 -0600 | [diff] [blame] | 1509 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1510 | return VK_SUCCESS; |
| 1511 | } |
| 1512 | |
Ian Elliott | e924ab2 | 2015-07-08 13:24:30 -0600 | [diff] [blame] | 1513 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceMemoryProperties( |
| 1514 | VkPhysicalDevice gpu_, |
| 1515 | VkPhysicalDeviceMemoryProperties* pProperties) |
| 1516 | { |
| 1517 | // TODO: Fill in with real data |
| 1518 | return VK_SUCCESS; |
| 1519 | } |
| 1520 | |
| 1521 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceLayerProperties( |
| 1522 | VkPhysicalDevice physicalDevice, |
| 1523 | uint32_t* pCount, |
| 1524 | VkLayerProperties* pProperties) |
| 1525 | { |
| 1526 | // TODO: Fill in with real data |
| 1527 | return VK_SUCCESS; |
| 1528 | } |
| 1529 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1530 | ICD_EXPORT VkResult VKAPI vkGetGlobalExtensionProperties( |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1531 | const char* pLayerName, |
| 1532 | uint32_t* pCount, |
| 1533 | VkExtensionProperties* pProperties) |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1534 | { |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1535 | uint32_t copy_size; |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1536 | |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1537 | if (pCount == NULL) { |
| 1538 | return VK_ERROR_INVALID_POINTER; |
| 1539 | } |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1540 | |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1541 | if (pProperties == NULL) { |
| 1542 | *pCount = NULLDRV_EXT_COUNT; |
| 1543 | return VK_SUCCESS; |
| 1544 | } |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1545 | |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1546 | copy_size = *pCount < NULLDRV_EXT_COUNT ? *pCount : NULLDRV_EXT_COUNT; |
| 1547 | memcpy(pProperties, intel_gpu_exts, copy_size * sizeof(VkExtensionProperties)); |
| 1548 | *pCount = copy_size; |
| 1549 | if (copy_size < NULLDRV_EXT_COUNT) { |
| 1550 | return VK_INCOMPLETE; |
| 1551 | } |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1552 | return VK_SUCCESS; |
| 1553 | } |
Ian Elliott | e924ab2 | 2015-07-08 13:24:30 -0600 | [diff] [blame] | 1554 | ICD_EXPORT VkResult VKAPI vkGetGlobalLayerProperties( |
| 1555 | uint32_t* pCount, |
| 1556 | VkLayerProperties* pProperties) |
| 1557 | { |
| 1558 | // TODO: Fill in with real data |
| 1559 | return VK_SUCCESS; |
| 1560 | } |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1561 | |
| 1562 | VkResult VKAPI vkGetPhysicalDeviceExtensionProperties( |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1563 | VkPhysicalDevice physicalDevice, |
| 1564 | const char* pLayerName, |
| 1565 | uint32_t* pCount, |
| 1566 | VkExtensionProperties* pProperties) |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1567 | { |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1568 | |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1569 | if (pCount == NULL) { |
| 1570 | return VK_ERROR_INVALID_POINTER; |
| 1571 | } |
| 1572 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1573 | *pCount = 0; |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 1574 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1575 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1576 | } |
| 1577 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1578 | ICD_EXPORT VkResult VKAPI vkCreateImage( |
| 1579 | VkDevice device, |
| 1580 | const VkImageCreateInfo* pCreateInfo, |
| 1581 | VkImage* pImage) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1582 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1583 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1584 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 1585 | |
| 1586 | return nulldrv_img_create(dev, pCreateInfo, false, |
| 1587 | (struct nulldrv_img **) pImage); |
| 1588 | } |
| 1589 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1590 | ICD_EXPORT VkResult VKAPI vkDestroyImage( |
| 1591 | VkDevice device, |
| 1592 | VkImage image) |
| 1593 | { |
| 1594 | NULLDRV_LOG_FUNC; |
| 1595 | return VK_SUCCESS; |
| 1596 | } |
| 1597 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1598 | ICD_EXPORT VkResult VKAPI vkGetImageSubresourceLayout( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1599 | VkDevice device, |
| 1600 | VkImage image, |
| 1601 | const VkImageSubresource* pSubresource, |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1602 | VkSubresourceLayout* pLayout) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1603 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1604 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1605 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1606 | pLayout->offset = 0; |
| 1607 | pLayout->size = 1; |
| 1608 | pLayout->rowPitch = 4; |
| 1609 | pLayout->depthPitch = 4; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1610 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1611 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1612 | } |
| 1613 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1614 | ICD_EXPORT VkResult VKAPI vkAllocMemory( |
| 1615 | VkDevice device, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 1616 | const VkMemoryAllocInfo* pAllocInfo, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1617 | VkDeviceMemory* pMem) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1618 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1619 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1620 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 1621 | |
| 1622 | return nulldrv_mem_alloc(dev, pAllocInfo, (struct nulldrv_mem **) pMem); |
| 1623 | } |
| 1624 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1625 | ICD_EXPORT VkResult VKAPI vkFreeMemory( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1626 | VkDevice device, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1627 | VkDeviceMemory mem_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1628 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1629 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1630 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1631 | } |
| 1632 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1633 | ICD_EXPORT VkResult VKAPI vkMapMemory( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1634 | VkDevice device, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1635 | VkDeviceMemory mem_, |
Tony Barbour | 3e3420a | 2015-04-16 19:09:28 -0600 | [diff] [blame] | 1636 | VkDeviceSize offset, |
| 1637 | VkDeviceSize size, |
| 1638 | VkFlags flags, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1639 | void** ppData) |
| 1640 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1641 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1642 | struct nulldrv_mem *mem = nulldrv_mem(mem_); |
| 1643 | void *ptr = nulldrv_mem_map(mem, flags); |
| 1644 | |
| 1645 | *ppData = ptr; |
| 1646 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1647 | return (ptr) ? VK_SUCCESS : VK_ERROR_UNKNOWN; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1648 | } |
| 1649 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1650 | ICD_EXPORT VkResult VKAPI vkUnmapMemory( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1651 | VkDevice device, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1652 | VkDeviceMemory mem_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1653 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1654 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1655 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1656 | } |
| 1657 | |
Courtney Goeltzenleuchter | a569a50 | 2015-04-29 17:16:21 -0600 | [diff] [blame] | 1658 | ICD_EXPORT VkResult VKAPI vkFlushMappedMemoryRanges( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1659 | VkDevice device, |
Courtney Goeltzenleuchter | a569a50 | 2015-04-29 17:16:21 -0600 | [diff] [blame] | 1660 | uint32_t memRangeCount, |
| 1661 | const VkMappedMemoryRange* pMemRanges) |
| 1662 | { |
| 1663 | NULLDRV_LOG_FUNC; |
| 1664 | return VK_SUCCESS; |
| 1665 | } |
| 1666 | |
| 1667 | ICD_EXPORT VkResult VKAPI vkInvalidateMappedMemoryRanges( |
| 1668 | VkDevice device, |
| 1669 | uint32_t memRangeCount, |
| 1670 | const VkMappedMemoryRange* pMemRanges) |
Ian Elliott | 07de923 | 2015-04-17 10:04:00 -0600 | [diff] [blame] | 1671 | { |
| 1672 | NULLDRV_LOG_FUNC; |
| 1673 | return VK_SUCCESS; |
| 1674 | } |
| 1675 | |
Courtney Goeltzenleuchter | d040c5c | 2015-07-09 21:57:28 -0600 | [diff] [blame] | 1676 | ICD_EXPORT VkResult VKAPI vkGetDeviceMemoryCommitment( |
| 1677 | VkDevice device, |
| 1678 | VkDeviceMemory memory, |
| 1679 | VkDeviceSize* pCommittedMemoryInBytes) |
| 1680 | { |
| 1681 | return VK_SUCCESS; |
| 1682 | } |
| 1683 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1684 | ICD_EXPORT VkResult VKAPI vkCreateInstance( |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 1685 | const VkInstanceCreateInfo* pCreateInfo, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1686 | VkInstance* pInstance) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1687 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1688 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1689 | struct nulldrv_instance *inst; |
| 1690 | |
| 1691 | inst = (struct nulldrv_instance *) nulldrv_base_create(NULL, sizeof(*inst), |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 1692 | VK_OBJECT_TYPE_INSTANCE); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1693 | if (!inst) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1694 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1695 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 1696 | inst->obj.base.get_memory_requirements = NULL; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1697 | |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1698 | *pInstance = (VkInstance) inst; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1699 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1700 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1701 | } |
| 1702 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1703 | ICD_EXPORT VkResult VKAPI vkDestroyInstance( |
| 1704 | VkInstance pInstance) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1705 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1706 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1707 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1708 | } |
| 1709 | |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1710 | ICD_EXPORT VkResult VKAPI vkEnumeratePhysicalDevices( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1711 | VkInstance instance, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1712 | uint32_t* pGpuCount, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1713 | VkPhysicalDevice* pGpus) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1714 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1715 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1716 | VkResult ret; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1717 | struct nulldrv_gpu *gpu; |
| 1718 | *pGpuCount = 1; |
| 1719 | ret = nulldrv_gpu_add(0, 0, 0, &gpu); |
David Pinedo | f676845 | 2015-04-21 14:44:02 -0600 | [diff] [blame] | 1720 | if (ret == VK_SUCCESS && pGpus) |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1721 | pGpus[0] = (VkPhysicalDevice) gpu; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1722 | return ret; |
| 1723 | } |
| 1724 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1725 | ICD_EXPORT VkResult VKAPI vkEnumerateLayers( |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1726 | VkPhysicalDevice gpu, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1727 | size_t maxStringSize, |
Courtney Goeltzenleuchter | bb1f360 | 2015-04-20 11:04:54 -0600 | [diff] [blame] | 1728 | size_t* pLayerCount, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1729 | char* const* pOutLayers, |
| 1730 | void* pReserved) |
| 1731 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1732 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1733 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1734 | } |
| 1735 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1736 | ICD_EXPORT VkResult VKAPI vkGetBufferMemoryRequirements( |
| 1737 | VkDevice device, |
| 1738 | VkBuffer buffer, |
| 1739 | VkMemoryRequirements* pMemoryRequirements) |
| 1740 | { |
| 1741 | NULLDRV_LOG_FUNC; |
| 1742 | struct nulldrv_base *base = nulldrv_base((void*)buffer.handle); |
| 1743 | |
| 1744 | return base->get_memory_requirements(base, pMemoryRequirements); |
| 1745 | } |
| 1746 | |
| 1747 | ICD_EXPORT VkResult VKAPI vkGetImageMemoryRequirements( |
| 1748 | VkDevice device, |
| 1749 | VkImage image, |
| 1750 | VkMemoryRequirements* pMemoryRequirements) |
| 1751 | { |
| 1752 | NULLDRV_LOG_FUNC; |
| 1753 | struct nulldrv_base *base = nulldrv_base((void*)image.handle); |
| 1754 | |
| 1755 | return base->get_memory_requirements(base, pMemoryRequirements); |
| 1756 | } |
| 1757 | |
| 1758 | ICD_EXPORT VkResult VKAPI vkBindBufferMemory( |
| 1759 | VkDevice device, |
| 1760 | VkBuffer buffer, |
| 1761 | VkDeviceMemory mem_, |
| 1762 | VkDeviceSize memOffset) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1763 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1764 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1765 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1766 | } |
| 1767 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1768 | ICD_EXPORT VkResult VKAPI vkBindImageMemory( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1769 | VkDevice device, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1770 | VkImage image, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1771 | VkDeviceMemory mem_, |
| 1772 | VkDeviceSize memOffset) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1773 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1774 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1775 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1776 | } |
| 1777 | |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 1778 | ICD_EXPORT VkResult VKAPI vkGetImageSparseMemoryRequirements( |
| 1779 | VkDevice device, |
| 1780 | VkImage image, |
| 1781 | uint32_t* pNumRequirements, |
| 1782 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) |
| 1783 | { |
| 1784 | NULLDRV_LOG_FUNC; |
| 1785 | return VK_SUCCESS; |
| 1786 | } |
| 1787 | |
| 1788 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceSparseImageFormatProperties( |
| 1789 | VkPhysicalDevice physicalDevice, |
| 1790 | VkFormat format, |
| 1791 | VkImageType type, |
| 1792 | uint32_t samples, |
| 1793 | VkImageUsageFlags usage, |
| 1794 | VkImageTiling tiling, |
| 1795 | uint32_t* pNumProperties, |
| 1796 | VkSparseImageFormatProperties* pProperties) |
| 1797 | { |
| 1798 | NULLDRV_LOG_FUNC; |
| 1799 | return VK_SUCCESS; |
| 1800 | } |
| 1801 | |
Mark Lobodzinski | fb9f564 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 1802 | ICD_EXPORT VkResult VKAPI vkQueueBindSparseBufferMemory( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1803 | VkQueue queue, |
Mark Lobodzinski | fb9f564 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 1804 | VkBuffer buffer, |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 1805 | uint32_t numBindings, |
| 1806 | const VkSparseMemoryBindInfo* pBindInfo) |
| 1807 | { |
| 1808 | NULLDRV_LOG_FUNC; |
| 1809 | return VK_SUCCESS; |
| 1810 | } |
| 1811 | |
| 1812 | ICD_EXPORT VkResult VKAPI vkQueueBindSparseImageOpaqueMemory( |
| 1813 | VkQueue queue, |
| 1814 | VkImage image, |
| 1815 | uint32_t numBindings, |
| 1816 | const VkSparseMemoryBindInfo* pBindInfo) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1817 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1818 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1819 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1820 | } |
| 1821 | |
Mark Lobodzinski | fb9f564 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 1822 | ICD_EXPORT VkResult VKAPI vkQueueBindSparseImageMemory( |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 1823 | VkQueue queue, |
| 1824 | VkImage image, |
| 1825 | uint32_t numBindings, |
| 1826 | const VkSparseImageMemoryBindInfo* pBindInfo) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1827 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1828 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1829 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1830 | } |
Jon Ashburn | 0e24996 | 2015-07-10 09:41:15 -0700 | [diff] [blame] | 1831 | ICD_EXPORT VkResult VKAPI vkCreatePipelineCache( |
| 1832 | VkDevice device, |
| 1833 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 1834 | VkPipelineCache* pPipelineCache) |
| 1835 | { |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1836 | |
Jon Ashburn | 0e24996 | 2015-07-10 09:41:15 -0700 | [diff] [blame] | 1837 | NULLDRV_LOG_FUNC; |
| 1838 | return VK_SUCCESS; |
| 1839 | } |
| 1840 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1841 | ICD_EXPORT VkResult VKAPI vkDestroyPipeline( |
| 1842 | VkDevice device, |
| 1843 | VkPipeline pipeline) |
| 1844 | { |
| 1845 | NULLDRV_LOG_FUNC; |
| 1846 | return VK_SUCCESS; |
| 1847 | } |
| 1848 | |
Courtney Goeltzenleuchter | a4cd819 | 2015-07-10 17:44:33 -0600 | [diff] [blame] | 1849 | VkResult VKAPI vkDestroyPipelineCache( |
| 1850 | VkDevice device, |
| 1851 | VkPipelineCache pipelineCache) |
Jon Ashburn | 0e24996 | 2015-07-10 09:41:15 -0700 | [diff] [blame] | 1852 | { |
| 1853 | NULLDRV_LOG_FUNC; |
| 1854 | return VK_SUCCESS; |
| 1855 | } |
| 1856 | |
| 1857 | ICD_EXPORT size_t VKAPI vkGetPipelineCacheSize( |
| 1858 | VkDevice device, |
| 1859 | VkPipelineCache pipelineCache) |
| 1860 | { |
| 1861 | NULLDRV_LOG_FUNC; |
| 1862 | return VK_ERROR_UNAVAILABLE; |
| 1863 | } |
| 1864 | |
| 1865 | ICD_EXPORT VkResult VKAPI vkGetPipelineCacheData( |
| 1866 | VkDevice device, |
| 1867 | VkPipelineCache pipelineCache, |
| 1868 | void* pData) |
| 1869 | { |
| 1870 | NULLDRV_LOG_FUNC; |
| 1871 | return VK_ERROR_UNAVAILABLE; |
| 1872 | } |
| 1873 | |
| 1874 | ICD_EXPORT VkResult VKAPI vkMergePipelineCaches( |
| 1875 | VkDevice device, |
| 1876 | VkPipelineCache destCache, |
| 1877 | uint32_t srcCacheCount, |
| 1878 | const VkPipelineCache* pSrcCaches) |
| 1879 | { |
| 1880 | NULLDRV_LOG_FUNC; |
| 1881 | return VK_ERROR_UNAVAILABLE; |
| 1882 | } |
| 1883 | ICD_EXPORT VkResult VKAPI vkCreateGraphicsPipelines( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1884 | VkDevice device, |
Jon Ashburn | 0e24996 | 2015-07-10 09:41:15 -0700 | [diff] [blame] | 1885 | VkPipelineCache pipelineCache, |
| 1886 | uint32_t count, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1887 | const VkGraphicsPipelineCreateInfo* pCreateInfo, |
| 1888 | VkPipeline* pPipeline) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1889 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1890 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1891 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 1892 | |
| 1893 | return graphics_pipeline_create(dev, pCreateInfo, |
| 1894 | (struct nulldrv_pipeline **) pPipeline); |
| 1895 | } |
| 1896 | |
Courtney Goeltzenleuchter | 32876a1 | 2015-03-25 15:37:49 -0600 | [diff] [blame] | 1897 | |
Courtney Goeltzenleuchter | 32876a1 | 2015-03-25 15:37:49 -0600 | [diff] [blame] | 1898 | |
Jon Ashburn | 0e24996 | 2015-07-10 09:41:15 -0700 | [diff] [blame] | 1899 | ICD_EXPORT VkResult VKAPI vkCreateComputePipelines( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1900 | VkDevice device, |
Jon Ashburn | 0e24996 | 2015-07-10 09:41:15 -0700 | [diff] [blame] | 1901 | VkPipelineCache pipelineCache, |
| 1902 | uint32_t count, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1903 | const VkComputePipelineCreateInfo* pCreateInfo, |
| 1904 | VkPipeline* pPipeline) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1905 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1906 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1907 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1908 | } |
| 1909 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1910 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1911 | |
Jon Ashburn | 0e24996 | 2015-07-10 09:41:15 -0700 | [diff] [blame] | 1912 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1913 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1914 | ICD_EXPORT VkResult VKAPI vkCreateQueryPool( |
| 1915 | VkDevice device, |
| 1916 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 1917 | VkQueryPool* pQueryPool) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1918 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1919 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1920 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1921 | } |
| 1922 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1923 | ICD_EXPORT VkResult VKAPI vkDestroyQueryPool( |
| 1924 | VkDevice device, |
| 1925 | VkQueryPool queryPoool) |
| 1926 | { |
| 1927 | NULLDRV_LOG_FUNC; |
| 1928 | return VK_SUCCESS; |
| 1929 | } |
| 1930 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1931 | ICD_EXPORT VkResult VKAPI vkGetQueryPoolResults( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 1932 | VkDevice device, |
| 1933 | VkQueryPool queryPool, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1934 | uint32_t startQuery, |
| 1935 | uint32_t queryCount, |
| 1936 | size_t* pDataSize, |
Tony Barbour | 8205d90 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 1937 | void* pData, |
| 1938 | VkQueryResultFlags flags) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1939 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1940 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1941 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1942 | } |
| 1943 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1944 | ICD_EXPORT VkResult VKAPI vkQueueWaitIdle( |
| 1945 | VkQueue queue_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1946 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1947 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1948 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1949 | } |
| 1950 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1951 | ICD_EXPORT VkResult VKAPI vkQueueSubmit( |
| 1952 | VkQueue queue_, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1953 | uint32_t cmdBufferCount, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1954 | const VkCmdBuffer* pCmdBuffers, |
| 1955 | VkFence fence_) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1956 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1957 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1958 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1959 | } |
| 1960 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1961 | ICD_EXPORT VkResult VKAPI vkCreateSemaphore( |
| 1962 | VkDevice device, |
| 1963 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 1964 | VkSemaphore* pSemaphore) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1965 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1966 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1967 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1968 | } |
| 1969 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1970 | ICD_EXPORT VkResult VKAPI vkDestroySemaphore( |
| 1971 | VkDevice device, |
| 1972 | VkSemaphore semaphore) |
| 1973 | { |
| 1974 | NULLDRV_LOG_FUNC; |
| 1975 | return VK_SUCCESS; |
| 1976 | } |
| 1977 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1978 | ICD_EXPORT VkResult VKAPI vkQueueSignalSemaphore( |
| 1979 | VkQueue queue, |
| 1980 | VkSemaphore semaphore) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1981 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1982 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1983 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1984 | } |
| 1985 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1986 | ICD_EXPORT VkResult VKAPI vkQueueWaitSemaphore( |
| 1987 | VkQueue queue, |
| 1988 | VkSemaphore semaphore) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1989 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1990 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1991 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1992 | } |
| 1993 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1994 | ICD_EXPORT VkResult VKAPI vkCreateSampler( |
| 1995 | VkDevice device, |
| 1996 | const VkSamplerCreateInfo* pCreateInfo, |
| 1997 | VkSampler* pSampler) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 1998 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 1999 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2000 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2001 | |
| 2002 | return nulldrv_sampler_create(dev, pCreateInfo, |
| 2003 | (struct nulldrv_sampler **) pSampler); |
| 2004 | } |
| 2005 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2006 | ICD_EXPORT VkResult VKAPI vkDestroySampler( |
| 2007 | VkDevice device, |
| 2008 | VkSampler sampler) |
| 2009 | { |
| 2010 | NULLDRV_LOG_FUNC; |
| 2011 | return VK_SUCCESS; |
| 2012 | } |
| 2013 | |
Ian Elliott | e924ab2 | 2015-07-08 13:24:30 -0600 | [diff] [blame] | 2014 | ICD_EXPORT VkResult VKAPI vkCreateShaderModule( |
| 2015 | VkDevice device, |
| 2016 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 2017 | VkShaderModule* pShaderModule) |
| 2018 | { |
| 2019 | // TODO: Fill in with real data |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2020 | NULLDRV_LOG_FUNC; |
| 2021 | return VK_SUCCESS; |
| 2022 | } |
| 2023 | |
| 2024 | ICD_EXPORT VkResult VKAPI vkDestroyShaderModule( |
| 2025 | VkDevice device, |
| 2026 | VkShaderModule shaderModule) |
| 2027 | { |
| 2028 | // TODO: Fill in with real data |
| 2029 | NULLDRV_LOG_FUNC; |
Ian Elliott | e924ab2 | 2015-07-08 13:24:30 -0600 | [diff] [blame] | 2030 | return VK_SUCCESS; |
| 2031 | } |
| 2032 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2033 | ICD_EXPORT VkResult VKAPI vkCreateShader( |
| 2034 | VkDevice device, |
| 2035 | const VkShaderCreateInfo* pCreateInfo, |
| 2036 | VkShader* pShader) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2037 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2038 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2039 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2040 | |
| 2041 | return shader_create(dev, pCreateInfo, (struct nulldrv_shader **) pShader); |
| 2042 | } |
| 2043 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2044 | ICD_EXPORT VkResult VKAPI vkDestroyShader( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2045 | VkDevice device, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2046 | VkShader shader) |
| 2047 | { |
| 2048 | NULLDRV_LOG_FUNC; |
| 2049 | return VK_SUCCESS; |
| 2050 | } |
| 2051 | |
| 2052 | ICD_EXPORT VkResult VKAPI vkCreateDynamicViewportState( |
| 2053 | VkDevice device, |
| 2054 | const VkDynamicViewportStateCreateInfo* pCreateInfo, |
| 2055 | VkDynamicViewportState* pState) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2056 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2057 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2058 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2059 | |
| 2060 | return nulldrv_viewport_state_create(dev, pCreateInfo, |
| 2061 | (struct nulldrv_dynamic_vp **) pState); |
| 2062 | } |
| 2063 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2064 | ICD_EXPORT VkResult VKAPI vkDestroyDynamicViewportState( |
| 2065 | VkDevice device, |
| 2066 | VkDynamicViewportState dynamicViewportState) |
| 2067 | { |
| 2068 | NULLDRV_LOG_FUNC; |
| 2069 | return VK_SUCCESS; |
| 2070 | } |
| 2071 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2072 | ICD_EXPORT VkResult VKAPI vkCreateDynamicRasterState( |
| 2073 | VkDevice device, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2074 | const VkDynamicRasterStateCreateInfo* pCreateInfo, |
| 2075 | VkDynamicRasterState* pState) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2076 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2077 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2078 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2079 | |
| 2080 | return nulldrv_raster_state_create(dev, pCreateInfo, |
| 2081 | (struct nulldrv_dynamic_rs **) pState); |
| 2082 | } |
| 2083 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2084 | ICD_EXPORT VkResult VKAPI vkDestroyDynamicRasterState( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2085 | VkDevice device, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2086 | VkDynamicRasterState dynamicRasterState) |
| 2087 | { |
| 2088 | NULLDRV_LOG_FUNC; |
| 2089 | return VK_SUCCESS; |
| 2090 | } |
| 2091 | |
| 2092 | ICD_EXPORT VkResult VKAPI vkCreateDynamicColorBlendState( |
| 2093 | VkDevice device, |
| 2094 | const VkDynamicColorBlendStateCreateInfo* pCreateInfo, |
| 2095 | VkDynamicColorBlendState* pState) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2096 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2097 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2098 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2099 | |
| 2100 | return nulldrv_blend_state_create(dev, pCreateInfo, |
| 2101 | (struct nulldrv_dynamic_cb **) pState); |
| 2102 | } |
| 2103 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2104 | ICD_EXPORT VkResult VKAPI vkDestroyDynamicColorBlendState( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2105 | VkDevice device, |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2106 | VkDynamicColorBlendState dynamicColorBlendState) |
| 2107 | { |
| 2108 | NULLDRV_LOG_FUNC; |
| 2109 | return VK_SUCCESS; |
| 2110 | } |
| 2111 | |
| 2112 | ICD_EXPORT VkResult VKAPI vkCreateDynamicDepthStencilState( |
| 2113 | VkDevice device, |
| 2114 | const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, |
| 2115 | VkDynamicDepthStencilState* pState) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2116 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2117 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2118 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2119 | |
| 2120 | return nulldrv_ds_state_create(dev, pCreateInfo, |
| 2121 | (struct nulldrv_dynamic_ds **) pState); |
| 2122 | } |
| 2123 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2124 | ICD_EXPORT VkResult VKAPI vkDestroyDynamicDepthStencilState( |
| 2125 | VkDevice device, |
| 2126 | VkDynamicDepthStencilState dynamicDepthStencilState) |
| 2127 | { |
| 2128 | NULLDRV_LOG_FUNC; |
| 2129 | return VK_SUCCESS; |
| 2130 | } |
| 2131 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2132 | ICD_EXPORT VkResult VKAPI vkCreateBufferView( |
| 2133 | VkDevice device, |
Courtney Goeltzenleuchter | ddcb619 | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 2134 | const VkBufferViewCreateInfo* pCreateInfo, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2135 | VkBufferView* pView) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2136 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2137 | NULLDRV_LOG_FUNC; |
| 2138 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2139 | |
| 2140 | return nulldrv_buf_view_create(dev, pCreateInfo, |
| 2141 | (struct nulldrv_buf_view **) pView); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2142 | } |
| 2143 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2144 | ICD_EXPORT VkResult VKAPI vkDestroyBufferView( |
| 2145 | VkDevice device, |
| 2146 | VkBufferView bufferView) |
| 2147 | { |
| 2148 | NULLDRV_LOG_FUNC; |
| 2149 | return VK_SUCCESS; |
| 2150 | } |
| 2151 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2152 | ICD_EXPORT VkResult VKAPI vkCreateImageView( |
| 2153 | VkDevice device, |
| 2154 | const VkImageViewCreateInfo* pCreateInfo, |
| 2155 | VkImageView* pView) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2156 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2157 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2158 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2159 | |
| 2160 | return nulldrv_img_view_create(dev, pCreateInfo, |
| 2161 | (struct nulldrv_img_view **) pView); |
| 2162 | } |
| 2163 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2164 | ICD_EXPORT VkResult VKAPI vkDestroyImageView( |
| 2165 | VkDevice device, |
| 2166 | VkImageView imageView) |
| 2167 | { |
| 2168 | NULLDRV_LOG_FUNC; |
| 2169 | return VK_SUCCESS; |
| 2170 | } |
| 2171 | |
Courtney Goeltzenleuchter | a4cd819 | 2015-07-10 17:44:33 -0600 | [diff] [blame] | 2172 | ICD_EXPORT VkResult VKAPI vkCreateAttachmentView( |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2173 | VkDevice device, |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 2174 | const VkAttachmentViewCreateInfo* pCreateInfo, |
| 2175 | VkAttachmentView* pView) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2176 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2177 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2178 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2179 | |
| 2180 | return nulldrv_rt_view_create(dev, pCreateInfo, |
| 2181 | (struct nulldrv_rt_view **) pView); |
| 2182 | } |
| 2183 | |
Courtney Goeltzenleuchter | a4cd819 | 2015-07-10 17:44:33 -0600 | [diff] [blame] | 2184 | ICD_EXPORT VkResult VKAPI vkDestroyAttachmentView( |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2185 | VkDevice device, |
Courtney Goeltzenleuchter | a4cd819 | 2015-07-10 17:44:33 -0600 | [diff] [blame] | 2186 | VkAttachmentView attachmentView) |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2187 | { |
| 2188 | NULLDRV_LOG_FUNC; |
| 2189 | return VK_SUCCESS; |
| 2190 | } |
| 2191 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2192 | ICD_EXPORT VkResult VKAPI vkCreateDescriptorSetLayout( |
| 2193 | VkDevice device, |
| 2194 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 2195 | VkDescriptorSetLayout* pSetLayout) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2196 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2197 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2198 | struct nulldrv_dev *dev = nulldrv_dev(device); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2199 | |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 2200 | return nulldrv_desc_layout_create(dev, pCreateInfo, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2201 | (struct nulldrv_desc_layout **) pSetLayout); |
| 2202 | } |
| 2203 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2204 | ICD_EXPORT VkResult VKAPI vkDestroyDescriptorSetLayout( |
| 2205 | VkDevice device, |
| 2206 | VkDescriptorSetLayout descriptorSetLayout) |
| 2207 | { |
| 2208 | NULLDRV_LOG_FUNC; |
| 2209 | return VK_SUCCESS; |
| 2210 | } |
| 2211 | |
Mark Lobodzinski | 556f721 | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 2212 | ICD_EXPORT VkResult VKAPI vkCreatePipelineLayout( |
| 2213 | VkDevice device, |
| 2214 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 2215 | VkPipelineLayout* pPipelineLayout) |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 2216 | { |
| 2217 | NULLDRV_LOG_FUNC; |
| 2218 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2219 | |
Mark Lobodzinski | 556f721 | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 2220 | return nulldrv_pipeline_layout_create(dev, |
| 2221 | pCreateInfo, |
| 2222 | (struct nulldrv_pipeline_layout **) pPipelineLayout); |
Chia-I Wu | 7732cb2 | 2015-03-26 15:27:55 +0800 | [diff] [blame] | 2223 | } |
| 2224 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2225 | ICD_EXPORT VkResult VKAPI vkDestroyPipelineLayout( |
| 2226 | VkDevice device, |
| 2227 | VkPipelineLayout pipelineLayout) |
| 2228 | { |
| 2229 | NULLDRV_LOG_FUNC; |
| 2230 | return VK_SUCCESS; |
| 2231 | } |
| 2232 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2233 | ICD_EXPORT VkResult VKAPI vkCreateDescriptorPool( |
| 2234 | VkDevice device, |
| 2235 | VkDescriptorPoolUsage poolUsage, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2236 | uint32_t maxSets, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2237 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 2238 | VkDescriptorPool* pDescriptorPool) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2239 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2240 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2241 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2242 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 2243 | return nulldrv_desc_pool_create(dev, poolUsage, maxSets, pCreateInfo, |
| 2244 | (struct nulldrv_desc_pool **) pDescriptorPool); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2245 | } |
| 2246 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2247 | ICD_EXPORT VkResult VKAPI vkDestroyDescriptorPool( |
| 2248 | VkDevice device, |
| 2249 | VkDescriptorPool descriptorPool) |
| 2250 | { |
| 2251 | NULLDRV_LOG_FUNC; |
| 2252 | return VK_SUCCESS; |
| 2253 | } |
| 2254 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2255 | ICD_EXPORT VkResult VKAPI vkResetDescriptorPool( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 2256 | VkDevice device, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2257 | VkDescriptorPool descriptorPool) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2258 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2259 | NULLDRV_LOG_FUNC; |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 2260 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2261 | } |
| 2262 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2263 | ICD_EXPORT VkResult VKAPI vkAllocDescriptorSets( |
Mike Stroyan | 230e625 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 2264 | VkDevice device, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2265 | VkDescriptorPool descriptorPool, |
| 2266 | VkDescriptorSetUsage setUsage, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2267 | uint32_t count, |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2268 | const VkDescriptorSetLayout* pSetLayouts, |
Cody Northrop | c8aa4a5 | 2015-08-03 12:47:29 -0600 | [diff] [blame] | 2269 | VkDescriptorSet* pDescriptorSets) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2270 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2271 | NULLDRV_LOG_FUNC; |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 2272 | struct nulldrv_desc_pool *pool = nulldrv_desc_pool(descriptorPool); |
| 2273 | struct nulldrv_dev *dev = pool->dev; |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2274 | VkResult ret = VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2275 | uint32_t i; |
| 2276 | |
| 2277 | for (i = 0; i < count; i++) { |
| 2278 | const struct nulldrv_desc_layout *layout = |
Tony Barbour | 8db6537 | 2015-07-10 18:32:33 -0600 | [diff] [blame] | 2279 | nulldrv_desc_layout(pSetLayouts[i]); |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2280 | |
Chia-I Wu | 8d24b3b | 2015-03-26 13:14:16 +0800 | [diff] [blame] | 2281 | ret = nulldrv_desc_set_create(dev, pool, setUsage, layout, |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2282 | (struct nulldrv_desc_set **) &pDescriptorSets[i]); |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 2283 | if (ret != VK_SUCCESS) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2284 | break; |
| 2285 | } |
| 2286 | |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2287 | return ret; |
| 2288 | } |
| 2289 | |
Tony Barbour | b857d31 | 2015-07-10 10:50:45 -0600 | [diff] [blame] | 2290 | ICD_EXPORT VkResult VKAPI vkFreeDescriptorSets( |
| 2291 | VkDevice device, |
| 2292 | VkDescriptorPool descriptorPool, |
| 2293 | uint32_t count, |
| 2294 | const VkDescriptorSet* pDescriptorSets) |
| 2295 | { |
| 2296 | NULLDRV_LOG_FUNC; |
| 2297 | return VK_SUCCESS; |
| 2298 | } |
| 2299 | |
Chia-I Wu | 8cd8ecd | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 2300 | ICD_EXPORT VkResult VKAPI vkUpdateDescriptorSets( |
| 2301 | VkDevice device, |
| 2302 | uint32_t writeCount, |
| 2303 | const VkWriteDescriptorSet* pDescriptorWrites, |
| 2304 | uint32_t copyCount, |
| 2305 | const VkCopyDescriptorSet* pDescriptorCopies) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2306 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2307 | NULLDRV_LOG_FUNC; |
Chia-I Wu | 8cd8ecd | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 2308 | return VK_SUCCESS; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2309 | } |
| 2310 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2311 | ICD_EXPORT VkResult VKAPI vkCreateFramebuffer( |
| 2312 | VkDevice device, |
| 2313 | const VkFramebufferCreateInfo* info, |
| 2314 | VkFramebuffer* fb_ret) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2315 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2316 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2317 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2318 | |
| 2319 | return nulldrv_fb_create(dev, info, (struct nulldrv_framebuffer **) fb_ret); |
| 2320 | } |
| 2321 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2322 | ICD_EXPORT VkResult VKAPI vkDestroyFramebuffer( |
| 2323 | VkDevice device, |
| 2324 | VkFramebuffer framebuffer) |
| 2325 | { |
| 2326 | NULLDRV_LOG_FUNC; |
| 2327 | return VK_SUCCESS; |
| 2328 | } |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2329 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2330 | ICD_EXPORT VkResult VKAPI vkCreateRenderPass( |
| 2331 | VkDevice device, |
| 2332 | const VkRenderPassCreateInfo* info, |
| 2333 | VkRenderPass* rp_ret) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2334 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2335 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2336 | struct nulldrv_dev *dev = nulldrv_dev(device); |
| 2337 | |
| 2338 | return nulldrv_render_pass_create(dev, info, (struct nulldrv_render_pass **) rp_ret); |
| 2339 | } |
| 2340 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 2341 | ICD_EXPORT VkResult VKAPI vkDestroyRenderPass( |
| 2342 | VkDevice device, |
| 2343 | VkRenderPass renderPass) |
| 2344 | { |
| 2345 | NULLDRV_LOG_FUNC; |
| 2346 | return VK_SUCCESS; |
| 2347 | } |
| 2348 | |
Courtney Goeltzenleuchter | a375b62 | 2015-07-27 14:04:01 -0600 | [diff] [blame] | 2349 | ICD_EXPORT void VKAPI vkCmdPushConstants( |
| 2350 | VkCmdBuffer cmdBuffer, |
| 2351 | VkPipelineLayout layout, |
| 2352 | VkShaderStageFlags stageFlags, |
| 2353 | uint32_t start, |
| 2354 | uint32_t length, |
| 2355 | const void* values) |
| 2356 | { |
| 2357 | /* TODO: Implement */ |
| 2358 | } |
| 2359 | |
Courtney Goeltzenleuchter | 07fe066 | 2015-07-27 13:47:08 -0600 | [diff] [blame] | 2360 | ICD_EXPORT VkResult VKAPI vkGetRenderAreaGranularity( |
| 2361 | VkDevice device, |
| 2362 | VkRenderPass renderPass, |
| 2363 | VkExtent2D* pGranularity) |
| 2364 | { |
| 2365 | pGranularity->height = 1; |
| 2366 | pGranularity->width = 1; |
| 2367 | |
| 2368 | return VK_SUCCESS; |
| 2369 | } |
| 2370 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 2371 | ICD_EXPORT void VKAPI vkCmdBeginRenderPass( |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 2372 | VkCmdBuffer cmdBuffer, |
| 2373 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 2374 | VkRenderPassContents contents) |
| 2375 | { |
| 2376 | NULLDRV_LOG_FUNC; |
| 2377 | } |
| 2378 | |
| 2379 | ICD_EXPORT void VKAPI vkCmdNextSubpass( |
| 2380 | VkCmdBuffer cmdBuffer, |
| 2381 | VkRenderPassContents contents) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2382 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2383 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2384 | } |
| 2385 | |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 2386 | ICD_EXPORT void VKAPI vkCmdEndRenderPass( |
Chia-I Wu | 88eaa3b | 2015-06-26 15:34:39 +0800 | [diff] [blame] | 2387 | VkCmdBuffer cmdBuffer) |
| 2388 | { |
| 2389 | NULLDRV_LOG_FUNC; |
| 2390 | } |
| 2391 | |
| 2392 | ICD_EXPORT void VKAPI vkCmdExecuteCommands( |
| 2393 | VkCmdBuffer cmdBuffer, |
| 2394 | uint32_t cmdBuffersCount, |
| 2395 | const VkCmdBuffer* pCmdBuffers) |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2396 | { |
David Pinedo | 8e9cb3b | 2015-02-10 15:02:08 -0700 | [diff] [blame] | 2397 | NULLDRV_LOG_FUNC; |
David Pinedo | 0257fbf | 2015-02-02 18:02:40 -0700 | [diff] [blame] | 2398 | } |
Ian Elliott | f93069f | 2015-02-19 14:26:19 -0700 | [diff] [blame] | 2399 | |
| 2400 | ICD_EXPORT void* xcbCreateWindow( |
| 2401 | uint16_t width, |
| 2402 | uint16_t height) |
| 2403 | { |
| 2404 | static uint32_t window; // Kludge to the max |
| 2405 | NULLDRV_LOG_FUNC; |
| 2406 | return &window; |
| 2407 | } |
| 2408 | |
| 2409 | // May not be needed, if we stub out stuf in tri.c |
| 2410 | ICD_EXPORT void xcbDestroyWindow() |
| 2411 | { |
| 2412 | NULLDRV_LOG_FUNC; |
| 2413 | } |
| 2414 | |
| 2415 | ICD_EXPORT int xcbGetMessage(void *msg) |
| 2416 | { |
| 2417 | NULLDRV_LOG_FUNC; |
| 2418 | return 0; |
| 2419 | } |
| 2420 | |
Courtney Goeltzenleuchter | 382489d | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 2421 | ICD_EXPORT VkResult xcbQueuePresent(void *queue, void *image, void* fence) |
Ian Elliott | f93069f | 2015-02-19 14:26:19 -0700 | [diff] [blame] | 2422 | { |
Courtney Goeltzenleuchter | 9cc421e | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 2423 | return VK_SUCCESS; |
Ian Elliott | f93069f | 2015-02-19 14:26:19 -0700 | [diff] [blame] | 2424 | } |
David Pinedo | 07494fd | 2015-07-24 10:54:41 -0600 | [diff] [blame] | 2425 | |
| 2426 | ICD_EXPORT VkResult VKAPI vkGetPhysicalDeviceImageFormatProperties( |
| 2427 | VkPhysicalDevice physicalDevice, |
| 2428 | VkFormat format, |
| 2429 | VkImageType type, |
| 2430 | VkImageTiling tiling, |
| 2431 | VkImageUsageFlags usage, |
| 2432 | VkImageFormatProperties* pImageFormatProperties) |
| 2433 | { |
| 2434 | return VK_ERROR_UNAVAILABLE; |
| 2435 | } |