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