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