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