| Lingfeng Yang | 6a28367 | 2018-11-01 13:37:56 -0700 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 2 | // Copyright (C) 2018 Google Inc. |
| Lingfeng Yang | 6a28367 | 2018-11-01 13:37:56 -0700 | [diff] [blame] | 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 15 | |
| 16 | // Autogenerated module VkEncoder |
| 17 | // (impl) generated by android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/genvk.py -registry android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/vk.xml cereal -o android/android-emugl/host/libs/libOpenglRender/vulkan/cereal |
| 18 | // Please do not modify directly; |
| 19 | // re-run android/scripts/generate-vulkan-sources.sh, |
| 20 | // or directly from Python by defining: |
| 21 | // VULKAN_REGISTRY_XML_DIR : Directory containing genvk.py and vk.xml |
| 22 | // CEREAL_OUTPUT_DIR: Where to put the generated sources. |
| 23 | // python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR |
| 24 | |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 25 | #include "VkEncoder.h" |
| Lingfeng Yang | 6a28367 | 2018-11-01 13:37:56 -0700 | [diff] [blame] | 26 | |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 27 | |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 28 | #include "IOStream.h" |
| 29 | #include "VulkanStream.h" |
| 30 | |
| Lingfeng Yang | 6f3b6c5 | 2018-11-05 14:22:37 -0800 | [diff] [blame] | 31 | #include "android/base/AlignedBuf.h" |
| 32 | |
| Lingfeng Yang | e71c642 | 2018-11-01 19:29:49 -0700 | [diff] [blame] | 33 | #include "goldfish_vk_marshaling_guest.h" |
| 34 | |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | using goldfish_vk::VulkanCountingStream; |
| 41 | using goldfish_vk::VulkanStream; |
| 42 | |
| Lingfeng Yang | 6f3b6c5 | 2018-11-05 14:22:37 -0800 | [diff] [blame] | 43 | using android::aligned_buf_alloc; |
| 44 | using android::aligned_buf_free; |
| 45 | |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 46 | class VkEncoder::Impl { |
| 47 | public: |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 48 | Impl(IOStream* stream) : m_stream(stream) { } |
| 49 | VulkanCountingStream* countingStream() { return &m_countingStream; } |
| 50 | VulkanStream* stream() { return &m_stream; } |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 51 | private: |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 52 | VulkanCountingStream m_countingStream; |
| 53 | VulkanStream m_stream; |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | VkEncoder::VkEncoder(IOStream *stream) : |
| 57 | mImpl(new VkEncoder::Impl(stream)) { } |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 58 | #ifdef VK_VERSION_1_0 |
| 59 | VkResult VkEncoder::vkCreateInstance( |
| 60 | const VkInstanceCreateInfo* pCreateInfo, |
| 61 | const VkAllocationCallbacks* pAllocator, |
| 62 | VkInstance* pInstance) |
| 63 | { |
| 64 | auto stream = mImpl->stream(); |
| 65 | auto countingStream = mImpl->countingStream(); |
| 66 | countingStream->rewind(); |
| 67 | { |
| 68 | marshal_VkInstanceCreateInfo(countingStream, (const VkInstanceCreateInfo*)(pCreateInfo)); |
| 69 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 70 | if (pAllocator) |
| 71 | { |
| 72 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 73 | } |
| 74 | countingStream->write((VkInstance*)pInstance, sizeof(VkInstance)); |
| 75 | } |
| 76 | uint32_t packetSize_vkCreateInstance = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 77 | countingStream->rewind(); |
| 78 | uint32_t opcode_vkCreateInstance = OP_vkCreateInstance; |
| 79 | stream->write(&opcode_vkCreateInstance, sizeof(uint32_t)); |
| 80 | stream->write(&packetSize_vkCreateInstance, sizeof(uint32_t)); |
| 81 | marshal_VkInstanceCreateInfo(stream, (const VkInstanceCreateInfo*)(pCreateInfo)); |
| 82 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 83 | if (pAllocator) |
| 84 | { |
| 85 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 86 | } |
| 87 | stream->write((VkInstance*)pInstance, sizeof(VkInstance)); |
| 88 | stream->read((VkInstance*)pInstance, sizeof(VkInstance)); |
| 89 | VkResult vkCreateInstance_VkResult_return = (VkResult)0; |
| 90 | stream->read(&vkCreateInstance_VkResult_return, sizeof(VkResult)); |
| 91 | return vkCreateInstance_VkResult_return; |
| 92 | } |
| 93 | |
| 94 | void VkEncoder::vkDestroyInstance( |
| 95 | VkInstance instance, |
| 96 | const VkAllocationCallbacks* pAllocator) |
| 97 | { |
| 98 | auto stream = mImpl->stream(); |
| 99 | auto countingStream = mImpl->countingStream(); |
| 100 | countingStream->rewind(); |
| 101 | { |
| 102 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 103 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 104 | if (pAllocator) |
| 105 | { |
| 106 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 107 | } |
| 108 | } |
| 109 | uint32_t packetSize_vkDestroyInstance = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 110 | countingStream->rewind(); |
| 111 | uint32_t opcode_vkDestroyInstance = OP_vkDestroyInstance; |
| 112 | stream->write(&opcode_vkDestroyInstance, sizeof(uint32_t)); |
| 113 | stream->write(&packetSize_vkDestroyInstance, sizeof(uint32_t)); |
| 114 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 115 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 116 | if (pAllocator) |
| 117 | { |
| 118 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | VkResult VkEncoder::vkEnumeratePhysicalDevices( |
| 123 | VkInstance instance, |
| 124 | uint32_t* pPhysicalDeviceCount, |
| 125 | VkPhysicalDevice* pPhysicalDevices) |
| 126 | { |
| 127 | auto stream = mImpl->stream(); |
| 128 | auto countingStream = mImpl->countingStream(); |
| 129 | countingStream->rewind(); |
| 130 | { |
| 131 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 132 | countingStream->write((uint32_t**)&pPhysicalDeviceCount, sizeof(uint32_t*)); |
| 133 | if (pPhysicalDeviceCount) |
| 134 | { |
| 135 | countingStream->write((uint32_t*)pPhysicalDeviceCount, sizeof(uint32_t)); |
| 136 | } |
| 137 | countingStream->write((VkPhysicalDevice**)&pPhysicalDevices, sizeof(VkPhysicalDevice*)); |
| 138 | if (pPhysicalDevices) |
| 139 | { |
| 140 | countingStream->write((VkPhysicalDevice*)pPhysicalDevices, (*(pPhysicalDeviceCount)) * sizeof(VkPhysicalDevice)); |
| 141 | } |
| 142 | } |
| 143 | uint32_t packetSize_vkEnumeratePhysicalDevices = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 144 | countingStream->rewind(); |
| 145 | uint32_t opcode_vkEnumeratePhysicalDevices = OP_vkEnumeratePhysicalDevices; |
| 146 | stream->write(&opcode_vkEnumeratePhysicalDevices, sizeof(uint32_t)); |
| 147 | stream->write(&packetSize_vkEnumeratePhysicalDevices, sizeof(uint32_t)); |
| 148 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 149 | stream->write((uint32_t**)&pPhysicalDeviceCount, sizeof(uint32_t*)); |
| 150 | if (pPhysicalDeviceCount) |
| 151 | { |
| 152 | stream->write((uint32_t*)pPhysicalDeviceCount, sizeof(uint32_t)); |
| 153 | } |
| 154 | stream->write((VkPhysicalDevice**)&pPhysicalDevices, sizeof(VkPhysicalDevice*)); |
| 155 | if (pPhysicalDevices) |
| 156 | { |
| 157 | stream->write((VkPhysicalDevice*)pPhysicalDevices, (*(pPhysicalDeviceCount)) * sizeof(VkPhysicalDevice)); |
| 158 | } |
| 159 | uint32_t* check_pPhysicalDeviceCount; |
| 160 | stream->read((uint32_t**)&check_pPhysicalDeviceCount, sizeof(uint32_t*)); |
| 161 | if (pPhysicalDeviceCount) |
| 162 | { |
| 163 | if (!(check_pPhysicalDeviceCount)) |
| 164 | { |
| 165 | fprintf(stderr, "fatal: pPhysicalDeviceCount inconsistent between guest and host\n"); |
| 166 | } |
| 167 | stream->read((uint32_t*)pPhysicalDeviceCount, sizeof(uint32_t)); |
| 168 | } |
| 169 | VkPhysicalDevice* check_pPhysicalDevices; |
| 170 | stream->read((VkPhysicalDevice**)&check_pPhysicalDevices, sizeof(VkPhysicalDevice*)); |
| 171 | if (pPhysicalDevices) |
| 172 | { |
| 173 | if (!(check_pPhysicalDevices)) |
| 174 | { |
| 175 | fprintf(stderr, "fatal: pPhysicalDevices inconsistent between guest and host\n"); |
| 176 | } |
| 177 | stream->read((VkPhysicalDevice*)pPhysicalDevices, (*(pPhysicalDeviceCount)) * sizeof(VkPhysicalDevice)); |
| 178 | } |
| 179 | VkResult vkEnumeratePhysicalDevices_VkResult_return = (VkResult)0; |
| 180 | stream->read(&vkEnumeratePhysicalDevices_VkResult_return, sizeof(VkResult)); |
| 181 | return vkEnumeratePhysicalDevices_VkResult_return; |
| 182 | } |
| 183 | |
| 184 | void VkEncoder::vkGetPhysicalDeviceFeatures( |
| 185 | VkPhysicalDevice physicalDevice, |
| 186 | VkPhysicalDeviceFeatures* pFeatures) |
| 187 | { |
| 188 | auto stream = mImpl->stream(); |
| 189 | auto countingStream = mImpl->countingStream(); |
| 190 | countingStream->rewind(); |
| 191 | { |
| 192 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 193 | marshal_VkPhysicalDeviceFeatures(countingStream, (VkPhysicalDeviceFeatures*)(pFeatures)); |
| 194 | } |
| 195 | uint32_t packetSize_vkGetPhysicalDeviceFeatures = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 196 | countingStream->rewind(); |
| 197 | uint32_t opcode_vkGetPhysicalDeviceFeatures = OP_vkGetPhysicalDeviceFeatures; |
| 198 | stream->write(&opcode_vkGetPhysicalDeviceFeatures, sizeof(uint32_t)); |
| 199 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures, sizeof(uint32_t)); |
| 200 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 201 | marshal_VkPhysicalDeviceFeatures(stream, (VkPhysicalDeviceFeatures*)(pFeatures)); |
| 202 | unmarshal_VkPhysicalDeviceFeatures(stream, (VkPhysicalDeviceFeatures*)(pFeatures)); |
| 203 | } |
| 204 | |
| 205 | void VkEncoder::vkGetPhysicalDeviceFormatProperties( |
| 206 | VkPhysicalDevice physicalDevice, |
| 207 | VkFormat format, |
| 208 | VkFormatProperties* pFormatProperties) |
| 209 | { |
| 210 | auto stream = mImpl->stream(); |
| 211 | auto countingStream = mImpl->countingStream(); |
| 212 | countingStream->rewind(); |
| 213 | { |
| 214 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 215 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 216 | marshal_VkFormatProperties(countingStream, (VkFormatProperties*)(pFormatProperties)); |
| 217 | } |
| 218 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 219 | countingStream->rewind(); |
| 220 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties = OP_vkGetPhysicalDeviceFormatProperties; |
| 221 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties, sizeof(uint32_t)); |
| 222 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties, sizeof(uint32_t)); |
| 223 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 224 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 225 | marshal_VkFormatProperties(stream, (VkFormatProperties*)(pFormatProperties)); |
| 226 | unmarshal_VkFormatProperties(stream, (VkFormatProperties*)(pFormatProperties)); |
| 227 | } |
| 228 | |
| 229 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties( |
| 230 | VkPhysicalDevice physicalDevice, |
| 231 | VkFormat format, |
| 232 | VkImageType type, |
| 233 | VkImageTiling tiling, |
| 234 | VkImageUsageFlags usage, |
| 235 | VkImageCreateFlags flags, |
| 236 | VkImageFormatProperties* pImageFormatProperties) |
| 237 | { |
| 238 | auto stream = mImpl->stream(); |
| 239 | auto countingStream = mImpl->countingStream(); |
| 240 | countingStream->rewind(); |
| 241 | { |
| 242 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 243 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 244 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 245 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 246 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 247 | countingStream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 248 | marshal_VkImageFormatProperties(countingStream, (VkImageFormatProperties*)(pImageFormatProperties)); |
| 249 | } |
| 250 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 251 | countingStream->rewind(); |
| 252 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties = OP_vkGetPhysicalDeviceImageFormatProperties; |
| 253 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties, sizeof(uint32_t)); |
| 254 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties, sizeof(uint32_t)); |
| 255 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 256 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 257 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 258 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 259 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 260 | stream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 261 | marshal_VkImageFormatProperties(stream, (VkImageFormatProperties*)(pImageFormatProperties)); |
| 262 | unmarshal_VkImageFormatProperties(stream, (VkImageFormatProperties*)(pImageFormatProperties)); |
| 263 | VkResult vkGetPhysicalDeviceImageFormatProperties_VkResult_return = (VkResult)0; |
| 264 | stream->read(&vkGetPhysicalDeviceImageFormatProperties_VkResult_return, sizeof(VkResult)); |
| 265 | return vkGetPhysicalDeviceImageFormatProperties_VkResult_return; |
| 266 | } |
| 267 | |
| 268 | void VkEncoder::vkGetPhysicalDeviceProperties( |
| 269 | VkPhysicalDevice physicalDevice, |
| 270 | VkPhysicalDeviceProperties* pProperties) |
| 271 | { |
| 272 | auto stream = mImpl->stream(); |
| 273 | auto countingStream = mImpl->countingStream(); |
| 274 | countingStream->rewind(); |
| 275 | { |
| 276 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 277 | marshal_VkPhysicalDeviceProperties(countingStream, (VkPhysicalDeviceProperties*)(pProperties)); |
| 278 | } |
| 279 | uint32_t packetSize_vkGetPhysicalDeviceProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 280 | countingStream->rewind(); |
| 281 | uint32_t opcode_vkGetPhysicalDeviceProperties = OP_vkGetPhysicalDeviceProperties; |
| 282 | stream->write(&opcode_vkGetPhysicalDeviceProperties, sizeof(uint32_t)); |
| 283 | stream->write(&packetSize_vkGetPhysicalDeviceProperties, sizeof(uint32_t)); |
| 284 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 285 | marshal_VkPhysicalDeviceProperties(stream, (VkPhysicalDeviceProperties*)(pProperties)); |
| 286 | unmarshal_VkPhysicalDeviceProperties(stream, (VkPhysicalDeviceProperties*)(pProperties)); |
| 287 | } |
| 288 | |
| 289 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties( |
| 290 | VkPhysicalDevice physicalDevice, |
| 291 | uint32_t* pQueueFamilyPropertyCount, |
| 292 | VkQueueFamilyProperties* pQueueFamilyProperties) |
| 293 | { |
| 294 | auto stream = mImpl->stream(); |
| 295 | auto countingStream = mImpl->countingStream(); |
| 296 | countingStream->rewind(); |
| 297 | { |
| 298 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 299 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 300 | if (pQueueFamilyPropertyCount) |
| 301 | { |
| 302 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 303 | } |
| 304 | countingStream->write((VkQueueFamilyProperties**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties*)); |
| 305 | if (pQueueFamilyProperties) |
| 306 | { |
| 307 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 308 | { |
| 309 | marshal_VkQueueFamilyProperties(countingStream, (VkQueueFamilyProperties*)(pQueueFamilyProperties + i)); |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 314 | countingStream->rewind(); |
| 315 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties = OP_vkGetPhysicalDeviceQueueFamilyProperties; |
| 316 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties, sizeof(uint32_t)); |
| 317 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties, sizeof(uint32_t)); |
| 318 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 319 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 320 | if (pQueueFamilyPropertyCount) |
| 321 | { |
| 322 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 323 | } |
| 324 | stream->write((VkQueueFamilyProperties**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties*)); |
| 325 | if (pQueueFamilyProperties) |
| 326 | { |
| 327 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 328 | { |
| 329 | marshal_VkQueueFamilyProperties(stream, (VkQueueFamilyProperties*)(pQueueFamilyProperties + i)); |
| 330 | } |
| 331 | } |
| 332 | uint32_t* check_pQueueFamilyPropertyCount; |
| 333 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 334 | if (pQueueFamilyPropertyCount) |
| 335 | { |
| 336 | if (!(check_pQueueFamilyPropertyCount)) |
| 337 | { |
| 338 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 339 | } |
| 340 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 341 | } |
| 342 | VkQueueFamilyProperties* check_pQueueFamilyProperties; |
| 343 | stream->read((VkQueueFamilyProperties**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties*)); |
| 344 | if (pQueueFamilyProperties) |
| 345 | { |
| 346 | if (!(check_pQueueFamilyProperties)) |
| 347 | { |
| 348 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 349 | } |
| 350 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 351 | { |
| 352 | unmarshal_VkQueueFamilyProperties(stream, (VkQueueFamilyProperties*)(pQueueFamilyProperties + i)); |
| 353 | } |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties( |
| 358 | VkPhysicalDevice physicalDevice, |
| 359 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) |
| 360 | { |
| 361 | auto stream = mImpl->stream(); |
| 362 | auto countingStream = mImpl->countingStream(); |
| 363 | countingStream->rewind(); |
| 364 | { |
| 365 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 366 | marshal_VkPhysicalDeviceMemoryProperties(countingStream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties)); |
| 367 | } |
| 368 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 369 | countingStream->rewind(); |
| 370 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties = OP_vkGetPhysicalDeviceMemoryProperties; |
| 371 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties, sizeof(uint32_t)); |
| 372 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties, sizeof(uint32_t)); |
| 373 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 374 | marshal_VkPhysicalDeviceMemoryProperties(stream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties)); |
| 375 | unmarshal_VkPhysicalDeviceMemoryProperties(stream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties)); |
| 376 | } |
| 377 | |
| 378 | PFN_vkVoidFunction VkEncoder::vkGetInstanceProcAddr( |
| 379 | VkInstance instance, |
| 380 | const char* pName) |
| 381 | { |
| 382 | auto stream = mImpl->stream(); |
| 383 | auto countingStream = mImpl->countingStream(); |
| 384 | countingStream->rewind(); |
| 385 | { |
| 386 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 387 | countingStream->putString(pName); |
| 388 | } |
| 389 | uint32_t packetSize_vkGetInstanceProcAddr = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 390 | countingStream->rewind(); |
| 391 | uint32_t opcode_vkGetInstanceProcAddr = OP_vkGetInstanceProcAddr; |
| 392 | stream->write(&opcode_vkGetInstanceProcAddr, sizeof(uint32_t)); |
| 393 | stream->write(&packetSize_vkGetInstanceProcAddr, sizeof(uint32_t)); |
| 394 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 395 | stream->putString(pName); |
| 396 | PFN_vkVoidFunction vkGetInstanceProcAddr_PFN_vkVoidFunction_return = (PFN_vkVoidFunction)0; |
| 397 | stream->read(&vkGetInstanceProcAddr_PFN_vkVoidFunction_return, sizeof(PFN_vkVoidFunction)); |
| 398 | return vkGetInstanceProcAddr_PFN_vkVoidFunction_return; |
| 399 | } |
| 400 | |
| 401 | PFN_vkVoidFunction VkEncoder::vkGetDeviceProcAddr( |
| 402 | VkDevice device, |
| 403 | const char* pName) |
| 404 | { |
| 405 | auto stream = mImpl->stream(); |
| 406 | auto countingStream = mImpl->countingStream(); |
| 407 | countingStream->rewind(); |
| 408 | { |
| 409 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 410 | countingStream->putString(pName); |
| 411 | } |
| 412 | uint32_t packetSize_vkGetDeviceProcAddr = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 413 | countingStream->rewind(); |
| 414 | uint32_t opcode_vkGetDeviceProcAddr = OP_vkGetDeviceProcAddr; |
| 415 | stream->write(&opcode_vkGetDeviceProcAddr, sizeof(uint32_t)); |
| 416 | stream->write(&packetSize_vkGetDeviceProcAddr, sizeof(uint32_t)); |
| 417 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 418 | stream->putString(pName); |
| 419 | PFN_vkVoidFunction vkGetDeviceProcAddr_PFN_vkVoidFunction_return = (PFN_vkVoidFunction)0; |
| 420 | stream->read(&vkGetDeviceProcAddr_PFN_vkVoidFunction_return, sizeof(PFN_vkVoidFunction)); |
| 421 | return vkGetDeviceProcAddr_PFN_vkVoidFunction_return; |
| 422 | } |
| 423 | |
| 424 | VkResult VkEncoder::vkCreateDevice( |
| 425 | VkPhysicalDevice physicalDevice, |
| 426 | const VkDeviceCreateInfo* pCreateInfo, |
| 427 | const VkAllocationCallbacks* pAllocator, |
| 428 | VkDevice* pDevice) |
| 429 | { |
| 430 | auto stream = mImpl->stream(); |
| 431 | auto countingStream = mImpl->countingStream(); |
| 432 | countingStream->rewind(); |
| 433 | { |
| 434 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 435 | marshal_VkDeviceCreateInfo(countingStream, (const VkDeviceCreateInfo*)(pCreateInfo)); |
| 436 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 437 | if (pAllocator) |
| 438 | { |
| 439 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 440 | } |
| 441 | countingStream->write((VkDevice*)pDevice, sizeof(VkDevice)); |
| 442 | } |
| 443 | uint32_t packetSize_vkCreateDevice = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 444 | countingStream->rewind(); |
| 445 | uint32_t opcode_vkCreateDevice = OP_vkCreateDevice; |
| 446 | stream->write(&opcode_vkCreateDevice, sizeof(uint32_t)); |
| 447 | stream->write(&packetSize_vkCreateDevice, sizeof(uint32_t)); |
| 448 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 449 | marshal_VkDeviceCreateInfo(stream, (const VkDeviceCreateInfo*)(pCreateInfo)); |
| 450 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 451 | if (pAllocator) |
| 452 | { |
| 453 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 454 | } |
| 455 | stream->write((VkDevice*)pDevice, sizeof(VkDevice)); |
| 456 | stream->read((VkDevice*)pDevice, sizeof(VkDevice)); |
| 457 | VkResult vkCreateDevice_VkResult_return = (VkResult)0; |
| 458 | stream->read(&vkCreateDevice_VkResult_return, sizeof(VkResult)); |
| 459 | return vkCreateDevice_VkResult_return; |
| 460 | } |
| 461 | |
| 462 | void VkEncoder::vkDestroyDevice( |
| 463 | VkDevice device, |
| 464 | const VkAllocationCallbacks* pAllocator) |
| 465 | { |
| 466 | auto stream = mImpl->stream(); |
| 467 | auto countingStream = mImpl->countingStream(); |
| 468 | countingStream->rewind(); |
| 469 | { |
| 470 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 471 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 472 | if (pAllocator) |
| 473 | { |
| 474 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 475 | } |
| 476 | } |
| 477 | uint32_t packetSize_vkDestroyDevice = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 478 | countingStream->rewind(); |
| 479 | uint32_t opcode_vkDestroyDevice = OP_vkDestroyDevice; |
| 480 | stream->write(&opcode_vkDestroyDevice, sizeof(uint32_t)); |
| 481 | stream->write(&packetSize_vkDestroyDevice, sizeof(uint32_t)); |
| 482 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 483 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 484 | if (pAllocator) |
| 485 | { |
| 486 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | VkResult VkEncoder::vkEnumerateInstanceExtensionProperties( |
| 491 | const char* pLayerName, |
| 492 | uint32_t* pPropertyCount, |
| 493 | VkExtensionProperties* pProperties) |
| 494 | { |
| 495 | auto stream = mImpl->stream(); |
| 496 | auto countingStream = mImpl->countingStream(); |
| 497 | countingStream->rewind(); |
| 498 | { |
| 499 | countingStream->putString(pLayerName); |
| 500 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 501 | if (pPropertyCount) |
| 502 | { |
| 503 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 504 | } |
| 505 | countingStream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 506 | if (pProperties) |
| 507 | { |
| 508 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 509 | { |
| 510 | marshal_VkExtensionProperties(countingStream, (VkExtensionProperties*)(pProperties + i)); |
| 511 | } |
| 512 | } |
| 513 | } |
| 514 | uint32_t packetSize_vkEnumerateInstanceExtensionProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 515 | countingStream->rewind(); |
| 516 | uint32_t opcode_vkEnumerateInstanceExtensionProperties = OP_vkEnumerateInstanceExtensionProperties; |
| 517 | stream->write(&opcode_vkEnumerateInstanceExtensionProperties, sizeof(uint32_t)); |
| 518 | stream->write(&packetSize_vkEnumerateInstanceExtensionProperties, sizeof(uint32_t)); |
| 519 | stream->putString(pLayerName); |
| 520 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 521 | if (pPropertyCount) |
| 522 | { |
| 523 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 524 | } |
| 525 | stream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 526 | if (pProperties) |
| 527 | { |
| 528 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 529 | { |
| 530 | marshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 531 | } |
| 532 | } |
| 533 | uint32_t* check_pPropertyCount; |
| 534 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 535 | if (pPropertyCount) |
| 536 | { |
| 537 | if (!(check_pPropertyCount)) |
| 538 | { |
| 539 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 540 | } |
| 541 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 542 | } |
| 543 | VkExtensionProperties* check_pProperties; |
| 544 | stream->read((VkExtensionProperties**)&check_pProperties, sizeof(VkExtensionProperties*)); |
| 545 | if (pProperties) |
| 546 | { |
| 547 | if (!(check_pProperties)) |
| 548 | { |
| 549 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 550 | } |
| 551 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 552 | { |
| 553 | unmarshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 554 | } |
| 555 | } |
| 556 | VkResult vkEnumerateInstanceExtensionProperties_VkResult_return = (VkResult)0; |
| 557 | stream->read(&vkEnumerateInstanceExtensionProperties_VkResult_return, sizeof(VkResult)); |
| 558 | return vkEnumerateInstanceExtensionProperties_VkResult_return; |
| 559 | } |
| 560 | |
| 561 | VkResult VkEncoder::vkEnumerateDeviceExtensionProperties( |
| 562 | VkPhysicalDevice physicalDevice, |
| 563 | const char* pLayerName, |
| 564 | uint32_t* pPropertyCount, |
| 565 | VkExtensionProperties* pProperties) |
| 566 | { |
| 567 | auto stream = mImpl->stream(); |
| 568 | auto countingStream = mImpl->countingStream(); |
| 569 | countingStream->rewind(); |
| 570 | { |
| 571 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 572 | countingStream->putString(pLayerName); |
| 573 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 574 | if (pPropertyCount) |
| 575 | { |
| 576 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 577 | } |
| 578 | countingStream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 579 | if (pProperties) |
| 580 | { |
| 581 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 582 | { |
| 583 | marshal_VkExtensionProperties(countingStream, (VkExtensionProperties*)(pProperties + i)); |
| 584 | } |
| 585 | } |
| 586 | } |
| 587 | uint32_t packetSize_vkEnumerateDeviceExtensionProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 588 | countingStream->rewind(); |
| 589 | uint32_t opcode_vkEnumerateDeviceExtensionProperties = OP_vkEnumerateDeviceExtensionProperties; |
| 590 | stream->write(&opcode_vkEnumerateDeviceExtensionProperties, sizeof(uint32_t)); |
| 591 | stream->write(&packetSize_vkEnumerateDeviceExtensionProperties, sizeof(uint32_t)); |
| 592 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 593 | stream->putString(pLayerName); |
| 594 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 595 | if (pPropertyCount) |
| 596 | { |
| 597 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 598 | } |
| 599 | stream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 600 | if (pProperties) |
| 601 | { |
| 602 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 603 | { |
| 604 | marshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 605 | } |
| 606 | } |
| 607 | uint32_t* check_pPropertyCount; |
| 608 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 609 | if (pPropertyCount) |
| 610 | { |
| 611 | if (!(check_pPropertyCount)) |
| 612 | { |
| 613 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 614 | } |
| 615 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 616 | } |
| 617 | VkExtensionProperties* check_pProperties; |
| 618 | stream->read((VkExtensionProperties**)&check_pProperties, sizeof(VkExtensionProperties*)); |
| 619 | if (pProperties) |
| 620 | { |
| 621 | if (!(check_pProperties)) |
| 622 | { |
| 623 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 624 | } |
| 625 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 626 | { |
| 627 | unmarshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 628 | } |
| 629 | } |
| 630 | VkResult vkEnumerateDeviceExtensionProperties_VkResult_return = (VkResult)0; |
| 631 | stream->read(&vkEnumerateDeviceExtensionProperties_VkResult_return, sizeof(VkResult)); |
| 632 | return vkEnumerateDeviceExtensionProperties_VkResult_return; |
| 633 | } |
| 634 | |
| 635 | VkResult VkEncoder::vkEnumerateInstanceLayerProperties( |
| 636 | uint32_t* pPropertyCount, |
| 637 | VkLayerProperties* pProperties) |
| 638 | { |
| 639 | auto stream = mImpl->stream(); |
| 640 | auto countingStream = mImpl->countingStream(); |
| 641 | countingStream->rewind(); |
| 642 | { |
| 643 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 644 | if (pPropertyCount) |
| 645 | { |
| 646 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 647 | } |
| 648 | countingStream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 649 | if (pProperties) |
| 650 | { |
| 651 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 652 | { |
| 653 | marshal_VkLayerProperties(countingStream, (VkLayerProperties*)(pProperties + i)); |
| 654 | } |
| 655 | } |
| 656 | } |
| 657 | uint32_t packetSize_vkEnumerateInstanceLayerProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 658 | countingStream->rewind(); |
| 659 | uint32_t opcode_vkEnumerateInstanceLayerProperties = OP_vkEnumerateInstanceLayerProperties; |
| 660 | stream->write(&opcode_vkEnumerateInstanceLayerProperties, sizeof(uint32_t)); |
| 661 | stream->write(&packetSize_vkEnumerateInstanceLayerProperties, sizeof(uint32_t)); |
| 662 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 663 | if (pPropertyCount) |
| 664 | { |
| 665 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 666 | } |
| 667 | stream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 668 | if (pProperties) |
| 669 | { |
| 670 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 671 | { |
| 672 | marshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 673 | } |
| 674 | } |
| 675 | uint32_t* check_pPropertyCount; |
| 676 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 677 | if (pPropertyCount) |
| 678 | { |
| 679 | if (!(check_pPropertyCount)) |
| 680 | { |
| 681 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 682 | } |
| 683 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 684 | } |
| 685 | VkLayerProperties* check_pProperties; |
| 686 | stream->read((VkLayerProperties**)&check_pProperties, sizeof(VkLayerProperties*)); |
| 687 | if (pProperties) |
| 688 | { |
| 689 | if (!(check_pProperties)) |
| 690 | { |
| 691 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 692 | } |
| 693 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 694 | { |
| 695 | unmarshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 696 | } |
| 697 | } |
| 698 | VkResult vkEnumerateInstanceLayerProperties_VkResult_return = (VkResult)0; |
| 699 | stream->read(&vkEnumerateInstanceLayerProperties_VkResult_return, sizeof(VkResult)); |
| 700 | return vkEnumerateInstanceLayerProperties_VkResult_return; |
| 701 | } |
| 702 | |
| 703 | VkResult VkEncoder::vkEnumerateDeviceLayerProperties( |
| 704 | VkPhysicalDevice physicalDevice, |
| 705 | uint32_t* pPropertyCount, |
| 706 | VkLayerProperties* pProperties) |
| 707 | { |
| 708 | auto stream = mImpl->stream(); |
| 709 | auto countingStream = mImpl->countingStream(); |
| 710 | countingStream->rewind(); |
| 711 | { |
| 712 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 713 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 714 | if (pPropertyCount) |
| 715 | { |
| 716 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 717 | } |
| 718 | countingStream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 719 | if (pProperties) |
| 720 | { |
| 721 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 722 | { |
| 723 | marshal_VkLayerProperties(countingStream, (VkLayerProperties*)(pProperties + i)); |
| 724 | } |
| 725 | } |
| 726 | } |
| 727 | uint32_t packetSize_vkEnumerateDeviceLayerProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 728 | countingStream->rewind(); |
| 729 | uint32_t opcode_vkEnumerateDeviceLayerProperties = OP_vkEnumerateDeviceLayerProperties; |
| 730 | stream->write(&opcode_vkEnumerateDeviceLayerProperties, sizeof(uint32_t)); |
| 731 | stream->write(&packetSize_vkEnumerateDeviceLayerProperties, sizeof(uint32_t)); |
| 732 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 733 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 734 | if (pPropertyCount) |
| 735 | { |
| 736 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 737 | } |
| 738 | stream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 739 | if (pProperties) |
| 740 | { |
| 741 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 742 | { |
| 743 | marshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 744 | } |
| 745 | } |
| 746 | uint32_t* check_pPropertyCount; |
| 747 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 748 | if (pPropertyCount) |
| 749 | { |
| 750 | if (!(check_pPropertyCount)) |
| 751 | { |
| 752 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 753 | } |
| 754 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 755 | } |
| 756 | VkLayerProperties* check_pProperties; |
| 757 | stream->read((VkLayerProperties**)&check_pProperties, sizeof(VkLayerProperties*)); |
| 758 | if (pProperties) |
| 759 | { |
| 760 | if (!(check_pProperties)) |
| 761 | { |
| 762 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 763 | } |
| 764 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 765 | { |
| 766 | unmarshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 767 | } |
| 768 | } |
| 769 | VkResult vkEnumerateDeviceLayerProperties_VkResult_return = (VkResult)0; |
| 770 | stream->read(&vkEnumerateDeviceLayerProperties_VkResult_return, sizeof(VkResult)); |
| 771 | return vkEnumerateDeviceLayerProperties_VkResult_return; |
| 772 | } |
| 773 | |
| 774 | void VkEncoder::vkGetDeviceQueue( |
| 775 | VkDevice device, |
| 776 | uint32_t queueFamilyIndex, |
| 777 | uint32_t queueIndex, |
| 778 | VkQueue* pQueue) |
| 779 | { |
| 780 | auto stream = mImpl->stream(); |
| 781 | auto countingStream = mImpl->countingStream(); |
| 782 | countingStream->rewind(); |
| 783 | { |
| 784 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 785 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 786 | countingStream->write((uint32_t*)&queueIndex, sizeof(uint32_t)); |
| 787 | countingStream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 788 | } |
| 789 | uint32_t packetSize_vkGetDeviceQueue = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 790 | countingStream->rewind(); |
| 791 | uint32_t opcode_vkGetDeviceQueue = OP_vkGetDeviceQueue; |
| 792 | stream->write(&opcode_vkGetDeviceQueue, sizeof(uint32_t)); |
| 793 | stream->write(&packetSize_vkGetDeviceQueue, sizeof(uint32_t)); |
| 794 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 795 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 796 | stream->write((uint32_t*)&queueIndex, sizeof(uint32_t)); |
| 797 | stream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 798 | stream->read((VkQueue*)pQueue, sizeof(VkQueue)); |
| 799 | } |
| 800 | |
| 801 | VkResult VkEncoder::vkQueueSubmit( |
| 802 | VkQueue queue, |
| 803 | uint32_t submitCount, |
| 804 | const VkSubmitInfo* pSubmits, |
| 805 | VkFence fence) |
| 806 | { |
| 807 | auto stream = mImpl->stream(); |
| 808 | auto countingStream = mImpl->countingStream(); |
| 809 | countingStream->rewind(); |
| 810 | { |
| 811 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 812 | countingStream->write((uint32_t*)&submitCount, sizeof(uint32_t)); |
| 813 | for (uint32_t i = 0; i < (uint32_t)((submitCount)); ++i) |
| 814 | { |
| 815 | marshal_VkSubmitInfo(countingStream, (const VkSubmitInfo*)(pSubmits + i)); |
| 816 | } |
| 817 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 818 | } |
| 819 | uint32_t packetSize_vkQueueSubmit = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 820 | countingStream->rewind(); |
| 821 | uint32_t opcode_vkQueueSubmit = OP_vkQueueSubmit; |
| 822 | stream->write(&opcode_vkQueueSubmit, sizeof(uint32_t)); |
| 823 | stream->write(&packetSize_vkQueueSubmit, sizeof(uint32_t)); |
| 824 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 825 | stream->write((uint32_t*)&submitCount, sizeof(uint32_t)); |
| 826 | for (uint32_t i = 0; i < (uint32_t)((submitCount)); ++i) |
| 827 | { |
| 828 | marshal_VkSubmitInfo(stream, (const VkSubmitInfo*)(pSubmits + i)); |
| 829 | } |
| 830 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 831 | VkResult vkQueueSubmit_VkResult_return = (VkResult)0; |
| 832 | stream->read(&vkQueueSubmit_VkResult_return, sizeof(VkResult)); |
| 833 | return vkQueueSubmit_VkResult_return; |
| 834 | } |
| 835 | |
| 836 | VkResult VkEncoder::vkQueueWaitIdle( |
| 837 | VkQueue queue) |
| 838 | { |
| 839 | auto stream = mImpl->stream(); |
| 840 | auto countingStream = mImpl->countingStream(); |
| 841 | countingStream->rewind(); |
| 842 | { |
| 843 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 844 | } |
| 845 | uint32_t packetSize_vkQueueWaitIdle = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 846 | countingStream->rewind(); |
| 847 | uint32_t opcode_vkQueueWaitIdle = OP_vkQueueWaitIdle; |
| 848 | stream->write(&opcode_vkQueueWaitIdle, sizeof(uint32_t)); |
| 849 | stream->write(&packetSize_vkQueueWaitIdle, sizeof(uint32_t)); |
| 850 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 851 | VkResult vkQueueWaitIdle_VkResult_return = (VkResult)0; |
| 852 | stream->read(&vkQueueWaitIdle_VkResult_return, sizeof(VkResult)); |
| 853 | return vkQueueWaitIdle_VkResult_return; |
| 854 | } |
| 855 | |
| 856 | VkResult VkEncoder::vkDeviceWaitIdle( |
| 857 | VkDevice device) |
| 858 | { |
| 859 | auto stream = mImpl->stream(); |
| 860 | auto countingStream = mImpl->countingStream(); |
| 861 | countingStream->rewind(); |
| 862 | { |
| 863 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 864 | } |
| 865 | uint32_t packetSize_vkDeviceWaitIdle = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 866 | countingStream->rewind(); |
| 867 | uint32_t opcode_vkDeviceWaitIdle = OP_vkDeviceWaitIdle; |
| 868 | stream->write(&opcode_vkDeviceWaitIdle, sizeof(uint32_t)); |
| 869 | stream->write(&packetSize_vkDeviceWaitIdle, sizeof(uint32_t)); |
| 870 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 871 | VkResult vkDeviceWaitIdle_VkResult_return = (VkResult)0; |
| 872 | stream->read(&vkDeviceWaitIdle_VkResult_return, sizeof(VkResult)); |
| 873 | return vkDeviceWaitIdle_VkResult_return; |
| 874 | } |
| 875 | |
| 876 | VkResult VkEncoder::vkAllocateMemory( |
| 877 | VkDevice device, |
| 878 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 879 | const VkAllocationCallbacks* pAllocator, |
| 880 | VkDeviceMemory* pMemory) |
| 881 | { |
| 882 | auto stream = mImpl->stream(); |
| 883 | auto countingStream = mImpl->countingStream(); |
| 884 | countingStream->rewind(); |
| 885 | { |
| 886 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 887 | marshal_VkMemoryAllocateInfo(countingStream, (const VkMemoryAllocateInfo*)(pAllocateInfo)); |
| 888 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 889 | if (pAllocator) |
| 890 | { |
| 891 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 892 | } |
| 893 | countingStream->write((VkDeviceMemory*)pMemory, sizeof(VkDeviceMemory)); |
| 894 | } |
| 895 | uint32_t packetSize_vkAllocateMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 896 | countingStream->rewind(); |
| 897 | uint32_t opcode_vkAllocateMemory = OP_vkAllocateMemory; |
| 898 | stream->write(&opcode_vkAllocateMemory, sizeof(uint32_t)); |
| 899 | stream->write(&packetSize_vkAllocateMemory, sizeof(uint32_t)); |
| 900 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 901 | marshal_VkMemoryAllocateInfo(stream, (const VkMemoryAllocateInfo*)(pAllocateInfo)); |
| 902 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 903 | if (pAllocator) |
| 904 | { |
| 905 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 906 | } |
| 907 | stream->write((VkDeviceMemory*)pMemory, sizeof(VkDeviceMemory)); |
| 908 | stream->read((VkDeviceMemory*)pMemory, sizeof(VkDeviceMemory)); |
| 909 | VkResult vkAllocateMemory_VkResult_return = (VkResult)0; |
| 910 | stream->read(&vkAllocateMemory_VkResult_return, sizeof(VkResult)); |
| 911 | return vkAllocateMemory_VkResult_return; |
| 912 | } |
| 913 | |
| 914 | void VkEncoder::vkFreeMemory( |
| 915 | VkDevice device, |
| 916 | VkDeviceMemory memory, |
| 917 | const VkAllocationCallbacks* pAllocator) |
| 918 | { |
| 919 | auto stream = mImpl->stream(); |
| 920 | auto countingStream = mImpl->countingStream(); |
| 921 | countingStream->rewind(); |
| 922 | { |
| 923 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 924 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 925 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 926 | if (pAllocator) |
| 927 | { |
| 928 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 929 | } |
| 930 | } |
| 931 | uint32_t packetSize_vkFreeMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 932 | countingStream->rewind(); |
| 933 | uint32_t opcode_vkFreeMemory = OP_vkFreeMemory; |
| 934 | stream->write(&opcode_vkFreeMemory, sizeof(uint32_t)); |
| 935 | stream->write(&packetSize_vkFreeMemory, sizeof(uint32_t)); |
| 936 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 937 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 938 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 939 | if (pAllocator) |
| 940 | { |
| 941 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | VkResult VkEncoder::vkMapMemory( |
| 946 | VkDevice device, |
| 947 | VkDeviceMemory memory, |
| 948 | VkDeviceSize offset, |
| 949 | VkDeviceSize size, |
| 950 | VkMemoryMapFlags flags, |
| 951 | void** ppData) |
| 952 | { |
| 953 | auto stream = mImpl->stream(); |
| 954 | auto countingStream = mImpl->countingStream(); |
| 955 | countingStream->rewind(); |
| 956 | { |
| 957 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 958 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 959 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 960 | countingStream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 961 | countingStream->write((VkMemoryMapFlags*)&flags, sizeof(VkMemoryMapFlags)); |
| 962 | countingStream->write((void***)&ppData, sizeof(void**)); |
| 963 | if (ppData) |
| 964 | { |
| 965 | countingStream->write((void**)ppData, sizeof(void*)); |
| 966 | } |
| 967 | } |
| 968 | uint32_t packetSize_vkMapMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 969 | countingStream->rewind(); |
| 970 | uint32_t opcode_vkMapMemory = OP_vkMapMemory; |
| 971 | stream->write(&opcode_vkMapMemory, sizeof(uint32_t)); |
| 972 | stream->write(&packetSize_vkMapMemory, sizeof(uint32_t)); |
| 973 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 974 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 975 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 976 | stream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 977 | stream->write((VkMemoryMapFlags*)&flags, sizeof(VkMemoryMapFlags)); |
| 978 | stream->write((void***)&ppData, sizeof(void**)); |
| 979 | if (ppData) |
| 980 | { |
| 981 | stream->write((void**)ppData, sizeof(void*)); |
| 982 | } |
| 983 | void** check_ppData; |
| 984 | stream->read((void***)&check_ppData, sizeof(void**)); |
| 985 | if (ppData) |
| 986 | { |
| 987 | if (!(check_ppData)) |
| 988 | { |
| 989 | fprintf(stderr, "fatal: ppData inconsistent between guest and host\n"); |
| 990 | } |
| 991 | stream->read((void**)ppData, sizeof(void*)); |
| 992 | } |
| 993 | VkResult vkMapMemory_VkResult_return = (VkResult)0; |
| 994 | stream->read(&vkMapMemory_VkResult_return, sizeof(VkResult)); |
| Lingfeng Yang | 4b78f7f | 2018-11-05 14:22:20 -0800 | [diff] [blame^] | 995 | if (((vkMapMemory_VkResult_return == VK_SUCCESS) && ppData && size > 0)) |
| 996 | { |
| 997 | *ppData = aligned_buf_alloc(1024 /* pick large alignment */, size);; |
| 998 | stream->read(*ppData, size); |
| 999 | } |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 1000 | return vkMapMemory_VkResult_return; |
| 1001 | } |
| 1002 | |
| 1003 | void VkEncoder::vkUnmapMemory( |
| 1004 | VkDevice device, |
| 1005 | VkDeviceMemory memory) |
| 1006 | { |
| 1007 | auto stream = mImpl->stream(); |
| 1008 | auto countingStream = mImpl->countingStream(); |
| 1009 | countingStream->rewind(); |
| 1010 | { |
| 1011 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1012 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1013 | } |
| 1014 | uint32_t packetSize_vkUnmapMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1015 | countingStream->rewind(); |
| 1016 | uint32_t opcode_vkUnmapMemory = OP_vkUnmapMemory; |
| 1017 | stream->write(&opcode_vkUnmapMemory, sizeof(uint32_t)); |
| 1018 | stream->write(&packetSize_vkUnmapMemory, sizeof(uint32_t)); |
| 1019 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1020 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1021 | } |
| 1022 | |
| 1023 | VkResult VkEncoder::vkFlushMappedMemoryRanges( |
| 1024 | VkDevice device, |
| 1025 | uint32_t memoryRangeCount, |
| 1026 | const VkMappedMemoryRange* pMemoryRanges) |
| 1027 | { |
| 1028 | auto stream = mImpl->stream(); |
| 1029 | auto countingStream = mImpl->countingStream(); |
| 1030 | countingStream->rewind(); |
| 1031 | { |
| 1032 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1033 | countingStream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1034 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1035 | { |
| 1036 | marshal_VkMappedMemoryRange(countingStream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1037 | } |
| 1038 | } |
| 1039 | uint32_t packetSize_vkFlushMappedMemoryRanges = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1040 | countingStream->rewind(); |
| 1041 | uint32_t opcode_vkFlushMappedMemoryRanges = OP_vkFlushMappedMemoryRanges; |
| 1042 | stream->write(&opcode_vkFlushMappedMemoryRanges, sizeof(uint32_t)); |
| 1043 | stream->write(&packetSize_vkFlushMappedMemoryRanges, sizeof(uint32_t)); |
| 1044 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1045 | stream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1046 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1047 | { |
| 1048 | marshal_VkMappedMemoryRange(stream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1049 | } |
| 1050 | VkResult vkFlushMappedMemoryRanges_VkResult_return = (VkResult)0; |
| 1051 | stream->read(&vkFlushMappedMemoryRanges_VkResult_return, sizeof(VkResult)); |
| 1052 | return vkFlushMappedMemoryRanges_VkResult_return; |
| 1053 | } |
| 1054 | |
| 1055 | VkResult VkEncoder::vkInvalidateMappedMemoryRanges( |
| 1056 | VkDevice device, |
| 1057 | uint32_t memoryRangeCount, |
| 1058 | const VkMappedMemoryRange* pMemoryRanges) |
| 1059 | { |
| 1060 | auto stream = mImpl->stream(); |
| 1061 | auto countingStream = mImpl->countingStream(); |
| 1062 | countingStream->rewind(); |
| 1063 | { |
| 1064 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1065 | countingStream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1066 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1067 | { |
| 1068 | marshal_VkMappedMemoryRange(countingStream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1069 | } |
| 1070 | } |
| 1071 | uint32_t packetSize_vkInvalidateMappedMemoryRanges = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1072 | countingStream->rewind(); |
| 1073 | uint32_t opcode_vkInvalidateMappedMemoryRanges = OP_vkInvalidateMappedMemoryRanges; |
| 1074 | stream->write(&opcode_vkInvalidateMappedMemoryRanges, sizeof(uint32_t)); |
| 1075 | stream->write(&packetSize_vkInvalidateMappedMemoryRanges, sizeof(uint32_t)); |
| 1076 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1077 | stream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1078 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1079 | { |
| 1080 | marshal_VkMappedMemoryRange(stream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1081 | } |
| 1082 | VkResult vkInvalidateMappedMemoryRanges_VkResult_return = (VkResult)0; |
| 1083 | stream->read(&vkInvalidateMappedMemoryRanges_VkResult_return, sizeof(VkResult)); |
| 1084 | return vkInvalidateMappedMemoryRanges_VkResult_return; |
| 1085 | } |
| 1086 | |
| 1087 | void VkEncoder::vkGetDeviceMemoryCommitment( |
| 1088 | VkDevice device, |
| 1089 | VkDeviceMemory memory, |
| 1090 | VkDeviceSize* pCommittedMemoryInBytes) |
| 1091 | { |
| 1092 | auto stream = mImpl->stream(); |
| 1093 | auto countingStream = mImpl->countingStream(); |
| 1094 | countingStream->rewind(); |
| 1095 | { |
| 1096 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1097 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1098 | countingStream->write((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1099 | } |
| 1100 | uint32_t packetSize_vkGetDeviceMemoryCommitment = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1101 | countingStream->rewind(); |
| 1102 | uint32_t opcode_vkGetDeviceMemoryCommitment = OP_vkGetDeviceMemoryCommitment; |
| 1103 | stream->write(&opcode_vkGetDeviceMemoryCommitment, sizeof(uint32_t)); |
| 1104 | stream->write(&packetSize_vkGetDeviceMemoryCommitment, sizeof(uint32_t)); |
| 1105 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1106 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1107 | stream->write((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1108 | stream->read((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1109 | } |
| 1110 | |
| 1111 | VkResult VkEncoder::vkBindBufferMemory( |
| 1112 | VkDevice device, |
| 1113 | VkBuffer buffer, |
| 1114 | VkDeviceMemory memory, |
| 1115 | VkDeviceSize memoryOffset) |
| 1116 | { |
| 1117 | auto stream = mImpl->stream(); |
| 1118 | auto countingStream = mImpl->countingStream(); |
| 1119 | countingStream->rewind(); |
| 1120 | { |
| 1121 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1122 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1123 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1124 | countingStream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1125 | } |
| 1126 | uint32_t packetSize_vkBindBufferMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1127 | countingStream->rewind(); |
| 1128 | uint32_t opcode_vkBindBufferMemory = OP_vkBindBufferMemory; |
| 1129 | stream->write(&opcode_vkBindBufferMemory, sizeof(uint32_t)); |
| 1130 | stream->write(&packetSize_vkBindBufferMemory, sizeof(uint32_t)); |
| 1131 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1132 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1133 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1134 | stream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1135 | VkResult vkBindBufferMemory_VkResult_return = (VkResult)0; |
| 1136 | stream->read(&vkBindBufferMemory_VkResult_return, sizeof(VkResult)); |
| 1137 | return vkBindBufferMemory_VkResult_return; |
| 1138 | } |
| 1139 | |
| 1140 | VkResult VkEncoder::vkBindImageMemory( |
| 1141 | VkDevice device, |
| 1142 | VkImage image, |
| 1143 | VkDeviceMemory memory, |
| 1144 | VkDeviceSize memoryOffset) |
| 1145 | { |
| 1146 | auto stream = mImpl->stream(); |
| 1147 | auto countingStream = mImpl->countingStream(); |
| 1148 | countingStream->rewind(); |
| 1149 | { |
| 1150 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1151 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1152 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1153 | countingStream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1154 | } |
| 1155 | uint32_t packetSize_vkBindImageMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1156 | countingStream->rewind(); |
| 1157 | uint32_t opcode_vkBindImageMemory = OP_vkBindImageMemory; |
| 1158 | stream->write(&opcode_vkBindImageMemory, sizeof(uint32_t)); |
| 1159 | stream->write(&packetSize_vkBindImageMemory, sizeof(uint32_t)); |
| 1160 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1161 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1162 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1163 | stream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1164 | VkResult vkBindImageMemory_VkResult_return = (VkResult)0; |
| 1165 | stream->read(&vkBindImageMemory_VkResult_return, sizeof(VkResult)); |
| 1166 | return vkBindImageMemory_VkResult_return; |
| 1167 | } |
| 1168 | |
| 1169 | void VkEncoder::vkGetBufferMemoryRequirements( |
| 1170 | VkDevice device, |
| 1171 | VkBuffer buffer, |
| 1172 | VkMemoryRequirements* pMemoryRequirements) |
| 1173 | { |
| 1174 | auto stream = mImpl->stream(); |
| 1175 | auto countingStream = mImpl->countingStream(); |
| 1176 | countingStream->rewind(); |
| 1177 | { |
| 1178 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1179 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1180 | marshal_VkMemoryRequirements(countingStream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1181 | } |
| 1182 | uint32_t packetSize_vkGetBufferMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1183 | countingStream->rewind(); |
| 1184 | uint32_t opcode_vkGetBufferMemoryRequirements = OP_vkGetBufferMemoryRequirements; |
| 1185 | stream->write(&opcode_vkGetBufferMemoryRequirements, sizeof(uint32_t)); |
| 1186 | stream->write(&packetSize_vkGetBufferMemoryRequirements, sizeof(uint32_t)); |
| 1187 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1188 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1189 | marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1190 | unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1191 | } |
| 1192 | |
| 1193 | void VkEncoder::vkGetImageMemoryRequirements( |
| 1194 | VkDevice device, |
| 1195 | VkImage image, |
| 1196 | VkMemoryRequirements* pMemoryRequirements) |
| 1197 | { |
| 1198 | auto stream = mImpl->stream(); |
| 1199 | auto countingStream = mImpl->countingStream(); |
| 1200 | countingStream->rewind(); |
| 1201 | { |
| 1202 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1203 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1204 | marshal_VkMemoryRequirements(countingStream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1205 | } |
| 1206 | uint32_t packetSize_vkGetImageMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1207 | countingStream->rewind(); |
| 1208 | uint32_t opcode_vkGetImageMemoryRequirements = OP_vkGetImageMemoryRequirements; |
| 1209 | stream->write(&opcode_vkGetImageMemoryRequirements, sizeof(uint32_t)); |
| 1210 | stream->write(&packetSize_vkGetImageMemoryRequirements, sizeof(uint32_t)); |
| 1211 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1212 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1213 | marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1214 | unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1215 | } |
| 1216 | |
| 1217 | void VkEncoder::vkGetImageSparseMemoryRequirements( |
| 1218 | VkDevice device, |
| 1219 | VkImage image, |
| 1220 | uint32_t* pSparseMemoryRequirementCount, |
| 1221 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) |
| 1222 | { |
| 1223 | auto stream = mImpl->stream(); |
| 1224 | auto countingStream = mImpl->countingStream(); |
| 1225 | countingStream->rewind(); |
| 1226 | { |
| 1227 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1228 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1229 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1230 | if (pSparseMemoryRequirementCount) |
| 1231 | { |
| 1232 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1233 | } |
| 1234 | countingStream->write((VkSparseImageMemoryRequirements**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1235 | if (pSparseMemoryRequirements) |
| 1236 | { |
| 1237 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1238 | { |
| 1239 | marshal_VkSparseImageMemoryRequirements(countingStream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1240 | } |
| 1241 | } |
| 1242 | } |
| 1243 | uint32_t packetSize_vkGetImageSparseMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1244 | countingStream->rewind(); |
| 1245 | uint32_t opcode_vkGetImageSparseMemoryRequirements = OP_vkGetImageSparseMemoryRequirements; |
| 1246 | stream->write(&opcode_vkGetImageSparseMemoryRequirements, sizeof(uint32_t)); |
| 1247 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements, sizeof(uint32_t)); |
| 1248 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1249 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1250 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1251 | if (pSparseMemoryRequirementCount) |
| 1252 | { |
| 1253 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1254 | } |
| 1255 | stream->write((VkSparseImageMemoryRequirements**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1256 | if (pSparseMemoryRequirements) |
| 1257 | { |
| 1258 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1259 | { |
| 1260 | marshal_VkSparseImageMemoryRequirements(stream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1261 | } |
| 1262 | } |
| 1263 | uint32_t* check_pSparseMemoryRequirementCount; |
| 1264 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1265 | if (pSparseMemoryRequirementCount) |
| 1266 | { |
| 1267 | if (!(check_pSparseMemoryRequirementCount)) |
| 1268 | { |
| 1269 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 1270 | } |
| 1271 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1272 | } |
| 1273 | VkSparseImageMemoryRequirements* check_pSparseMemoryRequirements; |
| 1274 | stream->read((VkSparseImageMemoryRequirements**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1275 | if (pSparseMemoryRequirements) |
| 1276 | { |
| 1277 | if (!(check_pSparseMemoryRequirements)) |
| 1278 | { |
| 1279 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 1280 | } |
| 1281 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1282 | { |
| 1283 | unmarshal_VkSparseImageMemoryRequirements(stream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1284 | } |
| 1285 | } |
| 1286 | } |
| 1287 | |
| 1288 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties( |
| 1289 | VkPhysicalDevice physicalDevice, |
| 1290 | VkFormat format, |
| 1291 | VkImageType type, |
| 1292 | VkSampleCountFlagBits samples, |
| 1293 | VkImageUsageFlags usage, |
| 1294 | VkImageTiling tiling, |
| 1295 | uint32_t* pPropertyCount, |
| 1296 | VkSparseImageFormatProperties* pProperties) |
| 1297 | { |
| 1298 | auto stream = mImpl->stream(); |
| 1299 | auto countingStream = mImpl->countingStream(); |
| 1300 | countingStream->rewind(); |
| 1301 | { |
| 1302 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 1303 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 1304 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 1305 | countingStream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 1306 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 1307 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 1308 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 1309 | if (pPropertyCount) |
| 1310 | { |
| 1311 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1312 | } |
| 1313 | countingStream->write((VkSparseImageFormatProperties**)&pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1314 | if (pProperties) |
| 1315 | { |
| 1316 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1317 | { |
| 1318 | marshal_VkSparseImageFormatProperties(countingStream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1319 | } |
| 1320 | } |
| 1321 | } |
| 1322 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1323 | countingStream->rewind(); |
| 1324 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties = OP_vkGetPhysicalDeviceSparseImageFormatProperties; |
| 1325 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties, sizeof(uint32_t)); |
| 1326 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties, sizeof(uint32_t)); |
| 1327 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 1328 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 1329 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 1330 | stream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 1331 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 1332 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 1333 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 1334 | if (pPropertyCount) |
| 1335 | { |
| 1336 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1337 | } |
| 1338 | stream->write((VkSparseImageFormatProperties**)&pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1339 | if (pProperties) |
| 1340 | { |
| 1341 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1342 | { |
| 1343 | marshal_VkSparseImageFormatProperties(stream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1344 | } |
| 1345 | } |
| 1346 | uint32_t* check_pPropertyCount; |
| 1347 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 1348 | if (pPropertyCount) |
| 1349 | { |
| 1350 | if (!(check_pPropertyCount)) |
| 1351 | { |
| 1352 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 1353 | } |
| 1354 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1355 | } |
| 1356 | VkSparseImageFormatProperties* check_pProperties; |
| 1357 | stream->read((VkSparseImageFormatProperties**)&check_pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1358 | if (pProperties) |
| 1359 | { |
| 1360 | if (!(check_pProperties)) |
| 1361 | { |
| 1362 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 1363 | } |
| 1364 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1365 | { |
| 1366 | unmarshal_VkSparseImageFormatProperties(stream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1367 | } |
| 1368 | } |
| 1369 | } |
| 1370 | |
| 1371 | VkResult VkEncoder::vkQueueBindSparse( |
| 1372 | VkQueue queue, |
| 1373 | uint32_t bindInfoCount, |
| 1374 | const VkBindSparseInfo* pBindInfo, |
| 1375 | VkFence fence) |
| 1376 | { |
| 1377 | auto stream = mImpl->stream(); |
| 1378 | auto countingStream = mImpl->countingStream(); |
| 1379 | countingStream->rewind(); |
| 1380 | { |
| 1381 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 1382 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 1383 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 1384 | { |
| 1385 | marshal_VkBindSparseInfo(countingStream, (const VkBindSparseInfo*)(pBindInfo + i)); |
| 1386 | } |
| 1387 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1388 | } |
| 1389 | uint32_t packetSize_vkQueueBindSparse = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1390 | countingStream->rewind(); |
| 1391 | uint32_t opcode_vkQueueBindSparse = OP_vkQueueBindSparse; |
| 1392 | stream->write(&opcode_vkQueueBindSparse, sizeof(uint32_t)); |
| 1393 | stream->write(&packetSize_vkQueueBindSparse, sizeof(uint32_t)); |
| 1394 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 1395 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 1396 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 1397 | { |
| 1398 | marshal_VkBindSparseInfo(stream, (const VkBindSparseInfo*)(pBindInfo + i)); |
| 1399 | } |
| 1400 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1401 | VkResult vkQueueBindSparse_VkResult_return = (VkResult)0; |
| 1402 | stream->read(&vkQueueBindSparse_VkResult_return, sizeof(VkResult)); |
| 1403 | return vkQueueBindSparse_VkResult_return; |
| 1404 | } |
| 1405 | |
| 1406 | VkResult VkEncoder::vkCreateFence( |
| 1407 | VkDevice device, |
| 1408 | const VkFenceCreateInfo* pCreateInfo, |
| 1409 | const VkAllocationCallbacks* pAllocator, |
| 1410 | VkFence* pFence) |
| 1411 | { |
| 1412 | auto stream = mImpl->stream(); |
| 1413 | auto countingStream = mImpl->countingStream(); |
| 1414 | countingStream->rewind(); |
| 1415 | { |
| 1416 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1417 | marshal_VkFenceCreateInfo(countingStream, (const VkFenceCreateInfo*)(pCreateInfo)); |
| 1418 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1419 | if (pAllocator) |
| 1420 | { |
| 1421 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1422 | } |
| 1423 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 1424 | } |
| 1425 | uint32_t packetSize_vkCreateFence = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1426 | countingStream->rewind(); |
| 1427 | uint32_t opcode_vkCreateFence = OP_vkCreateFence; |
| 1428 | stream->write(&opcode_vkCreateFence, sizeof(uint32_t)); |
| 1429 | stream->write(&packetSize_vkCreateFence, sizeof(uint32_t)); |
| 1430 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1431 | marshal_VkFenceCreateInfo(stream, (const VkFenceCreateInfo*)(pCreateInfo)); |
| 1432 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1433 | if (pAllocator) |
| 1434 | { |
| 1435 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1436 | } |
| 1437 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 1438 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 1439 | VkResult vkCreateFence_VkResult_return = (VkResult)0; |
| 1440 | stream->read(&vkCreateFence_VkResult_return, sizeof(VkResult)); |
| 1441 | return vkCreateFence_VkResult_return; |
| 1442 | } |
| 1443 | |
| 1444 | void VkEncoder::vkDestroyFence( |
| 1445 | VkDevice device, |
| 1446 | VkFence fence, |
| 1447 | const VkAllocationCallbacks* pAllocator) |
| 1448 | { |
| 1449 | auto stream = mImpl->stream(); |
| 1450 | auto countingStream = mImpl->countingStream(); |
| 1451 | countingStream->rewind(); |
| 1452 | { |
| 1453 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1454 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1455 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1456 | if (pAllocator) |
| 1457 | { |
| 1458 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1459 | } |
| 1460 | } |
| 1461 | uint32_t packetSize_vkDestroyFence = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1462 | countingStream->rewind(); |
| 1463 | uint32_t opcode_vkDestroyFence = OP_vkDestroyFence; |
| 1464 | stream->write(&opcode_vkDestroyFence, sizeof(uint32_t)); |
| 1465 | stream->write(&packetSize_vkDestroyFence, sizeof(uint32_t)); |
| 1466 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1467 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1468 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1469 | if (pAllocator) |
| 1470 | { |
| 1471 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1472 | } |
| 1473 | } |
| 1474 | |
| 1475 | VkResult VkEncoder::vkResetFences( |
| 1476 | VkDevice device, |
| 1477 | uint32_t fenceCount, |
| 1478 | const VkFence* pFences) |
| 1479 | { |
| 1480 | auto stream = mImpl->stream(); |
| 1481 | auto countingStream = mImpl->countingStream(); |
| 1482 | countingStream->rewind(); |
| 1483 | { |
| 1484 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1485 | countingStream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1486 | countingStream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1487 | } |
| 1488 | uint32_t packetSize_vkResetFences = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1489 | countingStream->rewind(); |
| 1490 | uint32_t opcode_vkResetFences = OP_vkResetFences; |
| 1491 | stream->write(&opcode_vkResetFences, sizeof(uint32_t)); |
| 1492 | stream->write(&packetSize_vkResetFences, sizeof(uint32_t)); |
| 1493 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1494 | stream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1495 | stream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1496 | VkResult vkResetFences_VkResult_return = (VkResult)0; |
| 1497 | stream->read(&vkResetFences_VkResult_return, sizeof(VkResult)); |
| 1498 | return vkResetFences_VkResult_return; |
| 1499 | } |
| 1500 | |
| 1501 | VkResult VkEncoder::vkGetFenceStatus( |
| 1502 | VkDevice device, |
| 1503 | VkFence fence) |
| 1504 | { |
| 1505 | auto stream = mImpl->stream(); |
| 1506 | auto countingStream = mImpl->countingStream(); |
| 1507 | countingStream->rewind(); |
| 1508 | { |
| 1509 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1510 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1511 | } |
| 1512 | uint32_t packetSize_vkGetFenceStatus = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1513 | countingStream->rewind(); |
| 1514 | uint32_t opcode_vkGetFenceStatus = OP_vkGetFenceStatus; |
| 1515 | stream->write(&opcode_vkGetFenceStatus, sizeof(uint32_t)); |
| 1516 | stream->write(&packetSize_vkGetFenceStatus, sizeof(uint32_t)); |
| 1517 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1518 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1519 | VkResult vkGetFenceStatus_VkResult_return = (VkResult)0; |
| 1520 | stream->read(&vkGetFenceStatus_VkResult_return, sizeof(VkResult)); |
| 1521 | return vkGetFenceStatus_VkResult_return; |
| 1522 | } |
| 1523 | |
| 1524 | VkResult VkEncoder::vkWaitForFences( |
| 1525 | VkDevice device, |
| 1526 | uint32_t fenceCount, |
| 1527 | const VkFence* pFences, |
| 1528 | VkBool32 waitAll, |
| 1529 | uint64_t timeout) |
| 1530 | { |
| 1531 | auto stream = mImpl->stream(); |
| 1532 | auto countingStream = mImpl->countingStream(); |
| 1533 | countingStream->rewind(); |
| 1534 | { |
| 1535 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1536 | countingStream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1537 | countingStream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1538 | countingStream->write((VkBool32*)&waitAll, sizeof(VkBool32)); |
| 1539 | countingStream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 1540 | } |
| 1541 | uint32_t packetSize_vkWaitForFences = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1542 | countingStream->rewind(); |
| 1543 | uint32_t opcode_vkWaitForFences = OP_vkWaitForFences; |
| 1544 | stream->write(&opcode_vkWaitForFences, sizeof(uint32_t)); |
| 1545 | stream->write(&packetSize_vkWaitForFences, sizeof(uint32_t)); |
| 1546 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1547 | stream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1548 | stream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1549 | stream->write((VkBool32*)&waitAll, sizeof(VkBool32)); |
| 1550 | stream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 1551 | VkResult vkWaitForFences_VkResult_return = (VkResult)0; |
| 1552 | stream->read(&vkWaitForFences_VkResult_return, sizeof(VkResult)); |
| 1553 | return vkWaitForFences_VkResult_return; |
| 1554 | } |
| 1555 | |
| 1556 | VkResult VkEncoder::vkCreateSemaphore( |
| 1557 | VkDevice device, |
| 1558 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 1559 | const VkAllocationCallbacks* pAllocator, |
| 1560 | VkSemaphore* pSemaphore) |
| 1561 | { |
| 1562 | auto stream = mImpl->stream(); |
| 1563 | auto countingStream = mImpl->countingStream(); |
| 1564 | countingStream->rewind(); |
| 1565 | { |
| 1566 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1567 | marshal_VkSemaphoreCreateInfo(countingStream, (const VkSemaphoreCreateInfo*)(pCreateInfo)); |
| 1568 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1569 | if (pAllocator) |
| 1570 | { |
| 1571 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1572 | } |
| 1573 | countingStream->write((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1574 | } |
| 1575 | uint32_t packetSize_vkCreateSemaphore = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1576 | countingStream->rewind(); |
| 1577 | uint32_t opcode_vkCreateSemaphore = OP_vkCreateSemaphore; |
| 1578 | stream->write(&opcode_vkCreateSemaphore, sizeof(uint32_t)); |
| 1579 | stream->write(&packetSize_vkCreateSemaphore, sizeof(uint32_t)); |
| 1580 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1581 | marshal_VkSemaphoreCreateInfo(stream, (const VkSemaphoreCreateInfo*)(pCreateInfo)); |
| 1582 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1583 | if (pAllocator) |
| 1584 | { |
| 1585 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1586 | } |
| 1587 | stream->write((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1588 | stream->read((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1589 | VkResult vkCreateSemaphore_VkResult_return = (VkResult)0; |
| 1590 | stream->read(&vkCreateSemaphore_VkResult_return, sizeof(VkResult)); |
| 1591 | return vkCreateSemaphore_VkResult_return; |
| 1592 | } |
| 1593 | |
| 1594 | void VkEncoder::vkDestroySemaphore( |
| 1595 | VkDevice device, |
| 1596 | VkSemaphore semaphore, |
| 1597 | const VkAllocationCallbacks* pAllocator) |
| 1598 | { |
| 1599 | auto stream = mImpl->stream(); |
| 1600 | auto countingStream = mImpl->countingStream(); |
| 1601 | countingStream->rewind(); |
| 1602 | { |
| 1603 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1604 | countingStream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 1605 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1606 | if (pAllocator) |
| 1607 | { |
| 1608 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1609 | } |
| 1610 | } |
| 1611 | uint32_t packetSize_vkDestroySemaphore = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1612 | countingStream->rewind(); |
| 1613 | uint32_t opcode_vkDestroySemaphore = OP_vkDestroySemaphore; |
| 1614 | stream->write(&opcode_vkDestroySemaphore, sizeof(uint32_t)); |
| 1615 | stream->write(&packetSize_vkDestroySemaphore, sizeof(uint32_t)); |
| 1616 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1617 | stream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 1618 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1619 | if (pAllocator) |
| 1620 | { |
| 1621 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1622 | } |
| 1623 | } |
| 1624 | |
| 1625 | VkResult VkEncoder::vkCreateEvent( |
| 1626 | VkDevice device, |
| 1627 | const VkEventCreateInfo* pCreateInfo, |
| 1628 | const VkAllocationCallbacks* pAllocator, |
| 1629 | VkEvent* pEvent) |
| 1630 | { |
| 1631 | auto stream = mImpl->stream(); |
| 1632 | auto countingStream = mImpl->countingStream(); |
| 1633 | countingStream->rewind(); |
| 1634 | { |
| 1635 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1636 | marshal_VkEventCreateInfo(countingStream, (const VkEventCreateInfo*)(pCreateInfo)); |
| 1637 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1638 | if (pAllocator) |
| 1639 | { |
| 1640 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1641 | } |
| 1642 | countingStream->write((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1643 | } |
| 1644 | uint32_t packetSize_vkCreateEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1645 | countingStream->rewind(); |
| 1646 | uint32_t opcode_vkCreateEvent = OP_vkCreateEvent; |
| 1647 | stream->write(&opcode_vkCreateEvent, sizeof(uint32_t)); |
| 1648 | stream->write(&packetSize_vkCreateEvent, sizeof(uint32_t)); |
| 1649 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1650 | marshal_VkEventCreateInfo(stream, (const VkEventCreateInfo*)(pCreateInfo)); |
| 1651 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1652 | if (pAllocator) |
| 1653 | { |
| 1654 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1655 | } |
| 1656 | stream->write((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1657 | stream->read((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1658 | VkResult vkCreateEvent_VkResult_return = (VkResult)0; |
| 1659 | stream->read(&vkCreateEvent_VkResult_return, sizeof(VkResult)); |
| 1660 | return vkCreateEvent_VkResult_return; |
| 1661 | } |
| 1662 | |
| 1663 | void VkEncoder::vkDestroyEvent( |
| 1664 | VkDevice device, |
| 1665 | VkEvent event, |
| 1666 | const VkAllocationCallbacks* pAllocator) |
| 1667 | { |
| 1668 | auto stream = mImpl->stream(); |
| 1669 | auto countingStream = mImpl->countingStream(); |
| 1670 | countingStream->rewind(); |
| 1671 | { |
| 1672 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1673 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1674 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1675 | if (pAllocator) |
| 1676 | { |
| 1677 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1678 | } |
| 1679 | } |
| 1680 | uint32_t packetSize_vkDestroyEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1681 | countingStream->rewind(); |
| 1682 | uint32_t opcode_vkDestroyEvent = OP_vkDestroyEvent; |
| 1683 | stream->write(&opcode_vkDestroyEvent, sizeof(uint32_t)); |
| 1684 | stream->write(&packetSize_vkDestroyEvent, sizeof(uint32_t)); |
| 1685 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1686 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1687 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1688 | if (pAllocator) |
| 1689 | { |
| 1690 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1691 | } |
| 1692 | } |
| 1693 | |
| 1694 | VkResult VkEncoder::vkGetEventStatus( |
| 1695 | VkDevice device, |
| 1696 | VkEvent event) |
| 1697 | { |
| 1698 | auto stream = mImpl->stream(); |
| 1699 | auto countingStream = mImpl->countingStream(); |
| 1700 | countingStream->rewind(); |
| 1701 | { |
| 1702 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1703 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1704 | } |
| 1705 | uint32_t packetSize_vkGetEventStatus = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1706 | countingStream->rewind(); |
| 1707 | uint32_t opcode_vkGetEventStatus = OP_vkGetEventStatus; |
| 1708 | stream->write(&opcode_vkGetEventStatus, sizeof(uint32_t)); |
| 1709 | stream->write(&packetSize_vkGetEventStatus, sizeof(uint32_t)); |
| 1710 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1711 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1712 | VkResult vkGetEventStatus_VkResult_return = (VkResult)0; |
| 1713 | stream->read(&vkGetEventStatus_VkResult_return, sizeof(VkResult)); |
| 1714 | return vkGetEventStatus_VkResult_return; |
| 1715 | } |
| 1716 | |
| 1717 | VkResult VkEncoder::vkSetEvent( |
| 1718 | VkDevice device, |
| 1719 | VkEvent event) |
| 1720 | { |
| 1721 | auto stream = mImpl->stream(); |
| 1722 | auto countingStream = mImpl->countingStream(); |
| 1723 | countingStream->rewind(); |
| 1724 | { |
| 1725 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1726 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1727 | } |
| 1728 | uint32_t packetSize_vkSetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1729 | countingStream->rewind(); |
| 1730 | uint32_t opcode_vkSetEvent = OP_vkSetEvent; |
| 1731 | stream->write(&opcode_vkSetEvent, sizeof(uint32_t)); |
| 1732 | stream->write(&packetSize_vkSetEvent, sizeof(uint32_t)); |
| 1733 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1734 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1735 | VkResult vkSetEvent_VkResult_return = (VkResult)0; |
| 1736 | stream->read(&vkSetEvent_VkResult_return, sizeof(VkResult)); |
| 1737 | return vkSetEvent_VkResult_return; |
| 1738 | } |
| 1739 | |
| 1740 | VkResult VkEncoder::vkResetEvent( |
| 1741 | VkDevice device, |
| 1742 | VkEvent event) |
| 1743 | { |
| 1744 | auto stream = mImpl->stream(); |
| 1745 | auto countingStream = mImpl->countingStream(); |
| 1746 | countingStream->rewind(); |
| 1747 | { |
| 1748 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1749 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1750 | } |
| 1751 | uint32_t packetSize_vkResetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1752 | countingStream->rewind(); |
| 1753 | uint32_t opcode_vkResetEvent = OP_vkResetEvent; |
| 1754 | stream->write(&opcode_vkResetEvent, sizeof(uint32_t)); |
| 1755 | stream->write(&packetSize_vkResetEvent, sizeof(uint32_t)); |
| 1756 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1757 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1758 | VkResult vkResetEvent_VkResult_return = (VkResult)0; |
| 1759 | stream->read(&vkResetEvent_VkResult_return, sizeof(VkResult)); |
| 1760 | return vkResetEvent_VkResult_return; |
| 1761 | } |
| 1762 | |
| 1763 | VkResult VkEncoder::vkCreateQueryPool( |
| 1764 | VkDevice device, |
| 1765 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 1766 | const VkAllocationCallbacks* pAllocator, |
| 1767 | VkQueryPool* pQueryPool) |
| 1768 | { |
| 1769 | auto stream = mImpl->stream(); |
| 1770 | auto countingStream = mImpl->countingStream(); |
| 1771 | countingStream->rewind(); |
| 1772 | { |
| 1773 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1774 | marshal_VkQueryPoolCreateInfo(countingStream, (const VkQueryPoolCreateInfo*)(pCreateInfo)); |
| 1775 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1776 | if (pAllocator) |
| 1777 | { |
| 1778 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1779 | } |
| 1780 | countingStream->write((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1781 | } |
| 1782 | uint32_t packetSize_vkCreateQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1783 | countingStream->rewind(); |
| 1784 | uint32_t opcode_vkCreateQueryPool = OP_vkCreateQueryPool; |
| 1785 | stream->write(&opcode_vkCreateQueryPool, sizeof(uint32_t)); |
| 1786 | stream->write(&packetSize_vkCreateQueryPool, sizeof(uint32_t)); |
| 1787 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1788 | marshal_VkQueryPoolCreateInfo(stream, (const VkQueryPoolCreateInfo*)(pCreateInfo)); |
| 1789 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1790 | if (pAllocator) |
| 1791 | { |
| 1792 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1793 | } |
| 1794 | stream->write((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1795 | stream->read((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1796 | VkResult vkCreateQueryPool_VkResult_return = (VkResult)0; |
| 1797 | stream->read(&vkCreateQueryPool_VkResult_return, sizeof(VkResult)); |
| 1798 | return vkCreateQueryPool_VkResult_return; |
| 1799 | } |
| 1800 | |
| 1801 | void VkEncoder::vkDestroyQueryPool( |
| 1802 | VkDevice device, |
| 1803 | VkQueryPool queryPool, |
| 1804 | const VkAllocationCallbacks* pAllocator) |
| 1805 | { |
| 1806 | auto stream = mImpl->stream(); |
| 1807 | auto countingStream = mImpl->countingStream(); |
| 1808 | countingStream->rewind(); |
| 1809 | { |
| 1810 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1811 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1812 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1813 | if (pAllocator) |
| 1814 | { |
| 1815 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1816 | } |
| 1817 | } |
| 1818 | uint32_t packetSize_vkDestroyQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1819 | countingStream->rewind(); |
| 1820 | uint32_t opcode_vkDestroyQueryPool = OP_vkDestroyQueryPool; |
| 1821 | stream->write(&opcode_vkDestroyQueryPool, sizeof(uint32_t)); |
| 1822 | stream->write(&packetSize_vkDestroyQueryPool, sizeof(uint32_t)); |
| 1823 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1824 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1825 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1826 | if (pAllocator) |
| 1827 | { |
| 1828 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1829 | } |
| 1830 | } |
| 1831 | |
| 1832 | VkResult VkEncoder::vkGetQueryPoolResults( |
| 1833 | VkDevice device, |
| 1834 | VkQueryPool queryPool, |
| 1835 | uint32_t firstQuery, |
| 1836 | uint32_t queryCount, |
| 1837 | size_t dataSize, |
| 1838 | void* pData, |
| 1839 | VkDeviceSize stride, |
| 1840 | VkQueryResultFlags flags) |
| 1841 | { |
| 1842 | auto stream = mImpl->stream(); |
| 1843 | auto countingStream = mImpl->countingStream(); |
| 1844 | countingStream->rewind(); |
| 1845 | { |
| 1846 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1847 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1848 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 1849 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 1850 | countingStream->write((size_t*)&dataSize, sizeof(size_t)); |
| 1851 | countingStream->write((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1852 | countingStream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 1853 | countingStream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 1854 | } |
| 1855 | uint32_t packetSize_vkGetQueryPoolResults = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1856 | countingStream->rewind(); |
| 1857 | uint32_t opcode_vkGetQueryPoolResults = OP_vkGetQueryPoolResults; |
| 1858 | stream->write(&opcode_vkGetQueryPoolResults, sizeof(uint32_t)); |
| 1859 | stream->write(&packetSize_vkGetQueryPoolResults, sizeof(uint32_t)); |
| 1860 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1861 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1862 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 1863 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 1864 | stream->write((size_t*)&dataSize, sizeof(size_t)); |
| 1865 | stream->write((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1866 | stream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 1867 | stream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 1868 | stream->read((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1869 | VkResult vkGetQueryPoolResults_VkResult_return = (VkResult)0; |
| 1870 | stream->read(&vkGetQueryPoolResults_VkResult_return, sizeof(VkResult)); |
| 1871 | return vkGetQueryPoolResults_VkResult_return; |
| 1872 | } |
| 1873 | |
| 1874 | VkResult VkEncoder::vkCreateBuffer( |
| 1875 | VkDevice device, |
| 1876 | const VkBufferCreateInfo* pCreateInfo, |
| 1877 | const VkAllocationCallbacks* pAllocator, |
| 1878 | VkBuffer* pBuffer) |
| 1879 | { |
| 1880 | auto stream = mImpl->stream(); |
| 1881 | auto countingStream = mImpl->countingStream(); |
| 1882 | countingStream->rewind(); |
| 1883 | { |
| 1884 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1885 | marshal_VkBufferCreateInfo(countingStream, (const VkBufferCreateInfo*)(pCreateInfo)); |
| 1886 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1887 | if (pAllocator) |
| 1888 | { |
| 1889 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1890 | } |
| 1891 | countingStream->write((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1892 | } |
| 1893 | uint32_t packetSize_vkCreateBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1894 | countingStream->rewind(); |
| 1895 | uint32_t opcode_vkCreateBuffer = OP_vkCreateBuffer; |
| 1896 | stream->write(&opcode_vkCreateBuffer, sizeof(uint32_t)); |
| 1897 | stream->write(&packetSize_vkCreateBuffer, sizeof(uint32_t)); |
| 1898 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1899 | marshal_VkBufferCreateInfo(stream, (const VkBufferCreateInfo*)(pCreateInfo)); |
| 1900 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1901 | if (pAllocator) |
| 1902 | { |
| 1903 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1904 | } |
| 1905 | stream->write((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1906 | stream->read((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1907 | VkResult vkCreateBuffer_VkResult_return = (VkResult)0; |
| 1908 | stream->read(&vkCreateBuffer_VkResult_return, sizeof(VkResult)); |
| 1909 | return vkCreateBuffer_VkResult_return; |
| 1910 | } |
| 1911 | |
| 1912 | void VkEncoder::vkDestroyBuffer( |
| 1913 | VkDevice device, |
| 1914 | VkBuffer buffer, |
| 1915 | const VkAllocationCallbacks* pAllocator) |
| 1916 | { |
| 1917 | auto stream = mImpl->stream(); |
| 1918 | auto countingStream = mImpl->countingStream(); |
| 1919 | countingStream->rewind(); |
| 1920 | { |
| 1921 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1922 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1923 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1924 | if (pAllocator) |
| 1925 | { |
| 1926 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1927 | } |
| 1928 | } |
| 1929 | uint32_t packetSize_vkDestroyBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1930 | countingStream->rewind(); |
| 1931 | uint32_t opcode_vkDestroyBuffer = OP_vkDestroyBuffer; |
| 1932 | stream->write(&opcode_vkDestroyBuffer, sizeof(uint32_t)); |
| 1933 | stream->write(&packetSize_vkDestroyBuffer, sizeof(uint32_t)); |
| 1934 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1935 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1936 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1937 | if (pAllocator) |
| 1938 | { |
| 1939 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1940 | } |
| 1941 | } |
| 1942 | |
| 1943 | VkResult VkEncoder::vkCreateBufferView( |
| 1944 | VkDevice device, |
| 1945 | const VkBufferViewCreateInfo* pCreateInfo, |
| 1946 | const VkAllocationCallbacks* pAllocator, |
| 1947 | VkBufferView* pView) |
| 1948 | { |
| 1949 | auto stream = mImpl->stream(); |
| 1950 | auto countingStream = mImpl->countingStream(); |
| 1951 | countingStream->rewind(); |
| 1952 | { |
| 1953 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1954 | marshal_VkBufferViewCreateInfo(countingStream, (const VkBufferViewCreateInfo*)(pCreateInfo)); |
| 1955 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1956 | if (pAllocator) |
| 1957 | { |
| 1958 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1959 | } |
| 1960 | countingStream->write((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1961 | } |
| 1962 | uint32_t packetSize_vkCreateBufferView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1963 | countingStream->rewind(); |
| 1964 | uint32_t opcode_vkCreateBufferView = OP_vkCreateBufferView; |
| 1965 | stream->write(&opcode_vkCreateBufferView, sizeof(uint32_t)); |
| 1966 | stream->write(&packetSize_vkCreateBufferView, sizeof(uint32_t)); |
| 1967 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1968 | marshal_VkBufferViewCreateInfo(stream, (const VkBufferViewCreateInfo*)(pCreateInfo)); |
| 1969 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1970 | if (pAllocator) |
| 1971 | { |
| 1972 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1973 | } |
| 1974 | stream->write((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1975 | stream->read((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1976 | VkResult vkCreateBufferView_VkResult_return = (VkResult)0; |
| 1977 | stream->read(&vkCreateBufferView_VkResult_return, sizeof(VkResult)); |
| 1978 | return vkCreateBufferView_VkResult_return; |
| 1979 | } |
| 1980 | |
| 1981 | void VkEncoder::vkDestroyBufferView( |
| 1982 | VkDevice device, |
| 1983 | VkBufferView bufferView, |
| 1984 | const VkAllocationCallbacks* pAllocator) |
| 1985 | { |
| 1986 | auto stream = mImpl->stream(); |
| 1987 | auto countingStream = mImpl->countingStream(); |
| 1988 | countingStream->rewind(); |
| 1989 | { |
| 1990 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1991 | countingStream->write((VkBufferView*)&bufferView, sizeof(VkBufferView)); |
| 1992 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1993 | if (pAllocator) |
| 1994 | { |
| 1995 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1996 | } |
| 1997 | } |
| 1998 | uint32_t packetSize_vkDestroyBufferView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1999 | countingStream->rewind(); |
| 2000 | uint32_t opcode_vkDestroyBufferView = OP_vkDestroyBufferView; |
| 2001 | stream->write(&opcode_vkDestroyBufferView, sizeof(uint32_t)); |
| 2002 | stream->write(&packetSize_vkDestroyBufferView, sizeof(uint32_t)); |
| 2003 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2004 | stream->write((VkBufferView*)&bufferView, sizeof(VkBufferView)); |
| 2005 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2006 | if (pAllocator) |
| 2007 | { |
| 2008 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2009 | } |
| 2010 | } |
| 2011 | |
| 2012 | VkResult VkEncoder::vkCreateImage( |
| 2013 | VkDevice device, |
| 2014 | const VkImageCreateInfo* pCreateInfo, |
| 2015 | const VkAllocationCallbacks* pAllocator, |
| 2016 | VkImage* pImage) |
| 2017 | { |
| 2018 | auto stream = mImpl->stream(); |
| 2019 | auto countingStream = mImpl->countingStream(); |
| 2020 | countingStream->rewind(); |
| 2021 | { |
| 2022 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2023 | marshal_VkImageCreateInfo(countingStream, (const VkImageCreateInfo*)(pCreateInfo)); |
| 2024 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2025 | if (pAllocator) |
| 2026 | { |
| 2027 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2028 | } |
| 2029 | countingStream->write((VkImage*)pImage, sizeof(VkImage)); |
| 2030 | } |
| 2031 | uint32_t packetSize_vkCreateImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2032 | countingStream->rewind(); |
| 2033 | uint32_t opcode_vkCreateImage = OP_vkCreateImage; |
| 2034 | stream->write(&opcode_vkCreateImage, sizeof(uint32_t)); |
| 2035 | stream->write(&packetSize_vkCreateImage, sizeof(uint32_t)); |
| 2036 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2037 | marshal_VkImageCreateInfo(stream, (const VkImageCreateInfo*)(pCreateInfo)); |
| 2038 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2039 | if (pAllocator) |
| 2040 | { |
| 2041 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2042 | } |
| 2043 | stream->write((VkImage*)pImage, sizeof(VkImage)); |
| 2044 | stream->read((VkImage*)pImage, sizeof(VkImage)); |
| 2045 | VkResult vkCreateImage_VkResult_return = (VkResult)0; |
| 2046 | stream->read(&vkCreateImage_VkResult_return, sizeof(VkResult)); |
| 2047 | return vkCreateImage_VkResult_return; |
| 2048 | } |
| 2049 | |
| 2050 | void VkEncoder::vkDestroyImage( |
| 2051 | VkDevice device, |
| 2052 | VkImage image, |
| 2053 | const VkAllocationCallbacks* pAllocator) |
| 2054 | { |
| 2055 | auto stream = mImpl->stream(); |
| 2056 | auto countingStream = mImpl->countingStream(); |
| 2057 | countingStream->rewind(); |
| 2058 | { |
| 2059 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2060 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 2061 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2062 | if (pAllocator) |
| 2063 | { |
| 2064 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2065 | } |
| 2066 | } |
| 2067 | uint32_t packetSize_vkDestroyImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2068 | countingStream->rewind(); |
| 2069 | uint32_t opcode_vkDestroyImage = OP_vkDestroyImage; |
| 2070 | stream->write(&opcode_vkDestroyImage, sizeof(uint32_t)); |
| 2071 | stream->write(&packetSize_vkDestroyImage, sizeof(uint32_t)); |
| 2072 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2073 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 2074 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2075 | if (pAllocator) |
| 2076 | { |
| 2077 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2078 | } |
| 2079 | } |
| 2080 | |
| 2081 | void VkEncoder::vkGetImageSubresourceLayout( |
| 2082 | VkDevice device, |
| 2083 | VkImage image, |
| 2084 | const VkImageSubresource* pSubresource, |
| 2085 | VkSubresourceLayout* pLayout) |
| 2086 | { |
| 2087 | auto stream = mImpl->stream(); |
| 2088 | auto countingStream = mImpl->countingStream(); |
| 2089 | countingStream->rewind(); |
| 2090 | { |
| 2091 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2092 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 2093 | marshal_VkImageSubresource(countingStream, (const VkImageSubresource*)(pSubresource)); |
| 2094 | marshal_VkSubresourceLayout(countingStream, (VkSubresourceLayout*)(pLayout)); |
| 2095 | } |
| 2096 | uint32_t packetSize_vkGetImageSubresourceLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2097 | countingStream->rewind(); |
| 2098 | uint32_t opcode_vkGetImageSubresourceLayout = OP_vkGetImageSubresourceLayout; |
| 2099 | stream->write(&opcode_vkGetImageSubresourceLayout, sizeof(uint32_t)); |
| 2100 | stream->write(&packetSize_vkGetImageSubresourceLayout, sizeof(uint32_t)); |
| 2101 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2102 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 2103 | marshal_VkImageSubresource(stream, (const VkImageSubresource*)(pSubresource)); |
| 2104 | marshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout)); |
| 2105 | unmarshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout)); |
| 2106 | } |
| 2107 | |
| 2108 | VkResult VkEncoder::vkCreateImageView( |
| 2109 | VkDevice device, |
| 2110 | const VkImageViewCreateInfo* pCreateInfo, |
| 2111 | const VkAllocationCallbacks* pAllocator, |
| 2112 | VkImageView* pView) |
| 2113 | { |
| 2114 | auto stream = mImpl->stream(); |
| 2115 | auto countingStream = mImpl->countingStream(); |
| 2116 | countingStream->rewind(); |
| 2117 | { |
| 2118 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2119 | marshal_VkImageViewCreateInfo(countingStream, (const VkImageViewCreateInfo*)(pCreateInfo)); |
| 2120 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2121 | if (pAllocator) |
| 2122 | { |
| 2123 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2124 | } |
| 2125 | countingStream->write((VkImageView*)pView, sizeof(VkImageView)); |
| 2126 | } |
| 2127 | uint32_t packetSize_vkCreateImageView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2128 | countingStream->rewind(); |
| 2129 | uint32_t opcode_vkCreateImageView = OP_vkCreateImageView; |
| 2130 | stream->write(&opcode_vkCreateImageView, sizeof(uint32_t)); |
| 2131 | stream->write(&packetSize_vkCreateImageView, sizeof(uint32_t)); |
| 2132 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2133 | marshal_VkImageViewCreateInfo(stream, (const VkImageViewCreateInfo*)(pCreateInfo)); |
| 2134 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2135 | if (pAllocator) |
| 2136 | { |
| 2137 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2138 | } |
| 2139 | stream->write((VkImageView*)pView, sizeof(VkImageView)); |
| 2140 | stream->read((VkImageView*)pView, sizeof(VkImageView)); |
| 2141 | VkResult vkCreateImageView_VkResult_return = (VkResult)0; |
| 2142 | stream->read(&vkCreateImageView_VkResult_return, sizeof(VkResult)); |
| 2143 | return vkCreateImageView_VkResult_return; |
| 2144 | } |
| 2145 | |
| 2146 | void VkEncoder::vkDestroyImageView( |
| 2147 | VkDevice device, |
| 2148 | VkImageView imageView, |
| 2149 | const VkAllocationCallbacks* pAllocator) |
| 2150 | { |
| 2151 | auto stream = mImpl->stream(); |
| 2152 | auto countingStream = mImpl->countingStream(); |
| 2153 | countingStream->rewind(); |
| 2154 | { |
| 2155 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2156 | countingStream->write((VkImageView*)&imageView, sizeof(VkImageView)); |
| 2157 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2158 | if (pAllocator) |
| 2159 | { |
| 2160 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2161 | } |
| 2162 | } |
| 2163 | uint32_t packetSize_vkDestroyImageView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2164 | countingStream->rewind(); |
| 2165 | uint32_t opcode_vkDestroyImageView = OP_vkDestroyImageView; |
| 2166 | stream->write(&opcode_vkDestroyImageView, sizeof(uint32_t)); |
| 2167 | stream->write(&packetSize_vkDestroyImageView, sizeof(uint32_t)); |
| 2168 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2169 | stream->write((VkImageView*)&imageView, sizeof(VkImageView)); |
| 2170 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2171 | if (pAllocator) |
| 2172 | { |
| 2173 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2174 | } |
| 2175 | } |
| 2176 | |
| 2177 | VkResult VkEncoder::vkCreateShaderModule( |
| 2178 | VkDevice device, |
| 2179 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 2180 | const VkAllocationCallbacks* pAllocator, |
| 2181 | VkShaderModule* pShaderModule) |
| 2182 | { |
| 2183 | auto stream = mImpl->stream(); |
| 2184 | auto countingStream = mImpl->countingStream(); |
| 2185 | countingStream->rewind(); |
| 2186 | { |
| 2187 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2188 | marshal_VkShaderModuleCreateInfo(countingStream, (const VkShaderModuleCreateInfo*)(pCreateInfo)); |
| 2189 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2190 | if (pAllocator) |
| 2191 | { |
| 2192 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2193 | } |
| 2194 | countingStream->write((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2195 | } |
| 2196 | uint32_t packetSize_vkCreateShaderModule = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2197 | countingStream->rewind(); |
| 2198 | uint32_t opcode_vkCreateShaderModule = OP_vkCreateShaderModule; |
| 2199 | stream->write(&opcode_vkCreateShaderModule, sizeof(uint32_t)); |
| 2200 | stream->write(&packetSize_vkCreateShaderModule, sizeof(uint32_t)); |
| 2201 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2202 | marshal_VkShaderModuleCreateInfo(stream, (const VkShaderModuleCreateInfo*)(pCreateInfo)); |
| 2203 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2204 | if (pAllocator) |
| 2205 | { |
| 2206 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2207 | } |
| 2208 | stream->write((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2209 | stream->read((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2210 | VkResult vkCreateShaderModule_VkResult_return = (VkResult)0; |
| 2211 | stream->read(&vkCreateShaderModule_VkResult_return, sizeof(VkResult)); |
| 2212 | return vkCreateShaderModule_VkResult_return; |
| 2213 | } |
| 2214 | |
| 2215 | void VkEncoder::vkDestroyShaderModule( |
| 2216 | VkDevice device, |
| 2217 | VkShaderModule shaderModule, |
| 2218 | const VkAllocationCallbacks* pAllocator) |
| 2219 | { |
| 2220 | auto stream = mImpl->stream(); |
| 2221 | auto countingStream = mImpl->countingStream(); |
| 2222 | countingStream->rewind(); |
| 2223 | { |
| 2224 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2225 | countingStream->write((VkShaderModule*)&shaderModule, sizeof(VkShaderModule)); |
| 2226 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2227 | if (pAllocator) |
| 2228 | { |
| 2229 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2230 | } |
| 2231 | } |
| 2232 | uint32_t packetSize_vkDestroyShaderModule = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2233 | countingStream->rewind(); |
| 2234 | uint32_t opcode_vkDestroyShaderModule = OP_vkDestroyShaderModule; |
| 2235 | stream->write(&opcode_vkDestroyShaderModule, sizeof(uint32_t)); |
| 2236 | stream->write(&packetSize_vkDestroyShaderModule, sizeof(uint32_t)); |
| 2237 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2238 | stream->write((VkShaderModule*)&shaderModule, sizeof(VkShaderModule)); |
| 2239 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2240 | if (pAllocator) |
| 2241 | { |
| 2242 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2243 | } |
| 2244 | } |
| 2245 | |
| 2246 | VkResult VkEncoder::vkCreatePipelineCache( |
| 2247 | VkDevice device, |
| 2248 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 2249 | const VkAllocationCallbacks* pAllocator, |
| 2250 | VkPipelineCache* pPipelineCache) |
| 2251 | { |
| 2252 | auto stream = mImpl->stream(); |
| 2253 | auto countingStream = mImpl->countingStream(); |
| 2254 | countingStream->rewind(); |
| 2255 | { |
| 2256 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2257 | marshal_VkPipelineCacheCreateInfo(countingStream, (const VkPipelineCacheCreateInfo*)(pCreateInfo)); |
| 2258 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2259 | if (pAllocator) |
| 2260 | { |
| 2261 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2262 | } |
| 2263 | countingStream->write((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2264 | } |
| 2265 | uint32_t packetSize_vkCreatePipelineCache = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2266 | countingStream->rewind(); |
| 2267 | uint32_t opcode_vkCreatePipelineCache = OP_vkCreatePipelineCache; |
| 2268 | stream->write(&opcode_vkCreatePipelineCache, sizeof(uint32_t)); |
| 2269 | stream->write(&packetSize_vkCreatePipelineCache, sizeof(uint32_t)); |
| 2270 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2271 | marshal_VkPipelineCacheCreateInfo(stream, (const VkPipelineCacheCreateInfo*)(pCreateInfo)); |
| 2272 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2273 | if (pAllocator) |
| 2274 | { |
| 2275 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2276 | } |
| 2277 | stream->write((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2278 | stream->read((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2279 | VkResult vkCreatePipelineCache_VkResult_return = (VkResult)0; |
| 2280 | stream->read(&vkCreatePipelineCache_VkResult_return, sizeof(VkResult)); |
| 2281 | return vkCreatePipelineCache_VkResult_return; |
| 2282 | } |
| 2283 | |
| 2284 | void VkEncoder::vkDestroyPipelineCache( |
| 2285 | VkDevice device, |
| 2286 | VkPipelineCache pipelineCache, |
| 2287 | const VkAllocationCallbacks* pAllocator) |
| 2288 | { |
| 2289 | auto stream = mImpl->stream(); |
| 2290 | auto countingStream = mImpl->countingStream(); |
| 2291 | countingStream->rewind(); |
| 2292 | { |
| 2293 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2294 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2295 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2296 | if (pAllocator) |
| 2297 | { |
| 2298 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2299 | } |
| 2300 | } |
| 2301 | uint32_t packetSize_vkDestroyPipelineCache = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2302 | countingStream->rewind(); |
| 2303 | uint32_t opcode_vkDestroyPipelineCache = OP_vkDestroyPipelineCache; |
| 2304 | stream->write(&opcode_vkDestroyPipelineCache, sizeof(uint32_t)); |
| 2305 | stream->write(&packetSize_vkDestroyPipelineCache, sizeof(uint32_t)); |
| 2306 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2307 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2308 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2309 | if (pAllocator) |
| 2310 | { |
| 2311 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2312 | } |
| 2313 | } |
| 2314 | |
| 2315 | VkResult VkEncoder::vkGetPipelineCacheData( |
| 2316 | VkDevice device, |
| 2317 | VkPipelineCache pipelineCache, |
| 2318 | size_t* pDataSize, |
| 2319 | void* pData) |
| 2320 | { |
| 2321 | auto stream = mImpl->stream(); |
| 2322 | auto countingStream = mImpl->countingStream(); |
| 2323 | countingStream->rewind(); |
| 2324 | { |
| 2325 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2326 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2327 | countingStream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 2328 | if (pDataSize) |
| 2329 | { |
| 2330 | countingStream->write((size_t*)pDataSize, sizeof(size_t)); |
| 2331 | } |
| 2332 | countingStream->write((void**)&pData, sizeof(void*)); |
| 2333 | if (pData) |
| 2334 | { |
| 2335 | countingStream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2336 | } |
| 2337 | } |
| 2338 | uint32_t packetSize_vkGetPipelineCacheData = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2339 | countingStream->rewind(); |
| 2340 | uint32_t opcode_vkGetPipelineCacheData = OP_vkGetPipelineCacheData; |
| 2341 | stream->write(&opcode_vkGetPipelineCacheData, sizeof(uint32_t)); |
| 2342 | stream->write(&packetSize_vkGetPipelineCacheData, sizeof(uint32_t)); |
| 2343 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2344 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2345 | stream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 2346 | if (pDataSize) |
| 2347 | { |
| 2348 | stream->write((size_t*)pDataSize, sizeof(size_t)); |
| 2349 | } |
| 2350 | stream->write((void**)&pData, sizeof(void*)); |
| 2351 | if (pData) |
| 2352 | { |
| 2353 | stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2354 | } |
| 2355 | size_t* check_pDataSize; |
| 2356 | stream->read((size_t**)&check_pDataSize, sizeof(size_t*)); |
| 2357 | if (pDataSize) |
| 2358 | { |
| 2359 | if (!(check_pDataSize)) |
| 2360 | { |
| 2361 | fprintf(stderr, "fatal: pDataSize inconsistent between guest and host\n"); |
| 2362 | } |
| 2363 | stream->read((size_t*)pDataSize, sizeof(size_t)); |
| 2364 | } |
| 2365 | void* check_pData; |
| 2366 | stream->read((void**)&check_pData, sizeof(void*)); |
| 2367 | if (pData) |
| 2368 | { |
| 2369 | if (!(check_pData)) |
| 2370 | { |
| 2371 | fprintf(stderr, "fatal: pData inconsistent between guest and host\n"); |
| 2372 | } |
| 2373 | stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2374 | } |
| 2375 | VkResult vkGetPipelineCacheData_VkResult_return = (VkResult)0; |
| 2376 | stream->read(&vkGetPipelineCacheData_VkResult_return, sizeof(VkResult)); |
| 2377 | return vkGetPipelineCacheData_VkResult_return; |
| 2378 | } |
| 2379 | |
| 2380 | VkResult VkEncoder::vkMergePipelineCaches( |
| 2381 | VkDevice device, |
| 2382 | VkPipelineCache dstCache, |
| 2383 | uint32_t srcCacheCount, |
| 2384 | const VkPipelineCache* pSrcCaches) |
| 2385 | { |
| 2386 | auto stream = mImpl->stream(); |
| 2387 | auto countingStream = mImpl->countingStream(); |
| 2388 | countingStream->rewind(); |
| 2389 | { |
| 2390 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2391 | countingStream->write((VkPipelineCache*)&dstCache, sizeof(VkPipelineCache)); |
| 2392 | countingStream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 2393 | countingStream->write((const VkPipelineCache*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkPipelineCache)); |
| 2394 | } |
| 2395 | uint32_t packetSize_vkMergePipelineCaches = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2396 | countingStream->rewind(); |
| 2397 | uint32_t opcode_vkMergePipelineCaches = OP_vkMergePipelineCaches; |
| 2398 | stream->write(&opcode_vkMergePipelineCaches, sizeof(uint32_t)); |
| 2399 | stream->write(&packetSize_vkMergePipelineCaches, sizeof(uint32_t)); |
| 2400 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2401 | stream->write((VkPipelineCache*)&dstCache, sizeof(VkPipelineCache)); |
| 2402 | stream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 2403 | stream->write((const VkPipelineCache*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkPipelineCache)); |
| 2404 | VkResult vkMergePipelineCaches_VkResult_return = (VkResult)0; |
| 2405 | stream->read(&vkMergePipelineCaches_VkResult_return, sizeof(VkResult)); |
| 2406 | return vkMergePipelineCaches_VkResult_return; |
| 2407 | } |
| 2408 | |
| 2409 | VkResult VkEncoder::vkCreateGraphicsPipelines( |
| 2410 | VkDevice device, |
| 2411 | VkPipelineCache pipelineCache, |
| 2412 | uint32_t createInfoCount, |
| 2413 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 2414 | const VkAllocationCallbacks* pAllocator, |
| 2415 | VkPipeline* pPipelines) |
| 2416 | { |
| 2417 | auto stream = mImpl->stream(); |
| 2418 | auto countingStream = mImpl->countingStream(); |
| 2419 | countingStream->rewind(); |
| 2420 | { |
| 2421 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2422 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2423 | countingStream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2424 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2425 | { |
| 2426 | marshal_VkGraphicsPipelineCreateInfo(countingStream, (const VkGraphicsPipelineCreateInfo*)(pCreateInfos + i)); |
| 2427 | } |
| 2428 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2429 | if (pAllocator) |
| 2430 | { |
| 2431 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2432 | } |
| 2433 | countingStream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2434 | } |
| 2435 | uint32_t packetSize_vkCreateGraphicsPipelines = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2436 | countingStream->rewind(); |
| 2437 | uint32_t opcode_vkCreateGraphicsPipelines = OP_vkCreateGraphicsPipelines; |
| 2438 | stream->write(&opcode_vkCreateGraphicsPipelines, sizeof(uint32_t)); |
| 2439 | stream->write(&packetSize_vkCreateGraphicsPipelines, sizeof(uint32_t)); |
| 2440 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2441 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2442 | stream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2443 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2444 | { |
| 2445 | marshal_VkGraphicsPipelineCreateInfo(stream, (const VkGraphicsPipelineCreateInfo*)(pCreateInfos + i)); |
| 2446 | } |
| 2447 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2448 | if (pAllocator) |
| 2449 | { |
| 2450 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2451 | } |
| 2452 | stream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2453 | stream->read((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2454 | VkResult vkCreateGraphicsPipelines_VkResult_return = (VkResult)0; |
| 2455 | stream->read(&vkCreateGraphicsPipelines_VkResult_return, sizeof(VkResult)); |
| 2456 | return vkCreateGraphicsPipelines_VkResult_return; |
| 2457 | } |
| 2458 | |
| 2459 | VkResult VkEncoder::vkCreateComputePipelines( |
| 2460 | VkDevice device, |
| 2461 | VkPipelineCache pipelineCache, |
| 2462 | uint32_t createInfoCount, |
| 2463 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 2464 | const VkAllocationCallbacks* pAllocator, |
| 2465 | VkPipeline* pPipelines) |
| 2466 | { |
| 2467 | auto stream = mImpl->stream(); |
| 2468 | auto countingStream = mImpl->countingStream(); |
| 2469 | countingStream->rewind(); |
| 2470 | { |
| 2471 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2472 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2473 | countingStream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2474 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2475 | { |
| 2476 | marshal_VkComputePipelineCreateInfo(countingStream, (const VkComputePipelineCreateInfo*)(pCreateInfos + i)); |
| 2477 | } |
| 2478 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2479 | if (pAllocator) |
| 2480 | { |
| 2481 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2482 | } |
| 2483 | countingStream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2484 | } |
| 2485 | uint32_t packetSize_vkCreateComputePipelines = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2486 | countingStream->rewind(); |
| 2487 | uint32_t opcode_vkCreateComputePipelines = OP_vkCreateComputePipelines; |
| 2488 | stream->write(&opcode_vkCreateComputePipelines, sizeof(uint32_t)); |
| 2489 | stream->write(&packetSize_vkCreateComputePipelines, sizeof(uint32_t)); |
| 2490 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2491 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2492 | stream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2493 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2494 | { |
| 2495 | marshal_VkComputePipelineCreateInfo(stream, (const VkComputePipelineCreateInfo*)(pCreateInfos + i)); |
| 2496 | } |
| 2497 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2498 | if (pAllocator) |
| 2499 | { |
| 2500 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2501 | } |
| 2502 | stream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2503 | stream->read((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2504 | VkResult vkCreateComputePipelines_VkResult_return = (VkResult)0; |
| 2505 | stream->read(&vkCreateComputePipelines_VkResult_return, sizeof(VkResult)); |
| 2506 | return vkCreateComputePipelines_VkResult_return; |
| 2507 | } |
| 2508 | |
| 2509 | void VkEncoder::vkDestroyPipeline( |
| 2510 | VkDevice device, |
| 2511 | VkPipeline pipeline, |
| 2512 | const VkAllocationCallbacks* pAllocator) |
| 2513 | { |
| 2514 | auto stream = mImpl->stream(); |
| 2515 | auto countingStream = mImpl->countingStream(); |
| 2516 | countingStream->rewind(); |
| 2517 | { |
| 2518 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2519 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 2520 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2521 | if (pAllocator) |
| 2522 | { |
| 2523 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2524 | } |
| 2525 | } |
| 2526 | uint32_t packetSize_vkDestroyPipeline = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2527 | countingStream->rewind(); |
| 2528 | uint32_t opcode_vkDestroyPipeline = OP_vkDestroyPipeline; |
| 2529 | stream->write(&opcode_vkDestroyPipeline, sizeof(uint32_t)); |
| 2530 | stream->write(&packetSize_vkDestroyPipeline, sizeof(uint32_t)); |
| 2531 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2532 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 2533 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2534 | if (pAllocator) |
| 2535 | { |
| 2536 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2537 | } |
| 2538 | } |
| 2539 | |
| 2540 | VkResult VkEncoder::vkCreatePipelineLayout( |
| 2541 | VkDevice device, |
| 2542 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 2543 | const VkAllocationCallbacks* pAllocator, |
| 2544 | VkPipelineLayout* pPipelineLayout) |
| 2545 | { |
| 2546 | auto stream = mImpl->stream(); |
| 2547 | auto countingStream = mImpl->countingStream(); |
| 2548 | countingStream->rewind(); |
| 2549 | { |
| 2550 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2551 | marshal_VkPipelineLayoutCreateInfo(countingStream, (const VkPipelineLayoutCreateInfo*)(pCreateInfo)); |
| 2552 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2553 | if (pAllocator) |
| 2554 | { |
| 2555 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2556 | } |
| 2557 | countingStream->write((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2558 | } |
| 2559 | uint32_t packetSize_vkCreatePipelineLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2560 | countingStream->rewind(); |
| 2561 | uint32_t opcode_vkCreatePipelineLayout = OP_vkCreatePipelineLayout; |
| 2562 | stream->write(&opcode_vkCreatePipelineLayout, sizeof(uint32_t)); |
| 2563 | stream->write(&packetSize_vkCreatePipelineLayout, sizeof(uint32_t)); |
| 2564 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2565 | marshal_VkPipelineLayoutCreateInfo(stream, (const VkPipelineLayoutCreateInfo*)(pCreateInfo)); |
| 2566 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2567 | if (pAllocator) |
| 2568 | { |
| 2569 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2570 | } |
| 2571 | stream->write((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2572 | stream->read((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2573 | VkResult vkCreatePipelineLayout_VkResult_return = (VkResult)0; |
| 2574 | stream->read(&vkCreatePipelineLayout_VkResult_return, sizeof(VkResult)); |
| 2575 | return vkCreatePipelineLayout_VkResult_return; |
| 2576 | } |
| 2577 | |
| 2578 | void VkEncoder::vkDestroyPipelineLayout( |
| 2579 | VkDevice device, |
| 2580 | VkPipelineLayout pipelineLayout, |
| 2581 | const VkAllocationCallbacks* pAllocator) |
| 2582 | { |
| 2583 | auto stream = mImpl->stream(); |
| 2584 | auto countingStream = mImpl->countingStream(); |
| 2585 | countingStream->rewind(); |
| 2586 | { |
| 2587 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2588 | countingStream->write((VkPipelineLayout*)&pipelineLayout, sizeof(VkPipelineLayout)); |
| 2589 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2590 | if (pAllocator) |
| 2591 | { |
| 2592 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2593 | } |
| 2594 | } |
| 2595 | uint32_t packetSize_vkDestroyPipelineLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2596 | countingStream->rewind(); |
| 2597 | uint32_t opcode_vkDestroyPipelineLayout = OP_vkDestroyPipelineLayout; |
| 2598 | stream->write(&opcode_vkDestroyPipelineLayout, sizeof(uint32_t)); |
| 2599 | stream->write(&packetSize_vkDestroyPipelineLayout, sizeof(uint32_t)); |
| 2600 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2601 | stream->write((VkPipelineLayout*)&pipelineLayout, sizeof(VkPipelineLayout)); |
| 2602 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2603 | if (pAllocator) |
| 2604 | { |
| 2605 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2606 | } |
| 2607 | } |
| 2608 | |
| 2609 | VkResult VkEncoder::vkCreateSampler( |
| 2610 | VkDevice device, |
| 2611 | const VkSamplerCreateInfo* pCreateInfo, |
| 2612 | const VkAllocationCallbacks* pAllocator, |
| 2613 | VkSampler* pSampler) |
| 2614 | { |
| 2615 | auto stream = mImpl->stream(); |
| 2616 | auto countingStream = mImpl->countingStream(); |
| 2617 | countingStream->rewind(); |
| 2618 | { |
| 2619 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2620 | marshal_VkSamplerCreateInfo(countingStream, (const VkSamplerCreateInfo*)(pCreateInfo)); |
| 2621 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2622 | if (pAllocator) |
| 2623 | { |
| 2624 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2625 | } |
| 2626 | countingStream->write((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2627 | } |
| 2628 | uint32_t packetSize_vkCreateSampler = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2629 | countingStream->rewind(); |
| 2630 | uint32_t opcode_vkCreateSampler = OP_vkCreateSampler; |
| 2631 | stream->write(&opcode_vkCreateSampler, sizeof(uint32_t)); |
| 2632 | stream->write(&packetSize_vkCreateSampler, sizeof(uint32_t)); |
| 2633 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2634 | marshal_VkSamplerCreateInfo(stream, (const VkSamplerCreateInfo*)(pCreateInfo)); |
| 2635 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2636 | if (pAllocator) |
| 2637 | { |
| 2638 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2639 | } |
| 2640 | stream->write((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2641 | stream->read((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2642 | VkResult vkCreateSampler_VkResult_return = (VkResult)0; |
| 2643 | stream->read(&vkCreateSampler_VkResult_return, sizeof(VkResult)); |
| 2644 | return vkCreateSampler_VkResult_return; |
| 2645 | } |
| 2646 | |
| 2647 | void VkEncoder::vkDestroySampler( |
| 2648 | VkDevice device, |
| 2649 | VkSampler sampler, |
| 2650 | const VkAllocationCallbacks* pAllocator) |
| 2651 | { |
| 2652 | auto stream = mImpl->stream(); |
| 2653 | auto countingStream = mImpl->countingStream(); |
| 2654 | countingStream->rewind(); |
| 2655 | { |
| 2656 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2657 | countingStream->write((VkSampler*)&sampler, sizeof(VkSampler)); |
| 2658 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2659 | if (pAllocator) |
| 2660 | { |
| 2661 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2662 | } |
| 2663 | } |
| 2664 | uint32_t packetSize_vkDestroySampler = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2665 | countingStream->rewind(); |
| 2666 | uint32_t opcode_vkDestroySampler = OP_vkDestroySampler; |
| 2667 | stream->write(&opcode_vkDestroySampler, sizeof(uint32_t)); |
| 2668 | stream->write(&packetSize_vkDestroySampler, sizeof(uint32_t)); |
| 2669 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2670 | stream->write((VkSampler*)&sampler, sizeof(VkSampler)); |
| 2671 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2672 | if (pAllocator) |
| 2673 | { |
| 2674 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2675 | } |
| 2676 | } |
| 2677 | |
| 2678 | VkResult VkEncoder::vkCreateDescriptorSetLayout( |
| 2679 | VkDevice device, |
| 2680 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 2681 | const VkAllocationCallbacks* pAllocator, |
| 2682 | VkDescriptorSetLayout* pSetLayout) |
| 2683 | { |
| 2684 | auto stream = mImpl->stream(); |
| 2685 | auto countingStream = mImpl->countingStream(); |
| 2686 | countingStream->rewind(); |
| 2687 | { |
| 2688 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2689 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 2690 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2691 | if (pAllocator) |
| 2692 | { |
| 2693 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2694 | } |
| 2695 | countingStream->write((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2696 | } |
| 2697 | uint32_t packetSize_vkCreateDescriptorSetLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2698 | countingStream->rewind(); |
| 2699 | uint32_t opcode_vkCreateDescriptorSetLayout = OP_vkCreateDescriptorSetLayout; |
| 2700 | stream->write(&opcode_vkCreateDescriptorSetLayout, sizeof(uint32_t)); |
| 2701 | stream->write(&packetSize_vkCreateDescriptorSetLayout, sizeof(uint32_t)); |
| 2702 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2703 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 2704 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2705 | if (pAllocator) |
| 2706 | { |
| 2707 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2708 | } |
| 2709 | stream->write((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2710 | stream->read((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2711 | VkResult vkCreateDescriptorSetLayout_VkResult_return = (VkResult)0; |
| 2712 | stream->read(&vkCreateDescriptorSetLayout_VkResult_return, sizeof(VkResult)); |
| 2713 | return vkCreateDescriptorSetLayout_VkResult_return; |
| 2714 | } |
| 2715 | |
| 2716 | void VkEncoder::vkDestroyDescriptorSetLayout( |
| 2717 | VkDevice device, |
| 2718 | VkDescriptorSetLayout descriptorSetLayout, |
| 2719 | const VkAllocationCallbacks* pAllocator) |
| 2720 | { |
| 2721 | auto stream = mImpl->stream(); |
| 2722 | auto countingStream = mImpl->countingStream(); |
| 2723 | countingStream->rewind(); |
| 2724 | { |
| 2725 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2726 | countingStream->write((VkDescriptorSetLayout*)&descriptorSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2727 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2728 | if (pAllocator) |
| 2729 | { |
| 2730 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2731 | } |
| 2732 | } |
| 2733 | uint32_t packetSize_vkDestroyDescriptorSetLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2734 | countingStream->rewind(); |
| 2735 | uint32_t opcode_vkDestroyDescriptorSetLayout = OP_vkDestroyDescriptorSetLayout; |
| 2736 | stream->write(&opcode_vkDestroyDescriptorSetLayout, sizeof(uint32_t)); |
| 2737 | stream->write(&packetSize_vkDestroyDescriptorSetLayout, sizeof(uint32_t)); |
| 2738 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2739 | stream->write((VkDescriptorSetLayout*)&descriptorSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2740 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2741 | if (pAllocator) |
| 2742 | { |
| 2743 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2744 | } |
| 2745 | } |
| 2746 | |
| 2747 | VkResult VkEncoder::vkCreateDescriptorPool( |
| 2748 | VkDevice device, |
| 2749 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 2750 | const VkAllocationCallbacks* pAllocator, |
| 2751 | VkDescriptorPool* pDescriptorPool) |
| 2752 | { |
| 2753 | auto stream = mImpl->stream(); |
| 2754 | auto countingStream = mImpl->countingStream(); |
| 2755 | countingStream->rewind(); |
| 2756 | { |
| 2757 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2758 | marshal_VkDescriptorPoolCreateInfo(countingStream, (const VkDescriptorPoolCreateInfo*)(pCreateInfo)); |
| 2759 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2760 | if (pAllocator) |
| 2761 | { |
| 2762 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2763 | } |
| 2764 | countingStream->write((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2765 | } |
| 2766 | uint32_t packetSize_vkCreateDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2767 | countingStream->rewind(); |
| 2768 | uint32_t opcode_vkCreateDescriptorPool = OP_vkCreateDescriptorPool; |
| 2769 | stream->write(&opcode_vkCreateDescriptorPool, sizeof(uint32_t)); |
| 2770 | stream->write(&packetSize_vkCreateDescriptorPool, sizeof(uint32_t)); |
| 2771 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2772 | marshal_VkDescriptorPoolCreateInfo(stream, (const VkDescriptorPoolCreateInfo*)(pCreateInfo)); |
| 2773 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2774 | if (pAllocator) |
| 2775 | { |
| 2776 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2777 | } |
| 2778 | stream->write((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2779 | stream->read((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2780 | VkResult vkCreateDescriptorPool_VkResult_return = (VkResult)0; |
| 2781 | stream->read(&vkCreateDescriptorPool_VkResult_return, sizeof(VkResult)); |
| 2782 | return vkCreateDescriptorPool_VkResult_return; |
| 2783 | } |
| 2784 | |
| 2785 | void VkEncoder::vkDestroyDescriptorPool( |
| 2786 | VkDevice device, |
| 2787 | VkDescriptorPool descriptorPool, |
| 2788 | const VkAllocationCallbacks* pAllocator) |
| 2789 | { |
| 2790 | auto stream = mImpl->stream(); |
| 2791 | auto countingStream = mImpl->countingStream(); |
| 2792 | countingStream->rewind(); |
| 2793 | { |
| 2794 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2795 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2796 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2797 | if (pAllocator) |
| 2798 | { |
| 2799 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2800 | } |
| 2801 | } |
| 2802 | uint32_t packetSize_vkDestroyDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2803 | countingStream->rewind(); |
| 2804 | uint32_t opcode_vkDestroyDescriptorPool = OP_vkDestroyDescriptorPool; |
| 2805 | stream->write(&opcode_vkDestroyDescriptorPool, sizeof(uint32_t)); |
| 2806 | stream->write(&packetSize_vkDestroyDescriptorPool, sizeof(uint32_t)); |
| 2807 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2808 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2809 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2810 | if (pAllocator) |
| 2811 | { |
| 2812 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2813 | } |
| 2814 | } |
| 2815 | |
| 2816 | VkResult VkEncoder::vkResetDescriptorPool( |
| 2817 | VkDevice device, |
| 2818 | VkDescriptorPool descriptorPool, |
| 2819 | VkDescriptorPoolResetFlags flags) |
| 2820 | { |
| 2821 | auto stream = mImpl->stream(); |
| 2822 | auto countingStream = mImpl->countingStream(); |
| 2823 | countingStream->rewind(); |
| 2824 | { |
| 2825 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2826 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2827 | countingStream->write((VkDescriptorPoolResetFlags*)&flags, sizeof(VkDescriptorPoolResetFlags)); |
| 2828 | } |
| 2829 | uint32_t packetSize_vkResetDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2830 | countingStream->rewind(); |
| 2831 | uint32_t opcode_vkResetDescriptorPool = OP_vkResetDescriptorPool; |
| 2832 | stream->write(&opcode_vkResetDescriptorPool, sizeof(uint32_t)); |
| 2833 | stream->write(&packetSize_vkResetDescriptorPool, sizeof(uint32_t)); |
| 2834 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2835 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2836 | stream->write((VkDescriptorPoolResetFlags*)&flags, sizeof(VkDescriptorPoolResetFlags)); |
| 2837 | VkResult vkResetDescriptorPool_VkResult_return = (VkResult)0; |
| 2838 | stream->read(&vkResetDescriptorPool_VkResult_return, sizeof(VkResult)); |
| 2839 | return vkResetDescriptorPool_VkResult_return; |
| 2840 | } |
| 2841 | |
| 2842 | VkResult VkEncoder::vkAllocateDescriptorSets( |
| 2843 | VkDevice device, |
| 2844 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
| 2845 | VkDescriptorSet* pDescriptorSets) |
| 2846 | { |
| 2847 | auto stream = mImpl->stream(); |
| 2848 | auto countingStream = mImpl->countingStream(); |
| 2849 | countingStream->rewind(); |
| 2850 | { |
| 2851 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2852 | marshal_VkDescriptorSetAllocateInfo(countingStream, (const VkDescriptorSetAllocateInfo*)(pAllocateInfo)); |
| 2853 | countingStream->write((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2854 | } |
| 2855 | uint32_t packetSize_vkAllocateDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2856 | countingStream->rewind(); |
| 2857 | uint32_t opcode_vkAllocateDescriptorSets = OP_vkAllocateDescriptorSets; |
| 2858 | stream->write(&opcode_vkAllocateDescriptorSets, sizeof(uint32_t)); |
| 2859 | stream->write(&packetSize_vkAllocateDescriptorSets, sizeof(uint32_t)); |
| 2860 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2861 | marshal_VkDescriptorSetAllocateInfo(stream, (const VkDescriptorSetAllocateInfo*)(pAllocateInfo)); |
| 2862 | stream->write((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2863 | stream->read((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2864 | VkResult vkAllocateDescriptorSets_VkResult_return = (VkResult)0; |
| 2865 | stream->read(&vkAllocateDescriptorSets_VkResult_return, sizeof(VkResult)); |
| 2866 | return vkAllocateDescriptorSets_VkResult_return; |
| 2867 | } |
| 2868 | |
| 2869 | VkResult VkEncoder::vkFreeDescriptorSets( |
| 2870 | VkDevice device, |
| 2871 | VkDescriptorPool descriptorPool, |
| 2872 | uint32_t descriptorSetCount, |
| 2873 | const VkDescriptorSet* pDescriptorSets) |
| 2874 | { |
| 2875 | auto stream = mImpl->stream(); |
| 2876 | auto countingStream = mImpl->countingStream(); |
| 2877 | countingStream->rewind(); |
| 2878 | { |
| 2879 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2880 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2881 | countingStream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 2882 | countingStream->write((const VkDescriptorSet**)&pDescriptorSets, sizeof(const VkDescriptorSet*)); |
| 2883 | if (pDescriptorSets) |
| 2884 | { |
| 2885 | countingStream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 2886 | } |
| 2887 | } |
| 2888 | uint32_t packetSize_vkFreeDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2889 | countingStream->rewind(); |
| 2890 | uint32_t opcode_vkFreeDescriptorSets = OP_vkFreeDescriptorSets; |
| 2891 | stream->write(&opcode_vkFreeDescriptorSets, sizeof(uint32_t)); |
| 2892 | stream->write(&packetSize_vkFreeDescriptorSets, sizeof(uint32_t)); |
| 2893 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2894 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2895 | stream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 2896 | stream->write((const VkDescriptorSet**)&pDescriptorSets, sizeof(const VkDescriptorSet*)); |
| 2897 | if (pDescriptorSets) |
| 2898 | { |
| 2899 | stream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 2900 | } |
| 2901 | VkResult vkFreeDescriptorSets_VkResult_return = (VkResult)0; |
| 2902 | stream->read(&vkFreeDescriptorSets_VkResult_return, sizeof(VkResult)); |
| 2903 | return vkFreeDescriptorSets_VkResult_return; |
| 2904 | } |
| 2905 | |
| 2906 | void VkEncoder::vkUpdateDescriptorSets( |
| 2907 | VkDevice device, |
| 2908 | uint32_t descriptorWriteCount, |
| 2909 | const VkWriteDescriptorSet* pDescriptorWrites, |
| 2910 | uint32_t descriptorCopyCount, |
| 2911 | const VkCopyDescriptorSet* pDescriptorCopies) |
| 2912 | { |
| 2913 | auto stream = mImpl->stream(); |
| 2914 | auto countingStream = mImpl->countingStream(); |
| 2915 | countingStream->rewind(); |
| 2916 | { |
| 2917 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2918 | countingStream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 2919 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 2920 | { |
| 2921 | marshal_VkWriteDescriptorSet(countingStream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 2922 | } |
| 2923 | countingStream->write((uint32_t*)&descriptorCopyCount, sizeof(uint32_t)); |
| 2924 | for (uint32_t i = 0; i < (uint32_t)((descriptorCopyCount)); ++i) |
| 2925 | { |
| 2926 | marshal_VkCopyDescriptorSet(countingStream, (const VkCopyDescriptorSet*)(pDescriptorCopies + i)); |
| 2927 | } |
| 2928 | } |
| 2929 | uint32_t packetSize_vkUpdateDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2930 | countingStream->rewind(); |
| 2931 | uint32_t opcode_vkUpdateDescriptorSets = OP_vkUpdateDescriptorSets; |
| 2932 | stream->write(&opcode_vkUpdateDescriptorSets, sizeof(uint32_t)); |
| 2933 | stream->write(&packetSize_vkUpdateDescriptorSets, sizeof(uint32_t)); |
| 2934 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2935 | stream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 2936 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 2937 | { |
| 2938 | marshal_VkWriteDescriptorSet(stream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 2939 | } |
| 2940 | stream->write((uint32_t*)&descriptorCopyCount, sizeof(uint32_t)); |
| 2941 | for (uint32_t i = 0; i < (uint32_t)((descriptorCopyCount)); ++i) |
| 2942 | { |
| 2943 | marshal_VkCopyDescriptorSet(stream, (const VkCopyDescriptorSet*)(pDescriptorCopies + i)); |
| 2944 | } |
| 2945 | } |
| 2946 | |
| 2947 | VkResult VkEncoder::vkCreateFramebuffer( |
| 2948 | VkDevice device, |
| 2949 | const VkFramebufferCreateInfo* pCreateInfo, |
| 2950 | const VkAllocationCallbacks* pAllocator, |
| 2951 | VkFramebuffer* pFramebuffer) |
| 2952 | { |
| 2953 | auto stream = mImpl->stream(); |
| 2954 | auto countingStream = mImpl->countingStream(); |
| 2955 | countingStream->rewind(); |
| 2956 | { |
| 2957 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2958 | marshal_VkFramebufferCreateInfo(countingStream, (const VkFramebufferCreateInfo*)(pCreateInfo)); |
| 2959 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2960 | if (pAllocator) |
| 2961 | { |
| 2962 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2963 | } |
| 2964 | countingStream->write((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2965 | } |
| 2966 | uint32_t packetSize_vkCreateFramebuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2967 | countingStream->rewind(); |
| 2968 | uint32_t opcode_vkCreateFramebuffer = OP_vkCreateFramebuffer; |
| 2969 | stream->write(&opcode_vkCreateFramebuffer, sizeof(uint32_t)); |
| 2970 | stream->write(&packetSize_vkCreateFramebuffer, sizeof(uint32_t)); |
| 2971 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2972 | marshal_VkFramebufferCreateInfo(stream, (const VkFramebufferCreateInfo*)(pCreateInfo)); |
| 2973 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2974 | if (pAllocator) |
| 2975 | { |
| 2976 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2977 | } |
| 2978 | stream->write((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2979 | stream->read((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2980 | VkResult vkCreateFramebuffer_VkResult_return = (VkResult)0; |
| 2981 | stream->read(&vkCreateFramebuffer_VkResult_return, sizeof(VkResult)); |
| 2982 | return vkCreateFramebuffer_VkResult_return; |
| 2983 | } |
| 2984 | |
| 2985 | void VkEncoder::vkDestroyFramebuffer( |
| 2986 | VkDevice device, |
| 2987 | VkFramebuffer framebuffer, |
| 2988 | const VkAllocationCallbacks* pAllocator) |
| 2989 | { |
| 2990 | auto stream = mImpl->stream(); |
| 2991 | auto countingStream = mImpl->countingStream(); |
| 2992 | countingStream->rewind(); |
| 2993 | { |
| 2994 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2995 | countingStream->write((VkFramebuffer*)&framebuffer, sizeof(VkFramebuffer)); |
| 2996 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2997 | if (pAllocator) |
| 2998 | { |
| 2999 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3000 | } |
| 3001 | } |
| 3002 | uint32_t packetSize_vkDestroyFramebuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3003 | countingStream->rewind(); |
| 3004 | uint32_t opcode_vkDestroyFramebuffer = OP_vkDestroyFramebuffer; |
| 3005 | stream->write(&opcode_vkDestroyFramebuffer, sizeof(uint32_t)); |
| 3006 | stream->write(&packetSize_vkDestroyFramebuffer, sizeof(uint32_t)); |
| 3007 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3008 | stream->write((VkFramebuffer*)&framebuffer, sizeof(VkFramebuffer)); |
| 3009 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3010 | if (pAllocator) |
| 3011 | { |
| 3012 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3013 | } |
| 3014 | } |
| 3015 | |
| 3016 | VkResult VkEncoder::vkCreateRenderPass( |
| 3017 | VkDevice device, |
| 3018 | const VkRenderPassCreateInfo* pCreateInfo, |
| 3019 | const VkAllocationCallbacks* pAllocator, |
| 3020 | VkRenderPass* pRenderPass) |
| 3021 | { |
| 3022 | auto stream = mImpl->stream(); |
| 3023 | auto countingStream = mImpl->countingStream(); |
| 3024 | countingStream->rewind(); |
| 3025 | { |
| 3026 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3027 | marshal_VkRenderPassCreateInfo(countingStream, (const VkRenderPassCreateInfo*)(pCreateInfo)); |
| 3028 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3029 | if (pAllocator) |
| 3030 | { |
| 3031 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3032 | } |
| 3033 | countingStream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3034 | } |
| 3035 | uint32_t packetSize_vkCreateRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3036 | countingStream->rewind(); |
| 3037 | uint32_t opcode_vkCreateRenderPass = OP_vkCreateRenderPass; |
| 3038 | stream->write(&opcode_vkCreateRenderPass, sizeof(uint32_t)); |
| 3039 | stream->write(&packetSize_vkCreateRenderPass, sizeof(uint32_t)); |
| 3040 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3041 | marshal_VkRenderPassCreateInfo(stream, (const VkRenderPassCreateInfo*)(pCreateInfo)); |
| 3042 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3043 | if (pAllocator) |
| 3044 | { |
| 3045 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3046 | } |
| 3047 | stream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3048 | stream->read((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3049 | VkResult vkCreateRenderPass_VkResult_return = (VkResult)0; |
| 3050 | stream->read(&vkCreateRenderPass_VkResult_return, sizeof(VkResult)); |
| 3051 | return vkCreateRenderPass_VkResult_return; |
| 3052 | } |
| 3053 | |
| 3054 | void VkEncoder::vkDestroyRenderPass( |
| 3055 | VkDevice device, |
| 3056 | VkRenderPass renderPass, |
| 3057 | const VkAllocationCallbacks* pAllocator) |
| 3058 | { |
| 3059 | auto stream = mImpl->stream(); |
| 3060 | auto countingStream = mImpl->countingStream(); |
| 3061 | countingStream->rewind(); |
| 3062 | { |
| 3063 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3064 | countingStream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3065 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3066 | if (pAllocator) |
| 3067 | { |
| 3068 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3069 | } |
| 3070 | } |
| 3071 | uint32_t packetSize_vkDestroyRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3072 | countingStream->rewind(); |
| 3073 | uint32_t opcode_vkDestroyRenderPass = OP_vkDestroyRenderPass; |
| 3074 | stream->write(&opcode_vkDestroyRenderPass, sizeof(uint32_t)); |
| 3075 | stream->write(&packetSize_vkDestroyRenderPass, sizeof(uint32_t)); |
| 3076 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3077 | stream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3078 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3079 | if (pAllocator) |
| 3080 | { |
| 3081 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3082 | } |
| 3083 | } |
| 3084 | |
| 3085 | void VkEncoder::vkGetRenderAreaGranularity( |
| 3086 | VkDevice device, |
| 3087 | VkRenderPass renderPass, |
| 3088 | VkExtent2D* pGranularity) |
| 3089 | { |
| 3090 | auto stream = mImpl->stream(); |
| 3091 | auto countingStream = mImpl->countingStream(); |
| 3092 | countingStream->rewind(); |
| 3093 | { |
| 3094 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3095 | countingStream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3096 | marshal_VkExtent2D(countingStream, (VkExtent2D*)(pGranularity)); |
| 3097 | } |
| 3098 | uint32_t packetSize_vkGetRenderAreaGranularity = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3099 | countingStream->rewind(); |
| 3100 | uint32_t opcode_vkGetRenderAreaGranularity = OP_vkGetRenderAreaGranularity; |
| 3101 | stream->write(&opcode_vkGetRenderAreaGranularity, sizeof(uint32_t)); |
| 3102 | stream->write(&packetSize_vkGetRenderAreaGranularity, sizeof(uint32_t)); |
| 3103 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3104 | stream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3105 | marshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity)); |
| 3106 | unmarshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity)); |
| 3107 | } |
| 3108 | |
| 3109 | VkResult VkEncoder::vkCreateCommandPool( |
| 3110 | VkDevice device, |
| 3111 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 3112 | const VkAllocationCallbacks* pAllocator, |
| 3113 | VkCommandPool* pCommandPool) |
| 3114 | { |
| 3115 | auto stream = mImpl->stream(); |
| 3116 | auto countingStream = mImpl->countingStream(); |
| 3117 | countingStream->rewind(); |
| 3118 | { |
| 3119 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3120 | marshal_VkCommandPoolCreateInfo(countingStream, (const VkCommandPoolCreateInfo*)(pCreateInfo)); |
| 3121 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3122 | if (pAllocator) |
| 3123 | { |
| 3124 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3125 | } |
| 3126 | countingStream->write((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3127 | } |
| 3128 | uint32_t packetSize_vkCreateCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3129 | countingStream->rewind(); |
| 3130 | uint32_t opcode_vkCreateCommandPool = OP_vkCreateCommandPool; |
| 3131 | stream->write(&opcode_vkCreateCommandPool, sizeof(uint32_t)); |
| 3132 | stream->write(&packetSize_vkCreateCommandPool, sizeof(uint32_t)); |
| 3133 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3134 | marshal_VkCommandPoolCreateInfo(stream, (const VkCommandPoolCreateInfo*)(pCreateInfo)); |
| 3135 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3136 | if (pAllocator) |
| 3137 | { |
| 3138 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3139 | } |
| 3140 | stream->write((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3141 | stream->read((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3142 | VkResult vkCreateCommandPool_VkResult_return = (VkResult)0; |
| 3143 | stream->read(&vkCreateCommandPool_VkResult_return, sizeof(VkResult)); |
| 3144 | return vkCreateCommandPool_VkResult_return; |
| 3145 | } |
| 3146 | |
| 3147 | void VkEncoder::vkDestroyCommandPool( |
| 3148 | VkDevice device, |
| 3149 | VkCommandPool commandPool, |
| 3150 | const VkAllocationCallbacks* pAllocator) |
| 3151 | { |
| 3152 | auto stream = mImpl->stream(); |
| 3153 | auto countingStream = mImpl->countingStream(); |
| 3154 | countingStream->rewind(); |
| 3155 | { |
| 3156 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3157 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3158 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3159 | if (pAllocator) |
| 3160 | { |
| 3161 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3162 | } |
| 3163 | } |
| 3164 | uint32_t packetSize_vkDestroyCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3165 | countingStream->rewind(); |
| 3166 | uint32_t opcode_vkDestroyCommandPool = OP_vkDestroyCommandPool; |
| 3167 | stream->write(&opcode_vkDestroyCommandPool, sizeof(uint32_t)); |
| 3168 | stream->write(&packetSize_vkDestroyCommandPool, sizeof(uint32_t)); |
| 3169 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3170 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3171 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3172 | if (pAllocator) |
| 3173 | { |
| 3174 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3175 | } |
| 3176 | } |
| 3177 | |
| 3178 | VkResult VkEncoder::vkResetCommandPool( |
| 3179 | VkDevice device, |
| 3180 | VkCommandPool commandPool, |
| 3181 | VkCommandPoolResetFlags flags) |
| 3182 | { |
| 3183 | auto stream = mImpl->stream(); |
| 3184 | auto countingStream = mImpl->countingStream(); |
| 3185 | countingStream->rewind(); |
| 3186 | { |
| 3187 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3188 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3189 | countingStream->write((VkCommandPoolResetFlags*)&flags, sizeof(VkCommandPoolResetFlags)); |
| 3190 | } |
| 3191 | uint32_t packetSize_vkResetCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3192 | countingStream->rewind(); |
| 3193 | uint32_t opcode_vkResetCommandPool = OP_vkResetCommandPool; |
| 3194 | stream->write(&opcode_vkResetCommandPool, sizeof(uint32_t)); |
| 3195 | stream->write(&packetSize_vkResetCommandPool, sizeof(uint32_t)); |
| 3196 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3197 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3198 | stream->write((VkCommandPoolResetFlags*)&flags, sizeof(VkCommandPoolResetFlags)); |
| 3199 | VkResult vkResetCommandPool_VkResult_return = (VkResult)0; |
| 3200 | stream->read(&vkResetCommandPool_VkResult_return, sizeof(VkResult)); |
| 3201 | return vkResetCommandPool_VkResult_return; |
| 3202 | } |
| 3203 | |
| 3204 | VkResult VkEncoder::vkAllocateCommandBuffers( |
| 3205 | VkDevice device, |
| 3206 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 3207 | VkCommandBuffer* pCommandBuffers) |
| 3208 | { |
| 3209 | auto stream = mImpl->stream(); |
| 3210 | auto countingStream = mImpl->countingStream(); |
| 3211 | countingStream->rewind(); |
| 3212 | { |
| 3213 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3214 | marshal_VkCommandBufferAllocateInfo(countingStream, (const VkCommandBufferAllocateInfo*)(pAllocateInfo)); |
| 3215 | countingStream->write((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3216 | } |
| 3217 | uint32_t packetSize_vkAllocateCommandBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3218 | countingStream->rewind(); |
| 3219 | uint32_t opcode_vkAllocateCommandBuffers = OP_vkAllocateCommandBuffers; |
| 3220 | stream->write(&opcode_vkAllocateCommandBuffers, sizeof(uint32_t)); |
| 3221 | stream->write(&packetSize_vkAllocateCommandBuffers, sizeof(uint32_t)); |
| 3222 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3223 | marshal_VkCommandBufferAllocateInfo(stream, (const VkCommandBufferAllocateInfo*)(pAllocateInfo)); |
| 3224 | stream->write((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3225 | stream->read((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3226 | VkResult vkAllocateCommandBuffers_VkResult_return = (VkResult)0; |
| 3227 | stream->read(&vkAllocateCommandBuffers_VkResult_return, sizeof(VkResult)); |
| 3228 | return vkAllocateCommandBuffers_VkResult_return; |
| 3229 | } |
| 3230 | |
| 3231 | void VkEncoder::vkFreeCommandBuffers( |
| 3232 | VkDevice device, |
| 3233 | VkCommandPool commandPool, |
| 3234 | uint32_t commandBufferCount, |
| 3235 | const VkCommandBuffer* pCommandBuffers) |
| 3236 | { |
| 3237 | auto stream = mImpl->stream(); |
| 3238 | auto countingStream = mImpl->countingStream(); |
| 3239 | countingStream->rewind(); |
| 3240 | { |
| 3241 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3242 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3243 | countingStream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 3244 | countingStream->write((const VkCommandBuffer**)&pCommandBuffers, sizeof(const VkCommandBuffer*)); |
| 3245 | if (pCommandBuffers) |
| 3246 | { |
| 3247 | countingStream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 3248 | } |
| 3249 | } |
| 3250 | uint32_t packetSize_vkFreeCommandBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3251 | countingStream->rewind(); |
| 3252 | uint32_t opcode_vkFreeCommandBuffers = OP_vkFreeCommandBuffers; |
| 3253 | stream->write(&opcode_vkFreeCommandBuffers, sizeof(uint32_t)); |
| 3254 | stream->write(&packetSize_vkFreeCommandBuffers, sizeof(uint32_t)); |
| 3255 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3256 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3257 | stream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 3258 | stream->write((const VkCommandBuffer**)&pCommandBuffers, sizeof(const VkCommandBuffer*)); |
| 3259 | if (pCommandBuffers) |
| 3260 | { |
| 3261 | stream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 3262 | } |
| 3263 | } |
| 3264 | |
| 3265 | VkResult VkEncoder::vkBeginCommandBuffer( |
| 3266 | VkCommandBuffer commandBuffer, |
| 3267 | const VkCommandBufferBeginInfo* pBeginInfo) |
| 3268 | { |
| 3269 | auto stream = mImpl->stream(); |
| 3270 | auto countingStream = mImpl->countingStream(); |
| 3271 | countingStream->rewind(); |
| 3272 | { |
| 3273 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3274 | marshal_VkCommandBufferBeginInfo(countingStream, (const VkCommandBufferBeginInfo*)(pBeginInfo)); |
| 3275 | } |
| 3276 | uint32_t packetSize_vkBeginCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3277 | countingStream->rewind(); |
| 3278 | uint32_t opcode_vkBeginCommandBuffer = OP_vkBeginCommandBuffer; |
| 3279 | stream->write(&opcode_vkBeginCommandBuffer, sizeof(uint32_t)); |
| 3280 | stream->write(&packetSize_vkBeginCommandBuffer, sizeof(uint32_t)); |
| 3281 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3282 | marshal_VkCommandBufferBeginInfo(stream, (const VkCommandBufferBeginInfo*)(pBeginInfo)); |
| 3283 | VkResult vkBeginCommandBuffer_VkResult_return = (VkResult)0; |
| 3284 | stream->read(&vkBeginCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3285 | return vkBeginCommandBuffer_VkResult_return; |
| 3286 | } |
| 3287 | |
| 3288 | VkResult VkEncoder::vkEndCommandBuffer( |
| 3289 | VkCommandBuffer commandBuffer) |
| 3290 | { |
| 3291 | auto stream = mImpl->stream(); |
| 3292 | auto countingStream = mImpl->countingStream(); |
| 3293 | countingStream->rewind(); |
| 3294 | { |
| 3295 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3296 | } |
| 3297 | uint32_t packetSize_vkEndCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3298 | countingStream->rewind(); |
| 3299 | uint32_t opcode_vkEndCommandBuffer = OP_vkEndCommandBuffer; |
| 3300 | stream->write(&opcode_vkEndCommandBuffer, sizeof(uint32_t)); |
| 3301 | stream->write(&packetSize_vkEndCommandBuffer, sizeof(uint32_t)); |
| 3302 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3303 | VkResult vkEndCommandBuffer_VkResult_return = (VkResult)0; |
| 3304 | stream->read(&vkEndCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3305 | return vkEndCommandBuffer_VkResult_return; |
| 3306 | } |
| 3307 | |
| 3308 | VkResult VkEncoder::vkResetCommandBuffer( |
| 3309 | VkCommandBuffer commandBuffer, |
| 3310 | VkCommandBufferResetFlags flags) |
| 3311 | { |
| 3312 | auto stream = mImpl->stream(); |
| 3313 | auto countingStream = mImpl->countingStream(); |
| 3314 | countingStream->rewind(); |
| 3315 | { |
| 3316 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3317 | countingStream->write((VkCommandBufferResetFlags*)&flags, sizeof(VkCommandBufferResetFlags)); |
| 3318 | } |
| 3319 | uint32_t packetSize_vkResetCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3320 | countingStream->rewind(); |
| 3321 | uint32_t opcode_vkResetCommandBuffer = OP_vkResetCommandBuffer; |
| 3322 | stream->write(&opcode_vkResetCommandBuffer, sizeof(uint32_t)); |
| 3323 | stream->write(&packetSize_vkResetCommandBuffer, sizeof(uint32_t)); |
| 3324 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3325 | stream->write((VkCommandBufferResetFlags*)&flags, sizeof(VkCommandBufferResetFlags)); |
| 3326 | VkResult vkResetCommandBuffer_VkResult_return = (VkResult)0; |
| 3327 | stream->read(&vkResetCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3328 | return vkResetCommandBuffer_VkResult_return; |
| 3329 | } |
| 3330 | |
| 3331 | void VkEncoder::vkCmdBindPipeline( |
| 3332 | VkCommandBuffer commandBuffer, |
| 3333 | VkPipelineBindPoint pipelineBindPoint, |
| 3334 | VkPipeline pipeline) |
| 3335 | { |
| 3336 | auto stream = mImpl->stream(); |
| 3337 | auto countingStream = mImpl->countingStream(); |
| 3338 | countingStream->rewind(); |
| 3339 | { |
| 3340 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3341 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3342 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 3343 | } |
| 3344 | uint32_t packetSize_vkCmdBindPipeline = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3345 | countingStream->rewind(); |
| 3346 | uint32_t opcode_vkCmdBindPipeline = OP_vkCmdBindPipeline; |
| 3347 | stream->write(&opcode_vkCmdBindPipeline, sizeof(uint32_t)); |
| 3348 | stream->write(&packetSize_vkCmdBindPipeline, sizeof(uint32_t)); |
| 3349 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3350 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3351 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 3352 | } |
| 3353 | |
| 3354 | void VkEncoder::vkCmdSetViewport( |
| 3355 | VkCommandBuffer commandBuffer, |
| 3356 | uint32_t firstViewport, |
| 3357 | uint32_t viewportCount, |
| 3358 | const VkViewport* pViewports) |
| 3359 | { |
| 3360 | auto stream = mImpl->stream(); |
| 3361 | auto countingStream = mImpl->countingStream(); |
| 3362 | countingStream->rewind(); |
| 3363 | { |
| 3364 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3365 | countingStream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 3366 | countingStream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 3367 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 3368 | { |
| 3369 | marshal_VkViewport(countingStream, (const VkViewport*)(pViewports + i)); |
| 3370 | } |
| 3371 | } |
| 3372 | uint32_t packetSize_vkCmdSetViewport = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3373 | countingStream->rewind(); |
| 3374 | uint32_t opcode_vkCmdSetViewport = OP_vkCmdSetViewport; |
| 3375 | stream->write(&opcode_vkCmdSetViewport, sizeof(uint32_t)); |
| 3376 | stream->write(&packetSize_vkCmdSetViewport, sizeof(uint32_t)); |
| 3377 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3378 | stream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 3379 | stream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 3380 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 3381 | { |
| 3382 | marshal_VkViewport(stream, (const VkViewport*)(pViewports + i)); |
| 3383 | } |
| 3384 | } |
| 3385 | |
| 3386 | void VkEncoder::vkCmdSetScissor( |
| 3387 | VkCommandBuffer commandBuffer, |
| 3388 | uint32_t firstScissor, |
| 3389 | uint32_t scissorCount, |
| 3390 | const VkRect2D* pScissors) |
| 3391 | { |
| 3392 | auto stream = mImpl->stream(); |
| 3393 | auto countingStream = mImpl->countingStream(); |
| 3394 | countingStream->rewind(); |
| 3395 | { |
| 3396 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3397 | countingStream->write((uint32_t*)&firstScissor, sizeof(uint32_t)); |
| 3398 | countingStream->write((uint32_t*)&scissorCount, sizeof(uint32_t)); |
| 3399 | for (uint32_t i = 0; i < (uint32_t)((scissorCount)); ++i) |
| 3400 | { |
| 3401 | marshal_VkRect2D(countingStream, (const VkRect2D*)(pScissors + i)); |
| 3402 | } |
| 3403 | } |
| 3404 | uint32_t packetSize_vkCmdSetScissor = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3405 | countingStream->rewind(); |
| 3406 | uint32_t opcode_vkCmdSetScissor = OP_vkCmdSetScissor; |
| 3407 | stream->write(&opcode_vkCmdSetScissor, sizeof(uint32_t)); |
| 3408 | stream->write(&packetSize_vkCmdSetScissor, sizeof(uint32_t)); |
| 3409 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3410 | stream->write((uint32_t*)&firstScissor, sizeof(uint32_t)); |
| 3411 | stream->write((uint32_t*)&scissorCount, sizeof(uint32_t)); |
| 3412 | for (uint32_t i = 0; i < (uint32_t)((scissorCount)); ++i) |
| 3413 | { |
| 3414 | marshal_VkRect2D(stream, (const VkRect2D*)(pScissors + i)); |
| 3415 | } |
| 3416 | } |
| 3417 | |
| 3418 | void VkEncoder::vkCmdSetLineWidth( |
| 3419 | VkCommandBuffer commandBuffer, |
| 3420 | float lineWidth) |
| 3421 | { |
| 3422 | auto stream = mImpl->stream(); |
| 3423 | auto countingStream = mImpl->countingStream(); |
| 3424 | countingStream->rewind(); |
| 3425 | { |
| 3426 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3427 | countingStream->write((float*)&lineWidth, sizeof(float)); |
| 3428 | } |
| 3429 | uint32_t packetSize_vkCmdSetLineWidth = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3430 | countingStream->rewind(); |
| 3431 | uint32_t opcode_vkCmdSetLineWidth = OP_vkCmdSetLineWidth; |
| 3432 | stream->write(&opcode_vkCmdSetLineWidth, sizeof(uint32_t)); |
| 3433 | stream->write(&packetSize_vkCmdSetLineWidth, sizeof(uint32_t)); |
| 3434 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3435 | stream->write((float*)&lineWidth, sizeof(float)); |
| 3436 | } |
| 3437 | |
| 3438 | void VkEncoder::vkCmdSetDepthBias( |
| 3439 | VkCommandBuffer commandBuffer, |
| 3440 | float depthBiasConstantFactor, |
| 3441 | float depthBiasClamp, |
| 3442 | float depthBiasSlopeFactor) |
| 3443 | { |
| 3444 | auto stream = mImpl->stream(); |
| 3445 | auto countingStream = mImpl->countingStream(); |
| 3446 | countingStream->rewind(); |
| 3447 | { |
| 3448 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3449 | countingStream->write((float*)&depthBiasConstantFactor, sizeof(float)); |
| 3450 | countingStream->write((float*)&depthBiasClamp, sizeof(float)); |
| 3451 | countingStream->write((float*)&depthBiasSlopeFactor, sizeof(float)); |
| 3452 | } |
| 3453 | uint32_t packetSize_vkCmdSetDepthBias = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3454 | countingStream->rewind(); |
| 3455 | uint32_t opcode_vkCmdSetDepthBias = OP_vkCmdSetDepthBias; |
| 3456 | stream->write(&opcode_vkCmdSetDepthBias, sizeof(uint32_t)); |
| 3457 | stream->write(&packetSize_vkCmdSetDepthBias, sizeof(uint32_t)); |
| 3458 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3459 | stream->write((float*)&depthBiasConstantFactor, sizeof(float)); |
| 3460 | stream->write((float*)&depthBiasClamp, sizeof(float)); |
| 3461 | stream->write((float*)&depthBiasSlopeFactor, sizeof(float)); |
| 3462 | } |
| 3463 | |
| 3464 | void VkEncoder::vkCmdSetBlendConstants( |
| 3465 | VkCommandBuffer commandBuffer, |
| 3466 | const float blendConstants) |
| 3467 | { |
| 3468 | auto stream = mImpl->stream(); |
| 3469 | auto countingStream = mImpl->countingStream(); |
| 3470 | countingStream->rewind(); |
| 3471 | { |
| 3472 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3473 | countingStream->write((const float*)&blendConstants, 4 * sizeof(const float)); |
| 3474 | } |
| 3475 | uint32_t packetSize_vkCmdSetBlendConstants = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3476 | countingStream->rewind(); |
| 3477 | uint32_t opcode_vkCmdSetBlendConstants = OP_vkCmdSetBlendConstants; |
| 3478 | stream->write(&opcode_vkCmdSetBlendConstants, sizeof(uint32_t)); |
| 3479 | stream->write(&packetSize_vkCmdSetBlendConstants, sizeof(uint32_t)); |
| 3480 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3481 | stream->write((const float*)&blendConstants, 4 * sizeof(const float)); |
| 3482 | } |
| 3483 | |
| 3484 | void VkEncoder::vkCmdSetDepthBounds( |
| 3485 | VkCommandBuffer commandBuffer, |
| 3486 | float minDepthBounds, |
| 3487 | float maxDepthBounds) |
| 3488 | { |
| 3489 | auto stream = mImpl->stream(); |
| 3490 | auto countingStream = mImpl->countingStream(); |
| 3491 | countingStream->rewind(); |
| 3492 | { |
| 3493 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3494 | countingStream->write((float*)&minDepthBounds, sizeof(float)); |
| 3495 | countingStream->write((float*)&maxDepthBounds, sizeof(float)); |
| 3496 | } |
| 3497 | uint32_t packetSize_vkCmdSetDepthBounds = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3498 | countingStream->rewind(); |
| 3499 | uint32_t opcode_vkCmdSetDepthBounds = OP_vkCmdSetDepthBounds; |
| 3500 | stream->write(&opcode_vkCmdSetDepthBounds, sizeof(uint32_t)); |
| 3501 | stream->write(&packetSize_vkCmdSetDepthBounds, sizeof(uint32_t)); |
| 3502 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3503 | stream->write((float*)&minDepthBounds, sizeof(float)); |
| 3504 | stream->write((float*)&maxDepthBounds, sizeof(float)); |
| 3505 | } |
| 3506 | |
| 3507 | void VkEncoder::vkCmdSetStencilCompareMask( |
| 3508 | VkCommandBuffer commandBuffer, |
| 3509 | VkStencilFaceFlags faceMask, |
| 3510 | uint32_t compareMask) |
| 3511 | { |
| 3512 | auto stream = mImpl->stream(); |
| 3513 | auto countingStream = mImpl->countingStream(); |
| 3514 | countingStream->rewind(); |
| 3515 | { |
| 3516 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3517 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3518 | countingStream->write((uint32_t*)&compareMask, sizeof(uint32_t)); |
| 3519 | } |
| 3520 | uint32_t packetSize_vkCmdSetStencilCompareMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3521 | countingStream->rewind(); |
| 3522 | uint32_t opcode_vkCmdSetStencilCompareMask = OP_vkCmdSetStencilCompareMask; |
| 3523 | stream->write(&opcode_vkCmdSetStencilCompareMask, sizeof(uint32_t)); |
| 3524 | stream->write(&packetSize_vkCmdSetStencilCompareMask, sizeof(uint32_t)); |
| 3525 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3526 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3527 | stream->write((uint32_t*)&compareMask, sizeof(uint32_t)); |
| 3528 | } |
| 3529 | |
| 3530 | void VkEncoder::vkCmdSetStencilWriteMask( |
| 3531 | VkCommandBuffer commandBuffer, |
| 3532 | VkStencilFaceFlags faceMask, |
| 3533 | uint32_t writeMask) |
| 3534 | { |
| 3535 | auto stream = mImpl->stream(); |
| 3536 | auto countingStream = mImpl->countingStream(); |
| 3537 | countingStream->rewind(); |
| 3538 | { |
| 3539 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3540 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3541 | countingStream->write((uint32_t*)&writeMask, sizeof(uint32_t)); |
| 3542 | } |
| 3543 | uint32_t packetSize_vkCmdSetStencilWriteMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3544 | countingStream->rewind(); |
| 3545 | uint32_t opcode_vkCmdSetStencilWriteMask = OP_vkCmdSetStencilWriteMask; |
| 3546 | stream->write(&opcode_vkCmdSetStencilWriteMask, sizeof(uint32_t)); |
| 3547 | stream->write(&packetSize_vkCmdSetStencilWriteMask, sizeof(uint32_t)); |
| 3548 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3549 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3550 | stream->write((uint32_t*)&writeMask, sizeof(uint32_t)); |
| 3551 | } |
| 3552 | |
| 3553 | void VkEncoder::vkCmdSetStencilReference( |
| 3554 | VkCommandBuffer commandBuffer, |
| 3555 | VkStencilFaceFlags faceMask, |
| 3556 | uint32_t reference) |
| 3557 | { |
| 3558 | auto stream = mImpl->stream(); |
| 3559 | auto countingStream = mImpl->countingStream(); |
| 3560 | countingStream->rewind(); |
| 3561 | { |
| 3562 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3563 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3564 | countingStream->write((uint32_t*)&reference, sizeof(uint32_t)); |
| 3565 | } |
| 3566 | uint32_t packetSize_vkCmdSetStencilReference = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3567 | countingStream->rewind(); |
| 3568 | uint32_t opcode_vkCmdSetStencilReference = OP_vkCmdSetStencilReference; |
| 3569 | stream->write(&opcode_vkCmdSetStencilReference, sizeof(uint32_t)); |
| 3570 | stream->write(&packetSize_vkCmdSetStencilReference, sizeof(uint32_t)); |
| 3571 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3572 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3573 | stream->write((uint32_t*)&reference, sizeof(uint32_t)); |
| 3574 | } |
| 3575 | |
| 3576 | void VkEncoder::vkCmdBindDescriptorSets( |
| 3577 | VkCommandBuffer commandBuffer, |
| 3578 | VkPipelineBindPoint pipelineBindPoint, |
| 3579 | VkPipelineLayout layout, |
| 3580 | uint32_t firstSet, |
| 3581 | uint32_t descriptorSetCount, |
| 3582 | const VkDescriptorSet* pDescriptorSets, |
| 3583 | uint32_t dynamicOffsetCount, |
| 3584 | const uint32_t* pDynamicOffsets) |
| 3585 | { |
| 3586 | auto stream = mImpl->stream(); |
| 3587 | auto countingStream = mImpl->countingStream(); |
| 3588 | countingStream->rewind(); |
| 3589 | { |
| 3590 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3591 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3592 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 3593 | countingStream->write((uint32_t*)&firstSet, sizeof(uint32_t)); |
| 3594 | countingStream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 3595 | countingStream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 3596 | countingStream->write((uint32_t*)&dynamicOffsetCount, sizeof(uint32_t)); |
| 3597 | countingStream->write((const uint32_t*)pDynamicOffsets, ((dynamicOffsetCount)) * sizeof(const uint32_t)); |
| 3598 | } |
| 3599 | uint32_t packetSize_vkCmdBindDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3600 | countingStream->rewind(); |
| 3601 | uint32_t opcode_vkCmdBindDescriptorSets = OP_vkCmdBindDescriptorSets; |
| 3602 | stream->write(&opcode_vkCmdBindDescriptorSets, sizeof(uint32_t)); |
| 3603 | stream->write(&packetSize_vkCmdBindDescriptorSets, sizeof(uint32_t)); |
| 3604 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3605 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3606 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 3607 | stream->write((uint32_t*)&firstSet, sizeof(uint32_t)); |
| 3608 | stream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 3609 | stream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 3610 | stream->write((uint32_t*)&dynamicOffsetCount, sizeof(uint32_t)); |
| 3611 | stream->write((const uint32_t*)pDynamicOffsets, ((dynamicOffsetCount)) * sizeof(const uint32_t)); |
| 3612 | } |
| 3613 | |
| 3614 | void VkEncoder::vkCmdBindIndexBuffer( |
| 3615 | VkCommandBuffer commandBuffer, |
| 3616 | VkBuffer buffer, |
| 3617 | VkDeviceSize offset, |
| 3618 | VkIndexType indexType) |
| 3619 | { |
| 3620 | auto stream = mImpl->stream(); |
| 3621 | auto countingStream = mImpl->countingStream(); |
| 3622 | countingStream->rewind(); |
| 3623 | { |
| 3624 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3625 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3626 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3627 | countingStream->write((VkIndexType*)&indexType, sizeof(VkIndexType)); |
| 3628 | } |
| 3629 | uint32_t packetSize_vkCmdBindIndexBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3630 | countingStream->rewind(); |
| 3631 | uint32_t opcode_vkCmdBindIndexBuffer = OP_vkCmdBindIndexBuffer; |
| 3632 | stream->write(&opcode_vkCmdBindIndexBuffer, sizeof(uint32_t)); |
| 3633 | stream->write(&packetSize_vkCmdBindIndexBuffer, sizeof(uint32_t)); |
| 3634 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3635 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3636 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3637 | stream->write((VkIndexType*)&indexType, sizeof(VkIndexType)); |
| 3638 | } |
| 3639 | |
| 3640 | void VkEncoder::vkCmdBindVertexBuffers( |
| 3641 | VkCommandBuffer commandBuffer, |
| 3642 | uint32_t firstBinding, |
| 3643 | uint32_t bindingCount, |
| 3644 | const VkBuffer* pBuffers, |
| 3645 | const VkDeviceSize* pOffsets) |
| 3646 | { |
| 3647 | auto stream = mImpl->stream(); |
| 3648 | auto countingStream = mImpl->countingStream(); |
| 3649 | countingStream->rewind(); |
| 3650 | { |
| 3651 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3652 | countingStream->write((uint32_t*)&firstBinding, sizeof(uint32_t)); |
| 3653 | countingStream->write((uint32_t*)&bindingCount, sizeof(uint32_t)); |
| 3654 | countingStream->write((const VkBuffer*)pBuffers, ((bindingCount)) * sizeof(const VkBuffer)); |
| 3655 | countingStream->write((const VkDeviceSize*)pOffsets, ((bindingCount)) * sizeof(const VkDeviceSize)); |
| 3656 | } |
| 3657 | uint32_t packetSize_vkCmdBindVertexBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3658 | countingStream->rewind(); |
| 3659 | uint32_t opcode_vkCmdBindVertexBuffers = OP_vkCmdBindVertexBuffers; |
| 3660 | stream->write(&opcode_vkCmdBindVertexBuffers, sizeof(uint32_t)); |
| 3661 | stream->write(&packetSize_vkCmdBindVertexBuffers, sizeof(uint32_t)); |
| 3662 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3663 | stream->write((uint32_t*)&firstBinding, sizeof(uint32_t)); |
| 3664 | stream->write((uint32_t*)&bindingCount, sizeof(uint32_t)); |
| 3665 | stream->write((const VkBuffer*)pBuffers, ((bindingCount)) * sizeof(const VkBuffer)); |
| 3666 | stream->write((const VkDeviceSize*)pOffsets, ((bindingCount)) * sizeof(const VkDeviceSize)); |
| 3667 | } |
| 3668 | |
| 3669 | void VkEncoder::vkCmdDraw( |
| 3670 | VkCommandBuffer commandBuffer, |
| 3671 | uint32_t vertexCount, |
| 3672 | uint32_t instanceCount, |
| 3673 | uint32_t firstVertex, |
| 3674 | uint32_t firstInstance) |
| 3675 | { |
| 3676 | auto stream = mImpl->stream(); |
| 3677 | auto countingStream = mImpl->countingStream(); |
| 3678 | countingStream->rewind(); |
| 3679 | { |
| 3680 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3681 | countingStream->write((uint32_t*)&vertexCount, sizeof(uint32_t)); |
| 3682 | countingStream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3683 | countingStream->write((uint32_t*)&firstVertex, sizeof(uint32_t)); |
| 3684 | countingStream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3685 | } |
| 3686 | uint32_t packetSize_vkCmdDraw = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3687 | countingStream->rewind(); |
| 3688 | uint32_t opcode_vkCmdDraw = OP_vkCmdDraw; |
| 3689 | stream->write(&opcode_vkCmdDraw, sizeof(uint32_t)); |
| 3690 | stream->write(&packetSize_vkCmdDraw, sizeof(uint32_t)); |
| 3691 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3692 | stream->write((uint32_t*)&vertexCount, sizeof(uint32_t)); |
| 3693 | stream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3694 | stream->write((uint32_t*)&firstVertex, sizeof(uint32_t)); |
| 3695 | stream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3696 | } |
| 3697 | |
| 3698 | void VkEncoder::vkCmdDrawIndexed( |
| 3699 | VkCommandBuffer commandBuffer, |
| 3700 | uint32_t indexCount, |
| 3701 | uint32_t instanceCount, |
| 3702 | uint32_t firstIndex, |
| 3703 | int32_t vertexOffset, |
| 3704 | uint32_t firstInstance) |
| 3705 | { |
| 3706 | auto stream = mImpl->stream(); |
| 3707 | auto countingStream = mImpl->countingStream(); |
| 3708 | countingStream->rewind(); |
| 3709 | { |
| 3710 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3711 | countingStream->write((uint32_t*)&indexCount, sizeof(uint32_t)); |
| 3712 | countingStream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3713 | countingStream->write((uint32_t*)&firstIndex, sizeof(uint32_t)); |
| 3714 | countingStream->write((int32_t*)&vertexOffset, sizeof(int32_t)); |
| 3715 | countingStream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3716 | } |
| 3717 | uint32_t packetSize_vkCmdDrawIndexed = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3718 | countingStream->rewind(); |
| 3719 | uint32_t opcode_vkCmdDrawIndexed = OP_vkCmdDrawIndexed; |
| 3720 | stream->write(&opcode_vkCmdDrawIndexed, sizeof(uint32_t)); |
| 3721 | stream->write(&packetSize_vkCmdDrawIndexed, sizeof(uint32_t)); |
| 3722 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3723 | stream->write((uint32_t*)&indexCount, sizeof(uint32_t)); |
| 3724 | stream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3725 | stream->write((uint32_t*)&firstIndex, sizeof(uint32_t)); |
| 3726 | stream->write((int32_t*)&vertexOffset, sizeof(int32_t)); |
| 3727 | stream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3728 | } |
| 3729 | |
| 3730 | void VkEncoder::vkCmdDrawIndirect( |
| 3731 | VkCommandBuffer commandBuffer, |
| 3732 | VkBuffer buffer, |
| 3733 | VkDeviceSize offset, |
| 3734 | uint32_t drawCount, |
| 3735 | uint32_t stride) |
| 3736 | { |
| 3737 | auto stream = mImpl->stream(); |
| 3738 | auto countingStream = mImpl->countingStream(); |
| 3739 | countingStream->rewind(); |
| 3740 | { |
| 3741 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3742 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3743 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3744 | countingStream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3745 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3746 | } |
| 3747 | uint32_t packetSize_vkCmdDrawIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3748 | countingStream->rewind(); |
| 3749 | uint32_t opcode_vkCmdDrawIndirect = OP_vkCmdDrawIndirect; |
| 3750 | stream->write(&opcode_vkCmdDrawIndirect, sizeof(uint32_t)); |
| 3751 | stream->write(&packetSize_vkCmdDrawIndirect, sizeof(uint32_t)); |
| 3752 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3753 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3754 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3755 | stream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3756 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3757 | } |
| 3758 | |
| 3759 | void VkEncoder::vkCmdDrawIndexedIndirect( |
| 3760 | VkCommandBuffer commandBuffer, |
| 3761 | VkBuffer buffer, |
| 3762 | VkDeviceSize offset, |
| 3763 | uint32_t drawCount, |
| 3764 | uint32_t stride) |
| 3765 | { |
| 3766 | auto stream = mImpl->stream(); |
| 3767 | auto countingStream = mImpl->countingStream(); |
| 3768 | countingStream->rewind(); |
| 3769 | { |
| 3770 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3771 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3772 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3773 | countingStream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3774 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3775 | } |
| 3776 | uint32_t packetSize_vkCmdDrawIndexedIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3777 | countingStream->rewind(); |
| 3778 | uint32_t opcode_vkCmdDrawIndexedIndirect = OP_vkCmdDrawIndexedIndirect; |
| 3779 | stream->write(&opcode_vkCmdDrawIndexedIndirect, sizeof(uint32_t)); |
| 3780 | stream->write(&packetSize_vkCmdDrawIndexedIndirect, sizeof(uint32_t)); |
| 3781 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3782 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3783 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3784 | stream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3785 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3786 | } |
| 3787 | |
| 3788 | void VkEncoder::vkCmdDispatch( |
| 3789 | VkCommandBuffer commandBuffer, |
| 3790 | uint32_t groupCountX, |
| 3791 | uint32_t groupCountY, |
| 3792 | uint32_t groupCountZ) |
| 3793 | { |
| 3794 | auto stream = mImpl->stream(); |
| 3795 | auto countingStream = mImpl->countingStream(); |
| 3796 | countingStream->rewind(); |
| 3797 | { |
| 3798 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3799 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 3800 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 3801 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 3802 | } |
| 3803 | uint32_t packetSize_vkCmdDispatch = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3804 | countingStream->rewind(); |
| 3805 | uint32_t opcode_vkCmdDispatch = OP_vkCmdDispatch; |
| 3806 | stream->write(&opcode_vkCmdDispatch, sizeof(uint32_t)); |
| 3807 | stream->write(&packetSize_vkCmdDispatch, sizeof(uint32_t)); |
| 3808 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3809 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 3810 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 3811 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 3812 | } |
| 3813 | |
| 3814 | void VkEncoder::vkCmdDispatchIndirect( |
| 3815 | VkCommandBuffer commandBuffer, |
| 3816 | VkBuffer buffer, |
| 3817 | VkDeviceSize offset) |
| 3818 | { |
| 3819 | auto stream = mImpl->stream(); |
| 3820 | auto countingStream = mImpl->countingStream(); |
| 3821 | countingStream->rewind(); |
| 3822 | { |
| 3823 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3824 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3825 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3826 | } |
| 3827 | uint32_t packetSize_vkCmdDispatchIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3828 | countingStream->rewind(); |
| 3829 | uint32_t opcode_vkCmdDispatchIndirect = OP_vkCmdDispatchIndirect; |
| 3830 | stream->write(&opcode_vkCmdDispatchIndirect, sizeof(uint32_t)); |
| 3831 | stream->write(&packetSize_vkCmdDispatchIndirect, sizeof(uint32_t)); |
| 3832 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3833 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3834 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3835 | } |
| 3836 | |
| 3837 | void VkEncoder::vkCmdCopyBuffer( |
| 3838 | VkCommandBuffer commandBuffer, |
| 3839 | VkBuffer srcBuffer, |
| 3840 | VkBuffer dstBuffer, |
| 3841 | uint32_t regionCount, |
| 3842 | const VkBufferCopy* pRegions) |
| 3843 | { |
| 3844 | auto stream = mImpl->stream(); |
| 3845 | auto countingStream = mImpl->countingStream(); |
| 3846 | countingStream->rewind(); |
| 3847 | { |
| 3848 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3849 | countingStream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3850 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 3851 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3852 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3853 | { |
| 3854 | marshal_VkBufferCopy(countingStream, (const VkBufferCopy*)(pRegions + i)); |
| 3855 | } |
| 3856 | } |
| 3857 | uint32_t packetSize_vkCmdCopyBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3858 | countingStream->rewind(); |
| 3859 | uint32_t opcode_vkCmdCopyBuffer = OP_vkCmdCopyBuffer; |
| 3860 | stream->write(&opcode_vkCmdCopyBuffer, sizeof(uint32_t)); |
| 3861 | stream->write(&packetSize_vkCmdCopyBuffer, sizeof(uint32_t)); |
| 3862 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3863 | stream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3864 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 3865 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3866 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3867 | { |
| 3868 | marshal_VkBufferCopy(stream, (const VkBufferCopy*)(pRegions + i)); |
| 3869 | } |
| 3870 | } |
| 3871 | |
| 3872 | void VkEncoder::vkCmdCopyImage( |
| 3873 | VkCommandBuffer commandBuffer, |
| 3874 | VkImage srcImage, |
| 3875 | VkImageLayout srcImageLayout, |
| 3876 | VkImage dstImage, |
| 3877 | VkImageLayout dstImageLayout, |
| 3878 | uint32_t regionCount, |
| 3879 | const VkImageCopy* pRegions) |
| 3880 | { |
| 3881 | auto stream = mImpl->stream(); |
| 3882 | auto countingStream = mImpl->countingStream(); |
| 3883 | countingStream->rewind(); |
| 3884 | { |
| 3885 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3886 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3887 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3888 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3889 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3890 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3891 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3892 | { |
| 3893 | marshal_VkImageCopy(countingStream, (const VkImageCopy*)(pRegions + i)); |
| 3894 | } |
| 3895 | } |
| 3896 | uint32_t packetSize_vkCmdCopyImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3897 | countingStream->rewind(); |
| 3898 | uint32_t opcode_vkCmdCopyImage = OP_vkCmdCopyImage; |
| 3899 | stream->write(&opcode_vkCmdCopyImage, sizeof(uint32_t)); |
| 3900 | stream->write(&packetSize_vkCmdCopyImage, sizeof(uint32_t)); |
| 3901 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3902 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3903 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3904 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3905 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3906 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3907 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3908 | { |
| 3909 | marshal_VkImageCopy(stream, (const VkImageCopy*)(pRegions + i)); |
| 3910 | } |
| 3911 | } |
| 3912 | |
| 3913 | void VkEncoder::vkCmdBlitImage( |
| 3914 | VkCommandBuffer commandBuffer, |
| 3915 | VkImage srcImage, |
| 3916 | VkImageLayout srcImageLayout, |
| 3917 | VkImage dstImage, |
| 3918 | VkImageLayout dstImageLayout, |
| 3919 | uint32_t regionCount, |
| 3920 | const VkImageBlit* pRegions, |
| 3921 | VkFilter filter) |
| 3922 | { |
| 3923 | auto stream = mImpl->stream(); |
| 3924 | auto countingStream = mImpl->countingStream(); |
| 3925 | countingStream->rewind(); |
| 3926 | { |
| 3927 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3928 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3929 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3930 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3931 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3932 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3933 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3934 | { |
| 3935 | marshal_VkImageBlit(countingStream, (const VkImageBlit*)(pRegions + i)); |
| 3936 | } |
| 3937 | countingStream->write((VkFilter*)&filter, sizeof(VkFilter)); |
| 3938 | } |
| 3939 | uint32_t packetSize_vkCmdBlitImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3940 | countingStream->rewind(); |
| 3941 | uint32_t opcode_vkCmdBlitImage = OP_vkCmdBlitImage; |
| 3942 | stream->write(&opcode_vkCmdBlitImage, sizeof(uint32_t)); |
| 3943 | stream->write(&packetSize_vkCmdBlitImage, sizeof(uint32_t)); |
| 3944 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3945 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3946 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3947 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3948 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3949 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3950 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3951 | { |
| 3952 | marshal_VkImageBlit(stream, (const VkImageBlit*)(pRegions + i)); |
| 3953 | } |
| 3954 | stream->write((VkFilter*)&filter, sizeof(VkFilter)); |
| 3955 | } |
| 3956 | |
| 3957 | void VkEncoder::vkCmdCopyBufferToImage( |
| 3958 | VkCommandBuffer commandBuffer, |
| 3959 | VkBuffer srcBuffer, |
| 3960 | VkImage dstImage, |
| 3961 | VkImageLayout dstImageLayout, |
| 3962 | uint32_t regionCount, |
| 3963 | const VkBufferImageCopy* pRegions) |
| 3964 | { |
| 3965 | auto stream = mImpl->stream(); |
| 3966 | auto countingStream = mImpl->countingStream(); |
| 3967 | countingStream->rewind(); |
| 3968 | { |
| 3969 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3970 | countingStream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3971 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3972 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3973 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3974 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3975 | { |
| 3976 | marshal_VkBufferImageCopy(countingStream, (const VkBufferImageCopy*)(pRegions + i)); |
| 3977 | } |
| 3978 | } |
| 3979 | uint32_t packetSize_vkCmdCopyBufferToImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3980 | countingStream->rewind(); |
| 3981 | uint32_t opcode_vkCmdCopyBufferToImage = OP_vkCmdCopyBufferToImage; |
| 3982 | stream->write(&opcode_vkCmdCopyBufferToImage, sizeof(uint32_t)); |
| 3983 | stream->write(&packetSize_vkCmdCopyBufferToImage, sizeof(uint32_t)); |
| 3984 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3985 | stream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3986 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3987 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3988 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3989 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3990 | { |
| 3991 | marshal_VkBufferImageCopy(stream, (const VkBufferImageCopy*)(pRegions + i)); |
| 3992 | } |
| 3993 | } |
| 3994 | |
| 3995 | void VkEncoder::vkCmdCopyImageToBuffer( |
| 3996 | VkCommandBuffer commandBuffer, |
| 3997 | VkImage srcImage, |
| 3998 | VkImageLayout srcImageLayout, |
| 3999 | VkBuffer dstBuffer, |
| 4000 | uint32_t regionCount, |
| 4001 | const VkBufferImageCopy* pRegions) |
| 4002 | { |
| 4003 | auto stream = mImpl->stream(); |
| 4004 | auto countingStream = mImpl->countingStream(); |
| 4005 | countingStream->rewind(); |
| 4006 | { |
| 4007 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4008 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4009 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4010 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4011 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4012 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4013 | { |
| 4014 | marshal_VkBufferImageCopy(countingStream, (const VkBufferImageCopy*)(pRegions + i)); |
| 4015 | } |
| 4016 | } |
| 4017 | uint32_t packetSize_vkCmdCopyImageToBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4018 | countingStream->rewind(); |
| 4019 | uint32_t opcode_vkCmdCopyImageToBuffer = OP_vkCmdCopyImageToBuffer; |
| 4020 | stream->write(&opcode_vkCmdCopyImageToBuffer, sizeof(uint32_t)); |
| 4021 | stream->write(&packetSize_vkCmdCopyImageToBuffer, sizeof(uint32_t)); |
| 4022 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4023 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4024 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4025 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4026 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4027 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4028 | { |
| 4029 | marshal_VkBufferImageCopy(stream, (const VkBufferImageCopy*)(pRegions + i)); |
| 4030 | } |
| 4031 | } |
| 4032 | |
| 4033 | void VkEncoder::vkCmdUpdateBuffer( |
| 4034 | VkCommandBuffer commandBuffer, |
| 4035 | VkBuffer dstBuffer, |
| 4036 | VkDeviceSize dstOffset, |
| 4037 | VkDeviceSize dataSize, |
| 4038 | const void* pData) |
| 4039 | { |
| 4040 | auto stream = mImpl->stream(); |
| 4041 | auto countingStream = mImpl->countingStream(); |
| 4042 | countingStream->rewind(); |
| 4043 | { |
| 4044 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4045 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4046 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4047 | countingStream->write((VkDeviceSize*)&dataSize, sizeof(VkDeviceSize)); |
| 4048 | countingStream->write((const void*)pData, ((dataSize)) * sizeof(const uint8_t)); |
| 4049 | } |
| 4050 | uint32_t packetSize_vkCmdUpdateBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4051 | countingStream->rewind(); |
| 4052 | uint32_t opcode_vkCmdUpdateBuffer = OP_vkCmdUpdateBuffer; |
| 4053 | stream->write(&opcode_vkCmdUpdateBuffer, sizeof(uint32_t)); |
| 4054 | stream->write(&packetSize_vkCmdUpdateBuffer, sizeof(uint32_t)); |
| 4055 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4056 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4057 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4058 | stream->write((VkDeviceSize*)&dataSize, sizeof(VkDeviceSize)); |
| 4059 | stream->write((const void*)pData, ((dataSize)) * sizeof(const uint8_t)); |
| 4060 | } |
| 4061 | |
| 4062 | void VkEncoder::vkCmdFillBuffer( |
| 4063 | VkCommandBuffer commandBuffer, |
| 4064 | VkBuffer dstBuffer, |
| 4065 | VkDeviceSize dstOffset, |
| 4066 | VkDeviceSize size, |
| 4067 | uint32_t data) |
| 4068 | { |
| 4069 | auto stream = mImpl->stream(); |
| 4070 | auto countingStream = mImpl->countingStream(); |
| 4071 | countingStream->rewind(); |
| 4072 | { |
| 4073 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4074 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4075 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4076 | countingStream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 4077 | countingStream->write((uint32_t*)&data, sizeof(uint32_t)); |
| 4078 | } |
| 4079 | uint32_t packetSize_vkCmdFillBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4080 | countingStream->rewind(); |
| 4081 | uint32_t opcode_vkCmdFillBuffer = OP_vkCmdFillBuffer; |
| 4082 | stream->write(&opcode_vkCmdFillBuffer, sizeof(uint32_t)); |
| 4083 | stream->write(&packetSize_vkCmdFillBuffer, sizeof(uint32_t)); |
| 4084 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4085 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4086 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4087 | stream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 4088 | stream->write((uint32_t*)&data, sizeof(uint32_t)); |
| 4089 | } |
| 4090 | |
| 4091 | void VkEncoder::vkCmdClearColorImage( |
| 4092 | VkCommandBuffer commandBuffer, |
| 4093 | VkImage image, |
| 4094 | VkImageLayout imageLayout, |
| 4095 | const VkClearColorValue* pColor, |
| 4096 | uint32_t rangeCount, |
| 4097 | const VkImageSubresourceRange* pRanges) |
| 4098 | { |
| 4099 | auto stream = mImpl->stream(); |
| 4100 | auto countingStream = mImpl->countingStream(); |
| 4101 | countingStream->rewind(); |
| 4102 | { |
| 4103 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4104 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 4105 | countingStream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4106 | marshal_VkClearColorValue(countingStream, (const VkClearColorValue*)(pColor)); |
| 4107 | countingStream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4108 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4109 | { |
| 4110 | marshal_VkImageSubresourceRange(countingStream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4111 | } |
| 4112 | } |
| 4113 | uint32_t packetSize_vkCmdClearColorImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4114 | countingStream->rewind(); |
| 4115 | uint32_t opcode_vkCmdClearColorImage = OP_vkCmdClearColorImage; |
| 4116 | stream->write(&opcode_vkCmdClearColorImage, sizeof(uint32_t)); |
| 4117 | stream->write(&packetSize_vkCmdClearColorImage, sizeof(uint32_t)); |
| 4118 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4119 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 4120 | stream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4121 | marshal_VkClearColorValue(stream, (const VkClearColorValue*)(pColor)); |
| 4122 | stream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4123 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4124 | { |
| 4125 | marshal_VkImageSubresourceRange(stream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4126 | } |
| 4127 | } |
| 4128 | |
| 4129 | void VkEncoder::vkCmdClearDepthStencilImage( |
| 4130 | VkCommandBuffer commandBuffer, |
| 4131 | VkImage image, |
| 4132 | VkImageLayout imageLayout, |
| 4133 | const VkClearDepthStencilValue* pDepthStencil, |
| 4134 | uint32_t rangeCount, |
| 4135 | const VkImageSubresourceRange* pRanges) |
| 4136 | { |
| 4137 | auto stream = mImpl->stream(); |
| 4138 | auto countingStream = mImpl->countingStream(); |
| 4139 | countingStream->rewind(); |
| 4140 | { |
| 4141 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4142 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 4143 | countingStream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4144 | marshal_VkClearDepthStencilValue(countingStream, (const VkClearDepthStencilValue*)(pDepthStencil)); |
| 4145 | countingStream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4146 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4147 | { |
| 4148 | marshal_VkImageSubresourceRange(countingStream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4149 | } |
| 4150 | } |
| 4151 | uint32_t packetSize_vkCmdClearDepthStencilImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4152 | countingStream->rewind(); |
| 4153 | uint32_t opcode_vkCmdClearDepthStencilImage = OP_vkCmdClearDepthStencilImage; |
| 4154 | stream->write(&opcode_vkCmdClearDepthStencilImage, sizeof(uint32_t)); |
| 4155 | stream->write(&packetSize_vkCmdClearDepthStencilImage, sizeof(uint32_t)); |
| 4156 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4157 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 4158 | stream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4159 | marshal_VkClearDepthStencilValue(stream, (const VkClearDepthStencilValue*)(pDepthStencil)); |
| 4160 | stream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4161 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4162 | { |
| 4163 | marshal_VkImageSubresourceRange(stream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4164 | } |
| 4165 | } |
| 4166 | |
| 4167 | void VkEncoder::vkCmdClearAttachments( |
| 4168 | VkCommandBuffer commandBuffer, |
| 4169 | uint32_t attachmentCount, |
| 4170 | const VkClearAttachment* pAttachments, |
| 4171 | uint32_t rectCount, |
| 4172 | const VkClearRect* pRects) |
| 4173 | { |
| 4174 | auto stream = mImpl->stream(); |
| 4175 | auto countingStream = mImpl->countingStream(); |
| 4176 | countingStream->rewind(); |
| 4177 | { |
| 4178 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4179 | countingStream->write((uint32_t*)&attachmentCount, sizeof(uint32_t)); |
| 4180 | for (uint32_t i = 0; i < (uint32_t)((attachmentCount)); ++i) |
| 4181 | { |
| 4182 | marshal_VkClearAttachment(countingStream, (const VkClearAttachment*)(pAttachments + i)); |
| 4183 | } |
| 4184 | countingStream->write((uint32_t*)&rectCount, sizeof(uint32_t)); |
| 4185 | for (uint32_t i = 0; i < (uint32_t)((rectCount)); ++i) |
| 4186 | { |
| 4187 | marshal_VkClearRect(countingStream, (const VkClearRect*)(pRects + i)); |
| 4188 | } |
| 4189 | } |
| 4190 | uint32_t packetSize_vkCmdClearAttachments = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4191 | countingStream->rewind(); |
| 4192 | uint32_t opcode_vkCmdClearAttachments = OP_vkCmdClearAttachments; |
| 4193 | stream->write(&opcode_vkCmdClearAttachments, sizeof(uint32_t)); |
| 4194 | stream->write(&packetSize_vkCmdClearAttachments, sizeof(uint32_t)); |
| 4195 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4196 | stream->write((uint32_t*)&attachmentCount, sizeof(uint32_t)); |
| 4197 | for (uint32_t i = 0; i < (uint32_t)((attachmentCount)); ++i) |
| 4198 | { |
| 4199 | marshal_VkClearAttachment(stream, (const VkClearAttachment*)(pAttachments + i)); |
| 4200 | } |
| 4201 | stream->write((uint32_t*)&rectCount, sizeof(uint32_t)); |
| 4202 | for (uint32_t i = 0; i < (uint32_t)((rectCount)); ++i) |
| 4203 | { |
| 4204 | marshal_VkClearRect(stream, (const VkClearRect*)(pRects + i)); |
| 4205 | } |
| 4206 | } |
| 4207 | |
| 4208 | void VkEncoder::vkCmdResolveImage( |
| 4209 | VkCommandBuffer commandBuffer, |
| 4210 | VkImage srcImage, |
| 4211 | VkImageLayout srcImageLayout, |
| 4212 | VkImage dstImage, |
| 4213 | VkImageLayout dstImageLayout, |
| 4214 | uint32_t regionCount, |
| 4215 | const VkImageResolve* pRegions) |
| 4216 | { |
| 4217 | auto stream = mImpl->stream(); |
| 4218 | auto countingStream = mImpl->countingStream(); |
| 4219 | countingStream->rewind(); |
| 4220 | { |
| 4221 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4222 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4223 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4224 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 4225 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 4226 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4227 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4228 | { |
| 4229 | marshal_VkImageResolve(countingStream, (const VkImageResolve*)(pRegions + i)); |
| 4230 | } |
| 4231 | } |
| 4232 | uint32_t packetSize_vkCmdResolveImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4233 | countingStream->rewind(); |
| 4234 | uint32_t opcode_vkCmdResolveImage = OP_vkCmdResolveImage; |
| 4235 | stream->write(&opcode_vkCmdResolveImage, sizeof(uint32_t)); |
| 4236 | stream->write(&packetSize_vkCmdResolveImage, sizeof(uint32_t)); |
| 4237 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4238 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4239 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4240 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 4241 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 4242 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4243 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4244 | { |
| 4245 | marshal_VkImageResolve(stream, (const VkImageResolve*)(pRegions + i)); |
| 4246 | } |
| 4247 | } |
| 4248 | |
| 4249 | void VkEncoder::vkCmdSetEvent( |
| 4250 | VkCommandBuffer commandBuffer, |
| 4251 | VkEvent event, |
| 4252 | VkPipelineStageFlags stageMask) |
| 4253 | { |
| 4254 | auto stream = mImpl->stream(); |
| 4255 | auto countingStream = mImpl->countingStream(); |
| 4256 | countingStream->rewind(); |
| 4257 | { |
| 4258 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4259 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4260 | countingStream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4261 | } |
| 4262 | uint32_t packetSize_vkCmdSetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4263 | countingStream->rewind(); |
| 4264 | uint32_t opcode_vkCmdSetEvent = OP_vkCmdSetEvent; |
| 4265 | stream->write(&opcode_vkCmdSetEvent, sizeof(uint32_t)); |
| 4266 | stream->write(&packetSize_vkCmdSetEvent, sizeof(uint32_t)); |
| 4267 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4268 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4269 | stream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4270 | } |
| 4271 | |
| 4272 | void VkEncoder::vkCmdResetEvent( |
| 4273 | VkCommandBuffer commandBuffer, |
| 4274 | VkEvent event, |
| 4275 | VkPipelineStageFlags stageMask) |
| 4276 | { |
| 4277 | auto stream = mImpl->stream(); |
| 4278 | auto countingStream = mImpl->countingStream(); |
| 4279 | countingStream->rewind(); |
| 4280 | { |
| 4281 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4282 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4283 | countingStream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4284 | } |
| 4285 | uint32_t packetSize_vkCmdResetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4286 | countingStream->rewind(); |
| 4287 | uint32_t opcode_vkCmdResetEvent = OP_vkCmdResetEvent; |
| 4288 | stream->write(&opcode_vkCmdResetEvent, sizeof(uint32_t)); |
| 4289 | stream->write(&packetSize_vkCmdResetEvent, sizeof(uint32_t)); |
| 4290 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4291 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4292 | stream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4293 | } |
| 4294 | |
| 4295 | void VkEncoder::vkCmdWaitEvents( |
| 4296 | VkCommandBuffer commandBuffer, |
| 4297 | uint32_t eventCount, |
| 4298 | const VkEvent* pEvents, |
| 4299 | VkPipelineStageFlags srcStageMask, |
| 4300 | VkPipelineStageFlags dstStageMask, |
| 4301 | uint32_t memoryBarrierCount, |
| 4302 | const VkMemoryBarrier* pMemoryBarriers, |
| 4303 | uint32_t bufferMemoryBarrierCount, |
| 4304 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 4305 | uint32_t imageMemoryBarrierCount, |
| 4306 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 4307 | { |
| 4308 | auto stream = mImpl->stream(); |
| 4309 | auto countingStream = mImpl->countingStream(); |
| 4310 | countingStream->rewind(); |
| 4311 | { |
| 4312 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4313 | countingStream->write((uint32_t*)&eventCount, sizeof(uint32_t)); |
| 4314 | countingStream->write((const VkEvent*)pEvents, ((eventCount)) * sizeof(const VkEvent)); |
| 4315 | countingStream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4316 | countingStream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4317 | countingStream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4318 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4319 | { |
| 4320 | marshal_VkMemoryBarrier(countingStream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4321 | } |
| 4322 | countingStream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4323 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4324 | { |
| 4325 | marshal_VkBufferMemoryBarrier(countingStream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4326 | } |
| 4327 | countingStream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4328 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4329 | { |
| 4330 | marshal_VkImageMemoryBarrier(countingStream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4331 | } |
| 4332 | } |
| 4333 | uint32_t packetSize_vkCmdWaitEvents = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4334 | countingStream->rewind(); |
| 4335 | uint32_t opcode_vkCmdWaitEvents = OP_vkCmdWaitEvents; |
| 4336 | stream->write(&opcode_vkCmdWaitEvents, sizeof(uint32_t)); |
| 4337 | stream->write(&packetSize_vkCmdWaitEvents, sizeof(uint32_t)); |
| 4338 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4339 | stream->write((uint32_t*)&eventCount, sizeof(uint32_t)); |
| 4340 | stream->write((const VkEvent*)pEvents, ((eventCount)) * sizeof(const VkEvent)); |
| 4341 | stream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4342 | stream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4343 | stream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4344 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4345 | { |
| 4346 | marshal_VkMemoryBarrier(stream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4347 | } |
| 4348 | stream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4349 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4350 | { |
| 4351 | marshal_VkBufferMemoryBarrier(stream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4352 | } |
| 4353 | stream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4354 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4355 | { |
| 4356 | marshal_VkImageMemoryBarrier(stream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4357 | } |
| 4358 | } |
| 4359 | |
| 4360 | void VkEncoder::vkCmdPipelineBarrier( |
| 4361 | VkCommandBuffer commandBuffer, |
| 4362 | VkPipelineStageFlags srcStageMask, |
| 4363 | VkPipelineStageFlags dstStageMask, |
| 4364 | VkDependencyFlags dependencyFlags, |
| 4365 | uint32_t memoryBarrierCount, |
| 4366 | const VkMemoryBarrier* pMemoryBarriers, |
| 4367 | uint32_t bufferMemoryBarrierCount, |
| 4368 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 4369 | uint32_t imageMemoryBarrierCount, |
| 4370 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 4371 | { |
| 4372 | auto stream = mImpl->stream(); |
| 4373 | auto countingStream = mImpl->countingStream(); |
| 4374 | countingStream->rewind(); |
| 4375 | { |
| 4376 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4377 | countingStream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4378 | countingStream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4379 | countingStream->write((VkDependencyFlags*)&dependencyFlags, sizeof(VkDependencyFlags)); |
| 4380 | countingStream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4381 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4382 | { |
| 4383 | marshal_VkMemoryBarrier(countingStream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4384 | } |
| 4385 | countingStream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4386 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4387 | { |
| 4388 | marshal_VkBufferMemoryBarrier(countingStream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4389 | } |
| 4390 | countingStream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4391 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4392 | { |
| 4393 | marshal_VkImageMemoryBarrier(countingStream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4394 | } |
| 4395 | } |
| 4396 | uint32_t packetSize_vkCmdPipelineBarrier = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4397 | countingStream->rewind(); |
| 4398 | uint32_t opcode_vkCmdPipelineBarrier = OP_vkCmdPipelineBarrier; |
| 4399 | stream->write(&opcode_vkCmdPipelineBarrier, sizeof(uint32_t)); |
| 4400 | stream->write(&packetSize_vkCmdPipelineBarrier, sizeof(uint32_t)); |
| 4401 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4402 | stream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4403 | stream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4404 | stream->write((VkDependencyFlags*)&dependencyFlags, sizeof(VkDependencyFlags)); |
| 4405 | stream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4406 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4407 | { |
| 4408 | marshal_VkMemoryBarrier(stream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4409 | } |
| 4410 | stream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4411 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4412 | { |
| 4413 | marshal_VkBufferMemoryBarrier(stream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4414 | } |
| 4415 | stream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4416 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4417 | { |
| 4418 | marshal_VkImageMemoryBarrier(stream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4419 | } |
| 4420 | } |
| 4421 | |
| 4422 | void VkEncoder::vkCmdBeginQuery( |
| 4423 | VkCommandBuffer commandBuffer, |
| 4424 | VkQueryPool queryPool, |
| 4425 | uint32_t query, |
| 4426 | VkQueryControlFlags flags) |
| 4427 | { |
| 4428 | auto stream = mImpl->stream(); |
| 4429 | auto countingStream = mImpl->countingStream(); |
| 4430 | countingStream->rewind(); |
| 4431 | { |
| 4432 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4433 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4434 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4435 | countingStream->write((VkQueryControlFlags*)&flags, sizeof(VkQueryControlFlags)); |
| 4436 | } |
| 4437 | uint32_t packetSize_vkCmdBeginQuery = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4438 | countingStream->rewind(); |
| 4439 | uint32_t opcode_vkCmdBeginQuery = OP_vkCmdBeginQuery; |
| 4440 | stream->write(&opcode_vkCmdBeginQuery, sizeof(uint32_t)); |
| 4441 | stream->write(&packetSize_vkCmdBeginQuery, sizeof(uint32_t)); |
| 4442 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4443 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4444 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4445 | stream->write((VkQueryControlFlags*)&flags, sizeof(VkQueryControlFlags)); |
| 4446 | } |
| 4447 | |
| 4448 | void VkEncoder::vkCmdEndQuery( |
| 4449 | VkCommandBuffer commandBuffer, |
| 4450 | VkQueryPool queryPool, |
| 4451 | uint32_t query) |
| 4452 | { |
| 4453 | auto stream = mImpl->stream(); |
| 4454 | auto countingStream = mImpl->countingStream(); |
| 4455 | countingStream->rewind(); |
| 4456 | { |
| 4457 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4458 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4459 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4460 | } |
| 4461 | uint32_t packetSize_vkCmdEndQuery = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4462 | countingStream->rewind(); |
| 4463 | uint32_t opcode_vkCmdEndQuery = OP_vkCmdEndQuery; |
| 4464 | stream->write(&opcode_vkCmdEndQuery, sizeof(uint32_t)); |
| 4465 | stream->write(&packetSize_vkCmdEndQuery, sizeof(uint32_t)); |
| 4466 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4467 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4468 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4469 | } |
| 4470 | |
| 4471 | void VkEncoder::vkCmdResetQueryPool( |
| 4472 | VkCommandBuffer commandBuffer, |
| 4473 | VkQueryPool queryPool, |
| 4474 | uint32_t firstQuery, |
| 4475 | uint32_t queryCount) |
| 4476 | { |
| 4477 | auto stream = mImpl->stream(); |
| 4478 | auto countingStream = mImpl->countingStream(); |
| 4479 | countingStream->rewind(); |
| 4480 | { |
| 4481 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4482 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4483 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4484 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4485 | } |
| 4486 | uint32_t packetSize_vkCmdResetQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4487 | countingStream->rewind(); |
| 4488 | uint32_t opcode_vkCmdResetQueryPool = OP_vkCmdResetQueryPool; |
| 4489 | stream->write(&opcode_vkCmdResetQueryPool, sizeof(uint32_t)); |
| 4490 | stream->write(&packetSize_vkCmdResetQueryPool, sizeof(uint32_t)); |
| 4491 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4492 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4493 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4494 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4495 | } |
| 4496 | |
| 4497 | void VkEncoder::vkCmdWriteTimestamp( |
| 4498 | VkCommandBuffer commandBuffer, |
| 4499 | VkPipelineStageFlagBits pipelineStage, |
| 4500 | VkQueryPool queryPool, |
| 4501 | uint32_t query) |
| 4502 | { |
| 4503 | auto stream = mImpl->stream(); |
| 4504 | auto countingStream = mImpl->countingStream(); |
| 4505 | countingStream->rewind(); |
| 4506 | { |
| 4507 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4508 | countingStream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 4509 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4510 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4511 | } |
| 4512 | uint32_t packetSize_vkCmdWriteTimestamp = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4513 | countingStream->rewind(); |
| 4514 | uint32_t opcode_vkCmdWriteTimestamp = OP_vkCmdWriteTimestamp; |
| 4515 | stream->write(&opcode_vkCmdWriteTimestamp, sizeof(uint32_t)); |
| 4516 | stream->write(&packetSize_vkCmdWriteTimestamp, sizeof(uint32_t)); |
| 4517 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4518 | stream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 4519 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4520 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4521 | } |
| 4522 | |
| 4523 | void VkEncoder::vkCmdCopyQueryPoolResults( |
| 4524 | VkCommandBuffer commandBuffer, |
| 4525 | VkQueryPool queryPool, |
| 4526 | uint32_t firstQuery, |
| 4527 | uint32_t queryCount, |
| 4528 | VkBuffer dstBuffer, |
| 4529 | VkDeviceSize dstOffset, |
| 4530 | VkDeviceSize stride, |
| 4531 | VkQueryResultFlags flags) |
| 4532 | { |
| 4533 | auto stream = mImpl->stream(); |
| 4534 | auto countingStream = mImpl->countingStream(); |
| 4535 | countingStream->rewind(); |
| 4536 | { |
| 4537 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4538 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4539 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4540 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4541 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4542 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4543 | countingStream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 4544 | countingStream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 4545 | } |
| 4546 | uint32_t packetSize_vkCmdCopyQueryPoolResults = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4547 | countingStream->rewind(); |
| 4548 | uint32_t opcode_vkCmdCopyQueryPoolResults = OP_vkCmdCopyQueryPoolResults; |
| 4549 | stream->write(&opcode_vkCmdCopyQueryPoolResults, sizeof(uint32_t)); |
| 4550 | stream->write(&packetSize_vkCmdCopyQueryPoolResults, sizeof(uint32_t)); |
| 4551 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4552 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4553 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4554 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4555 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4556 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4557 | stream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 4558 | stream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 4559 | } |
| 4560 | |
| 4561 | void VkEncoder::vkCmdPushConstants( |
| 4562 | VkCommandBuffer commandBuffer, |
| 4563 | VkPipelineLayout layout, |
| 4564 | VkShaderStageFlags stageFlags, |
| 4565 | uint32_t offset, |
| 4566 | uint32_t size, |
| 4567 | const void* pValues) |
| 4568 | { |
| 4569 | auto stream = mImpl->stream(); |
| 4570 | auto countingStream = mImpl->countingStream(); |
| 4571 | countingStream->rewind(); |
| 4572 | { |
| 4573 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4574 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 4575 | countingStream->write((VkShaderStageFlags*)&stageFlags, sizeof(VkShaderStageFlags)); |
| 4576 | countingStream->write((uint32_t*)&offset, sizeof(uint32_t)); |
| 4577 | countingStream->write((uint32_t*)&size, sizeof(uint32_t)); |
| 4578 | countingStream->write((const void*)pValues, ((size)) * sizeof(const uint8_t)); |
| 4579 | } |
| 4580 | uint32_t packetSize_vkCmdPushConstants = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4581 | countingStream->rewind(); |
| 4582 | uint32_t opcode_vkCmdPushConstants = OP_vkCmdPushConstants; |
| 4583 | stream->write(&opcode_vkCmdPushConstants, sizeof(uint32_t)); |
| 4584 | stream->write(&packetSize_vkCmdPushConstants, sizeof(uint32_t)); |
| 4585 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4586 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 4587 | stream->write((VkShaderStageFlags*)&stageFlags, sizeof(VkShaderStageFlags)); |
| 4588 | stream->write((uint32_t*)&offset, sizeof(uint32_t)); |
| 4589 | stream->write((uint32_t*)&size, sizeof(uint32_t)); |
| 4590 | stream->write((const void*)pValues, ((size)) * sizeof(const uint8_t)); |
| 4591 | } |
| 4592 | |
| 4593 | void VkEncoder::vkCmdBeginRenderPass( |
| 4594 | VkCommandBuffer commandBuffer, |
| 4595 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 4596 | VkSubpassContents contents) |
| 4597 | { |
| 4598 | auto stream = mImpl->stream(); |
| 4599 | auto countingStream = mImpl->countingStream(); |
| 4600 | countingStream->rewind(); |
| 4601 | { |
| 4602 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4603 | marshal_VkRenderPassBeginInfo(countingStream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 4604 | countingStream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4605 | } |
| 4606 | uint32_t packetSize_vkCmdBeginRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4607 | countingStream->rewind(); |
| 4608 | uint32_t opcode_vkCmdBeginRenderPass = OP_vkCmdBeginRenderPass; |
| 4609 | stream->write(&opcode_vkCmdBeginRenderPass, sizeof(uint32_t)); |
| 4610 | stream->write(&packetSize_vkCmdBeginRenderPass, sizeof(uint32_t)); |
| 4611 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4612 | marshal_VkRenderPassBeginInfo(stream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 4613 | stream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4614 | } |
| 4615 | |
| 4616 | void VkEncoder::vkCmdNextSubpass( |
| 4617 | VkCommandBuffer commandBuffer, |
| 4618 | VkSubpassContents contents) |
| 4619 | { |
| 4620 | auto stream = mImpl->stream(); |
| 4621 | auto countingStream = mImpl->countingStream(); |
| 4622 | countingStream->rewind(); |
| 4623 | { |
| 4624 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4625 | countingStream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4626 | } |
| 4627 | uint32_t packetSize_vkCmdNextSubpass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4628 | countingStream->rewind(); |
| 4629 | uint32_t opcode_vkCmdNextSubpass = OP_vkCmdNextSubpass; |
| 4630 | stream->write(&opcode_vkCmdNextSubpass, sizeof(uint32_t)); |
| 4631 | stream->write(&packetSize_vkCmdNextSubpass, sizeof(uint32_t)); |
| 4632 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4633 | stream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4634 | } |
| 4635 | |
| 4636 | void VkEncoder::vkCmdEndRenderPass( |
| 4637 | VkCommandBuffer commandBuffer) |
| 4638 | { |
| 4639 | auto stream = mImpl->stream(); |
| 4640 | auto countingStream = mImpl->countingStream(); |
| 4641 | countingStream->rewind(); |
| 4642 | { |
| 4643 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4644 | } |
| 4645 | uint32_t packetSize_vkCmdEndRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4646 | countingStream->rewind(); |
| 4647 | uint32_t opcode_vkCmdEndRenderPass = OP_vkCmdEndRenderPass; |
| 4648 | stream->write(&opcode_vkCmdEndRenderPass, sizeof(uint32_t)); |
| 4649 | stream->write(&packetSize_vkCmdEndRenderPass, sizeof(uint32_t)); |
| 4650 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4651 | } |
| 4652 | |
| 4653 | void VkEncoder::vkCmdExecuteCommands( |
| 4654 | VkCommandBuffer commandBuffer, |
| 4655 | uint32_t commandBufferCount, |
| 4656 | const VkCommandBuffer* pCommandBuffers) |
| 4657 | { |
| 4658 | auto stream = mImpl->stream(); |
| 4659 | auto countingStream = mImpl->countingStream(); |
| 4660 | countingStream->rewind(); |
| 4661 | { |
| 4662 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4663 | countingStream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 4664 | countingStream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 4665 | } |
| 4666 | uint32_t packetSize_vkCmdExecuteCommands = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4667 | countingStream->rewind(); |
| 4668 | uint32_t opcode_vkCmdExecuteCommands = OP_vkCmdExecuteCommands; |
| 4669 | stream->write(&opcode_vkCmdExecuteCommands, sizeof(uint32_t)); |
| 4670 | stream->write(&packetSize_vkCmdExecuteCommands, sizeof(uint32_t)); |
| 4671 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4672 | stream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 4673 | stream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 4674 | } |
| 4675 | |
| 4676 | #endif |
| 4677 | #ifdef VK_VERSION_1_1 |
| 4678 | VkResult VkEncoder::vkEnumerateInstanceVersion( |
| 4679 | uint32_t* pApiVersion) |
| 4680 | { |
| 4681 | auto stream = mImpl->stream(); |
| 4682 | auto countingStream = mImpl->countingStream(); |
| 4683 | countingStream->rewind(); |
| 4684 | { |
| 4685 | countingStream->write((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4686 | } |
| 4687 | uint32_t packetSize_vkEnumerateInstanceVersion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4688 | countingStream->rewind(); |
| 4689 | uint32_t opcode_vkEnumerateInstanceVersion = OP_vkEnumerateInstanceVersion; |
| 4690 | stream->write(&opcode_vkEnumerateInstanceVersion, sizeof(uint32_t)); |
| 4691 | stream->write(&packetSize_vkEnumerateInstanceVersion, sizeof(uint32_t)); |
| 4692 | stream->write((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4693 | stream->read((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4694 | VkResult vkEnumerateInstanceVersion_VkResult_return = (VkResult)0; |
| 4695 | stream->read(&vkEnumerateInstanceVersion_VkResult_return, sizeof(VkResult)); |
| 4696 | return vkEnumerateInstanceVersion_VkResult_return; |
| 4697 | } |
| 4698 | |
| 4699 | VkResult VkEncoder::vkBindBufferMemory2( |
| 4700 | VkDevice device, |
| 4701 | uint32_t bindInfoCount, |
| 4702 | const VkBindBufferMemoryInfo* pBindInfos) |
| 4703 | { |
| 4704 | auto stream = mImpl->stream(); |
| 4705 | auto countingStream = mImpl->countingStream(); |
| 4706 | countingStream->rewind(); |
| 4707 | { |
| 4708 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4709 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4710 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4711 | { |
| 4712 | marshal_VkBindBufferMemoryInfo(countingStream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 4713 | } |
| 4714 | } |
| 4715 | uint32_t packetSize_vkBindBufferMemory2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4716 | countingStream->rewind(); |
| 4717 | uint32_t opcode_vkBindBufferMemory2 = OP_vkBindBufferMemory2; |
| 4718 | stream->write(&opcode_vkBindBufferMemory2, sizeof(uint32_t)); |
| 4719 | stream->write(&packetSize_vkBindBufferMemory2, sizeof(uint32_t)); |
| 4720 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4721 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4722 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4723 | { |
| 4724 | marshal_VkBindBufferMemoryInfo(stream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 4725 | } |
| 4726 | VkResult vkBindBufferMemory2_VkResult_return = (VkResult)0; |
| 4727 | stream->read(&vkBindBufferMemory2_VkResult_return, sizeof(VkResult)); |
| 4728 | return vkBindBufferMemory2_VkResult_return; |
| 4729 | } |
| 4730 | |
| 4731 | VkResult VkEncoder::vkBindImageMemory2( |
| 4732 | VkDevice device, |
| 4733 | uint32_t bindInfoCount, |
| 4734 | const VkBindImageMemoryInfo* pBindInfos) |
| 4735 | { |
| 4736 | auto stream = mImpl->stream(); |
| 4737 | auto countingStream = mImpl->countingStream(); |
| 4738 | countingStream->rewind(); |
| 4739 | { |
| 4740 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4741 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4742 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4743 | { |
| 4744 | marshal_VkBindImageMemoryInfo(countingStream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 4745 | } |
| 4746 | } |
| 4747 | uint32_t packetSize_vkBindImageMemory2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4748 | countingStream->rewind(); |
| 4749 | uint32_t opcode_vkBindImageMemory2 = OP_vkBindImageMemory2; |
| 4750 | stream->write(&opcode_vkBindImageMemory2, sizeof(uint32_t)); |
| 4751 | stream->write(&packetSize_vkBindImageMemory2, sizeof(uint32_t)); |
| 4752 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4753 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4754 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4755 | { |
| 4756 | marshal_VkBindImageMemoryInfo(stream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 4757 | } |
| 4758 | VkResult vkBindImageMemory2_VkResult_return = (VkResult)0; |
| 4759 | stream->read(&vkBindImageMemory2_VkResult_return, sizeof(VkResult)); |
| 4760 | return vkBindImageMemory2_VkResult_return; |
| 4761 | } |
| 4762 | |
| 4763 | void VkEncoder::vkGetDeviceGroupPeerMemoryFeatures( |
| 4764 | VkDevice device, |
| 4765 | uint32_t heapIndex, |
| 4766 | uint32_t localDeviceIndex, |
| 4767 | uint32_t remoteDeviceIndex, |
| 4768 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 4769 | { |
| 4770 | auto stream = mImpl->stream(); |
| 4771 | auto countingStream = mImpl->countingStream(); |
| 4772 | countingStream->rewind(); |
| 4773 | { |
| 4774 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4775 | countingStream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 4776 | countingStream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 4777 | countingStream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 4778 | countingStream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4779 | } |
| 4780 | uint32_t packetSize_vkGetDeviceGroupPeerMemoryFeatures = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4781 | countingStream->rewind(); |
| 4782 | uint32_t opcode_vkGetDeviceGroupPeerMemoryFeatures = OP_vkGetDeviceGroupPeerMemoryFeatures; |
| 4783 | stream->write(&opcode_vkGetDeviceGroupPeerMemoryFeatures, sizeof(uint32_t)); |
| 4784 | stream->write(&packetSize_vkGetDeviceGroupPeerMemoryFeatures, sizeof(uint32_t)); |
| 4785 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4786 | stream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 4787 | stream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 4788 | stream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 4789 | stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4790 | stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4791 | } |
| 4792 | |
| 4793 | void VkEncoder::vkCmdSetDeviceMask( |
| 4794 | VkCommandBuffer commandBuffer, |
| 4795 | uint32_t deviceMask) |
| 4796 | { |
| 4797 | auto stream = mImpl->stream(); |
| 4798 | auto countingStream = mImpl->countingStream(); |
| 4799 | countingStream->rewind(); |
| 4800 | { |
| 4801 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4802 | countingStream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 4803 | } |
| 4804 | uint32_t packetSize_vkCmdSetDeviceMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4805 | countingStream->rewind(); |
| 4806 | uint32_t opcode_vkCmdSetDeviceMask = OP_vkCmdSetDeviceMask; |
| 4807 | stream->write(&opcode_vkCmdSetDeviceMask, sizeof(uint32_t)); |
| 4808 | stream->write(&packetSize_vkCmdSetDeviceMask, sizeof(uint32_t)); |
| 4809 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4810 | stream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 4811 | } |
| 4812 | |
| 4813 | void VkEncoder::vkCmdDispatchBase( |
| 4814 | VkCommandBuffer commandBuffer, |
| 4815 | uint32_t baseGroupX, |
| 4816 | uint32_t baseGroupY, |
| 4817 | uint32_t baseGroupZ, |
| 4818 | uint32_t groupCountX, |
| 4819 | uint32_t groupCountY, |
| 4820 | uint32_t groupCountZ) |
| 4821 | { |
| 4822 | auto stream = mImpl->stream(); |
| 4823 | auto countingStream = mImpl->countingStream(); |
| 4824 | countingStream->rewind(); |
| 4825 | { |
| 4826 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4827 | countingStream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 4828 | countingStream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 4829 | countingStream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 4830 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 4831 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 4832 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 4833 | } |
| 4834 | uint32_t packetSize_vkCmdDispatchBase = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4835 | countingStream->rewind(); |
| 4836 | uint32_t opcode_vkCmdDispatchBase = OP_vkCmdDispatchBase; |
| 4837 | stream->write(&opcode_vkCmdDispatchBase, sizeof(uint32_t)); |
| 4838 | stream->write(&packetSize_vkCmdDispatchBase, sizeof(uint32_t)); |
| 4839 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4840 | stream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 4841 | stream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 4842 | stream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 4843 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 4844 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 4845 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 4846 | } |
| 4847 | |
| 4848 | VkResult VkEncoder::vkEnumeratePhysicalDeviceGroups( |
| 4849 | VkInstance instance, |
| 4850 | uint32_t* pPhysicalDeviceGroupCount, |
| 4851 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 4852 | { |
| 4853 | auto stream = mImpl->stream(); |
| 4854 | auto countingStream = mImpl->countingStream(); |
| 4855 | countingStream->rewind(); |
| 4856 | { |
| 4857 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 4858 | countingStream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4859 | if (pPhysicalDeviceGroupCount) |
| 4860 | { |
| 4861 | countingStream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4862 | } |
| 4863 | countingStream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4864 | if (pPhysicalDeviceGroupProperties) |
| 4865 | { |
| 4866 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4867 | { |
| 4868 | marshal_VkPhysicalDeviceGroupProperties(countingStream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4869 | } |
| 4870 | } |
| 4871 | } |
| 4872 | uint32_t packetSize_vkEnumeratePhysicalDeviceGroups = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4873 | countingStream->rewind(); |
| 4874 | uint32_t opcode_vkEnumeratePhysicalDeviceGroups = OP_vkEnumeratePhysicalDeviceGroups; |
| 4875 | stream->write(&opcode_vkEnumeratePhysicalDeviceGroups, sizeof(uint32_t)); |
| 4876 | stream->write(&packetSize_vkEnumeratePhysicalDeviceGroups, sizeof(uint32_t)); |
| 4877 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 4878 | stream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4879 | if (pPhysicalDeviceGroupCount) |
| 4880 | { |
| 4881 | stream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4882 | } |
| 4883 | stream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4884 | if (pPhysicalDeviceGroupProperties) |
| 4885 | { |
| 4886 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4887 | { |
| 4888 | marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4889 | } |
| 4890 | } |
| 4891 | uint32_t* check_pPhysicalDeviceGroupCount; |
| 4892 | stream->read((uint32_t**)&check_pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4893 | if (pPhysicalDeviceGroupCount) |
| 4894 | { |
| 4895 | if (!(check_pPhysicalDeviceGroupCount)) |
| 4896 | { |
| 4897 | fprintf(stderr, "fatal: pPhysicalDeviceGroupCount inconsistent between guest and host\n"); |
| 4898 | } |
| 4899 | stream->read((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4900 | } |
| 4901 | VkPhysicalDeviceGroupProperties* check_pPhysicalDeviceGroupProperties; |
| 4902 | stream->read((VkPhysicalDeviceGroupProperties**)&check_pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4903 | if (pPhysicalDeviceGroupProperties) |
| 4904 | { |
| 4905 | if (!(check_pPhysicalDeviceGroupProperties)) |
| 4906 | { |
| 4907 | fprintf(stderr, "fatal: pPhysicalDeviceGroupProperties inconsistent between guest and host\n"); |
| 4908 | } |
| 4909 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4910 | { |
| 4911 | unmarshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4912 | } |
| 4913 | } |
| 4914 | VkResult vkEnumeratePhysicalDeviceGroups_VkResult_return = (VkResult)0; |
| 4915 | stream->read(&vkEnumeratePhysicalDeviceGroups_VkResult_return, sizeof(VkResult)); |
| 4916 | return vkEnumeratePhysicalDeviceGroups_VkResult_return; |
| 4917 | } |
| 4918 | |
| 4919 | void VkEncoder::vkGetImageMemoryRequirements2( |
| 4920 | VkDevice device, |
| 4921 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 4922 | VkMemoryRequirements2* pMemoryRequirements) |
| 4923 | { |
| 4924 | auto stream = mImpl->stream(); |
| 4925 | auto countingStream = mImpl->countingStream(); |
| 4926 | countingStream->rewind(); |
| 4927 | { |
| 4928 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4929 | marshal_VkImageMemoryRequirementsInfo2(countingStream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 4930 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4931 | } |
| 4932 | uint32_t packetSize_vkGetImageMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4933 | countingStream->rewind(); |
| 4934 | uint32_t opcode_vkGetImageMemoryRequirements2 = OP_vkGetImageMemoryRequirements2; |
| 4935 | stream->write(&opcode_vkGetImageMemoryRequirements2, sizeof(uint32_t)); |
| 4936 | stream->write(&packetSize_vkGetImageMemoryRequirements2, sizeof(uint32_t)); |
| 4937 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4938 | marshal_VkImageMemoryRequirementsInfo2(stream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 4939 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4940 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4941 | } |
| 4942 | |
| 4943 | void VkEncoder::vkGetBufferMemoryRequirements2( |
| 4944 | VkDevice device, |
| 4945 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 4946 | VkMemoryRequirements2* pMemoryRequirements) |
| 4947 | { |
| 4948 | auto stream = mImpl->stream(); |
| 4949 | auto countingStream = mImpl->countingStream(); |
| 4950 | countingStream->rewind(); |
| 4951 | { |
| 4952 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4953 | marshal_VkBufferMemoryRequirementsInfo2(countingStream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 4954 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4955 | } |
| 4956 | uint32_t packetSize_vkGetBufferMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4957 | countingStream->rewind(); |
| 4958 | uint32_t opcode_vkGetBufferMemoryRequirements2 = OP_vkGetBufferMemoryRequirements2; |
| 4959 | stream->write(&opcode_vkGetBufferMemoryRequirements2, sizeof(uint32_t)); |
| 4960 | stream->write(&packetSize_vkGetBufferMemoryRequirements2, sizeof(uint32_t)); |
| 4961 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4962 | marshal_VkBufferMemoryRequirementsInfo2(stream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 4963 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4964 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4965 | } |
| 4966 | |
| 4967 | void VkEncoder::vkGetImageSparseMemoryRequirements2( |
| 4968 | VkDevice device, |
| 4969 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 4970 | uint32_t* pSparseMemoryRequirementCount, |
| 4971 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 4972 | { |
| 4973 | auto stream = mImpl->stream(); |
| 4974 | auto countingStream = mImpl->countingStream(); |
| 4975 | countingStream->rewind(); |
| 4976 | { |
| 4977 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4978 | marshal_VkImageSparseMemoryRequirementsInfo2(countingStream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 4979 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 4980 | if (pSparseMemoryRequirementCount) |
| 4981 | { |
| 4982 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 4983 | } |
| 4984 | countingStream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 4985 | if (pSparseMemoryRequirements) |
| 4986 | { |
| 4987 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 4988 | { |
| 4989 | marshal_VkSparseImageMemoryRequirements2(countingStream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 4990 | } |
| 4991 | } |
| 4992 | } |
| 4993 | uint32_t packetSize_vkGetImageSparseMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4994 | countingStream->rewind(); |
| 4995 | uint32_t opcode_vkGetImageSparseMemoryRequirements2 = OP_vkGetImageSparseMemoryRequirements2; |
| 4996 | stream->write(&opcode_vkGetImageSparseMemoryRequirements2, sizeof(uint32_t)); |
| 4997 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements2, sizeof(uint32_t)); |
| 4998 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4999 | marshal_VkImageSparseMemoryRequirementsInfo2(stream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 5000 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 5001 | if (pSparseMemoryRequirementCount) |
| 5002 | { |
| 5003 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 5004 | } |
| 5005 | stream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 5006 | if (pSparseMemoryRequirements) |
| 5007 | { |
| 5008 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 5009 | { |
| 5010 | marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 5011 | } |
| 5012 | } |
| 5013 | uint32_t* check_pSparseMemoryRequirementCount; |
| 5014 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 5015 | if (pSparseMemoryRequirementCount) |
| 5016 | { |
| 5017 | if (!(check_pSparseMemoryRequirementCount)) |
| 5018 | { |
| 5019 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 5020 | } |
| 5021 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 5022 | } |
| 5023 | VkSparseImageMemoryRequirements2* check_pSparseMemoryRequirements; |
| 5024 | stream->read((VkSparseImageMemoryRequirements2**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 5025 | if (pSparseMemoryRequirements) |
| 5026 | { |
| 5027 | if (!(check_pSparseMemoryRequirements)) |
| 5028 | { |
| 5029 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 5030 | } |
| 5031 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 5032 | { |
| 5033 | unmarshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 5034 | } |
| 5035 | } |
| 5036 | } |
| 5037 | |
| 5038 | void VkEncoder::vkGetPhysicalDeviceFeatures2( |
| 5039 | VkPhysicalDevice physicalDevice, |
| 5040 | VkPhysicalDeviceFeatures2* pFeatures) |
| 5041 | { |
| 5042 | auto stream = mImpl->stream(); |
| 5043 | auto countingStream = mImpl->countingStream(); |
| 5044 | countingStream->rewind(); |
| 5045 | { |
| 5046 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5047 | marshal_VkPhysicalDeviceFeatures2(countingStream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5048 | } |
| 5049 | uint32_t packetSize_vkGetPhysicalDeviceFeatures2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5050 | countingStream->rewind(); |
| 5051 | uint32_t opcode_vkGetPhysicalDeviceFeatures2 = OP_vkGetPhysicalDeviceFeatures2; |
| 5052 | stream->write(&opcode_vkGetPhysicalDeviceFeatures2, sizeof(uint32_t)); |
| 5053 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures2, sizeof(uint32_t)); |
| 5054 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5055 | marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5056 | unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5057 | } |
| 5058 | |
| 5059 | void VkEncoder::vkGetPhysicalDeviceProperties2( |
| 5060 | VkPhysicalDevice physicalDevice, |
| 5061 | VkPhysicalDeviceProperties2* pProperties) |
| 5062 | { |
| 5063 | auto stream = mImpl->stream(); |
| 5064 | auto countingStream = mImpl->countingStream(); |
| 5065 | countingStream->rewind(); |
| 5066 | { |
| 5067 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5068 | marshal_VkPhysicalDeviceProperties2(countingStream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5069 | } |
| 5070 | uint32_t packetSize_vkGetPhysicalDeviceProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5071 | countingStream->rewind(); |
| 5072 | uint32_t opcode_vkGetPhysicalDeviceProperties2 = OP_vkGetPhysicalDeviceProperties2; |
| 5073 | stream->write(&opcode_vkGetPhysicalDeviceProperties2, sizeof(uint32_t)); |
| 5074 | stream->write(&packetSize_vkGetPhysicalDeviceProperties2, sizeof(uint32_t)); |
| 5075 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5076 | marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5077 | unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5078 | } |
| 5079 | |
| 5080 | void VkEncoder::vkGetPhysicalDeviceFormatProperties2( |
| 5081 | VkPhysicalDevice physicalDevice, |
| 5082 | VkFormat format, |
| 5083 | VkFormatProperties2* pFormatProperties) |
| 5084 | { |
| 5085 | auto stream = mImpl->stream(); |
| 5086 | auto countingStream = mImpl->countingStream(); |
| 5087 | countingStream->rewind(); |
| 5088 | { |
| 5089 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5090 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 5091 | marshal_VkFormatProperties2(countingStream, (VkFormatProperties2*)(pFormatProperties)); |
| 5092 | } |
| 5093 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5094 | countingStream->rewind(); |
| 5095 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties2 = OP_vkGetPhysicalDeviceFormatProperties2; |
| 5096 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties2, sizeof(uint32_t)); |
| 5097 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties2, sizeof(uint32_t)); |
| 5098 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5099 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 5100 | marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 5101 | unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 5102 | } |
| 5103 | |
| 5104 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties2( |
| 5105 | VkPhysicalDevice physicalDevice, |
| 5106 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 5107 | VkImageFormatProperties2* pImageFormatProperties) |
| 5108 | { |
| 5109 | auto stream = mImpl->stream(); |
| 5110 | auto countingStream = mImpl->countingStream(); |
| 5111 | countingStream->rewind(); |
| 5112 | { |
| 5113 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5114 | marshal_VkPhysicalDeviceImageFormatInfo2(countingStream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 5115 | marshal_VkImageFormatProperties2(countingStream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5116 | } |
| 5117 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5118 | countingStream->rewind(); |
| 5119 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties2 = OP_vkGetPhysicalDeviceImageFormatProperties2; |
| 5120 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties2, sizeof(uint32_t)); |
| 5121 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties2, sizeof(uint32_t)); |
| 5122 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5123 | marshal_VkPhysicalDeviceImageFormatInfo2(stream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 5124 | marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5125 | unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5126 | VkResult vkGetPhysicalDeviceImageFormatProperties2_VkResult_return = (VkResult)0; |
| 5127 | stream->read(&vkGetPhysicalDeviceImageFormatProperties2_VkResult_return, sizeof(VkResult)); |
| 5128 | return vkGetPhysicalDeviceImageFormatProperties2_VkResult_return; |
| 5129 | } |
| 5130 | |
| 5131 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties2( |
| 5132 | VkPhysicalDevice physicalDevice, |
| 5133 | uint32_t* pQueueFamilyPropertyCount, |
| 5134 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 5135 | { |
| 5136 | auto stream = mImpl->stream(); |
| 5137 | auto countingStream = mImpl->countingStream(); |
| 5138 | countingStream->rewind(); |
| 5139 | { |
| 5140 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5141 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5142 | if (pQueueFamilyPropertyCount) |
| 5143 | { |
| 5144 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5145 | } |
| 5146 | countingStream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5147 | if (pQueueFamilyProperties) |
| 5148 | { |
| 5149 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5150 | { |
| 5151 | marshal_VkQueueFamilyProperties2(countingStream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5152 | } |
| 5153 | } |
| 5154 | } |
| 5155 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5156 | countingStream->rewind(); |
| 5157 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties2 = OP_vkGetPhysicalDeviceQueueFamilyProperties2; |
| 5158 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties2, sizeof(uint32_t)); |
| 5159 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties2, sizeof(uint32_t)); |
| 5160 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5161 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5162 | if (pQueueFamilyPropertyCount) |
| 5163 | { |
| 5164 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5165 | } |
| 5166 | stream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5167 | if (pQueueFamilyProperties) |
| 5168 | { |
| 5169 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5170 | { |
| 5171 | marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5172 | } |
| 5173 | } |
| 5174 | uint32_t* check_pQueueFamilyPropertyCount; |
| 5175 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5176 | if (pQueueFamilyPropertyCount) |
| 5177 | { |
| 5178 | if (!(check_pQueueFamilyPropertyCount)) |
| 5179 | { |
| 5180 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 5181 | } |
| 5182 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5183 | } |
| 5184 | VkQueueFamilyProperties2* check_pQueueFamilyProperties; |
| 5185 | stream->read((VkQueueFamilyProperties2**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5186 | if (pQueueFamilyProperties) |
| 5187 | { |
| 5188 | if (!(check_pQueueFamilyProperties)) |
| 5189 | { |
| 5190 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 5191 | } |
| 5192 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5193 | { |
| 5194 | unmarshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5195 | } |
| 5196 | } |
| 5197 | } |
| 5198 | |
| 5199 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties2( |
| 5200 | VkPhysicalDevice physicalDevice, |
| 5201 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 5202 | { |
| 5203 | auto stream = mImpl->stream(); |
| 5204 | auto countingStream = mImpl->countingStream(); |
| 5205 | countingStream->rewind(); |
| 5206 | { |
| 5207 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5208 | marshal_VkPhysicalDeviceMemoryProperties2(countingStream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5209 | } |
| 5210 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5211 | countingStream->rewind(); |
| 5212 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties2 = OP_vkGetPhysicalDeviceMemoryProperties2; |
| 5213 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties2, sizeof(uint32_t)); |
| 5214 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties2, sizeof(uint32_t)); |
| 5215 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5216 | marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5217 | unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5218 | } |
| 5219 | |
| 5220 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties2( |
| 5221 | VkPhysicalDevice physicalDevice, |
| 5222 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 5223 | uint32_t* pPropertyCount, |
| 5224 | VkSparseImageFormatProperties2* pProperties) |
| 5225 | { |
| 5226 | auto stream = mImpl->stream(); |
| 5227 | auto countingStream = mImpl->countingStream(); |
| 5228 | countingStream->rewind(); |
| 5229 | { |
| 5230 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5231 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(countingStream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 5232 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 5233 | if (pPropertyCount) |
| 5234 | { |
| 5235 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5236 | } |
| 5237 | countingStream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5238 | if (pProperties) |
| 5239 | { |
| 5240 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5241 | { |
| 5242 | marshal_VkSparseImageFormatProperties2(countingStream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5243 | } |
| 5244 | } |
| 5245 | } |
| 5246 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5247 | countingStream->rewind(); |
| 5248 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties2 = OP_vkGetPhysicalDeviceSparseImageFormatProperties2; |
| 5249 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties2, sizeof(uint32_t)); |
| 5250 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2, sizeof(uint32_t)); |
| 5251 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5252 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(stream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 5253 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 5254 | if (pPropertyCount) |
| 5255 | { |
| 5256 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5257 | } |
| 5258 | stream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5259 | if (pProperties) |
| 5260 | { |
| 5261 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5262 | { |
| 5263 | marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5264 | } |
| 5265 | } |
| 5266 | uint32_t* check_pPropertyCount; |
| 5267 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 5268 | if (pPropertyCount) |
| 5269 | { |
| 5270 | if (!(check_pPropertyCount)) |
| 5271 | { |
| 5272 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 5273 | } |
| 5274 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5275 | } |
| 5276 | VkSparseImageFormatProperties2* check_pProperties; |
| 5277 | stream->read((VkSparseImageFormatProperties2**)&check_pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5278 | if (pProperties) |
| 5279 | { |
| 5280 | if (!(check_pProperties)) |
| 5281 | { |
| 5282 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 5283 | } |
| 5284 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5285 | { |
| 5286 | unmarshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5287 | } |
| 5288 | } |
| 5289 | } |
| 5290 | |
| 5291 | void VkEncoder::vkTrimCommandPool( |
| 5292 | VkDevice device, |
| 5293 | VkCommandPool commandPool, |
| 5294 | VkCommandPoolTrimFlags flags) |
| 5295 | { |
| 5296 | auto stream = mImpl->stream(); |
| 5297 | auto countingStream = mImpl->countingStream(); |
| 5298 | countingStream->rewind(); |
| 5299 | { |
| 5300 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5301 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 5302 | countingStream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 5303 | } |
| 5304 | uint32_t packetSize_vkTrimCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5305 | countingStream->rewind(); |
| 5306 | uint32_t opcode_vkTrimCommandPool = OP_vkTrimCommandPool; |
| 5307 | stream->write(&opcode_vkTrimCommandPool, sizeof(uint32_t)); |
| 5308 | stream->write(&packetSize_vkTrimCommandPool, sizeof(uint32_t)); |
| 5309 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5310 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 5311 | stream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 5312 | } |
| 5313 | |
| 5314 | void VkEncoder::vkGetDeviceQueue2( |
| 5315 | VkDevice device, |
| 5316 | const VkDeviceQueueInfo2* pQueueInfo, |
| 5317 | VkQueue* pQueue) |
| 5318 | { |
| 5319 | auto stream = mImpl->stream(); |
| 5320 | auto countingStream = mImpl->countingStream(); |
| 5321 | countingStream->rewind(); |
| 5322 | { |
| 5323 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5324 | marshal_VkDeviceQueueInfo2(countingStream, (const VkDeviceQueueInfo2*)(pQueueInfo)); |
| 5325 | countingStream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5326 | } |
| 5327 | uint32_t packetSize_vkGetDeviceQueue2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5328 | countingStream->rewind(); |
| 5329 | uint32_t opcode_vkGetDeviceQueue2 = OP_vkGetDeviceQueue2; |
| 5330 | stream->write(&opcode_vkGetDeviceQueue2, sizeof(uint32_t)); |
| 5331 | stream->write(&packetSize_vkGetDeviceQueue2, sizeof(uint32_t)); |
| 5332 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5333 | marshal_VkDeviceQueueInfo2(stream, (const VkDeviceQueueInfo2*)(pQueueInfo)); |
| 5334 | stream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5335 | stream->read((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5336 | } |
| 5337 | |
| 5338 | VkResult VkEncoder::vkCreateSamplerYcbcrConversion( |
| 5339 | VkDevice device, |
| 5340 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 5341 | const VkAllocationCallbacks* pAllocator, |
| 5342 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 5343 | { |
| 5344 | auto stream = mImpl->stream(); |
| 5345 | auto countingStream = mImpl->countingStream(); |
| 5346 | countingStream->rewind(); |
| 5347 | { |
| 5348 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5349 | marshal_VkSamplerYcbcrConversionCreateInfo(countingStream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 5350 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5351 | if (pAllocator) |
| 5352 | { |
| 5353 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5354 | } |
| 5355 | countingStream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5356 | } |
| 5357 | uint32_t packetSize_vkCreateSamplerYcbcrConversion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5358 | countingStream->rewind(); |
| 5359 | uint32_t opcode_vkCreateSamplerYcbcrConversion = OP_vkCreateSamplerYcbcrConversion; |
| 5360 | stream->write(&opcode_vkCreateSamplerYcbcrConversion, sizeof(uint32_t)); |
| 5361 | stream->write(&packetSize_vkCreateSamplerYcbcrConversion, sizeof(uint32_t)); |
| 5362 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5363 | marshal_VkSamplerYcbcrConversionCreateInfo(stream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 5364 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5365 | if (pAllocator) |
| 5366 | { |
| 5367 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5368 | } |
| 5369 | stream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5370 | stream->read((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5371 | VkResult vkCreateSamplerYcbcrConversion_VkResult_return = (VkResult)0; |
| 5372 | stream->read(&vkCreateSamplerYcbcrConversion_VkResult_return, sizeof(VkResult)); |
| 5373 | return vkCreateSamplerYcbcrConversion_VkResult_return; |
| 5374 | } |
| 5375 | |
| 5376 | void VkEncoder::vkDestroySamplerYcbcrConversion( |
| 5377 | VkDevice device, |
| 5378 | VkSamplerYcbcrConversion ycbcrConversion, |
| 5379 | const VkAllocationCallbacks* pAllocator) |
| 5380 | { |
| 5381 | auto stream = mImpl->stream(); |
| 5382 | auto countingStream = mImpl->countingStream(); |
| 5383 | countingStream->rewind(); |
| 5384 | { |
| 5385 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5386 | countingStream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5387 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5388 | if (pAllocator) |
| 5389 | { |
| 5390 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5391 | } |
| 5392 | } |
| 5393 | uint32_t packetSize_vkDestroySamplerYcbcrConversion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5394 | countingStream->rewind(); |
| 5395 | uint32_t opcode_vkDestroySamplerYcbcrConversion = OP_vkDestroySamplerYcbcrConversion; |
| 5396 | stream->write(&opcode_vkDestroySamplerYcbcrConversion, sizeof(uint32_t)); |
| 5397 | stream->write(&packetSize_vkDestroySamplerYcbcrConversion, sizeof(uint32_t)); |
| 5398 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5399 | stream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5400 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5401 | if (pAllocator) |
| 5402 | { |
| 5403 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5404 | } |
| 5405 | } |
| 5406 | |
| 5407 | VkResult VkEncoder::vkCreateDescriptorUpdateTemplate( |
| 5408 | VkDevice device, |
| 5409 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 5410 | const VkAllocationCallbacks* pAllocator, |
| 5411 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 5412 | { |
| 5413 | auto stream = mImpl->stream(); |
| 5414 | auto countingStream = mImpl->countingStream(); |
| 5415 | countingStream->rewind(); |
| 5416 | { |
| 5417 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5418 | marshal_VkDescriptorUpdateTemplateCreateInfo(countingStream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 5419 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5420 | if (pAllocator) |
| 5421 | { |
| 5422 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5423 | } |
| 5424 | countingStream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5425 | } |
| 5426 | uint32_t packetSize_vkCreateDescriptorUpdateTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5427 | countingStream->rewind(); |
| 5428 | uint32_t opcode_vkCreateDescriptorUpdateTemplate = OP_vkCreateDescriptorUpdateTemplate; |
| 5429 | stream->write(&opcode_vkCreateDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5430 | stream->write(&packetSize_vkCreateDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5431 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5432 | marshal_VkDescriptorUpdateTemplateCreateInfo(stream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 5433 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5434 | if (pAllocator) |
| 5435 | { |
| 5436 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5437 | } |
| 5438 | stream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5439 | stream->read((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5440 | VkResult vkCreateDescriptorUpdateTemplate_VkResult_return = (VkResult)0; |
| 5441 | stream->read(&vkCreateDescriptorUpdateTemplate_VkResult_return, sizeof(VkResult)); |
| 5442 | return vkCreateDescriptorUpdateTemplate_VkResult_return; |
| 5443 | } |
| 5444 | |
| 5445 | void VkEncoder::vkDestroyDescriptorUpdateTemplate( |
| 5446 | VkDevice device, |
| 5447 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 5448 | const VkAllocationCallbacks* pAllocator) |
| 5449 | { |
| 5450 | auto stream = mImpl->stream(); |
| 5451 | auto countingStream = mImpl->countingStream(); |
| 5452 | countingStream->rewind(); |
| 5453 | { |
| 5454 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5455 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5456 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5457 | if (pAllocator) |
| 5458 | { |
| 5459 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5460 | } |
| 5461 | } |
| 5462 | uint32_t packetSize_vkDestroyDescriptorUpdateTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5463 | countingStream->rewind(); |
| 5464 | uint32_t opcode_vkDestroyDescriptorUpdateTemplate = OP_vkDestroyDescriptorUpdateTemplate; |
| 5465 | stream->write(&opcode_vkDestroyDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5466 | stream->write(&packetSize_vkDestroyDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5467 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5468 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5469 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5470 | if (pAllocator) |
| 5471 | { |
| 5472 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5473 | } |
| 5474 | } |
| 5475 | |
| 5476 | void VkEncoder::vkUpdateDescriptorSetWithTemplate( |
| 5477 | VkDevice device, |
| 5478 | VkDescriptorSet descriptorSet, |
| 5479 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 5480 | const void* pData) |
| 5481 | { |
| 5482 | auto stream = mImpl->stream(); |
| 5483 | auto countingStream = mImpl->countingStream(); |
| 5484 | countingStream->rewind(); |
| 5485 | { |
| 5486 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5487 | countingStream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 5488 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5489 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 5490 | if (pData) |
| 5491 | { |
| 5492 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 5493 | } |
| 5494 | } |
| 5495 | uint32_t packetSize_vkUpdateDescriptorSetWithTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5496 | countingStream->rewind(); |
| 5497 | uint32_t opcode_vkUpdateDescriptorSetWithTemplate = OP_vkUpdateDescriptorSetWithTemplate; |
| 5498 | stream->write(&opcode_vkUpdateDescriptorSetWithTemplate, sizeof(uint32_t)); |
| 5499 | stream->write(&packetSize_vkUpdateDescriptorSetWithTemplate, sizeof(uint32_t)); |
| 5500 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5501 | stream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 5502 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5503 | stream->write((const void**)&pData, sizeof(const void*)); |
| 5504 | if (pData) |
| 5505 | { |
| 5506 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 5507 | } |
| 5508 | } |
| 5509 | |
| 5510 | void VkEncoder::vkGetPhysicalDeviceExternalBufferProperties( |
| 5511 | VkPhysicalDevice physicalDevice, |
| 5512 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 5513 | VkExternalBufferProperties* pExternalBufferProperties) |
| 5514 | { |
| 5515 | auto stream = mImpl->stream(); |
| 5516 | auto countingStream = mImpl->countingStream(); |
| 5517 | countingStream->rewind(); |
| 5518 | { |
| 5519 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5520 | marshal_VkPhysicalDeviceExternalBufferInfo(countingStream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 5521 | marshal_VkExternalBufferProperties(countingStream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5522 | } |
| 5523 | uint32_t packetSize_vkGetPhysicalDeviceExternalBufferProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5524 | countingStream->rewind(); |
| 5525 | uint32_t opcode_vkGetPhysicalDeviceExternalBufferProperties = OP_vkGetPhysicalDeviceExternalBufferProperties; |
| 5526 | stream->write(&opcode_vkGetPhysicalDeviceExternalBufferProperties, sizeof(uint32_t)); |
| 5527 | stream->write(&packetSize_vkGetPhysicalDeviceExternalBufferProperties, sizeof(uint32_t)); |
| 5528 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5529 | marshal_VkPhysicalDeviceExternalBufferInfo(stream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 5530 | marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5531 | unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5532 | } |
| 5533 | |
| 5534 | void VkEncoder::vkGetPhysicalDeviceExternalFenceProperties( |
| 5535 | VkPhysicalDevice physicalDevice, |
| 5536 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 5537 | VkExternalFenceProperties* pExternalFenceProperties) |
| 5538 | { |
| 5539 | auto stream = mImpl->stream(); |
| 5540 | auto countingStream = mImpl->countingStream(); |
| 5541 | countingStream->rewind(); |
| 5542 | { |
| 5543 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5544 | marshal_VkPhysicalDeviceExternalFenceInfo(countingStream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 5545 | marshal_VkExternalFenceProperties(countingStream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5546 | } |
| 5547 | uint32_t packetSize_vkGetPhysicalDeviceExternalFenceProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5548 | countingStream->rewind(); |
| 5549 | uint32_t opcode_vkGetPhysicalDeviceExternalFenceProperties = OP_vkGetPhysicalDeviceExternalFenceProperties; |
| 5550 | stream->write(&opcode_vkGetPhysicalDeviceExternalFenceProperties, sizeof(uint32_t)); |
| 5551 | stream->write(&packetSize_vkGetPhysicalDeviceExternalFenceProperties, sizeof(uint32_t)); |
| 5552 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5553 | marshal_VkPhysicalDeviceExternalFenceInfo(stream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 5554 | marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5555 | unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5556 | } |
| 5557 | |
| 5558 | void VkEncoder::vkGetPhysicalDeviceExternalSemaphoreProperties( |
| 5559 | VkPhysicalDevice physicalDevice, |
| 5560 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 5561 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 5562 | { |
| 5563 | auto stream = mImpl->stream(); |
| 5564 | auto countingStream = mImpl->countingStream(); |
| 5565 | countingStream->rewind(); |
| 5566 | { |
| 5567 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5568 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(countingStream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 5569 | marshal_VkExternalSemaphoreProperties(countingStream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5570 | } |
| 5571 | uint32_t packetSize_vkGetPhysicalDeviceExternalSemaphoreProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5572 | countingStream->rewind(); |
| 5573 | uint32_t opcode_vkGetPhysicalDeviceExternalSemaphoreProperties = OP_vkGetPhysicalDeviceExternalSemaphoreProperties; |
| 5574 | stream->write(&opcode_vkGetPhysicalDeviceExternalSemaphoreProperties, sizeof(uint32_t)); |
| 5575 | stream->write(&packetSize_vkGetPhysicalDeviceExternalSemaphoreProperties, sizeof(uint32_t)); |
| 5576 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5577 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 5578 | marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5579 | unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5580 | } |
| 5581 | |
| 5582 | void VkEncoder::vkGetDescriptorSetLayoutSupport( |
| 5583 | VkDevice device, |
| 5584 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 5585 | VkDescriptorSetLayoutSupport* pSupport) |
| 5586 | { |
| 5587 | auto stream = mImpl->stream(); |
| 5588 | auto countingStream = mImpl->countingStream(); |
| 5589 | countingStream->rewind(); |
| 5590 | { |
| 5591 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5592 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 5593 | marshal_VkDescriptorSetLayoutSupport(countingStream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5594 | } |
| 5595 | uint32_t packetSize_vkGetDescriptorSetLayoutSupport = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5596 | countingStream->rewind(); |
| 5597 | uint32_t opcode_vkGetDescriptorSetLayoutSupport = OP_vkGetDescriptorSetLayoutSupport; |
| 5598 | stream->write(&opcode_vkGetDescriptorSetLayoutSupport, sizeof(uint32_t)); |
| 5599 | stream->write(&packetSize_vkGetDescriptorSetLayoutSupport, sizeof(uint32_t)); |
| 5600 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5601 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 5602 | marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5603 | unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5604 | } |
| 5605 | |
| 5606 | #endif |
| 5607 | #ifdef VK_KHR_surface |
| 5608 | void VkEncoder::vkDestroySurfaceKHR( |
| 5609 | VkInstance instance, |
| 5610 | VkSurfaceKHR surface, |
| 5611 | const VkAllocationCallbacks* pAllocator) |
| 5612 | { |
| 5613 | auto stream = mImpl->stream(); |
| 5614 | auto countingStream = mImpl->countingStream(); |
| 5615 | countingStream->rewind(); |
| 5616 | { |
| 5617 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 5618 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5619 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5620 | if (pAllocator) |
| 5621 | { |
| 5622 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5623 | } |
| 5624 | } |
| 5625 | uint32_t packetSize_vkDestroySurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5626 | countingStream->rewind(); |
| 5627 | uint32_t opcode_vkDestroySurfaceKHR = OP_vkDestroySurfaceKHR; |
| 5628 | stream->write(&opcode_vkDestroySurfaceKHR, sizeof(uint32_t)); |
| 5629 | stream->write(&packetSize_vkDestroySurfaceKHR, sizeof(uint32_t)); |
| 5630 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 5631 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5632 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5633 | if (pAllocator) |
| 5634 | { |
| 5635 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5636 | } |
| 5637 | } |
| 5638 | |
| 5639 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceSupportKHR( |
| 5640 | VkPhysicalDevice physicalDevice, |
| 5641 | uint32_t queueFamilyIndex, |
| 5642 | VkSurfaceKHR surface, |
| 5643 | VkBool32* pSupported) |
| 5644 | { |
| 5645 | auto stream = mImpl->stream(); |
| 5646 | auto countingStream = mImpl->countingStream(); |
| 5647 | countingStream->rewind(); |
| 5648 | { |
| 5649 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5650 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 5651 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5652 | countingStream->write((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5653 | } |
| 5654 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5655 | countingStream->rewind(); |
| 5656 | uint32_t opcode_vkGetPhysicalDeviceSurfaceSupportKHR = OP_vkGetPhysicalDeviceSurfaceSupportKHR; |
| 5657 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceSupportKHR, sizeof(uint32_t)); |
| 5658 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceSupportKHR, sizeof(uint32_t)); |
| 5659 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5660 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 5661 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5662 | stream->write((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5663 | stream->read((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5664 | VkResult vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return = (VkResult)0; |
| 5665 | stream->read(&vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return, sizeof(VkResult)); |
| 5666 | return vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return; |
| 5667 | } |
| 5668 | |
| 5669 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 5670 | VkPhysicalDevice physicalDevice, |
| 5671 | VkSurfaceKHR surface, |
| 5672 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) |
| 5673 | { |
| 5674 | auto stream = mImpl->stream(); |
| 5675 | auto countingStream = mImpl->countingStream(); |
| 5676 | countingStream->rewind(); |
| 5677 | { |
| 5678 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5679 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5680 | marshal_VkSurfaceCapabilitiesKHR(countingStream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5681 | } |
| 5682 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5683 | countingStream->rewind(); |
| 5684 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = OP_vkGetPhysicalDeviceSurfaceCapabilitiesKHR; |
| 5685 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, sizeof(uint32_t)); |
| 5686 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, sizeof(uint32_t)); |
| 5687 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5688 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5689 | marshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5690 | unmarshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5691 | VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 5692 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 5693 | return vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return; |
| 5694 | } |
| 5695 | |
| 5696 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 5697 | VkPhysicalDevice physicalDevice, |
| 5698 | VkSurfaceKHR surface, |
| 5699 | uint32_t* pSurfaceFormatCount, |
| 5700 | VkSurfaceFormatKHR* pSurfaceFormats) |
| 5701 | { |
| 5702 | auto stream = mImpl->stream(); |
| 5703 | auto countingStream = mImpl->countingStream(); |
| 5704 | countingStream->rewind(); |
| 5705 | { |
| 5706 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5707 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5708 | countingStream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5709 | if (pSurfaceFormatCount) |
| 5710 | { |
| 5711 | countingStream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5712 | } |
| 5713 | countingStream->write((VkSurfaceFormatKHR**)&pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5714 | if (pSurfaceFormats) |
| 5715 | { |
| 5716 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5717 | { |
| 5718 | marshal_VkSurfaceFormatKHR(countingStream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5719 | } |
| 5720 | } |
| 5721 | } |
| 5722 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceFormatsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5723 | countingStream->rewind(); |
| 5724 | uint32_t opcode_vkGetPhysicalDeviceSurfaceFormatsKHR = OP_vkGetPhysicalDeviceSurfaceFormatsKHR; |
| 5725 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceFormatsKHR, sizeof(uint32_t)); |
| 5726 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceFormatsKHR, sizeof(uint32_t)); |
| 5727 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5728 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5729 | stream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5730 | if (pSurfaceFormatCount) |
| 5731 | { |
| 5732 | stream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5733 | } |
| 5734 | stream->write((VkSurfaceFormatKHR**)&pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5735 | if (pSurfaceFormats) |
| 5736 | { |
| 5737 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5738 | { |
| 5739 | marshal_VkSurfaceFormatKHR(stream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5740 | } |
| 5741 | } |
| 5742 | uint32_t* check_pSurfaceFormatCount; |
| 5743 | stream->read((uint32_t**)&check_pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5744 | if (pSurfaceFormatCount) |
| 5745 | { |
| 5746 | if (!(check_pSurfaceFormatCount)) |
| 5747 | { |
| 5748 | fprintf(stderr, "fatal: pSurfaceFormatCount inconsistent between guest and host\n"); |
| 5749 | } |
| 5750 | stream->read((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5751 | } |
| 5752 | VkSurfaceFormatKHR* check_pSurfaceFormats; |
| 5753 | stream->read((VkSurfaceFormatKHR**)&check_pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5754 | if (pSurfaceFormats) |
| 5755 | { |
| 5756 | if (!(check_pSurfaceFormats)) |
| 5757 | { |
| 5758 | fprintf(stderr, "fatal: pSurfaceFormats inconsistent between guest and host\n"); |
| 5759 | } |
| 5760 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5761 | { |
| 5762 | unmarshal_VkSurfaceFormatKHR(stream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5763 | } |
| 5764 | } |
| 5765 | VkResult vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return = (VkResult)0; |
| 5766 | stream->read(&vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return, sizeof(VkResult)); |
| 5767 | return vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return; |
| 5768 | } |
| 5769 | |
| 5770 | VkResult VkEncoder::vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 5771 | VkPhysicalDevice physicalDevice, |
| 5772 | VkSurfaceKHR surface, |
| 5773 | uint32_t* pPresentModeCount, |
| 5774 | VkPresentModeKHR* pPresentModes) |
| 5775 | { |
| 5776 | auto stream = mImpl->stream(); |
| 5777 | auto countingStream = mImpl->countingStream(); |
| 5778 | countingStream->rewind(); |
| 5779 | { |
| 5780 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5781 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5782 | countingStream->write((uint32_t**)&pPresentModeCount, sizeof(uint32_t*)); |
| 5783 | if (pPresentModeCount) |
| 5784 | { |
| 5785 | countingStream->write((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5786 | } |
| 5787 | countingStream->write((VkPresentModeKHR**)&pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5788 | if (pPresentModes) |
| 5789 | { |
| 5790 | countingStream->write((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5791 | } |
| 5792 | } |
| 5793 | uint32_t packetSize_vkGetPhysicalDeviceSurfacePresentModesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5794 | countingStream->rewind(); |
| 5795 | uint32_t opcode_vkGetPhysicalDeviceSurfacePresentModesKHR = OP_vkGetPhysicalDeviceSurfacePresentModesKHR; |
| 5796 | stream->write(&opcode_vkGetPhysicalDeviceSurfacePresentModesKHR, sizeof(uint32_t)); |
| 5797 | stream->write(&packetSize_vkGetPhysicalDeviceSurfacePresentModesKHR, sizeof(uint32_t)); |
| 5798 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5799 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5800 | stream->write((uint32_t**)&pPresentModeCount, sizeof(uint32_t*)); |
| 5801 | if (pPresentModeCount) |
| 5802 | { |
| 5803 | stream->write((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5804 | } |
| 5805 | stream->write((VkPresentModeKHR**)&pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5806 | if (pPresentModes) |
| 5807 | { |
| 5808 | stream->write((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5809 | } |
| 5810 | uint32_t* check_pPresentModeCount; |
| 5811 | stream->read((uint32_t**)&check_pPresentModeCount, sizeof(uint32_t*)); |
| 5812 | if (pPresentModeCount) |
| 5813 | { |
| 5814 | if (!(check_pPresentModeCount)) |
| 5815 | { |
| 5816 | fprintf(stderr, "fatal: pPresentModeCount inconsistent between guest and host\n"); |
| 5817 | } |
| 5818 | stream->read((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5819 | } |
| 5820 | VkPresentModeKHR* check_pPresentModes; |
| 5821 | stream->read((VkPresentModeKHR**)&check_pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5822 | if (pPresentModes) |
| 5823 | { |
| 5824 | if (!(check_pPresentModes)) |
| 5825 | { |
| 5826 | fprintf(stderr, "fatal: pPresentModes inconsistent between guest and host\n"); |
| 5827 | } |
| 5828 | stream->read((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5829 | } |
| 5830 | VkResult vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return = (VkResult)0; |
| 5831 | stream->read(&vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return, sizeof(VkResult)); |
| 5832 | return vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return; |
| 5833 | } |
| 5834 | |
| 5835 | #endif |
| 5836 | #ifdef VK_KHR_swapchain |
| 5837 | VkResult VkEncoder::vkCreateSwapchainKHR( |
| 5838 | VkDevice device, |
| 5839 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
| 5840 | const VkAllocationCallbacks* pAllocator, |
| 5841 | VkSwapchainKHR* pSwapchain) |
| 5842 | { |
| 5843 | auto stream = mImpl->stream(); |
| 5844 | auto countingStream = mImpl->countingStream(); |
| 5845 | countingStream->rewind(); |
| 5846 | { |
| 5847 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5848 | marshal_VkSwapchainCreateInfoKHR(countingStream, (const VkSwapchainCreateInfoKHR*)(pCreateInfo)); |
| 5849 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5850 | if (pAllocator) |
| 5851 | { |
| 5852 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5853 | } |
| 5854 | countingStream->write((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5855 | } |
| 5856 | uint32_t packetSize_vkCreateSwapchainKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5857 | countingStream->rewind(); |
| 5858 | uint32_t opcode_vkCreateSwapchainKHR = OP_vkCreateSwapchainKHR; |
| 5859 | stream->write(&opcode_vkCreateSwapchainKHR, sizeof(uint32_t)); |
| 5860 | stream->write(&packetSize_vkCreateSwapchainKHR, sizeof(uint32_t)); |
| 5861 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5862 | marshal_VkSwapchainCreateInfoKHR(stream, (const VkSwapchainCreateInfoKHR*)(pCreateInfo)); |
| 5863 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5864 | if (pAllocator) |
| 5865 | { |
| 5866 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5867 | } |
| 5868 | stream->write((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5869 | stream->read((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5870 | VkResult vkCreateSwapchainKHR_VkResult_return = (VkResult)0; |
| 5871 | stream->read(&vkCreateSwapchainKHR_VkResult_return, sizeof(VkResult)); |
| 5872 | return vkCreateSwapchainKHR_VkResult_return; |
| 5873 | } |
| 5874 | |
| 5875 | void VkEncoder::vkDestroySwapchainKHR( |
| 5876 | VkDevice device, |
| 5877 | VkSwapchainKHR swapchain, |
| 5878 | const VkAllocationCallbacks* pAllocator) |
| 5879 | { |
| 5880 | auto stream = mImpl->stream(); |
| 5881 | auto countingStream = mImpl->countingStream(); |
| 5882 | countingStream->rewind(); |
| 5883 | { |
| 5884 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5885 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5886 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5887 | if (pAllocator) |
| 5888 | { |
| 5889 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5890 | } |
| 5891 | } |
| 5892 | uint32_t packetSize_vkDestroySwapchainKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5893 | countingStream->rewind(); |
| 5894 | uint32_t opcode_vkDestroySwapchainKHR = OP_vkDestroySwapchainKHR; |
| 5895 | stream->write(&opcode_vkDestroySwapchainKHR, sizeof(uint32_t)); |
| 5896 | stream->write(&packetSize_vkDestroySwapchainKHR, sizeof(uint32_t)); |
| 5897 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5898 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5899 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5900 | if (pAllocator) |
| 5901 | { |
| 5902 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5903 | } |
| 5904 | } |
| 5905 | |
| 5906 | VkResult VkEncoder::vkGetSwapchainImagesKHR( |
| 5907 | VkDevice device, |
| 5908 | VkSwapchainKHR swapchain, |
| 5909 | uint32_t* pSwapchainImageCount, |
| 5910 | VkImage* pSwapchainImages) |
| 5911 | { |
| 5912 | auto stream = mImpl->stream(); |
| 5913 | auto countingStream = mImpl->countingStream(); |
| 5914 | countingStream->rewind(); |
| 5915 | { |
| 5916 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5917 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5918 | countingStream->write((uint32_t**)&pSwapchainImageCount, sizeof(uint32_t*)); |
| 5919 | if (pSwapchainImageCount) |
| 5920 | { |
| 5921 | countingStream->write((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5922 | } |
| 5923 | countingStream->write((VkImage**)&pSwapchainImages, sizeof(VkImage*)); |
| 5924 | if (pSwapchainImages) |
| 5925 | { |
| 5926 | countingStream->write((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5927 | } |
| 5928 | } |
| 5929 | uint32_t packetSize_vkGetSwapchainImagesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5930 | countingStream->rewind(); |
| 5931 | uint32_t opcode_vkGetSwapchainImagesKHR = OP_vkGetSwapchainImagesKHR; |
| 5932 | stream->write(&opcode_vkGetSwapchainImagesKHR, sizeof(uint32_t)); |
| 5933 | stream->write(&packetSize_vkGetSwapchainImagesKHR, sizeof(uint32_t)); |
| 5934 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5935 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5936 | stream->write((uint32_t**)&pSwapchainImageCount, sizeof(uint32_t*)); |
| 5937 | if (pSwapchainImageCount) |
| 5938 | { |
| 5939 | stream->write((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5940 | } |
| 5941 | stream->write((VkImage**)&pSwapchainImages, sizeof(VkImage*)); |
| 5942 | if (pSwapchainImages) |
| 5943 | { |
| 5944 | stream->write((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5945 | } |
| 5946 | uint32_t* check_pSwapchainImageCount; |
| 5947 | stream->read((uint32_t**)&check_pSwapchainImageCount, sizeof(uint32_t*)); |
| 5948 | if (pSwapchainImageCount) |
| 5949 | { |
| 5950 | if (!(check_pSwapchainImageCount)) |
| 5951 | { |
| 5952 | fprintf(stderr, "fatal: pSwapchainImageCount inconsistent between guest and host\n"); |
| 5953 | } |
| 5954 | stream->read((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5955 | } |
| 5956 | VkImage* check_pSwapchainImages; |
| 5957 | stream->read((VkImage**)&check_pSwapchainImages, sizeof(VkImage*)); |
| 5958 | if (pSwapchainImages) |
| 5959 | { |
| 5960 | if (!(check_pSwapchainImages)) |
| 5961 | { |
| 5962 | fprintf(stderr, "fatal: pSwapchainImages inconsistent between guest and host\n"); |
| 5963 | } |
| 5964 | stream->read((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5965 | } |
| 5966 | VkResult vkGetSwapchainImagesKHR_VkResult_return = (VkResult)0; |
| 5967 | stream->read(&vkGetSwapchainImagesKHR_VkResult_return, sizeof(VkResult)); |
| 5968 | return vkGetSwapchainImagesKHR_VkResult_return; |
| 5969 | } |
| 5970 | |
| 5971 | VkResult VkEncoder::vkAcquireNextImageKHR( |
| 5972 | VkDevice device, |
| 5973 | VkSwapchainKHR swapchain, |
| 5974 | uint64_t timeout, |
| 5975 | VkSemaphore semaphore, |
| 5976 | VkFence fence, |
| 5977 | uint32_t* pImageIndex) |
| 5978 | { |
| 5979 | auto stream = mImpl->stream(); |
| 5980 | auto countingStream = mImpl->countingStream(); |
| 5981 | countingStream->rewind(); |
| 5982 | { |
| 5983 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5984 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5985 | countingStream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 5986 | countingStream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 5987 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 5988 | countingStream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 5989 | } |
| 5990 | uint32_t packetSize_vkAcquireNextImageKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5991 | countingStream->rewind(); |
| 5992 | uint32_t opcode_vkAcquireNextImageKHR = OP_vkAcquireNextImageKHR; |
| 5993 | stream->write(&opcode_vkAcquireNextImageKHR, sizeof(uint32_t)); |
| 5994 | stream->write(&packetSize_vkAcquireNextImageKHR, sizeof(uint32_t)); |
| 5995 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5996 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5997 | stream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 5998 | stream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 5999 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 6000 | stream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6001 | stream->read((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6002 | VkResult vkAcquireNextImageKHR_VkResult_return = (VkResult)0; |
| 6003 | stream->read(&vkAcquireNextImageKHR_VkResult_return, sizeof(VkResult)); |
| 6004 | return vkAcquireNextImageKHR_VkResult_return; |
| 6005 | } |
| 6006 | |
| 6007 | VkResult VkEncoder::vkQueuePresentKHR( |
| 6008 | VkQueue queue, |
| 6009 | const VkPresentInfoKHR* pPresentInfo) |
| 6010 | { |
| 6011 | auto stream = mImpl->stream(); |
| 6012 | auto countingStream = mImpl->countingStream(); |
| 6013 | countingStream->rewind(); |
| 6014 | { |
| 6015 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 6016 | marshal_VkPresentInfoKHR(countingStream, (const VkPresentInfoKHR*)(pPresentInfo)); |
| 6017 | } |
| 6018 | uint32_t packetSize_vkQueuePresentKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6019 | countingStream->rewind(); |
| 6020 | uint32_t opcode_vkQueuePresentKHR = OP_vkQueuePresentKHR; |
| 6021 | stream->write(&opcode_vkQueuePresentKHR, sizeof(uint32_t)); |
| 6022 | stream->write(&packetSize_vkQueuePresentKHR, sizeof(uint32_t)); |
| 6023 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 6024 | marshal_VkPresentInfoKHR(stream, (const VkPresentInfoKHR*)(pPresentInfo)); |
| 6025 | VkResult vkQueuePresentKHR_VkResult_return = (VkResult)0; |
| 6026 | stream->read(&vkQueuePresentKHR_VkResult_return, sizeof(VkResult)); |
| 6027 | return vkQueuePresentKHR_VkResult_return; |
| 6028 | } |
| 6029 | |
| 6030 | VkResult VkEncoder::vkGetDeviceGroupPresentCapabilitiesKHR( |
| 6031 | VkDevice device, |
| 6032 | VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) |
| 6033 | { |
| 6034 | auto stream = mImpl->stream(); |
| 6035 | auto countingStream = mImpl->countingStream(); |
| 6036 | countingStream->rewind(); |
| 6037 | { |
| 6038 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6039 | marshal_VkDeviceGroupPresentCapabilitiesKHR(countingStream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6040 | } |
| 6041 | uint32_t packetSize_vkGetDeviceGroupPresentCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6042 | countingStream->rewind(); |
| 6043 | uint32_t opcode_vkGetDeviceGroupPresentCapabilitiesKHR = OP_vkGetDeviceGroupPresentCapabilitiesKHR; |
| 6044 | stream->write(&opcode_vkGetDeviceGroupPresentCapabilitiesKHR, sizeof(uint32_t)); |
| 6045 | stream->write(&packetSize_vkGetDeviceGroupPresentCapabilitiesKHR, sizeof(uint32_t)); |
| 6046 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6047 | marshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6048 | unmarshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6049 | VkResult vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 6050 | stream->read(&vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 6051 | return vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return; |
| 6052 | } |
| 6053 | |
| 6054 | VkResult VkEncoder::vkGetDeviceGroupSurfacePresentModesKHR( |
| 6055 | VkDevice device, |
| 6056 | VkSurfaceKHR surface, |
| 6057 | VkDeviceGroupPresentModeFlagsKHR* pModes) |
| 6058 | { |
| 6059 | auto stream = mImpl->stream(); |
| 6060 | auto countingStream = mImpl->countingStream(); |
| 6061 | countingStream->rewind(); |
| 6062 | { |
| 6063 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6064 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6065 | countingStream->write((VkDeviceGroupPresentModeFlagsKHR**)&pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6066 | if (pModes) |
| 6067 | { |
| 6068 | countingStream->write((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6069 | } |
| 6070 | } |
| 6071 | uint32_t packetSize_vkGetDeviceGroupSurfacePresentModesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6072 | countingStream->rewind(); |
| 6073 | uint32_t opcode_vkGetDeviceGroupSurfacePresentModesKHR = OP_vkGetDeviceGroupSurfacePresentModesKHR; |
| 6074 | stream->write(&opcode_vkGetDeviceGroupSurfacePresentModesKHR, sizeof(uint32_t)); |
| 6075 | stream->write(&packetSize_vkGetDeviceGroupSurfacePresentModesKHR, sizeof(uint32_t)); |
| 6076 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6077 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6078 | stream->write((VkDeviceGroupPresentModeFlagsKHR**)&pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6079 | if (pModes) |
| 6080 | { |
| 6081 | stream->write((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6082 | } |
| 6083 | VkDeviceGroupPresentModeFlagsKHR* check_pModes; |
| 6084 | stream->read((VkDeviceGroupPresentModeFlagsKHR**)&check_pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6085 | if (pModes) |
| 6086 | { |
| 6087 | if (!(check_pModes)) |
| 6088 | { |
| 6089 | fprintf(stderr, "fatal: pModes inconsistent between guest and host\n"); |
| 6090 | } |
| 6091 | stream->read((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6092 | } |
| 6093 | VkResult vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return = (VkResult)0; |
| 6094 | stream->read(&vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return, sizeof(VkResult)); |
| 6095 | return vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return; |
| 6096 | } |
| 6097 | |
| 6098 | VkResult VkEncoder::vkGetPhysicalDevicePresentRectanglesKHR( |
| 6099 | VkPhysicalDevice physicalDevice, |
| 6100 | VkSurfaceKHR surface, |
| 6101 | uint32_t* pRectCount, |
| 6102 | VkRect2D* pRects) |
| 6103 | { |
| 6104 | auto stream = mImpl->stream(); |
| 6105 | auto countingStream = mImpl->countingStream(); |
| 6106 | countingStream->rewind(); |
| 6107 | { |
| 6108 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6109 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6110 | countingStream->write((uint32_t**)&pRectCount, sizeof(uint32_t*)); |
| 6111 | if (pRectCount) |
| 6112 | { |
| 6113 | countingStream->write((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6114 | } |
| 6115 | countingStream->write((VkRect2D**)&pRects, sizeof(VkRect2D*)); |
| 6116 | if (pRects) |
| 6117 | { |
| 6118 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6119 | { |
| 6120 | marshal_VkRect2D(countingStream, (VkRect2D*)(pRects + i)); |
| 6121 | } |
| 6122 | } |
| 6123 | } |
| 6124 | uint32_t packetSize_vkGetPhysicalDevicePresentRectanglesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6125 | countingStream->rewind(); |
| 6126 | uint32_t opcode_vkGetPhysicalDevicePresentRectanglesKHR = OP_vkGetPhysicalDevicePresentRectanglesKHR; |
| 6127 | stream->write(&opcode_vkGetPhysicalDevicePresentRectanglesKHR, sizeof(uint32_t)); |
| 6128 | stream->write(&packetSize_vkGetPhysicalDevicePresentRectanglesKHR, sizeof(uint32_t)); |
| 6129 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6130 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6131 | stream->write((uint32_t**)&pRectCount, sizeof(uint32_t*)); |
| 6132 | if (pRectCount) |
| 6133 | { |
| 6134 | stream->write((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6135 | } |
| 6136 | stream->write((VkRect2D**)&pRects, sizeof(VkRect2D*)); |
| 6137 | if (pRects) |
| 6138 | { |
| 6139 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6140 | { |
| 6141 | marshal_VkRect2D(stream, (VkRect2D*)(pRects + i)); |
| 6142 | } |
| 6143 | } |
| 6144 | uint32_t* check_pRectCount; |
| 6145 | stream->read((uint32_t**)&check_pRectCount, sizeof(uint32_t*)); |
| 6146 | if (pRectCount) |
| 6147 | { |
| 6148 | if (!(check_pRectCount)) |
| 6149 | { |
| 6150 | fprintf(stderr, "fatal: pRectCount inconsistent between guest and host\n"); |
| 6151 | } |
| 6152 | stream->read((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6153 | } |
| 6154 | VkRect2D* check_pRects; |
| 6155 | stream->read((VkRect2D**)&check_pRects, sizeof(VkRect2D*)); |
| 6156 | if (pRects) |
| 6157 | { |
| 6158 | if (!(check_pRects)) |
| 6159 | { |
| 6160 | fprintf(stderr, "fatal: pRects inconsistent between guest and host\n"); |
| 6161 | } |
| 6162 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6163 | { |
| 6164 | unmarshal_VkRect2D(stream, (VkRect2D*)(pRects + i)); |
| 6165 | } |
| 6166 | } |
| 6167 | VkResult vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return = (VkResult)0; |
| 6168 | stream->read(&vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return, sizeof(VkResult)); |
| 6169 | return vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return; |
| 6170 | } |
| 6171 | |
| 6172 | VkResult VkEncoder::vkAcquireNextImage2KHR( |
| 6173 | VkDevice device, |
| 6174 | const VkAcquireNextImageInfoKHR* pAcquireInfo, |
| 6175 | uint32_t* pImageIndex) |
| 6176 | { |
| 6177 | auto stream = mImpl->stream(); |
| 6178 | auto countingStream = mImpl->countingStream(); |
| 6179 | countingStream->rewind(); |
| 6180 | { |
| 6181 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6182 | marshal_VkAcquireNextImageInfoKHR(countingStream, (const VkAcquireNextImageInfoKHR*)(pAcquireInfo)); |
| 6183 | countingStream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6184 | } |
| 6185 | uint32_t packetSize_vkAcquireNextImage2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6186 | countingStream->rewind(); |
| 6187 | uint32_t opcode_vkAcquireNextImage2KHR = OP_vkAcquireNextImage2KHR; |
| 6188 | stream->write(&opcode_vkAcquireNextImage2KHR, sizeof(uint32_t)); |
| 6189 | stream->write(&packetSize_vkAcquireNextImage2KHR, sizeof(uint32_t)); |
| 6190 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6191 | marshal_VkAcquireNextImageInfoKHR(stream, (const VkAcquireNextImageInfoKHR*)(pAcquireInfo)); |
| 6192 | stream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6193 | stream->read((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6194 | VkResult vkAcquireNextImage2KHR_VkResult_return = (VkResult)0; |
| 6195 | stream->read(&vkAcquireNextImage2KHR_VkResult_return, sizeof(VkResult)); |
| 6196 | return vkAcquireNextImage2KHR_VkResult_return; |
| 6197 | } |
| 6198 | |
| 6199 | #endif |
| 6200 | #ifdef VK_KHR_display |
| 6201 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 6202 | VkPhysicalDevice physicalDevice, |
| 6203 | uint32_t* pPropertyCount, |
| 6204 | VkDisplayPropertiesKHR* pProperties) |
| 6205 | { |
| 6206 | auto stream = mImpl->stream(); |
| 6207 | auto countingStream = mImpl->countingStream(); |
| 6208 | countingStream->rewind(); |
| 6209 | { |
| 6210 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6211 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6212 | if (pPropertyCount) |
| 6213 | { |
| 6214 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6215 | } |
| 6216 | countingStream->write((VkDisplayPropertiesKHR**)&pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6217 | if (pProperties) |
| 6218 | { |
| 6219 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6220 | { |
| 6221 | marshal_VkDisplayPropertiesKHR(countingStream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6222 | } |
| 6223 | } |
| 6224 | } |
| 6225 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6226 | countingStream->rewind(); |
| 6227 | uint32_t opcode_vkGetPhysicalDeviceDisplayPropertiesKHR = OP_vkGetPhysicalDeviceDisplayPropertiesKHR; |
| 6228 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPropertiesKHR, sizeof(uint32_t)); |
| 6229 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPropertiesKHR, sizeof(uint32_t)); |
| 6230 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6231 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6232 | if (pPropertyCount) |
| 6233 | { |
| 6234 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6235 | } |
| 6236 | stream->write((VkDisplayPropertiesKHR**)&pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6237 | if (pProperties) |
| 6238 | { |
| 6239 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6240 | { |
| 6241 | marshal_VkDisplayPropertiesKHR(stream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6242 | } |
| 6243 | } |
| 6244 | uint32_t* check_pPropertyCount; |
| 6245 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6246 | if (pPropertyCount) |
| 6247 | { |
| 6248 | if (!(check_pPropertyCount)) |
| 6249 | { |
| 6250 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6251 | } |
| 6252 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6253 | } |
| 6254 | VkDisplayPropertiesKHR* check_pProperties; |
| 6255 | stream->read((VkDisplayPropertiesKHR**)&check_pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6256 | if (pProperties) |
| 6257 | { |
| 6258 | if (!(check_pProperties)) |
| 6259 | { |
| 6260 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6261 | } |
| 6262 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6263 | { |
| 6264 | unmarshal_VkDisplayPropertiesKHR(stream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6265 | } |
| 6266 | } |
| 6267 | VkResult vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return = (VkResult)0; |
| 6268 | stream->read(&vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6269 | return vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return; |
| 6270 | } |
| 6271 | |
| 6272 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 6273 | VkPhysicalDevice physicalDevice, |
| 6274 | uint32_t* pPropertyCount, |
| 6275 | VkDisplayPlanePropertiesKHR* pProperties) |
| 6276 | { |
| 6277 | auto stream = mImpl->stream(); |
| 6278 | auto countingStream = mImpl->countingStream(); |
| 6279 | countingStream->rewind(); |
| 6280 | { |
| 6281 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6282 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6283 | if (pPropertyCount) |
| 6284 | { |
| 6285 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6286 | } |
| 6287 | countingStream->write((VkDisplayPlanePropertiesKHR**)&pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6288 | if (pProperties) |
| 6289 | { |
| 6290 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6291 | { |
| 6292 | marshal_VkDisplayPlanePropertiesKHR(countingStream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6293 | } |
| 6294 | } |
| 6295 | } |
| 6296 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6297 | countingStream->rewind(); |
| 6298 | uint32_t opcode_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = OP_vkGetPhysicalDeviceDisplayPlanePropertiesKHR; |
| 6299 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, sizeof(uint32_t)); |
| 6300 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, sizeof(uint32_t)); |
| 6301 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6302 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6303 | if (pPropertyCount) |
| 6304 | { |
| 6305 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6306 | } |
| 6307 | stream->write((VkDisplayPlanePropertiesKHR**)&pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6308 | if (pProperties) |
| 6309 | { |
| 6310 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6311 | { |
| 6312 | marshal_VkDisplayPlanePropertiesKHR(stream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6313 | } |
| 6314 | } |
| 6315 | uint32_t* check_pPropertyCount; |
| 6316 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6317 | if (pPropertyCount) |
| 6318 | { |
| 6319 | if (!(check_pPropertyCount)) |
| 6320 | { |
| 6321 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6322 | } |
| 6323 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6324 | } |
| 6325 | VkDisplayPlanePropertiesKHR* check_pProperties; |
| 6326 | stream->read((VkDisplayPlanePropertiesKHR**)&check_pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6327 | if (pProperties) |
| 6328 | { |
| 6329 | if (!(check_pProperties)) |
| 6330 | { |
| 6331 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6332 | } |
| 6333 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6334 | { |
| 6335 | unmarshal_VkDisplayPlanePropertiesKHR(stream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6336 | } |
| 6337 | } |
| 6338 | VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return = (VkResult)0; |
| 6339 | stream->read(&vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6340 | return vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return; |
| 6341 | } |
| 6342 | |
| 6343 | VkResult VkEncoder::vkGetDisplayPlaneSupportedDisplaysKHR( |
| 6344 | VkPhysicalDevice physicalDevice, |
| 6345 | uint32_t planeIndex, |
| 6346 | uint32_t* pDisplayCount, |
| 6347 | VkDisplayKHR* pDisplays) |
| 6348 | { |
| 6349 | auto stream = mImpl->stream(); |
| 6350 | auto countingStream = mImpl->countingStream(); |
| 6351 | countingStream->rewind(); |
| 6352 | { |
| 6353 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6354 | countingStream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6355 | countingStream->write((uint32_t**)&pDisplayCount, sizeof(uint32_t*)); |
| 6356 | if (pDisplayCount) |
| 6357 | { |
| 6358 | countingStream->write((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6359 | } |
| 6360 | countingStream->write((VkDisplayKHR**)&pDisplays, sizeof(VkDisplayKHR*)); |
| 6361 | if (pDisplays) |
| 6362 | { |
| 6363 | countingStream->write((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6364 | } |
| 6365 | } |
| 6366 | uint32_t packetSize_vkGetDisplayPlaneSupportedDisplaysKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6367 | countingStream->rewind(); |
| 6368 | uint32_t opcode_vkGetDisplayPlaneSupportedDisplaysKHR = OP_vkGetDisplayPlaneSupportedDisplaysKHR; |
| 6369 | stream->write(&opcode_vkGetDisplayPlaneSupportedDisplaysKHR, sizeof(uint32_t)); |
| 6370 | stream->write(&packetSize_vkGetDisplayPlaneSupportedDisplaysKHR, sizeof(uint32_t)); |
| 6371 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6372 | stream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6373 | stream->write((uint32_t**)&pDisplayCount, sizeof(uint32_t*)); |
| 6374 | if (pDisplayCount) |
| 6375 | { |
| 6376 | stream->write((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6377 | } |
| 6378 | stream->write((VkDisplayKHR**)&pDisplays, sizeof(VkDisplayKHR*)); |
| 6379 | if (pDisplays) |
| 6380 | { |
| 6381 | stream->write((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6382 | } |
| 6383 | uint32_t* check_pDisplayCount; |
| 6384 | stream->read((uint32_t**)&check_pDisplayCount, sizeof(uint32_t*)); |
| 6385 | if (pDisplayCount) |
| 6386 | { |
| 6387 | if (!(check_pDisplayCount)) |
| 6388 | { |
| 6389 | fprintf(stderr, "fatal: pDisplayCount inconsistent between guest and host\n"); |
| 6390 | } |
| 6391 | stream->read((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6392 | } |
| 6393 | VkDisplayKHR* check_pDisplays; |
| 6394 | stream->read((VkDisplayKHR**)&check_pDisplays, sizeof(VkDisplayKHR*)); |
| 6395 | if (pDisplays) |
| 6396 | { |
| 6397 | if (!(check_pDisplays)) |
| 6398 | { |
| 6399 | fprintf(stderr, "fatal: pDisplays inconsistent between guest and host\n"); |
| 6400 | } |
| 6401 | stream->read((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6402 | } |
| 6403 | VkResult vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return = (VkResult)0; |
| 6404 | stream->read(&vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return, sizeof(VkResult)); |
| 6405 | return vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return; |
| 6406 | } |
| 6407 | |
| 6408 | VkResult VkEncoder::vkGetDisplayModePropertiesKHR( |
| 6409 | VkPhysicalDevice physicalDevice, |
| 6410 | VkDisplayKHR display, |
| 6411 | uint32_t* pPropertyCount, |
| 6412 | VkDisplayModePropertiesKHR* pProperties) |
| 6413 | { |
| 6414 | auto stream = mImpl->stream(); |
| 6415 | auto countingStream = mImpl->countingStream(); |
| 6416 | countingStream->rewind(); |
| 6417 | { |
| 6418 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6419 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6420 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6421 | if (pPropertyCount) |
| 6422 | { |
| 6423 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6424 | } |
| 6425 | countingStream->write((VkDisplayModePropertiesKHR**)&pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6426 | if (pProperties) |
| 6427 | { |
| 6428 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6429 | { |
| 6430 | marshal_VkDisplayModePropertiesKHR(countingStream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6431 | } |
| 6432 | } |
| 6433 | } |
| 6434 | uint32_t packetSize_vkGetDisplayModePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6435 | countingStream->rewind(); |
| 6436 | uint32_t opcode_vkGetDisplayModePropertiesKHR = OP_vkGetDisplayModePropertiesKHR; |
| 6437 | stream->write(&opcode_vkGetDisplayModePropertiesKHR, sizeof(uint32_t)); |
| 6438 | stream->write(&packetSize_vkGetDisplayModePropertiesKHR, sizeof(uint32_t)); |
| 6439 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6440 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6441 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6442 | if (pPropertyCount) |
| 6443 | { |
| 6444 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6445 | } |
| 6446 | stream->write((VkDisplayModePropertiesKHR**)&pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6447 | if (pProperties) |
| 6448 | { |
| 6449 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6450 | { |
| 6451 | marshal_VkDisplayModePropertiesKHR(stream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6452 | } |
| 6453 | } |
| 6454 | uint32_t* check_pPropertyCount; |
| 6455 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6456 | if (pPropertyCount) |
| 6457 | { |
| 6458 | if (!(check_pPropertyCount)) |
| 6459 | { |
| 6460 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6461 | } |
| 6462 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6463 | } |
| 6464 | VkDisplayModePropertiesKHR* check_pProperties; |
| 6465 | stream->read((VkDisplayModePropertiesKHR**)&check_pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6466 | if (pProperties) |
| 6467 | { |
| 6468 | if (!(check_pProperties)) |
| 6469 | { |
| 6470 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6471 | } |
| 6472 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6473 | { |
| 6474 | unmarshal_VkDisplayModePropertiesKHR(stream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6475 | } |
| 6476 | } |
| 6477 | VkResult vkGetDisplayModePropertiesKHR_VkResult_return = (VkResult)0; |
| 6478 | stream->read(&vkGetDisplayModePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6479 | return vkGetDisplayModePropertiesKHR_VkResult_return; |
| 6480 | } |
| 6481 | |
| 6482 | VkResult VkEncoder::vkCreateDisplayModeKHR( |
| 6483 | VkPhysicalDevice physicalDevice, |
| 6484 | VkDisplayKHR display, |
| 6485 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
| 6486 | const VkAllocationCallbacks* pAllocator, |
| 6487 | VkDisplayModeKHR* pMode) |
| 6488 | { |
| 6489 | auto stream = mImpl->stream(); |
| 6490 | auto countingStream = mImpl->countingStream(); |
| 6491 | countingStream->rewind(); |
| 6492 | { |
| 6493 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6494 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6495 | marshal_VkDisplayModeCreateInfoKHR(countingStream, (const VkDisplayModeCreateInfoKHR*)(pCreateInfo)); |
| 6496 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6497 | if (pAllocator) |
| 6498 | { |
| 6499 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6500 | } |
| 6501 | countingStream->write((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6502 | } |
| 6503 | uint32_t packetSize_vkCreateDisplayModeKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6504 | countingStream->rewind(); |
| 6505 | uint32_t opcode_vkCreateDisplayModeKHR = OP_vkCreateDisplayModeKHR; |
| 6506 | stream->write(&opcode_vkCreateDisplayModeKHR, sizeof(uint32_t)); |
| 6507 | stream->write(&packetSize_vkCreateDisplayModeKHR, sizeof(uint32_t)); |
| 6508 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6509 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6510 | marshal_VkDisplayModeCreateInfoKHR(stream, (const VkDisplayModeCreateInfoKHR*)(pCreateInfo)); |
| 6511 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6512 | if (pAllocator) |
| 6513 | { |
| 6514 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6515 | } |
| 6516 | stream->write((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6517 | stream->read((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6518 | VkResult vkCreateDisplayModeKHR_VkResult_return = (VkResult)0; |
| 6519 | stream->read(&vkCreateDisplayModeKHR_VkResult_return, sizeof(VkResult)); |
| 6520 | return vkCreateDisplayModeKHR_VkResult_return; |
| 6521 | } |
| 6522 | |
| 6523 | VkResult VkEncoder::vkGetDisplayPlaneCapabilitiesKHR( |
| 6524 | VkPhysicalDevice physicalDevice, |
| 6525 | VkDisplayModeKHR mode, |
| 6526 | uint32_t planeIndex, |
| 6527 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) |
| 6528 | { |
| 6529 | auto stream = mImpl->stream(); |
| 6530 | auto countingStream = mImpl->countingStream(); |
| 6531 | countingStream->rewind(); |
| 6532 | { |
| 6533 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6534 | countingStream->write((VkDisplayModeKHR*)&mode, sizeof(VkDisplayModeKHR)); |
| 6535 | countingStream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6536 | marshal_VkDisplayPlaneCapabilitiesKHR(countingStream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6537 | } |
| 6538 | uint32_t packetSize_vkGetDisplayPlaneCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6539 | countingStream->rewind(); |
| 6540 | uint32_t opcode_vkGetDisplayPlaneCapabilitiesKHR = OP_vkGetDisplayPlaneCapabilitiesKHR; |
| 6541 | stream->write(&opcode_vkGetDisplayPlaneCapabilitiesKHR, sizeof(uint32_t)); |
| 6542 | stream->write(&packetSize_vkGetDisplayPlaneCapabilitiesKHR, sizeof(uint32_t)); |
| 6543 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6544 | stream->write((VkDisplayModeKHR*)&mode, sizeof(VkDisplayModeKHR)); |
| 6545 | stream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6546 | marshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6547 | unmarshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6548 | VkResult vkGetDisplayPlaneCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 6549 | stream->read(&vkGetDisplayPlaneCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 6550 | return vkGetDisplayPlaneCapabilitiesKHR_VkResult_return; |
| 6551 | } |
| 6552 | |
| 6553 | VkResult VkEncoder::vkCreateDisplayPlaneSurfaceKHR( |
| 6554 | VkInstance instance, |
| 6555 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
| 6556 | const VkAllocationCallbacks* pAllocator, |
| 6557 | VkSurfaceKHR* pSurface) |
| 6558 | { |
| 6559 | auto stream = mImpl->stream(); |
| 6560 | auto countingStream = mImpl->countingStream(); |
| 6561 | countingStream->rewind(); |
| 6562 | { |
| 6563 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6564 | marshal_VkDisplaySurfaceCreateInfoKHR(countingStream, (const VkDisplaySurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6565 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6566 | if (pAllocator) |
| 6567 | { |
| 6568 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6569 | } |
| 6570 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6571 | } |
| 6572 | uint32_t packetSize_vkCreateDisplayPlaneSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6573 | countingStream->rewind(); |
| 6574 | uint32_t opcode_vkCreateDisplayPlaneSurfaceKHR = OP_vkCreateDisplayPlaneSurfaceKHR; |
| 6575 | stream->write(&opcode_vkCreateDisplayPlaneSurfaceKHR, sizeof(uint32_t)); |
| 6576 | stream->write(&packetSize_vkCreateDisplayPlaneSurfaceKHR, sizeof(uint32_t)); |
| 6577 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6578 | marshal_VkDisplaySurfaceCreateInfoKHR(stream, (const VkDisplaySurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6579 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6580 | if (pAllocator) |
| 6581 | { |
| 6582 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6583 | } |
| 6584 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6585 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6586 | VkResult vkCreateDisplayPlaneSurfaceKHR_VkResult_return = (VkResult)0; |
| 6587 | stream->read(&vkCreateDisplayPlaneSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6588 | return vkCreateDisplayPlaneSurfaceKHR_VkResult_return; |
| 6589 | } |
| 6590 | |
| 6591 | #endif |
| 6592 | #ifdef VK_KHR_display_swapchain |
| 6593 | VkResult VkEncoder::vkCreateSharedSwapchainsKHR( |
| 6594 | VkDevice device, |
| 6595 | uint32_t swapchainCount, |
| 6596 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 6597 | const VkAllocationCallbacks* pAllocator, |
| 6598 | VkSwapchainKHR* pSwapchains) |
| 6599 | { |
| 6600 | auto stream = mImpl->stream(); |
| 6601 | auto countingStream = mImpl->countingStream(); |
| 6602 | countingStream->rewind(); |
| 6603 | { |
| 6604 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6605 | countingStream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 6606 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 6607 | { |
| 6608 | marshal_VkSwapchainCreateInfoKHR(countingStream, (const VkSwapchainCreateInfoKHR*)(pCreateInfos + i)); |
| 6609 | } |
| 6610 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6611 | if (pAllocator) |
| 6612 | { |
| 6613 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6614 | } |
| 6615 | countingStream->write((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6616 | } |
| 6617 | uint32_t packetSize_vkCreateSharedSwapchainsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6618 | countingStream->rewind(); |
| 6619 | uint32_t opcode_vkCreateSharedSwapchainsKHR = OP_vkCreateSharedSwapchainsKHR; |
| 6620 | stream->write(&opcode_vkCreateSharedSwapchainsKHR, sizeof(uint32_t)); |
| 6621 | stream->write(&packetSize_vkCreateSharedSwapchainsKHR, sizeof(uint32_t)); |
| 6622 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6623 | stream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 6624 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 6625 | { |
| 6626 | marshal_VkSwapchainCreateInfoKHR(stream, (const VkSwapchainCreateInfoKHR*)(pCreateInfos + i)); |
| 6627 | } |
| 6628 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6629 | if (pAllocator) |
| 6630 | { |
| 6631 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6632 | } |
| 6633 | stream->write((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6634 | stream->read((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6635 | VkResult vkCreateSharedSwapchainsKHR_VkResult_return = (VkResult)0; |
| 6636 | stream->read(&vkCreateSharedSwapchainsKHR_VkResult_return, sizeof(VkResult)); |
| 6637 | return vkCreateSharedSwapchainsKHR_VkResult_return; |
| 6638 | } |
| 6639 | |
| 6640 | #endif |
| 6641 | #ifdef VK_KHR_xlib_surface |
| 6642 | VkResult VkEncoder::vkCreateXlibSurfaceKHR( |
| 6643 | VkInstance instance, |
| 6644 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
| 6645 | const VkAllocationCallbacks* pAllocator, |
| 6646 | VkSurfaceKHR* pSurface) |
| 6647 | { |
| 6648 | auto stream = mImpl->stream(); |
| 6649 | auto countingStream = mImpl->countingStream(); |
| 6650 | countingStream->rewind(); |
| 6651 | { |
| 6652 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6653 | marshal_VkXlibSurfaceCreateInfoKHR(countingStream, (const VkXlibSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6654 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6655 | if (pAllocator) |
| 6656 | { |
| 6657 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6658 | } |
| 6659 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6660 | } |
| 6661 | uint32_t packetSize_vkCreateXlibSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6662 | countingStream->rewind(); |
| 6663 | uint32_t opcode_vkCreateXlibSurfaceKHR = OP_vkCreateXlibSurfaceKHR; |
| 6664 | stream->write(&opcode_vkCreateXlibSurfaceKHR, sizeof(uint32_t)); |
| 6665 | stream->write(&packetSize_vkCreateXlibSurfaceKHR, sizeof(uint32_t)); |
| 6666 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6667 | marshal_VkXlibSurfaceCreateInfoKHR(stream, (const VkXlibSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6668 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6669 | if (pAllocator) |
| 6670 | { |
| 6671 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6672 | } |
| 6673 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6674 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6675 | VkResult vkCreateXlibSurfaceKHR_VkResult_return = (VkResult)0; |
| 6676 | stream->read(&vkCreateXlibSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6677 | return vkCreateXlibSurfaceKHR_VkResult_return; |
| 6678 | } |
| 6679 | |
| 6680 | VkBool32 VkEncoder::vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 6681 | VkPhysicalDevice physicalDevice, |
| 6682 | uint32_t queueFamilyIndex, |
| 6683 | Display* dpy, |
| 6684 | VisualID visualID) |
| 6685 | { |
| 6686 | auto stream = mImpl->stream(); |
| 6687 | auto countingStream = mImpl->countingStream(); |
| 6688 | countingStream->rewind(); |
| 6689 | { |
| 6690 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6691 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6692 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 6693 | countingStream->write((VisualID*)&visualID, sizeof(VisualID)); |
| 6694 | } |
| 6695 | uint32_t packetSize_vkGetPhysicalDeviceXlibPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6696 | countingStream->rewind(); |
| 6697 | uint32_t opcode_vkGetPhysicalDeviceXlibPresentationSupportKHR = OP_vkGetPhysicalDeviceXlibPresentationSupportKHR; |
| 6698 | stream->write(&opcode_vkGetPhysicalDeviceXlibPresentationSupportKHR, sizeof(uint32_t)); |
| 6699 | stream->write(&packetSize_vkGetPhysicalDeviceXlibPresentationSupportKHR, sizeof(uint32_t)); |
| 6700 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6701 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6702 | stream->write((Display*)dpy, sizeof(Display)); |
| 6703 | stream->write((VisualID*)&visualID, sizeof(VisualID)); |
| 6704 | stream->read((Display*)dpy, sizeof(Display)); |
| 6705 | VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6706 | stream->read(&vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6707 | return vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return; |
| 6708 | } |
| 6709 | |
| 6710 | #endif |
| 6711 | #ifdef VK_KHR_xcb_surface |
| 6712 | VkResult VkEncoder::vkCreateXcbSurfaceKHR( |
| 6713 | VkInstance instance, |
| 6714 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
| 6715 | const VkAllocationCallbacks* pAllocator, |
| 6716 | VkSurfaceKHR* pSurface) |
| 6717 | { |
| 6718 | auto stream = mImpl->stream(); |
| 6719 | auto countingStream = mImpl->countingStream(); |
| 6720 | countingStream->rewind(); |
| 6721 | { |
| 6722 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6723 | marshal_VkXcbSurfaceCreateInfoKHR(countingStream, (const VkXcbSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6724 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6725 | if (pAllocator) |
| 6726 | { |
| 6727 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6728 | } |
| 6729 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6730 | } |
| 6731 | uint32_t packetSize_vkCreateXcbSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6732 | countingStream->rewind(); |
| 6733 | uint32_t opcode_vkCreateXcbSurfaceKHR = OP_vkCreateXcbSurfaceKHR; |
| 6734 | stream->write(&opcode_vkCreateXcbSurfaceKHR, sizeof(uint32_t)); |
| 6735 | stream->write(&packetSize_vkCreateXcbSurfaceKHR, sizeof(uint32_t)); |
| 6736 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6737 | marshal_VkXcbSurfaceCreateInfoKHR(stream, (const VkXcbSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6738 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6739 | if (pAllocator) |
| 6740 | { |
| 6741 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6742 | } |
| 6743 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6744 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6745 | VkResult vkCreateXcbSurfaceKHR_VkResult_return = (VkResult)0; |
| 6746 | stream->read(&vkCreateXcbSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6747 | return vkCreateXcbSurfaceKHR_VkResult_return; |
| 6748 | } |
| 6749 | |
| 6750 | VkBool32 VkEncoder::vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 6751 | VkPhysicalDevice physicalDevice, |
| 6752 | uint32_t queueFamilyIndex, |
| 6753 | xcb_connection_t* connection, |
| 6754 | xcb_visualid_t visual_id) |
| 6755 | { |
| 6756 | auto stream = mImpl->stream(); |
| 6757 | auto countingStream = mImpl->countingStream(); |
| 6758 | countingStream->rewind(); |
| 6759 | { |
| 6760 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6761 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6762 | countingStream->write((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6763 | countingStream->write((xcb_visualid_t*)&visual_id, sizeof(xcb_visualid_t)); |
| 6764 | } |
| 6765 | uint32_t packetSize_vkGetPhysicalDeviceXcbPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6766 | countingStream->rewind(); |
| 6767 | uint32_t opcode_vkGetPhysicalDeviceXcbPresentationSupportKHR = OP_vkGetPhysicalDeviceXcbPresentationSupportKHR; |
| 6768 | stream->write(&opcode_vkGetPhysicalDeviceXcbPresentationSupportKHR, sizeof(uint32_t)); |
| 6769 | stream->write(&packetSize_vkGetPhysicalDeviceXcbPresentationSupportKHR, sizeof(uint32_t)); |
| 6770 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6771 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6772 | stream->write((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6773 | stream->write((xcb_visualid_t*)&visual_id, sizeof(xcb_visualid_t)); |
| 6774 | stream->read((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6775 | VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6776 | stream->read(&vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6777 | return vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return; |
| 6778 | } |
| 6779 | |
| 6780 | #endif |
| 6781 | #ifdef VK_KHR_wayland_surface |
| 6782 | VkResult VkEncoder::vkCreateWaylandSurfaceKHR( |
| 6783 | VkInstance instance, |
| 6784 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
| 6785 | const VkAllocationCallbacks* pAllocator, |
| 6786 | VkSurfaceKHR* pSurface) |
| 6787 | { |
| 6788 | auto stream = mImpl->stream(); |
| 6789 | auto countingStream = mImpl->countingStream(); |
| 6790 | countingStream->rewind(); |
| 6791 | { |
| 6792 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6793 | marshal_VkWaylandSurfaceCreateInfoKHR(countingStream, (const VkWaylandSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6794 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6795 | if (pAllocator) |
| 6796 | { |
| 6797 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6798 | } |
| 6799 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6800 | } |
| 6801 | uint32_t packetSize_vkCreateWaylandSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6802 | countingStream->rewind(); |
| 6803 | uint32_t opcode_vkCreateWaylandSurfaceKHR = OP_vkCreateWaylandSurfaceKHR; |
| 6804 | stream->write(&opcode_vkCreateWaylandSurfaceKHR, sizeof(uint32_t)); |
| 6805 | stream->write(&packetSize_vkCreateWaylandSurfaceKHR, sizeof(uint32_t)); |
| 6806 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6807 | marshal_VkWaylandSurfaceCreateInfoKHR(stream, (const VkWaylandSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6808 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6809 | if (pAllocator) |
| 6810 | { |
| 6811 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6812 | } |
| 6813 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6814 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6815 | VkResult vkCreateWaylandSurfaceKHR_VkResult_return = (VkResult)0; |
| 6816 | stream->read(&vkCreateWaylandSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6817 | return vkCreateWaylandSurfaceKHR_VkResult_return; |
| 6818 | } |
| 6819 | |
| 6820 | VkBool32 VkEncoder::vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 6821 | VkPhysicalDevice physicalDevice, |
| 6822 | uint32_t queueFamilyIndex, |
| 6823 | wl_display* display) |
| 6824 | { |
| 6825 | auto stream = mImpl->stream(); |
| 6826 | auto countingStream = mImpl->countingStream(); |
| 6827 | countingStream->rewind(); |
| 6828 | { |
| 6829 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6830 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6831 | countingStream->write((wl_display*)display, sizeof(wl_display)); |
| 6832 | } |
| 6833 | uint32_t packetSize_vkGetPhysicalDeviceWaylandPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6834 | countingStream->rewind(); |
| 6835 | uint32_t opcode_vkGetPhysicalDeviceWaylandPresentationSupportKHR = OP_vkGetPhysicalDeviceWaylandPresentationSupportKHR; |
| 6836 | stream->write(&opcode_vkGetPhysicalDeviceWaylandPresentationSupportKHR, sizeof(uint32_t)); |
| 6837 | stream->write(&packetSize_vkGetPhysicalDeviceWaylandPresentationSupportKHR, sizeof(uint32_t)); |
| 6838 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6839 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6840 | stream->write((wl_display*)display, sizeof(wl_display)); |
| 6841 | stream->read((wl_display*)display, sizeof(wl_display)); |
| 6842 | VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6843 | stream->read(&vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6844 | return vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return; |
| 6845 | } |
| 6846 | |
| 6847 | #endif |
| 6848 | #ifdef VK_KHR_mir_surface |
| 6849 | VkResult VkEncoder::vkCreateMirSurfaceKHR( |
| 6850 | VkInstance instance, |
| 6851 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
| 6852 | const VkAllocationCallbacks* pAllocator, |
| 6853 | VkSurfaceKHR* pSurface) |
| 6854 | { |
| 6855 | auto stream = mImpl->stream(); |
| 6856 | auto countingStream = mImpl->countingStream(); |
| 6857 | countingStream->rewind(); |
| 6858 | { |
| 6859 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6860 | marshal_VkMirSurfaceCreateInfoKHR(countingStream, (const VkMirSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6861 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6862 | if (pAllocator) |
| 6863 | { |
| 6864 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6865 | } |
| 6866 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6867 | } |
| 6868 | uint32_t packetSize_vkCreateMirSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6869 | countingStream->rewind(); |
| 6870 | uint32_t opcode_vkCreateMirSurfaceKHR = OP_vkCreateMirSurfaceKHR; |
| 6871 | stream->write(&opcode_vkCreateMirSurfaceKHR, sizeof(uint32_t)); |
| 6872 | stream->write(&packetSize_vkCreateMirSurfaceKHR, sizeof(uint32_t)); |
| 6873 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6874 | marshal_VkMirSurfaceCreateInfoKHR(stream, (const VkMirSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6875 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6876 | if (pAllocator) |
| 6877 | { |
| 6878 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6879 | } |
| 6880 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6881 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6882 | VkResult vkCreateMirSurfaceKHR_VkResult_return = (VkResult)0; |
| 6883 | stream->read(&vkCreateMirSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6884 | return vkCreateMirSurfaceKHR_VkResult_return; |
| 6885 | } |
| 6886 | |
| 6887 | VkBool32 VkEncoder::vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 6888 | VkPhysicalDevice physicalDevice, |
| 6889 | uint32_t queueFamilyIndex, |
| 6890 | MirConnection* connection) |
| 6891 | { |
| 6892 | auto stream = mImpl->stream(); |
| 6893 | auto countingStream = mImpl->countingStream(); |
| 6894 | countingStream->rewind(); |
| 6895 | { |
| 6896 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6897 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6898 | countingStream->write((MirConnection*)connection, sizeof(MirConnection)); |
| 6899 | } |
| 6900 | uint32_t packetSize_vkGetPhysicalDeviceMirPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6901 | countingStream->rewind(); |
| 6902 | uint32_t opcode_vkGetPhysicalDeviceMirPresentationSupportKHR = OP_vkGetPhysicalDeviceMirPresentationSupportKHR; |
| 6903 | stream->write(&opcode_vkGetPhysicalDeviceMirPresentationSupportKHR, sizeof(uint32_t)); |
| 6904 | stream->write(&packetSize_vkGetPhysicalDeviceMirPresentationSupportKHR, sizeof(uint32_t)); |
| 6905 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6906 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6907 | stream->write((MirConnection*)connection, sizeof(MirConnection)); |
| 6908 | stream->read((MirConnection*)connection, sizeof(MirConnection)); |
| 6909 | VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6910 | stream->read(&vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6911 | return vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return; |
| 6912 | } |
| 6913 | |
| 6914 | #endif |
| 6915 | #ifdef VK_KHR_android_surface |
| 6916 | VkResult VkEncoder::vkCreateAndroidSurfaceKHR( |
| 6917 | VkInstance instance, |
| 6918 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
| 6919 | const VkAllocationCallbacks* pAllocator, |
| 6920 | VkSurfaceKHR* pSurface) |
| 6921 | { |
| 6922 | auto stream = mImpl->stream(); |
| 6923 | auto countingStream = mImpl->countingStream(); |
| 6924 | countingStream->rewind(); |
| 6925 | { |
| 6926 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6927 | marshal_VkAndroidSurfaceCreateInfoKHR(countingStream, (const VkAndroidSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6928 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6929 | if (pAllocator) |
| 6930 | { |
| 6931 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6932 | } |
| 6933 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6934 | } |
| 6935 | uint32_t packetSize_vkCreateAndroidSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6936 | countingStream->rewind(); |
| 6937 | uint32_t opcode_vkCreateAndroidSurfaceKHR = OP_vkCreateAndroidSurfaceKHR; |
| 6938 | stream->write(&opcode_vkCreateAndroidSurfaceKHR, sizeof(uint32_t)); |
| 6939 | stream->write(&packetSize_vkCreateAndroidSurfaceKHR, sizeof(uint32_t)); |
| 6940 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6941 | marshal_VkAndroidSurfaceCreateInfoKHR(stream, (const VkAndroidSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6942 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6943 | if (pAllocator) |
| 6944 | { |
| 6945 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6946 | } |
| 6947 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6948 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6949 | VkResult vkCreateAndroidSurfaceKHR_VkResult_return = (VkResult)0; |
| 6950 | stream->read(&vkCreateAndroidSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6951 | return vkCreateAndroidSurfaceKHR_VkResult_return; |
| 6952 | } |
| 6953 | |
| 6954 | #endif |
| 6955 | #ifdef VK_KHR_win32_surface |
| 6956 | VkResult VkEncoder::vkCreateWin32SurfaceKHR( |
| 6957 | VkInstance instance, |
| 6958 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
| 6959 | const VkAllocationCallbacks* pAllocator, |
| 6960 | VkSurfaceKHR* pSurface) |
| 6961 | { |
| 6962 | auto stream = mImpl->stream(); |
| 6963 | auto countingStream = mImpl->countingStream(); |
| 6964 | countingStream->rewind(); |
| 6965 | { |
| 6966 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6967 | marshal_VkWin32SurfaceCreateInfoKHR(countingStream, (const VkWin32SurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6968 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6969 | if (pAllocator) |
| 6970 | { |
| 6971 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6972 | } |
| 6973 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6974 | } |
| 6975 | uint32_t packetSize_vkCreateWin32SurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6976 | countingStream->rewind(); |
| 6977 | uint32_t opcode_vkCreateWin32SurfaceKHR = OP_vkCreateWin32SurfaceKHR; |
| 6978 | stream->write(&opcode_vkCreateWin32SurfaceKHR, sizeof(uint32_t)); |
| 6979 | stream->write(&packetSize_vkCreateWin32SurfaceKHR, sizeof(uint32_t)); |
| 6980 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6981 | marshal_VkWin32SurfaceCreateInfoKHR(stream, (const VkWin32SurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6982 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6983 | if (pAllocator) |
| 6984 | { |
| 6985 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6986 | } |
| 6987 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6988 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6989 | VkResult vkCreateWin32SurfaceKHR_VkResult_return = (VkResult)0; |
| 6990 | stream->read(&vkCreateWin32SurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6991 | return vkCreateWin32SurfaceKHR_VkResult_return; |
| 6992 | } |
| 6993 | |
| 6994 | VkBool32 VkEncoder::vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 6995 | VkPhysicalDevice physicalDevice, |
| 6996 | uint32_t queueFamilyIndex) |
| 6997 | { |
| 6998 | auto stream = mImpl->stream(); |
| 6999 | auto countingStream = mImpl->countingStream(); |
| 7000 | countingStream->rewind(); |
| 7001 | { |
| 7002 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7003 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 7004 | } |
| 7005 | uint32_t packetSize_vkGetPhysicalDeviceWin32PresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7006 | countingStream->rewind(); |
| 7007 | uint32_t opcode_vkGetPhysicalDeviceWin32PresentationSupportKHR = OP_vkGetPhysicalDeviceWin32PresentationSupportKHR; |
| 7008 | stream->write(&opcode_vkGetPhysicalDeviceWin32PresentationSupportKHR, sizeof(uint32_t)); |
| 7009 | stream->write(&packetSize_vkGetPhysicalDeviceWin32PresentationSupportKHR, sizeof(uint32_t)); |
| 7010 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7011 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 7012 | VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 7013 | stream->read(&vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 7014 | return vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return; |
| 7015 | } |
| 7016 | |
| 7017 | #endif |
| 7018 | #ifdef VK_KHR_sampler_mirror_clamp_to_edge |
| 7019 | #endif |
| 7020 | #ifdef VK_KHR_multiview |
| 7021 | #endif |
| 7022 | #ifdef VK_KHR_get_physical_device_properties2 |
| 7023 | void VkEncoder::vkGetPhysicalDeviceFeatures2KHR( |
| 7024 | VkPhysicalDevice physicalDevice, |
| 7025 | VkPhysicalDeviceFeatures2* pFeatures) |
| 7026 | { |
| 7027 | auto stream = mImpl->stream(); |
| 7028 | auto countingStream = mImpl->countingStream(); |
| 7029 | countingStream->rewind(); |
| 7030 | { |
| 7031 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7032 | marshal_VkPhysicalDeviceFeatures2(countingStream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7033 | } |
| 7034 | uint32_t packetSize_vkGetPhysicalDeviceFeatures2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7035 | countingStream->rewind(); |
| 7036 | uint32_t opcode_vkGetPhysicalDeviceFeatures2KHR = OP_vkGetPhysicalDeviceFeatures2KHR; |
| 7037 | stream->write(&opcode_vkGetPhysicalDeviceFeatures2KHR, sizeof(uint32_t)); |
| 7038 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures2KHR, sizeof(uint32_t)); |
| 7039 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7040 | marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7041 | unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7042 | } |
| 7043 | |
| 7044 | void VkEncoder::vkGetPhysicalDeviceProperties2KHR( |
| 7045 | VkPhysicalDevice physicalDevice, |
| 7046 | VkPhysicalDeviceProperties2* pProperties) |
| 7047 | { |
| 7048 | auto stream = mImpl->stream(); |
| 7049 | auto countingStream = mImpl->countingStream(); |
| 7050 | countingStream->rewind(); |
| 7051 | { |
| 7052 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7053 | marshal_VkPhysicalDeviceProperties2(countingStream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7054 | } |
| 7055 | uint32_t packetSize_vkGetPhysicalDeviceProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7056 | countingStream->rewind(); |
| 7057 | uint32_t opcode_vkGetPhysicalDeviceProperties2KHR = OP_vkGetPhysicalDeviceProperties2KHR; |
| 7058 | stream->write(&opcode_vkGetPhysicalDeviceProperties2KHR, sizeof(uint32_t)); |
| 7059 | stream->write(&packetSize_vkGetPhysicalDeviceProperties2KHR, sizeof(uint32_t)); |
| 7060 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7061 | marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7062 | unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7063 | } |
| 7064 | |
| 7065 | void VkEncoder::vkGetPhysicalDeviceFormatProperties2KHR( |
| 7066 | VkPhysicalDevice physicalDevice, |
| 7067 | VkFormat format, |
| 7068 | VkFormatProperties2* pFormatProperties) |
| 7069 | { |
| 7070 | auto stream = mImpl->stream(); |
| 7071 | auto countingStream = mImpl->countingStream(); |
| 7072 | countingStream->rewind(); |
| 7073 | { |
| 7074 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7075 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 7076 | marshal_VkFormatProperties2(countingStream, (VkFormatProperties2*)(pFormatProperties)); |
| 7077 | } |
| 7078 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7079 | countingStream->rewind(); |
| 7080 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties2KHR = OP_vkGetPhysicalDeviceFormatProperties2KHR; |
| 7081 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties2KHR, sizeof(uint32_t)); |
| 7082 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties2KHR, sizeof(uint32_t)); |
| 7083 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7084 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 7085 | marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 7086 | unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 7087 | } |
| 7088 | |
| 7089 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 7090 | VkPhysicalDevice physicalDevice, |
| 7091 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 7092 | VkImageFormatProperties2* pImageFormatProperties) |
| 7093 | { |
| 7094 | auto stream = mImpl->stream(); |
| 7095 | auto countingStream = mImpl->countingStream(); |
| 7096 | countingStream->rewind(); |
| 7097 | { |
| 7098 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7099 | marshal_VkPhysicalDeviceImageFormatInfo2(countingStream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 7100 | marshal_VkImageFormatProperties2(countingStream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7101 | } |
| 7102 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7103 | countingStream->rewind(); |
| 7104 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties2KHR = OP_vkGetPhysicalDeviceImageFormatProperties2KHR; |
| 7105 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7106 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7107 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7108 | marshal_VkPhysicalDeviceImageFormatInfo2(stream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 7109 | marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7110 | unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7111 | VkResult vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return = (VkResult)0; |
| 7112 | stream->read(&vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 7113 | return vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return; |
| 7114 | } |
| 7115 | |
| 7116 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 7117 | VkPhysicalDevice physicalDevice, |
| 7118 | uint32_t* pQueueFamilyPropertyCount, |
| 7119 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 7120 | { |
| 7121 | auto stream = mImpl->stream(); |
| 7122 | auto countingStream = mImpl->countingStream(); |
| 7123 | countingStream->rewind(); |
| 7124 | { |
| 7125 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7126 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7127 | if (pQueueFamilyPropertyCount) |
| 7128 | { |
| 7129 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7130 | } |
| 7131 | countingStream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7132 | if (pQueueFamilyProperties) |
| 7133 | { |
| 7134 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7135 | { |
| 7136 | marshal_VkQueueFamilyProperties2(countingStream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7137 | } |
| 7138 | } |
| 7139 | } |
| 7140 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7141 | countingStream->rewind(); |
| 7142 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties2KHR = OP_vkGetPhysicalDeviceQueueFamilyProperties2KHR; |
| 7143 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties2KHR, sizeof(uint32_t)); |
| 7144 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties2KHR, sizeof(uint32_t)); |
| 7145 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7146 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7147 | if (pQueueFamilyPropertyCount) |
| 7148 | { |
| 7149 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7150 | } |
| 7151 | stream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7152 | if (pQueueFamilyProperties) |
| 7153 | { |
| 7154 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7155 | { |
| 7156 | marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7157 | } |
| 7158 | } |
| 7159 | uint32_t* check_pQueueFamilyPropertyCount; |
| 7160 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7161 | if (pQueueFamilyPropertyCount) |
| 7162 | { |
| 7163 | if (!(check_pQueueFamilyPropertyCount)) |
| 7164 | { |
| 7165 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 7166 | } |
| 7167 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7168 | } |
| 7169 | VkQueueFamilyProperties2* check_pQueueFamilyProperties; |
| 7170 | stream->read((VkQueueFamilyProperties2**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7171 | if (pQueueFamilyProperties) |
| 7172 | { |
| 7173 | if (!(check_pQueueFamilyProperties)) |
| 7174 | { |
| 7175 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 7176 | } |
| 7177 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7178 | { |
| 7179 | unmarshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7180 | } |
| 7181 | } |
| 7182 | } |
| 7183 | |
| 7184 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties2KHR( |
| 7185 | VkPhysicalDevice physicalDevice, |
| 7186 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 7187 | { |
| 7188 | auto stream = mImpl->stream(); |
| 7189 | auto countingStream = mImpl->countingStream(); |
| 7190 | countingStream->rewind(); |
| 7191 | { |
| 7192 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7193 | marshal_VkPhysicalDeviceMemoryProperties2(countingStream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7194 | } |
| 7195 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7196 | countingStream->rewind(); |
| 7197 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties2KHR = OP_vkGetPhysicalDeviceMemoryProperties2KHR; |
| 7198 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties2KHR, sizeof(uint32_t)); |
| 7199 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties2KHR, sizeof(uint32_t)); |
| 7200 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7201 | marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7202 | unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7203 | } |
| 7204 | |
| 7205 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 7206 | VkPhysicalDevice physicalDevice, |
| 7207 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 7208 | uint32_t* pPropertyCount, |
| 7209 | VkSparseImageFormatProperties2* pProperties) |
| 7210 | { |
| 7211 | auto stream = mImpl->stream(); |
| 7212 | auto countingStream = mImpl->countingStream(); |
| 7213 | countingStream->rewind(); |
| 7214 | { |
| 7215 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7216 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(countingStream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 7217 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 7218 | if (pPropertyCount) |
| 7219 | { |
| 7220 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7221 | } |
| 7222 | countingStream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7223 | if (pProperties) |
| 7224 | { |
| 7225 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7226 | { |
| 7227 | marshal_VkSparseImageFormatProperties2(countingStream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7228 | } |
| 7229 | } |
| 7230 | } |
| 7231 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7232 | countingStream->rewind(); |
| 7233 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = OP_vkGetPhysicalDeviceSparseImageFormatProperties2KHR; |
| 7234 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7235 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7236 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7237 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(stream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 7238 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 7239 | if (pPropertyCount) |
| 7240 | { |
| 7241 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7242 | } |
| 7243 | stream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7244 | if (pProperties) |
| 7245 | { |
| 7246 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7247 | { |
| 7248 | marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7249 | } |
| 7250 | } |
| 7251 | uint32_t* check_pPropertyCount; |
| 7252 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 7253 | if (pPropertyCount) |
| 7254 | { |
| 7255 | if (!(check_pPropertyCount)) |
| 7256 | { |
| 7257 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 7258 | } |
| 7259 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7260 | } |
| 7261 | VkSparseImageFormatProperties2* check_pProperties; |
| 7262 | stream->read((VkSparseImageFormatProperties2**)&check_pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7263 | if (pProperties) |
| 7264 | { |
| 7265 | if (!(check_pProperties)) |
| 7266 | { |
| 7267 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 7268 | } |
| 7269 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7270 | { |
| 7271 | unmarshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7272 | } |
| 7273 | } |
| 7274 | } |
| 7275 | |
| 7276 | #endif |
| 7277 | #ifdef VK_KHR_device_group |
| 7278 | void VkEncoder::vkGetDeviceGroupPeerMemoryFeaturesKHR( |
| 7279 | VkDevice device, |
| 7280 | uint32_t heapIndex, |
| 7281 | uint32_t localDeviceIndex, |
| 7282 | uint32_t remoteDeviceIndex, |
| 7283 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 7284 | { |
| 7285 | auto stream = mImpl->stream(); |
| 7286 | auto countingStream = mImpl->countingStream(); |
| 7287 | countingStream->rewind(); |
| 7288 | { |
| 7289 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7290 | countingStream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 7291 | countingStream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 7292 | countingStream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 7293 | countingStream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7294 | } |
| 7295 | uint32_t packetSize_vkGetDeviceGroupPeerMemoryFeaturesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7296 | countingStream->rewind(); |
| 7297 | uint32_t opcode_vkGetDeviceGroupPeerMemoryFeaturesKHR = OP_vkGetDeviceGroupPeerMemoryFeaturesKHR; |
| 7298 | stream->write(&opcode_vkGetDeviceGroupPeerMemoryFeaturesKHR, sizeof(uint32_t)); |
| 7299 | stream->write(&packetSize_vkGetDeviceGroupPeerMemoryFeaturesKHR, sizeof(uint32_t)); |
| 7300 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7301 | stream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 7302 | stream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 7303 | stream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 7304 | stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7305 | stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7306 | } |
| 7307 | |
| 7308 | void VkEncoder::vkCmdSetDeviceMaskKHR( |
| 7309 | VkCommandBuffer commandBuffer, |
| 7310 | uint32_t deviceMask) |
| 7311 | { |
| 7312 | auto stream = mImpl->stream(); |
| 7313 | auto countingStream = mImpl->countingStream(); |
| 7314 | countingStream->rewind(); |
| 7315 | { |
| 7316 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7317 | countingStream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 7318 | } |
| 7319 | uint32_t packetSize_vkCmdSetDeviceMaskKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7320 | countingStream->rewind(); |
| 7321 | uint32_t opcode_vkCmdSetDeviceMaskKHR = OP_vkCmdSetDeviceMaskKHR; |
| 7322 | stream->write(&opcode_vkCmdSetDeviceMaskKHR, sizeof(uint32_t)); |
| 7323 | stream->write(&packetSize_vkCmdSetDeviceMaskKHR, sizeof(uint32_t)); |
| 7324 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7325 | stream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 7326 | } |
| 7327 | |
| 7328 | void VkEncoder::vkCmdDispatchBaseKHR( |
| 7329 | VkCommandBuffer commandBuffer, |
| 7330 | uint32_t baseGroupX, |
| 7331 | uint32_t baseGroupY, |
| 7332 | uint32_t baseGroupZ, |
| 7333 | uint32_t groupCountX, |
| 7334 | uint32_t groupCountY, |
| 7335 | uint32_t groupCountZ) |
| 7336 | { |
| 7337 | auto stream = mImpl->stream(); |
| 7338 | auto countingStream = mImpl->countingStream(); |
| 7339 | countingStream->rewind(); |
| 7340 | { |
| 7341 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7342 | countingStream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 7343 | countingStream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 7344 | countingStream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 7345 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 7346 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 7347 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 7348 | } |
| 7349 | uint32_t packetSize_vkCmdDispatchBaseKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7350 | countingStream->rewind(); |
| 7351 | uint32_t opcode_vkCmdDispatchBaseKHR = OP_vkCmdDispatchBaseKHR; |
| 7352 | stream->write(&opcode_vkCmdDispatchBaseKHR, sizeof(uint32_t)); |
| 7353 | stream->write(&packetSize_vkCmdDispatchBaseKHR, sizeof(uint32_t)); |
| 7354 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7355 | stream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 7356 | stream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 7357 | stream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 7358 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 7359 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 7360 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 7361 | } |
| 7362 | |
| 7363 | #endif |
| 7364 | #ifdef VK_KHR_shader_draw_parameters |
| 7365 | #endif |
| 7366 | #ifdef VK_KHR_maintenance1 |
| 7367 | void VkEncoder::vkTrimCommandPoolKHR( |
| 7368 | VkDevice device, |
| 7369 | VkCommandPool commandPool, |
| 7370 | VkCommandPoolTrimFlags flags) |
| 7371 | { |
| 7372 | auto stream = mImpl->stream(); |
| 7373 | auto countingStream = mImpl->countingStream(); |
| 7374 | countingStream->rewind(); |
| 7375 | { |
| 7376 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7377 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 7378 | countingStream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 7379 | } |
| 7380 | uint32_t packetSize_vkTrimCommandPoolKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7381 | countingStream->rewind(); |
| 7382 | uint32_t opcode_vkTrimCommandPoolKHR = OP_vkTrimCommandPoolKHR; |
| 7383 | stream->write(&opcode_vkTrimCommandPoolKHR, sizeof(uint32_t)); |
| 7384 | stream->write(&packetSize_vkTrimCommandPoolKHR, sizeof(uint32_t)); |
| 7385 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7386 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 7387 | stream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 7388 | } |
| 7389 | |
| 7390 | #endif |
| 7391 | #ifdef VK_KHR_device_group_creation |
| 7392 | VkResult VkEncoder::vkEnumeratePhysicalDeviceGroupsKHR( |
| 7393 | VkInstance instance, |
| 7394 | uint32_t* pPhysicalDeviceGroupCount, |
| 7395 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 7396 | { |
| 7397 | auto stream = mImpl->stream(); |
| 7398 | auto countingStream = mImpl->countingStream(); |
| 7399 | countingStream->rewind(); |
| 7400 | { |
| 7401 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 7402 | countingStream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7403 | if (pPhysicalDeviceGroupCount) |
| 7404 | { |
| 7405 | countingStream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7406 | } |
| 7407 | countingStream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7408 | if (pPhysicalDeviceGroupProperties) |
| 7409 | { |
| 7410 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7411 | { |
| 7412 | marshal_VkPhysicalDeviceGroupProperties(countingStream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7413 | } |
| 7414 | } |
| 7415 | } |
| 7416 | uint32_t packetSize_vkEnumeratePhysicalDeviceGroupsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7417 | countingStream->rewind(); |
| 7418 | uint32_t opcode_vkEnumeratePhysicalDeviceGroupsKHR = OP_vkEnumeratePhysicalDeviceGroupsKHR; |
| 7419 | stream->write(&opcode_vkEnumeratePhysicalDeviceGroupsKHR, sizeof(uint32_t)); |
| 7420 | stream->write(&packetSize_vkEnumeratePhysicalDeviceGroupsKHR, sizeof(uint32_t)); |
| 7421 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 7422 | stream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7423 | if (pPhysicalDeviceGroupCount) |
| 7424 | { |
| 7425 | stream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7426 | } |
| 7427 | stream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7428 | if (pPhysicalDeviceGroupProperties) |
| 7429 | { |
| 7430 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7431 | { |
| 7432 | marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7433 | } |
| 7434 | } |
| 7435 | uint32_t* check_pPhysicalDeviceGroupCount; |
| 7436 | stream->read((uint32_t**)&check_pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7437 | if (pPhysicalDeviceGroupCount) |
| 7438 | { |
| 7439 | if (!(check_pPhysicalDeviceGroupCount)) |
| 7440 | { |
| 7441 | fprintf(stderr, "fatal: pPhysicalDeviceGroupCount inconsistent between guest and host\n"); |
| 7442 | } |
| 7443 | stream->read((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7444 | } |
| 7445 | VkPhysicalDeviceGroupProperties* check_pPhysicalDeviceGroupProperties; |
| 7446 | stream->read((VkPhysicalDeviceGroupProperties**)&check_pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7447 | if (pPhysicalDeviceGroupProperties) |
| 7448 | { |
| 7449 | if (!(check_pPhysicalDeviceGroupProperties)) |
| 7450 | { |
| 7451 | fprintf(stderr, "fatal: pPhysicalDeviceGroupProperties inconsistent between guest and host\n"); |
| 7452 | } |
| 7453 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7454 | { |
| 7455 | unmarshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7456 | } |
| 7457 | } |
| 7458 | VkResult vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return = (VkResult)0; |
| 7459 | stream->read(&vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return, sizeof(VkResult)); |
| 7460 | return vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return; |
| 7461 | } |
| 7462 | |
| 7463 | #endif |
| 7464 | #ifdef VK_KHR_external_memory_capabilities |
| 7465 | void VkEncoder::vkGetPhysicalDeviceExternalBufferPropertiesKHR( |
| 7466 | VkPhysicalDevice physicalDevice, |
| 7467 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 7468 | VkExternalBufferProperties* pExternalBufferProperties) |
| 7469 | { |
| 7470 | auto stream = mImpl->stream(); |
| 7471 | auto countingStream = mImpl->countingStream(); |
| 7472 | countingStream->rewind(); |
| 7473 | { |
| 7474 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7475 | marshal_VkPhysicalDeviceExternalBufferInfo(countingStream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 7476 | marshal_VkExternalBufferProperties(countingStream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7477 | } |
| 7478 | uint32_t packetSize_vkGetPhysicalDeviceExternalBufferPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7479 | countingStream->rewind(); |
| 7480 | uint32_t opcode_vkGetPhysicalDeviceExternalBufferPropertiesKHR = OP_vkGetPhysicalDeviceExternalBufferPropertiesKHR; |
| 7481 | stream->write(&opcode_vkGetPhysicalDeviceExternalBufferPropertiesKHR, sizeof(uint32_t)); |
| 7482 | stream->write(&packetSize_vkGetPhysicalDeviceExternalBufferPropertiesKHR, sizeof(uint32_t)); |
| 7483 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7484 | marshal_VkPhysicalDeviceExternalBufferInfo(stream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 7485 | marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7486 | unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7487 | } |
| 7488 | |
| 7489 | #endif |
| 7490 | #ifdef VK_KHR_external_memory |
| 7491 | #endif |
| 7492 | #ifdef VK_KHR_external_memory_win32 |
| 7493 | VkResult VkEncoder::vkGetMemoryWin32HandleKHR( |
| 7494 | VkDevice device, |
| 7495 | const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 7496 | HANDLE* pHandle) |
| 7497 | { |
| 7498 | auto stream = mImpl->stream(); |
| 7499 | auto countingStream = mImpl->countingStream(); |
| 7500 | countingStream->rewind(); |
| 7501 | { |
| 7502 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7503 | marshal_VkMemoryGetWin32HandleInfoKHR(countingStream, (const VkMemoryGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7504 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7505 | } |
| 7506 | uint32_t packetSize_vkGetMemoryWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7507 | countingStream->rewind(); |
| 7508 | uint32_t opcode_vkGetMemoryWin32HandleKHR = OP_vkGetMemoryWin32HandleKHR; |
| 7509 | stream->write(&opcode_vkGetMemoryWin32HandleKHR, sizeof(uint32_t)); |
| 7510 | stream->write(&packetSize_vkGetMemoryWin32HandleKHR, sizeof(uint32_t)); |
| 7511 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7512 | marshal_VkMemoryGetWin32HandleInfoKHR(stream, (const VkMemoryGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7513 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7514 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7515 | VkResult vkGetMemoryWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7516 | stream->read(&vkGetMemoryWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7517 | return vkGetMemoryWin32HandleKHR_VkResult_return; |
| 7518 | } |
| 7519 | |
| 7520 | VkResult VkEncoder::vkGetMemoryWin32HandlePropertiesKHR( |
| 7521 | VkDevice device, |
| 7522 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 7523 | HANDLE handle, |
| 7524 | VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) |
| 7525 | { |
| 7526 | auto stream = mImpl->stream(); |
| 7527 | auto countingStream = mImpl->countingStream(); |
| 7528 | countingStream->rewind(); |
| 7529 | { |
| 7530 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7531 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7532 | countingStream->write((HANDLE*)&handle, sizeof(HANDLE)); |
| 7533 | marshal_VkMemoryWin32HandlePropertiesKHR(countingStream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7534 | } |
| 7535 | uint32_t packetSize_vkGetMemoryWin32HandlePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7536 | countingStream->rewind(); |
| 7537 | uint32_t opcode_vkGetMemoryWin32HandlePropertiesKHR = OP_vkGetMemoryWin32HandlePropertiesKHR; |
| 7538 | stream->write(&opcode_vkGetMemoryWin32HandlePropertiesKHR, sizeof(uint32_t)); |
| 7539 | stream->write(&packetSize_vkGetMemoryWin32HandlePropertiesKHR, sizeof(uint32_t)); |
| 7540 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7541 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7542 | stream->write((HANDLE*)&handle, sizeof(HANDLE)); |
| 7543 | marshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7544 | unmarshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7545 | VkResult vkGetMemoryWin32HandlePropertiesKHR_VkResult_return = (VkResult)0; |
| 7546 | stream->read(&vkGetMemoryWin32HandlePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 7547 | return vkGetMemoryWin32HandlePropertiesKHR_VkResult_return; |
| 7548 | } |
| 7549 | |
| 7550 | #endif |
| 7551 | #ifdef VK_KHR_external_memory_fd |
| 7552 | VkResult VkEncoder::vkGetMemoryFdKHR( |
| 7553 | VkDevice device, |
| 7554 | const VkMemoryGetFdInfoKHR* pGetFdInfo, |
| 7555 | int* pFd) |
| 7556 | { |
| 7557 | auto stream = mImpl->stream(); |
| 7558 | auto countingStream = mImpl->countingStream(); |
| 7559 | countingStream->rewind(); |
| 7560 | { |
| 7561 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7562 | marshal_VkMemoryGetFdInfoKHR(countingStream, (const VkMemoryGetFdInfoKHR*)(pGetFdInfo)); |
| 7563 | countingStream->write((int*)pFd, sizeof(int)); |
| 7564 | } |
| 7565 | uint32_t packetSize_vkGetMemoryFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7566 | countingStream->rewind(); |
| 7567 | uint32_t opcode_vkGetMemoryFdKHR = OP_vkGetMemoryFdKHR; |
| 7568 | stream->write(&opcode_vkGetMemoryFdKHR, sizeof(uint32_t)); |
| 7569 | stream->write(&packetSize_vkGetMemoryFdKHR, sizeof(uint32_t)); |
| 7570 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7571 | marshal_VkMemoryGetFdInfoKHR(stream, (const VkMemoryGetFdInfoKHR*)(pGetFdInfo)); |
| 7572 | stream->write((int*)pFd, sizeof(int)); |
| 7573 | stream->read((int*)pFd, sizeof(int)); |
| 7574 | VkResult vkGetMemoryFdKHR_VkResult_return = (VkResult)0; |
| 7575 | stream->read(&vkGetMemoryFdKHR_VkResult_return, sizeof(VkResult)); |
| 7576 | return vkGetMemoryFdKHR_VkResult_return; |
| 7577 | } |
| 7578 | |
| 7579 | VkResult VkEncoder::vkGetMemoryFdPropertiesKHR( |
| 7580 | VkDevice device, |
| 7581 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 7582 | int fd, |
| 7583 | VkMemoryFdPropertiesKHR* pMemoryFdProperties) |
| 7584 | { |
| 7585 | auto stream = mImpl->stream(); |
| 7586 | auto countingStream = mImpl->countingStream(); |
| 7587 | countingStream->rewind(); |
| 7588 | { |
| 7589 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7590 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7591 | countingStream->write((int*)&fd, sizeof(int)); |
| 7592 | marshal_VkMemoryFdPropertiesKHR(countingStream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7593 | } |
| 7594 | uint32_t packetSize_vkGetMemoryFdPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7595 | countingStream->rewind(); |
| 7596 | uint32_t opcode_vkGetMemoryFdPropertiesKHR = OP_vkGetMemoryFdPropertiesKHR; |
| 7597 | stream->write(&opcode_vkGetMemoryFdPropertiesKHR, sizeof(uint32_t)); |
| 7598 | stream->write(&packetSize_vkGetMemoryFdPropertiesKHR, sizeof(uint32_t)); |
| 7599 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7600 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7601 | stream->write((int*)&fd, sizeof(int)); |
| 7602 | marshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7603 | unmarshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7604 | VkResult vkGetMemoryFdPropertiesKHR_VkResult_return = (VkResult)0; |
| 7605 | stream->read(&vkGetMemoryFdPropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 7606 | return vkGetMemoryFdPropertiesKHR_VkResult_return; |
| 7607 | } |
| 7608 | |
| 7609 | #endif |
| 7610 | #ifdef VK_KHR_win32_keyed_mutex |
| 7611 | #endif |
| 7612 | #ifdef VK_KHR_external_semaphore_capabilities |
| 7613 | void VkEncoder::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( |
| 7614 | VkPhysicalDevice physicalDevice, |
| 7615 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 7616 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 7617 | { |
| 7618 | auto stream = mImpl->stream(); |
| 7619 | auto countingStream = mImpl->countingStream(); |
| 7620 | countingStream->rewind(); |
| 7621 | { |
| 7622 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7623 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(countingStream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 7624 | marshal_VkExternalSemaphoreProperties(countingStream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7625 | } |
| 7626 | uint32_t packetSize_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7627 | countingStream->rewind(); |
| 7628 | uint32_t opcode_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = OP_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; |
| 7629 | stream->write(&opcode_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, sizeof(uint32_t)); |
| 7630 | stream->write(&packetSize_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, sizeof(uint32_t)); |
| 7631 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7632 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 7633 | marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7634 | unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7635 | } |
| 7636 | |
| 7637 | #endif |
| 7638 | #ifdef VK_KHR_external_semaphore |
| 7639 | #endif |
| 7640 | #ifdef VK_KHR_external_semaphore_win32 |
| 7641 | VkResult VkEncoder::vkImportSemaphoreWin32HandleKHR( |
| 7642 | VkDevice device, |
| 7643 | const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) |
| 7644 | { |
| 7645 | auto stream = mImpl->stream(); |
| 7646 | auto countingStream = mImpl->countingStream(); |
| 7647 | countingStream->rewind(); |
| 7648 | { |
| 7649 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7650 | marshal_VkImportSemaphoreWin32HandleInfoKHR(countingStream, (const VkImportSemaphoreWin32HandleInfoKHR*)(pImportSemaphoreWin32HandleInfo)); |
| 7651 | } |
| 7652 | uint32_t packetSize_vkImportSemaphoreWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7653 | countingStream->rewind(); |
| 7654 | uint32_t opcode_vkImportSemaphoreWin32HandleKHR = OP_vkImportSemaphoreWin32HandleKHR; |
| 7655 | stream->write(&opcode_vkImportSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7656 | stream->write(&packetSize_vkImportSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7657 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7658 | marshal_VkImportSemaphoreWin32HandleInfoKHR(stream, (const VkImportSemaphoreWin32HandleInfoKHR*)(pImportSemaphoreWin32HandleInfo)); |
| 7659 | VkResult vkImportSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7660 | stream->read(&vkImportSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7661 | return vkImportSemaphoreWin32HandleKHR_VkResult_return; |
| 7662 | } |
| 7663 | |
| 7664 | VkResult VkEncoder::vkGetSemaphoreWin32HandleKHR( |
| 7665 | VkDevice device, |
| 7666 | const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 7667 | HANDLE* pHandle) |
| 7668 | { |
| 7669 | auto stream = mImpl->stream(); |
| 7670 | auto countingStream = mImpl->countingStream(); |
| 7671 | countingStream->rewind(); |
| 7672 | { |
| 7673 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7674 | marshal_VkSemaphoreGetWin32HandleInfoKHR(countingStream, (const VkSemaphoreGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7675 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7676 | } |
| 7677 | uint32_t packetSize_vkGetSemaphoreWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7678 | countingStream->rewind(); |
| 7679 | uint32_t opcode_vkGetSemaphoreWin32HandleKHR = OP_vkGetSemaphoreWin32HandleKHR; |
| 7680 | stream->write(&opcode_vkGetSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7681 | stream->write(&packetSize_vkGetSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7682 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7683 | marshal_VkSemaphoreGetWin32HandleInfoKHR(stream, (const VkSemaphoreGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7684 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7685 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7686 | VkResult vkGetSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7687 | stream->read(&vkGetSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7688 | return vkGetSemaphoreWin32HandleKHR_VkResult_return; |
| 7689 | } |
| 7690 | |
| 7691 | #endif |
| 7692 | #ifdef VK_KHR_external_semaphore_fd |
| 7693 | VkResult VkEncoder::vkImportSemaphoreFdKHR( |
| 7694 | VkDevice device, |
| 7695 | const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) |
| 7696 | { |
| 7697 | auto stream = mImpl->stream(); |
| 7698 | auto countingStream = mImpl->countingStream(); |
| 7699 | countingStream->rewind(); |
| 7700 | { |
| 7701 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7702 | marshal_VkImportSemaphoreFdInfoKHR(countingStream, (const VkImportSemaphoreFdInfoKHR*)(pImportSemaphoreFdInfo)); |
| 7703 | } |
| 7704 | uint32_t packetSize_vkImportSemaphoreFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7705 | countingStream->rewind(); |
| 7706 | uint32_t opcode_vkImportSemaphoreFdKHR = OP_vkImportSemaphoreFdKHR; |
| 7707 | stream->write(&opcode_vkImportSemaphoreFdKHR, sizeof(uint32_t)); |
| 7708 | stream->write(&packetSize_vkImportSemaphoreFdKHR, sizeof(uint32_t)); |
| 7709 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7710 | marshal_VkImportSemaphoreFdInfoKHR(stream, (const VkImportSemaphoreFdInfoKHR*)(pImportSemaphoreFdInfo)); |
| 7711 | VkResult vkImportSemaphoreFdKHR_VkResult_return = (VkResult)0; |
| 7712 | stream->read(&vkImportSemaphoreFdKHR_VkResult_return, sizeof(VkResult)); |
| 7713 | return vkImportSemaphoreFdKHR_VkResult_return; |
| 7714 | } |
| 7715 | |
| 7716 | VkResult VkEncoder::vkGetSemaphoreFdKHR( |
| 7717 | VkDevice device, |
| 7718 | const VkSemaphoreGetFdInfoKHR* pGetFdInfo, |
| 7719 | int* pFd) |
| 7720 | { |
| 7721 | auto stream = mImpl->stream(); |
| 7722 | auto countingStream = mImpl->countingStream(); |
| 7723 | countingStream->rewind(); |
| 7724 | { |
| 7725 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7726 | marshal_VkSemaphoreGetFdInfoKHR(countingStream, (const VkSemaphoreGetFdInfoKHR*)(pGetFdInfo)); |
| 7727 | countingStream->write((int*)pFd, sizeof(int)); |
| 7728 | } |
| 7729 | uint32_t packetSize_vkGetSemaphoreFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7730 | countingStream->rewind(); |
| 7731 | uint32_t opcode_vkGetSemaphoreFdKHR = OP_vkGetSemaphoreFdKHR; |
| 7732 | stream->write(&opcode_vkGetSemaphoreFdKHR, sizeof(uint32_t)); |
| 7733 | stream->write(&packetSize_vkGetSemaphoreFdKHR, sizeof(uint32_t)); |
| 7734 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7735 | marshal_VkSemaphoreGetFdInfoKHR(stream, (const VkSemaphoreGetFdInfoKHR*)(pGetFdInfo)); |
| 7736 | stream->write((int*)pFd, sizeof(int)); |
| 7737 | stream->read((int*)pFd, sizeof(int)); |
| 7738 | VkResult vkGetSemaphoreFdKHR_VkResult_return = (VkResult)0; |
| 7739 | stream->read(&vkGetSemaphoreFdKHR_VkResult_return, sizeof(VkResult)); |
| 7740 | return vkGetSemaphoreFdKHR_VkResult_return; |
| 7741 | } |
| 7742 | |
| 7743 | #endif |
| 7744 | #ifdef VK_KHR_push_descriptor |
| 7745 | void VkEncoder::vkCmdPushDescriptorSetKHR( |
| 7746 | VkCommandBuffer commandBuffer, |
| 7747 | VkPipelineBindPoint pipelineBindPoint, |
| 7748 | VkPipelineLayout layout, |
| 7749 | uint32_t set, |
| 7750 | uint32_t descriptorWriteCount, |
| 7751 | const VkWriteDescriptorSet* pDescriptorWrites) |
| 7752 | { |
| 7753 | auto stream = mImpl->stream(); |
| 7754 | auto countingStream = mImpl->countingStream(); |
| 7755 | countingStream->rewind(); |
| 7756 | { |
| 7757 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7758 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 7759 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7760 | countingStream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7761 | countingStream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 7762 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 7763 | { |
| 7764 | marshal_VkWriteDescriptorSet(countingStream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 7765 | } |
| 7766 | } |
| 7767 | uint32_t packetSize_vkCmdPushDescriptorSetKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7768 | countingStream->rewind(); |
| 7769 | uint32_t opcode_vkCmdPushDescriptorSetKHR = OP_vkCmdPushDescriptorSetKHR; |
| 7770 | stream->write(&opcode_vkCmdPushDescriptorSetKHR, sizeof(uint32_t)); |
| 7771 | stream->write(&packetSize_vkCmdPushDescriptorSetKHR, sizeof(uint32_t)); |
| 7772 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7773 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 7774 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7775 | stream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7776 | stream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 7777 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 7778 | { |
| 7779 | marshal_VkWriteDescriptorSet(stream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 7780 | } |
| 7781 | } |
| 7782 | |
| 7783 | void VkEncoder::vkCmdPushDescriptorSetWithTemplateKHR( |
| 7784 | VkCommandBuffer commandBuffer, |
| 7785 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7786 | VkPipelineLayout layout, |
| 7787 | uint32_t set, |
| 7788 | const void* pData) |
| 7789 | { |
| 7790 | auto stream = mImpl->stream(); |
| 7791 | auto countingStream = mImpl->countingStream(); |
| 7792 | countingStream->rewind(); |
| 7793 | { |
| 7794 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7795 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7796 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7797 | countingStream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7798 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 7799 | if (pData) |
| 7800 | { |
| 7801 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 7802 | } |
| 7803 | } |
| 7804 | uint32_t packetSize_vkCmdPushDescriptorSetWithTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7805 | countingStream->rewind(); |
| 7806 | uint32_t opcode_vkCmdPushDescriptorSetWithTemplateKHR = OP_vkCmdPushDescriptorSetWithTemplateKHR; |
| 7807 | stream->write(&opcode_vkCmdPushDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7808 | stream->write(&packetSize_vkCmdPushDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7809 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7810 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7811 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7812 | stream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7813 | stream->write((const void**)&pData, sizeof(const void*)); |
| 7814 | if (pData) |
| 7815 | { |
| 7816 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 7817 | } |
| 7818 | } |
| 7819 | |
| 7820 | #endif |
| 7821 | #ifdef VK_KHR_16bit_storage |
| 7822 | #endif |
| 7823 | #ifdef VK_KHR_incremental_present |
| 7824 | #endif |
| 7825 | #ifdef VK_KHR_descriptor_update_template |
| 7826 | VkResult VkEncoder::vkCreateDescriptorUpdateTemplateKHR( |
| 7827 | VkDevice device, |
| 7828 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 7829 | const VkAllocationCallbacks* pAllocator, |
| 7830 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 7831 | { |
| 7832 | auto stream = mImpl->stream(); |
| 7833 | auto countingStream = mImpl->countingStream(); |
| 7834 | countingStream->rewind(); |
| 7835 | { |
| 7836 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7837 | marshal_VkDescriptorUpdateTemplateCreateInfo(countingStream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 7838 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7839 | if (pAllocator) |
| 7840 | { |
| 7841 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7842 | } |
| 7843 | countingStream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7844 | } |
| 7845 | uint32_t packetSize_vkCreateDescriptorUpdateTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7846 | countingStream->rewind(); |
| 7847 | uint32_t opcode_vkCreateDescriptorUpdateTemplateKHR = OP_vkCreateDescriptorUpdateTemplateKHR; |
| 7848 | stream->write(&opcode_vkCreateDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7849 | stream->write(&packetSize_vkCreateDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7850 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7851 | marshal_VkDescriptorUpdateTemplateCreateInfo(stream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 7852 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7853 | if (pAllocator) |
| 7854 | { |
| 7855 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7856 | } |
| 7857 | stream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7858 | stream->read((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7859 | VkResult vkCreateDescriptorUpdateTemplateKHR_VkResult_return = (VkResult)0; |
| 7860 | stream->read(&vkCreateDescriptorUpdateTemplateKHR_VkResult_return, sizeof(VkResult)); |
| 7861 | return vkCreateDescriptorUpdateTemplateKHR_VkResult_return; |
| 7862 | } |
| 7863 | |
| 7864 | void VkEncoder::vkDestroyDescriptorUpdateTemplateKHR( |
| 7865 | VkDevice device, |
| 7866 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7867 | const VkAllocationCallbacks* pAllocator) |
| 7868 | { |
| 7869 | auto stream = mImpl->stream(); |
| 7870 | auto countingStream = mImpl->countingStream(); |
| 7871 | countingStream->rewind(); |
| 7872 | { |
| 7873 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7874 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7875 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7876 | if (pAllocator) |
| 7877 | { |
| 7878 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7879 | } |
| 7880 | } |
| 7881 | uint32_t packetSize_vkDestroyDescriptorUpdateTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7882 | countingStream->rewind(); |
| 7883 | uint32_t opcode_vkDestroyDescriptorUpdateTemplateKHR = OP_vkDestroyDescriptorUpdateTemplateKHR; |
| 7884 | stream->write(&opcode_vkDestroyDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7885 | stream->write(&packetSize_vkDestroyDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7886 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7887 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7888 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7889 | if (pAllocator) |
| 7890 | { |
| 7891 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7892 | } |
| 7893 | } |
| 7894 | |
| 7895 | void VkEncoder::vkUpdateDescriptorSetWithTemplateKHR( |
| 7896 | VkDevice device, |
| 7897 | VkDescriptorSet descriptorSet, |
| 7898 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7899 | const void* pData) |
| 7900 | { |
| 7901 | auto stream = mImpl->stream(); |
| 7902 | auto countingStream = mImpl->countingStream(); |
| 7903 | countingStream->rewind(); |
| 7904 | { |
| 7905 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7906 | countingStream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 7907 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7908 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 7909 | if (pData) |
| 7910 | { |
| 7911 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 7912 | } |
| 7913 | } |
| 7914 | uint32_t packetSize_vkUpdateDescriptorSetWithTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7915 | countingStream->rewind(); |
| 7916 | uint32_t opcode_vkUpdateDescriptorSetWithTemplateKHR = OP_vkUpdateDescriptorSetWithTemplateKHR; |
| 7917 | stream->write(&opcode_vkUpdateDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7918 | stream->write(&packetSize_vkUpdateDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7919 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7920 | stream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 7921 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7922 | stream->write((const void**)&pData, sizeof(const void*)); |
| 7923 | if (pData) |
| 7924 | { |
| 7925 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 7926 | } |
| 7927 | } |
| 7928 | |
| 7929 | #endif |
| 7930 | #ifdef VK_KHR_create_renderpass2 |
| 7931 | VkResult VkEncoder::vkCreateRenderPass2KHR( |
| 7932 | VkDevice device, |
| 7933 | const VkRenderPassCreateInfo2KHR* pCreateInfo, |
| 7934 | const VkAllocationCallbacks* pAllocator, |
| 7935 | VkRenderPass* pRenderPass) |
| 7936 | { |
| 7937 | auto stream = mImpl->stream(); |
| 7938 | auto countingStream = mImpl->countingStream(); |
| 7939 | countingStream->rewind(); |
| 7940 | { |
| 7941 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7942 | marshal_VkRenderPassCreateInfo2KHR(countingStream, (const VkRenderPassCreateInfo2KHR*)(pCreateInfo)); |
| 7943 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7944 | if (pAllocator) |
| 7945 | { |
| 7946 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7947 | } |
| 7948 | countingStream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7949 | } |
| 7950 | uint32_t packetSize_vkCreateRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7951 | countingStream->rewind(); |
| 7952 | uint32_t opcode_vkCreateRenderPass2KHR = OP_vkCreateRenderPass2KHR; |
| 7953 | stream->write(&opcode_vkCreateRenderPass2KHR, sizeof(uint32_t)); |
| 7954 | stream->write(&packetSize_vkCreateRenderPass2KHR, sizeof(uint32_t)); |
| 7955 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7956 | marshal_VkRenderPassCreateInfo2KHR(stream, (const VkRenderPassCreateInfo2KHR*)(pCreateInfo)); |
| 7957 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7958 | if (pAllocator) |
| 7959 | { |
| 7960 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7961 | } |
| 7962 | stream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7963 | stream->read((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7964 | VkResult vkCreateRenderPass2KHR_VkResult_return = (VkResult)0; |
| 7965 | stream->read(&vkCreateRenderPass2KHR_VkResult_return, sizeof(VkResult)); |
| 7966 | return vkCreateRenderPass2KHR_VkResult_return; |
| 7967 | } |
| 7968 | |
| 7969 | void VkEncoder::vkCmdBeginRenderPass2KHR( |
| 7970 | VkCommandBuffer commandBuffer, |
| 7971 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 7972 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo) |
| 7973 | { |
| 7974 | auto stream = mImpl->stream(); |
| 7975 | auto countingStream = mImpl->countingStream(); |
| 7976 | countingStream->rewind(); |
| 7977 | { |
| 7978 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7979 | marshal_VkRenderPassBeginInfo(countingStream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 7980 | marshal_VkSubpassBeginInfoKHR(countingStream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7981 | } |
| 7982 | uint32_t packetSize_vkCmdBeginRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7983 | countingStream->rewind(); |
| 7984 | uint32_t opcode_vkCmdBeginRenderPass2KHR = OP_vkCmdBeginRenderPass2KHR; |
| 7985 | stream->write(&opcode_vkCmdBeginRenderPass2KHR, sizeof(uint32_t)); |
| 7986 | stream->write(&packetSize_vkCmdBeginRenderPass2KHR, sizeof(uint32_t)); |
| 7987 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7988 | marshal_VkRenderPassBeginInfo(stream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 7989 | marshal_VkSubpassBeginInfoKHR(stream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7990 | } |
| 7991 | |
| 7992 | void VkEncoder::vkCmdNextSubpass2KHR( |
| 7993 | VkCommandBuffer commandBuffer, |
| 7994 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo, |
| 7995 | const VkSubpassEndInfoKHR* pSubpassEndInfo) |
| 7996 | { |
| 7997 | auto stream = mImpl->stream(); |
| 7998 | auto countingStream = mImpl->countingStream(); |
| 7999 | countingStream->rewind(); |
| 8000 | { |
| 8001 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8002 | marshal_VkSubpassBeginInfoKHR(countingStream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 8003 | marshal_VkSubpassEndInfoKHR(countingStream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8004 | } |
| 8005 | uint32_t packetSize_vkCmdNextSubpass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8006 | countingStream->rewind(); |
| 8007 | uint32_t opcode_vkCmdNextSubpass2KHR = OP_vkCmdNextSubpass2KHR; |
| 8008 | stream->write(&opcode_vkCmdNextSubpass2KHR, sizeof(uint32_t)); |
| 8009 | stream->write(&packetSize_vkCmdNextSubpass2KHR, sizeof(uint32_t)); |
| 8010 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8011 | marshal_VkSubpassBeginInfoKHR(stream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 8012 | marshal_VkSubpassEndInfoKHR(stream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8013 | } |
| 8014 | |
| 8015 | void VkEncoder::vkCmdEndRenderPass2KHR( |
| 8016 | VkCommandBuffer commandBuffer, |
| 8017 | const VkSubpassEndInfoKHR* pSubpassEndInfo) |
| 8018 | { |
| 8019 | auto stream = mImpl->stream(); |
| 8020 | auto countingStream = mImpl->countingStream(); |
| 8021 | countingStream->rewind(); |
| 8022 | { |
| 8023 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8024 | marshal_VkSubpassEndInfoKHR(countingStream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8025 | } |
| 8026 | uint32_t packetSize_vkCmdEndRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8027 | countingStream->rewind(); |
| 8028 | uint32_t opcode_vkCmdEndRenderPass2KHR = OP_vkCmdEndRenderPass2KHR; |
| 8029 | stream->write(&opcode_vkCmdEndRenderPass2KHR, sizeof(uint32_t)); |
| 8030 | stream->write(&packetSize_vkCmdEndRenderPass2KHR, sizeof(uint32_t)); |
| 8031 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8032 | marshal_VkSubpassEndInfoKHR(stream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8033 | } |
| 8034 | |
| 8035 | #endif |
| 8036 | #ifdef VK_KHR_shared_presentable_image |
| 8037 | VkResult VkEncoder::vkGetSwapchainStatusKHR( |
| 8038 | VkDevice device, |
| 8039 | VkSwapchainKHR swapchain) |
| 8040 | { |
| 8041 | auto stream = mImpl->stream(); |
| 8042 | auto countingStream = mImpl->countingStream(); |
| 8043 | countingStream->rewind(); |
| 8044 | { |
| 8045 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8046 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 8047 | } |
| 8048 | uint32_t packetSize_vkGetSwapchainStatusKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8049 | countingStream->rewind(); |
| 8050 | uint32_t opcode_vkGetSwapchainStatusKHR = OP_vkGetSwapchainStatusKHR; |
| 8051 | stream->write(&opcode_vkGetSwapchainStatusKHR, sizeof(uint32_t)); |
| 8052 | stream->write(&packetSize_vkGetSwapchainStatusKHR, sizeof(uint32_t)); |
| 8053 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8054 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 8055 | VkResult vkGetSwapchainStatusKHR_VkResult_return = (VkResult)0; |
| 8056 | stream->read(&vkGetSwapchainStatusKHR_VkResult_return, sizeof(VkResult)); |
| 8057 | return vkGetSwapchainStatusKHR_VkResult_return; |
| 8058 | } |
| 8059 | |
| 8060 | #endif |
| 8061 | #ifdef VK_KHR_external_fence_capabilities |
| 8062 | void VkEncoder::vkGetPhysicalDeviceExternalFencePropertiesKHR( |
| 8063 | VkPhysicalDevice physicalDevice, |
| 8064 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 8065 | VkExternalFenceProperties* pExternalFenceProperties) |
| 8066 | { |
| 8067 | auto stream = mImpl->stream(); |
| 8068 | auto countingStream = mImpl->countingStream(); |
| 8069 | countingStream->rewind(); |
| 8070 | { |
| 8071 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8072 | marshal_VkPhysicalDeviceExternalFenceInfo(countingStream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 8073 | marshal_VkExternalFenceProperties(countingStream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8074 | } |
| 8075 | uint32_t packetSize_vkGetPhysicalDeviceExternalFencePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8076 | countingStream->rewind(); |
| 8077 | uint32_t opcode_vkGetPhysicalDeviceExternalFencePropertiesKHR = OP_vkGetPhysicalDeviceExternalFencePropertiesKHR; |
| 8078 | stream->write(&opcode_vkGetPhysicalDeviceExternalFencePropertiesKHR, sizeof(uint32_t)); |
| 8079 | stream->write(&packetSize_vkGetPhysicalDeviceExternalFencePropertiesKHR, sizeof(uint32_t)); |
| 8080 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8081 | marshal_VkPhysicalDeviceExternalFenceInfo(stream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 8082 | marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8083 | unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8084 | } |
| 8085 | |
| 8086 | #endif |
| 8087 | #ifdef VK_KHR_external_fence |
| 8088 | #endif |
| 8089 | #ifdef VK_KHR_external_fence_win32 |
| 8090 | VkResult VkEncoder::vkImportFenceWin32HandleKHR( |
| 8091 | VkDevice device, |
| 8092 | const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) |
| 8093 | { |
| 8094 | auto stream = mImpl->stream(); |
| 8095 | auto countingStream = mImpl->countingStream(); |
| 8096 | countingStream->rewind(); |
| 8097 | { |
| 8098 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8099 | marshal_VkImportFenceWin32HandleInfoKHR(countingStream, (const VkImportFenceWin32HandleInfoKHR*)(pImportFenceWin32HandleInfo)); |
| 8100 | } |
| 8101 | uint32_t packetSize_vkImportFenceWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8102 | countingStream->rewind(); |
| 8103 | uint32_t opcode_vkImportFenceWin32HandleKHR = OP_vkImportFenceWin32HandleKHR; |
| 8104 | stream->write(&opcode_vkImportFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8105 | stream->write(&packetSize_vkImportFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8106 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8107 | marshal_VkImportFenceWin32HandleInfoKHR(stream, (const VkImportFenceWin32HandleInfoKHR*)(pImportFenceWin32HandleInfo)); |
| 8108 | VkResult vkImportFenceWin32HandleKHR_VkResult_return = (VkResult)0; |
| 8109 | stream->read(&vkImportFenceWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 8110 | return vkImportFenceWin32HandleKHR_VkResult_return; |
| 8111 | } |
| 8112 | |
| 8113 | VkResult VkEncoder::vkGetFenceWin32HandleKHR( |
| 8114 | VkDevice device, |
| 8115 | const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 8116 | HANDLE* pHandle) |
| 8117 | { |
| 8118 | auto stream = mImpl->stream(); |
| 8119 | auto countingStream = mImpl->countingStream(); |
| 8120 | countingStream->rewind(); |
| 8121 | { |
| 8122 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8123 | marshal_VkFenceGetWin32HandleInfoKHR(countingStream, (const VkFenceGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 8124 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8125 | } |
| 8126 | uint32_t packetSize_vkGetFenceWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8127 | countingStream->rewind(); |
| 8128 | uint32_t opcode_vkGetFenceWin32HandleKHR = OP_vkGetFenceWin32HandleKHR; |
| 8129 | stream->write(&opcode_vkGetFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8130 | stream->write(&packetSize_vkGetFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8131 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8132 | marshal_VkFenceGetWin32HandleInfoKHR(stream, (const VkFenceGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 8133 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8134 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8135 | VkResult vkGetFenceWin32HandleKHR_VkResult_return = (VkResult)0; |
| 8136 | stream->read(&vkGetFenceWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 8137 | return vkGetFenceWin32HandleKHR_VkResult_return; |
| 8138 | } |
| 8139 | |
| 8140 | #endif |
| 8141 | #ifdef VK_KHR_external_fence_fd |
| 8142 | VkResult VkEncoder::vkImportFenceFdKHR( |
| 8143 | VkDevice device, |
| 8144 | const VkImportFenceFdInfoKHR* pImportFenceFdInfo) |
| 8145 | { |
| 8146 | auto stream = mImpl->stream(); |
| 8147 | auto countingStream = mImpl->countingStream(); |
| 8148 | countingStream->rewind(); |
| 8149 | { |
| 8150 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8151 | marshal_VkImportFenceFdInfoKHR(countingStream, (const VkImportFenceFdInfoKHR*)(pImportFenceFdInfo)); |
| 8152 | } |
| 8153 | uint32_t packetSize_vkImportFenceFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8154 | countingStream->rewind(); |
| 8155 | uint32_t opcode_vkImportFenceFdKHR = OP_vkImportFenceFdKHR; |
| 8156 | stream->write(&opcode_vkImportFenceFdKHR, sizeof(uint32_t)); |
| 8157 | stream->write(&packetSize_vkImportFenceFdKHR, sizeof(uint32_t)); |
| 8158 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8159 | marshal_VkImportFenceFdInfoKHR(stream, (const VkImportFenceFdInfoKHR*)(pImportFenceFdInfo)); |
| 8160 | VkResult vkImportFenceFdKHR_VkResult_return = (VkResult)0; |
| 8161 | stream->read(&vkImportFenceFdKHR_VkResult_return, sizeof(VkResult)); |
| 8162 | return vkImportFenceFdKHR_VkResult_return; |
| 8163 | } |
| 8164 | |
| 8165 | VkResult VkEncoder::vkGetFenceFdKHR( |
| 8166 | VkDevice device, |
| 8167 | const VkFenceGetFdInfoKHR* pGetFdInfo, |
| 8168 | int* pFd) |
| 8169 | { |
| 8170 | auto stream = mImpl->stream(); |
| 8171 | auto countingStream = mImpl->countingStream(); |
| 8172 | countingStream->rewind(); |
| 8173 | { |
| 8174 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8175 | marshal_VkFenceGetFdInfoKHR(countingStream, (const VkFenceGetFdInfoKHR*)(pGetFdInfo)); |
| 8176 | countingStream->write((int*)pFd, sizeof(int)); |
| 8177 | } |
| 8178 | uint32_t packetSize_vkGetFenceFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8179 | countingStream->rewind(); |
| 8180 | uint32_t opcode_vkGetFenceFdKHR = OP_vkGetFenceFdKHR; |
| 8181 | stream->write(&opcode_vkGetFenceFdKHR, sizeof(uint32_t)); |
| 8182 | stream->write(&packetSize_vkGetFenceFdKHR, sizeof(uint32_t)); |
| 8183 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8184 | marshal_VkFenceGetFdInfoKHR(stream, (const VkFenceGetFdInfoKHR*)(pGetFdInfo)); |
| 8185 | stream->write((int*)pFd, sizeof(int)); |
| 8186 | stream->read((int*)pFd, sizeof(int)); |
| 8187 | VkResult vkGetFenceFdKHR_VkResult_return = (VkResult)0; |
| 8188 | stream->read(&vkGetFenceFdKHR_VkResult_return, sizeof(VkResult)); |
| 8189 | return vkGetFenceFdKHR_VkResult_return; |
| 8190 | } |
| 8191 | |
| 8192 | #endif |
| 8193 | #ifdef VK_KHR_maintenance2 |
| 8194 | #endif |
| 8195 | #ifdef VK_KHR_get_surface_capabilities2 |
| 8196 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilities2KHR( |
| 8197 | VkPhysicalDevice physicalDevice, |
| 8198 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 8199 | VkSurfaceCapabilities2KHR* pSurfaceCapabilities) |
| 8200 | { |
| 8201 | auto stream = mImpl->stream(); |
| 8202 | auto countingStream = mImpl->countingStream(); |
| 8203 | countingStream->rewind(); |
| 8204 | { |
| 8205 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8206 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(countingStream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8207 | marshal_VkSurfaceCapabilities2KHR(countingStream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8208 | } |
| 8209 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilities2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8210 | countingStream->rewind(); |
| 8211 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilities2KHR = OP_vkGetPhysicalDeviceSurfaceCapabilities2KHR; |
| 8212 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilities2KHR, sizeof(uint32_t)); |
| 8213 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilities2KHR, sizeof(uint32_t)); |
| 8214 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8215 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(stream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8216 | marshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8217 | unmarshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8218 | VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return = (VkResult)0; |
| 8219 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return, sizeof(VkResult)); |
| 8220 | return vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return; |
| 8221 | } |
| 8222 | |
| 8223 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceFormats2KHR( |
| 8224 | VkPhysicalDevice physicalDevice, |
| 8225 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 8226 | uint32_t* pSurfaceFormatCount, |
| 8227 | VkSurfaceFormat2KHR* pSurfaceFormats) |
| 8228 | { |
| 8229 | auto stream = mImpl->stream(); |
| 8230 | auto countingStream = mImpl->countingStream(); |
| 8231 | countingStream->rewind(); |
| 8232 | { |
| 8233 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8234 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(countingStream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8235 | countingStream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8236 | if (pSurfaceFormatCount) |
| 8237 | { |
| 8238 | countingStream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8239 | } |
| 8240 | countingStream->write((VkSurfaceFormat2KHR**)&pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8241 | if (pSurfaceFormats) |
| 8242 | { |
| 8243 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8244 | { |
| 8245 | marshal_VkSurfaceFormat2KHR(countingStream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8246 | } |
| 8247 | } |
| 8248 | } |
| 8249 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceFormats2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8250 | countingStream->rewind(); |
| 8251 | uint32_t opcode_vkGetPhysicalDeviceSurfaceFormats2KHR = OP_vkGetPhysicalDeviceSurfaceFormats2KHR; |
| 8252 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceFormats2KHR, sizeof(uint32_t)); |
| 8253 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceFormats2KHR, sizeof(uint32_t)); |
| 8254 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8255 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(stream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8256 | stream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8257 | if (pSurfaceFormatCount) |
| 8258 | { |
| 8259 | stream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8260 | } |
| 8261 | stream->write((VkSurfaceFormat2KHR**)&pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8262 | if (pSurfaceFormats) |
| 8263 | { |
| 8264 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8265 | { |
| 8266 | marshal_VkSurfaceFormat2KHR(stream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8267 | } |
| 8268 | } |
| 8269 | uint32_t* check_pSurfaceFormatCount; |
| 8270 | stream->read((uint32_t**)&check_pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8271 | if (pSurfaceFormatCount) |
| 8272 | { |
| 8273 | if (!(check_pSurfaceFormatCount)) |
| 8274 | { |
| 8275 | fprintf(stderr, "fatal: pSurfaceFormatCount inconsistent between guest and host\n"); |
| 8276 | } |
| 8277 | stream->read((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8278 | } |
| 8279 | VkSurfaceFormat2KHR* check_pSurfaceFormats; |
| 8280 | stream->read((VkSurfaceFormat2KHR**)&check_pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8281 | if (pSurfaceFormats) |
| 8282 | { |
| 8283 | if (!(check_pSurfaceFormats)) |
| 8284 | { |
| 8285 | fprintf(stderr, "fatal: pSurfaceFormats inconsistent between guest and host\n"); |
| 8286 | } |
| 8287 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8288 | { |
| 8289 | unmarshal_VkSurfaceFormat2KHR(stream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8290 | } |
| 8291 | } |
| 8292 | VkResult vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return = (VkResult)0; |
| 8293 | stream->read(&vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return, sizeof(VkResult)); |
| 8294 | return vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return; |
| 8295 | } |
| 8296 | |
| 8297 | #endif |
| 8298 | #ifdef VK_KHR_variable_pointers |
| 8299 | #endif |
| 8300 | #ifdef VK_KHR_get_display_properties2 |
| 8301 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayProperties2KHR( |
| 8302 | VkPhysicalDevice physicalDevice, |
| 8303 | uint32_t* pPropertyCount, |
| 8304 | VkDisplayProperties2KHR* pProperties) |
| 8305 | { |
| 8306 | auto stream = mImpl->stream(); |
| 8307 | auto countingStream = mImpl->countingStream(); |
| 8308 | countingStream->rewind(); |
| 8309 | { |
| 8310 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8311 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8312 | if (pPropertyCount) |
| 8313 | { |
| 8314 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8315 | } |
| 8316 | countingStream->write((VkDisplayProperties2KHR**)&pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8317 | if (pProperties) |
| 8318 | { |
| 8319 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8320 | { |
| 8321 | marshal_VkDisplayProperties2KHR(countingStream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8322 | } |
| 8323 | } |
| 8324 | } |
| 8325 | uint32_t packetSize_vkGetPhysicalDeviceDisplayProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8326 | countingStream->rewind(); |
| 8327 | uint32_t opcode_vkGetPhysicalDeviceDisplayProperties2KHR = OP_vkGetPhysicalDeviceDisplayProperties2KHR; |
| 8328 | stream->write(&opcode_vkGetPhysicalDeviceDisplayProperties2KHR, sizeof(uint32_t)); |
| 8329 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayProperties2KHR, sizeof(uint32_t)); |
| 8330 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8331 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8332 | if (pPropertyCount) |
| 8333 | { |
| 8334 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8335 | } |
| 8336 | stream->write((VkDisplayProperties2KHR**)&pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8337 | if (pProperties) |
| 8338 | { |
| 8339 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8340 | { |
| 8341 | marshal_VkDisplayProperties2KHR(stream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8342 | } |
| 8343 | } |
| 8344 | uint32_t* check_pPropertyCount; |
| 8345 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8346 | if (pPropertyCount) |
| 8347 | { |
| 8348 | if (!(check_pPropertyCount)) |
| 8349 | { |
| 8350 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8351 | } |
| 8352 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8353 | } |
| 8354 | VkDisplayProperties2KHR* check_pProperties; |
| 8355 | stream->read((VkDisplayProperties2KHR**)&check_pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8356 | if (pProperties) |
| 8357 | { |
| 8358 | if (!(check_pProperties)) |
| 8359 | { |
| 8360 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8361 | } |
| 8362 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8363 | { |
| 8364 | unmarshal_VkDisplayProperties2KHR(stream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8365 | } |
| 8366 | } |
| 8367 | VkResult vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return = (VkResult)0; |
| 8368 | stream->read(&vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8369 | return vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return; |
| 8370 | } |
| 8371 | |
| 8372 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPlaneProperties2KHR( |
| 8373 | VkPhysicalDevice physicalDevice, |
| 8374 | uint32_t* pPropertyCount, |
| 8375 | VkDisplayPlaneProperties2KHR* pProperties) |
| 8376 | { |
| 8377 | auto stream = mImpl->stream(); |
| 8378 | auto countingStream = mImpl->countingStream(); |
| 8379 | countingStream->rewind(); |
| 8380 | { |
| 8381 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8382 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8383 | if (pPropertyCount) |
| 8384 | { |
| 8385 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8386 | } |
| 8387 | countingStream->write((VkDisplayPlaneProperties2KHR**)&pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8388 | if (pProperties) |
| 8389 | { |
| 8390 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8391 | { |
| 8392 | marshal_VkDisplayPlaneProperties2KHR(countingStream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8393 | } |
| 8394 | } |
| 8395 | } |
| 8396 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8397 | countingStream->rewind(); |
| 8398 | uint32_t opcode_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = OP_vkGetPhysicalDeviceDisplayPlaneProperties2KHR; |
| 8399 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, sizeof(uint32_t)); |
| 8400 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, sizeof(uint32_t)); |
| 8401 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8402 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8403 | if (pPropertyCount) |
| 8404 | { |
| 8405 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8406 | } |
| 8407 | stream->write((VkDisplayPlaneProperties2KHR**)&pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8408 | if (pProperties) |
| 8409 | { |
| 8410 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8411 | { |
| 8412 | marshal_VkDisplayPlaneProperties2KHR(stream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8413 | } |
| 8414 | } |
| 8415 | uint32_t* check_pPropertyCount; |
| 8416 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8417 | if (pPropertyCount) |
| 8418 | { |
| 8419 | if (!(check_pPropertyCount)) |
| 8420 | { |
| 8421 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8422 | } |
| 8423 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8424 | } |
| 8425 | VkDisplayPlaneProperties2KHR* check_pProperties; |
| 8426 | stream->read((VkDisplayPlaneProperties2KHR**)&check_pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8427 | if (pProperties) |
| 8428 | { |
| 8429 | if (!(check_pProperties)) |
| 8430 | { |
| 8431 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8432 | } |
| 8433 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8434 | { |
| 8435 | unmarshal_VkDisplayPlaneProperties2KHR(stream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8436 | } |
| 8437 | } |
| 8438 | VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return = (VkResult)0; |
| 8439 | stream->read(&vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8440 | return vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return; |
| 8441 | } |
| 8442 | |
| 8443 | VkResult VkEncoder::vkGetDisplayModeProperties2KHR( |
| 8444 | VkPhysicalDevice physicalDevice, |
| 8445 | VkDisplayKHR display, |
| 8446 | uint32_t* pPropertyCount, |
| 8447 | VkDisplayModeProperties2KHR* pProperties) |
| 8448 | { |
| 8449 | auto stream = mImpl->stream(); |
| 8450 | auto countingStream = mImpl->countingStream(); |
| 8451 | countingStream->rewind(); |
| 8452 | { |
| 8453 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8454 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 8455 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8456 | if (pPropertyCount) |
| 8457 | { |
| 8458 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8459 | } |
| 8460 | countingStream->write((VkDisplayModeProperties2KHR**)&pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8461 | if (pProperties) |
| 8462 | { |
| 8463 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8464 | { |
| 8465 | marshal_VkDisplayModeProperties2KHR(countingStream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8466 | } |
| 8467 | } |
| 8468 | } |
| 8469 | uint32_t packetSize_vkGetDisplayModeProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8470 | countingStream->rewind(); |
| 8471 | uint32_t opcode_vkGetDisplayModeProperties2KHR = OP_vkGetDisplayModeProperties2KHR; |
| 8472 | stream->write(&opcode_vkGetDisplayModeProperties2KHR, sizeof(uint32_t)); |
| 8473 | stream->write(&packetSize_vkGetDisplayModeProperties2KHR, sizeof(uint32_t)); |
| 8474 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8475 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 8476 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8477 | if (pPropertyCount) |
| 8478 | { |
| 8479 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8480 | } |
| 8481 | stream->write((VkDisplayModeProperties2KHR**)&pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8482 | if (pProperties) |
| 8483 | { |
| 8484 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8485 | { |
| 8486 | marshal_VkDisplayModeProperties2KHR(stream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8487 | } |
| 8488 | } |
| 8489 | uint32_t* check_pPropertyCount; |
| 8490 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8491 | if (pPropertyCount) |
| 8492 | { |
| 8493 | if (!(check_pPropertyCount)) |
| 8494 | { |
| 8495 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8496 | } |
| 8497 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8498 | } |
| 8499 | VkDisplayModeProperties2KHR* check_pProperties; |
| 8500 | stream->read((VkDisplayModeProperties2KHR**)&check_pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8501 | if (pProperties) |
| 8502 | { |
| 8503 | if (!(check_pProperties)) |
| 8504 | { |
| 8505 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8506 | } |
| 8507 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8508 | { |
| 8509 | unmarshal_VkDisplayModeProperties2KHR(stream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8510 | } |
| 8511 | } |
| 8512 | VkResult vkGetDisplayModeProperties2KHR_VkResult_return = (VkResult)0; |
| 8513 | stream->read(&vkGetDisplayModeProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8514 | return vkGetDisplayModeProperties2KHR_VkResult_return; |
| 8515 | } |
| 8516 | |
| 8517 | VkResult VkEncoder::vkGetDisplayPlaneCapabilities2KHR( |
| 8518 | VkPhysicalDevice physicalDevice, |
| 8519 | const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, |
| 8520 | VkDisplayPlaneCapabilities2KHR* pCapabilities) |
| 8521 | { |
| 8522 | auto stream = mImpl->stream(); |
| 8523 | auto countingStream = mImpl->countingStream(); |
| 8524 | countingStream->rewind(); |
| 8525 | { |
| 8526 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8527 | marshal_VkDisplayPlaneInfo2KHR(countingStream, (const VkDisplayPlaneInfo2KHR*)(pDisplayPlaneInfo)); |
| 8528 | marshal_VkDisplayPlaneCapabilities2KHR(countingStream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8529 | } |
| 8530 | uint32_t packetSize_vkGetDisplayPlaneCapabilities2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8531 | countingStream->rewind(); |
| 8532 | uint32_t opcode_vkGetDisplayPlaneCapabilities2KHR = OP_vkGetDisplayPlaneCapabilities2KHR; |
| 8533 | stream->write(&opcode_vkGetDisplayPlaneCapabilities2KHR, sizeof(uint32_t)); |
| 8534 | stream->write(&packetSize_vkGetDisplayPlaneCapabilities2KHR, sizeof(uint32_t)); |
| 8535 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8536 | marshal_VkDisplayPlaneInfo2KHR(stream, (const VkDisplayPlaneInfo2KHR*)(pDisplayPlaneInfo)); |
| 8537 | marshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8538 | unmarshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8539 | VkResult vkGetDisplayPlaneCapabilities2KHR_VkResult_return = (VkResult)0; |
| 8540 | stream->read(&vkGetDisplayPlaneCapabilities2KHR_VkResult_return, sizeof(VkResult)); |
| 8541 | return vkGetDisplayPlaneCapabilities2KHR_VkResult_return; |
| 8542 | } |
| 8543 | |
| 8544 | #endif |
| 8545 | #ifdef VK_KHR_dedicated_allocation |
| 8546 | #endif |
| 8547 | #ifdef VK_KHR_storage_buffer_storage_class |
| 8548 | #endif |
| 8549 | #ifdef VK_KHR_relaxed_block_layout |
| 8550 | #endif |
| 8551 | #ifdef VK_KHR_get_memory_requirements2 |
| 8552 | void VkEncoder::vkGetImageMemoryRequirements2KHR( |
| 8553 | VkDevice device, |
| 8554 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 8555 | VkMemoryRequirements2* pMemoryRequirements) |
| 8556 | { |
| 8557 | auto stream = mImpl->stream(); |
| 8558 | auto countingStream = mImpl->countingStream(); |
| 8559 | countingStream->rewind(); |
| 8560 | { |
| 8561 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8562 | marshal_VkImageMemoryRequirementsInfo2(countingStream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 8563 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8564 | } |
| 8565 | uint32_t packetSize_vkGetImageMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8566 | countingStream->rewind(); |
| 8567 | uint32_t opcode_vkGetImageMemoryRequirements2KHR = OP_vkGetImageMemoryRequirements2KHR; |
| 8568 | stream->write(&opcode_vkGetImageMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8569 | stream->write(&packetSize_vkGetImageMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8570 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8571 | marshal_VkImageMemoryRequirementsInfo2(stream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 8572 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8573 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8574 | } |
| 8575 | |
| 8576 | void VkEncoder::vkGetBufferMemoryRequirements2KHR( |
| 8577 | VkDevice device, |
| 8578 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 8579 | VkMemoryRequirements2* pMemoryRequirements) |
| 8580 | { |
| 8581 | auto stream = mImpl->stream(); |
| 8582 | auto countingStream = mImpl->countingStream(); |
| 8583 | countingStream->rewind(); |
| 8584 | { |
| 8585 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8586 | marshal_VkBufferMemoryRequirementsInfo2(countingStream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 8587 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8588 | } |
| 8589 | uint32_t packetSize_vkGetBufferMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8590 | countingStream->rewind(); |
| 8591 | uint32_t opcode_vkGetBufferMemoryRequirements2KHR = OP_vkGetBufferMemoryRequirements2KHR; |
| 8592 | stream->write(&opcode_vkGetBufferMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8593 | stream->write(&packetSize_vkGetBufferMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8594 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8595 | marshal_VkBufferMemoryRequirementsInfo2(stream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 8596 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8597 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8598 | } |
| 8599 | |
| 8600 | void VkEncoder::vkGetImageSparseMemoryRequirements2KHR( |
| 8601 | VkDevice device, |
| 8602 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 8603 | uint32_t* pSparseMemoryRequirementCount, |
| 8604 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 8605 | { |
| 8606 | auto stream = mImpl->stream(); |
| 8607 | auto countingStream = mImpl->countingStream(); |
| 8608 | countingStream->rewind(); |
| 8609 | { |
| 8610 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8611 | marshal_VkImageSparseMemoryRequirementsInfo2(countingStream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 8612 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8613 | if (pSparseMemoryRequirementCount) |
| 8614 | { |
| 8615 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8616 | } |
| 8617 | countingStream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8618 | if (pSparseMemoryRequirements) |
| 8619 | { |
| 8620 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8621 | { |
| 8622 | marshal_VkSparseImageMemoryRequirements2(countingStream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8623 | } |
| 8624 | } |
| 8625 | } |
| 8626 | uint32_t packetSize_vkGetImageSparseMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8627 | countingStream->rewind(); |
| 8628 | uint32_t opcode_vkGetImageSparseMemoryRequirements2KHR = OP_vkGetImageSparseMemoryRequirements2KHR; |
| 8629 | stream->write(&opcode_vkGetImageSparseMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8630 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8631 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8632 | marshal_VkImageSparseMemoryRequirementsInfo2(stream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 8633 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8634 | if (pSparseMemoryRequirementCount) |
| 8635 | { |
| 8636 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8637 | } |
| 8638 | stream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8639 | if (pSparseMemoryRequirements) |
| 8640 | { |
| 8641 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8642 | { |
| 8643 | marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8644 | } |
| 8645 | } |
| 8646 | uint32_t* check_pSparseMemoryRequirementCount; |
| 8647 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8648 | if (pSparseMemoryRequirementCount) |
| 8649 | { |
| 8650 | if (!(check_pSparseMemoryRequirementCount)) |
| 8651 | { |
| 8652 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 8653 | } |
| 8654 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8655 | } |
| 8656 | VkSparseImageMemoryRequirements2* check_pSparseMemoryRequirements; |
| 8657 | stream->read((VkSparseImageMemoryRequirements2**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8658 | if (pSparseMemoryRequirements) |
| 8659 | { |
| 8660 | if (!(check_pSparseMemoryRequirements)) |
| 8661 | { |
| 8662 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 8663 | } |
| 8664 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8665 | { |
| 8666 | unmarshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8667 | } |
| 8668 | } |
| 8669 | } |
| 8670 | |
| 8671 | #endif |
| 8672 | #ifdef VK_KHR_image_format_list |
| 8673 | #endif |
| 8674 | #ifdef VK_KHR_sampler_ycbcr_conversion |
| 8675 | VkResult VkEncoder::vkCreateSamplerYcbcrConversionKHR( |
| 8676 | VkDevice device, |
| 8677 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 8678 | const VkAllocationCallbacks* pAllocator, |
| 8679 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 8680 | { |
| 8681 | auto stream = mImpl->stream(); |
| 8682 | auto countingStream = mImpl->countingStream(); |
| 8683 | countingStream->rewind(); |
| 8684 | { |
| 8685 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8686 | marshal_VkSamplerYcbcrConversionCreateInfo(countingStream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 8687 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8688 | if (pAllocator) |
| 8689 | { |
| 8690 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8691 | } |
| 8692 | countingStream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8693 | } |
| 8694 | uint32_t packetSize_vkCreateSamplerYcbcrConversionKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8695 | countingStream->rewind(); |
| 8696 | uint32_t opcode_vkCreateSamplerYcbcrConversionKHR = OP_vkCreateSamplerYcbcrConversionKHR; |
| 8697 | stream->write(&opcode_vkCreateSamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8698 | stream->write(&packetSize_vkCreateSamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8699 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8700 | marshal_VkSamplerYcbcrConversionCreateInfo(stream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 8701 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8702 | if (pAllocator) |
| 8703 | { |
| 8704 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8705 | } |
| 8706 | stream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8707 | stream->read((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8708 | VkResult vkCreateSamplerYcbcrConversionKHR_VkResult_return = (VkResult)0; |
| 8709 | stream->read(&vkCreateSamplerYcbcrConversionKHR_VkResult_return, sizeof(VkResult)); |
| 8710 | return vkCreateSamplerYcbcrConversionKHR_VkResult_return; |
| 8711 | } |
| 8712 | |
| 8713 | void VkEncoder::vkDestroySamplerYcbcrConversionKHR( |
| 8714 | VkDevice device, |
| 8715 | VkSamplerYcbcrConversion ycbcrConversion, |
| 8716 | const VkAllocationCallbacks* pAllocator) |
| 8717 | { |
| 8718 | auto stream = mImpl->stream(); |
| 8719 | auto countingStream = mImpl->countingStream(); |
| 8720 | countingStream->rewind(); |
| 8721 | { |
| 8722 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8723 | countingStream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8724 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8725 | if (pAllocator) |
| 8726 | { |
| 8727 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8728 | } |
| 8729 | } |
| 8730 | uint32_t packetSize_vkDestroySamplerYcbcrConversionKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8731 | countingStream->rewind(); |
| 8732 | uint32_t opcode_vkDestroySamplerYcbcrConversionKHR = OP_vkDestroySamplerYcbcrConversionKHR; |
| 8733 | stream->write(&opcode_vkDestroySamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8734 | stream->write(&packetSize_vkDestroySamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8735 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8736 | stream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8737 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8738 | if (pAllocator) |
| 8739 | { |
| 8740 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8741 | } |
| 8742 | } |
| 8743 | |
| 8744 | #endif |
| 8745 | #ifdef VK_KHR_bind_memory2 |
| 8746 | VkResult VkEncoder::vkBindBufferMemory2KHR( |
| 8747 | VkDevice device, |
| 8748 | uint32_t bindInfoCount, |
| 8749 | const VkBindBufferMemoryInfo* pBindInfos) |
| 8750 | { |
| 8751 | auto stream = mImpl->stream(); |
| 8752 | auto countingStream = mImpl->countingStream(); |
| 8753 | countingStream->rewind(); |
| 8754 | { |
| 8755 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8756 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8757 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8758 | { |
| 8759 | marshal_VkBindBufferMemoryInfo(countingStream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 8760 | } |
| 8761 | } |
| 8762 | uint32_t packetSize_vkBindBufferMemory2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8763 | countingStream->rewind(); |
| 8764 | uint32_t opcode_vkBindBufferMemory2KHR = OP_vkBindBufferMemory2KHR; |
| 8765 | stream->write(&opcode_vkBindBufferMemory2KHR, sizeof(uint32_t)); |
| 8766 | stream->write(&packetSize_vkBindBufferMemory2KHR, sizeof(uint32_t)); |
| 8767 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8768 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8769 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8770 | { |
| 8771 | marshal_VkBindBufferMemoryInfo(stream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 8772 | } |
| 8773 | VkResult vkBindBufferMemory2KHR_VkResult_return = (VkResult)0; |
| 8774 | stream->read(&vkBindBufferMemory2KHR_VkResult_return, sizeof(VkResult)); |
| 8775 | return vkBindBufferMemory2KHR_VkResult_return; |
| 8776 | } |
| 8777 | |
| 8778 | VkResult VkEncoder::vkBindImageMemory2KHR( |
| 8779 | VkDevice device, |
| 8780 | uint32_t bindInfoCount, |
| 8781 | const VkBindImageMemoryInfo* pBindInfos) |
| 8782 | { |
| 8783 | auto stream = mImpl->stream(); |
| 8784 | auto countingStream = mImpl->countingStream(); |
| 8785 | countingStream->rewind(); |
| 8786 | { |
| 8787 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8788 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8789 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8790 | { |
| 8791 | marshal_VkBindImageMemoryInfo(countingStream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 8792 | } |
| 8793 | } |
| 8794 | uint32_t packetSize_vkBindImageMemory2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8795 | countingStream->rewind(); |
| 8796 | uint32_t opcode_vkBindImageMemory2KHR = OP_vkBindImageMemory2KHR; |
| 8797 | stream->write(&opcode_vkBindImageMemory2KHR, sizeof(uint32_t)); |
| 8798 | stream->write(&packetSize_vkBindImageMemory2KHR, sizeof(uint32_t)); |
| 8799 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8800 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8801 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8802 | { |
| 8803 | marshal_VkBindImageMemoryInfo(stream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 8804 | } |
| 8805 | VkResult vkBindImageMemory2KHR_VkResult_return = (VkResult)0; |
| 8806 | stream->read(&vkBindImageMemory2KHR_VkResult_return, sizeof(VkResult)); |
| 8807 | return vkBindImageMemory2KHR_VkResult_return; |
| 8808 | } |
| 8809 | |
| 8810 | #endif |
| 8811 | #ifdef VK_KHR_maintenance3 |
| 8812 | void VkEncoder::vkGetDescriptorSetLayoutSupportKHR( |
| 8813 | VkDevice device, |
| 8814 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 8815 | VkDescriptorSetLayoutSupport* pSupport) |
| 8816 | { |
| 8817 | auto stream = mImpl->stream(); |
| 8818 | auto countingStream = mImpl->countingStream(); |
| 8819 | countingStream->rewind(); |
| 8820 | { |
| 8821 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8822 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 8823 | marshal_VkDescriptorSetLayoutSupport(countingStream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8824 | } |
| 8825 | uint32_t packetSize_vkGetDescriptorSetLayoutSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8826 | countingStream->rewind(); |
| 8827 | uint32_t opcode_vkGetDescriptorSetLayoutSupportKHR = OP_vkGetDescriptorSetLayoutSupportKHR; |
| 8828 | stream->write(&opcode_vkGetDescriptorSetLayoutSupportKHR, sizeof(uint32_t)); |
| 8829 | stream->write(&packetSize_vkGetDescriptorSetLayoutSupportKHR, sizeof(uint32_t)); |
| 8830 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8831 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 8832 | marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8833 | unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8834 | } |
| 8835 | |
| 8836 | #endif |
| 8837 | #ifdef VK_KHR_draw_indirect_count |
| 8838 | void VkEncoder::vkCmdDrawIndirectCountKHR( |
| 8839 | VkCommandBuffer commandBuffer, |
| 8840 | VkBuffer buffer, |
| 8841 | VkDeviceSize offset, |
| 8842 | VkBuffer countBuffer, |
| 8843 | VkDeviceSize countBufferOffset, |
| 8844 | uint32_t maxDrawCount, |
| 8845 | uint32_t stride) |
| 8846 | { |
| 8847 | auto stream = mImpl->stream(); |
| 8848 | auto countingStream = mImpl->countingStream(); |
| 8849 | countingStream->rewind(); |
| 8850 | { |
| 8851 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8852 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8853 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8854 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8855 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8856 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8857 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8858 | } |
| 8859 | uint32_t packetSize_vkCmdDrawIndirectCountKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8860 | countingStream->rewind(); |
| 8861 | uint32_t opcode_vkCmdDrawIndirectCountKHR = OP_vkCmdDrawIndirectCountKHR; |
| 8862 | stream->write(&opcode_vkCmdDrawIndirectCountKHR, sizeof(uint32_t)); |
| 8863 | stream->write(&packetSize_vkCmdDrawIndirectCountKHR, sizeof(uint32_t)); |
| 8864 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8865 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8866 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8867 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8868 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8869 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8870 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8871 | } |
| 8872 | |
| 8873 | void VkEncoder::vkCmdDrawIndexedIndirectCountKHR( |
| 8874 | VkCommandBuffer commandBuffer, |
| 8875 | VkBuffer buffer, |
| 8876 | VkDeviceSize offset, |
| 8877 | VkBuffer countBuffer, |
| 8878 | VkDeviceSize countBufferOffset, |
| 8879 | uint32_t maxDrawCount, |
| 8880 | uint32_t stride) |
| 8881 | { |
| 8882 | auto stream = mImpl->stream(); |
| 8883 | auto countingStream = mImpl->countingStream(); |
| 8884 | countingStream->rewind(); |
| 8885 | { |
| 8886 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8887 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8888 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8889 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8890 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8891 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8892 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8893 | } |
| 8894 | uint32_t packetSize_vkCmdDrawIndexedIndirectCountKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8895 | countingStream->rewind(); |
| 8896 | uint32_t opcode_vkCmdDrawIndexedIndirectCountKHR = OP_vkCmdDrawIndexedIndirectCountKHR; |
| 8897 | stream->write(&opcode_vkCmdDrawIndexedIndirectCountKHR, sizeof(uint32_t)); |
| 8898 | stream->write(&packetSize_vkCmdDrawIndexedIndirectCountKHR, sizeof(uint32_t)); |
| 8899 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8900 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8901 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8902 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8903 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8904 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8905 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8906 | } |
| 8907 | |
| 8908 | #endif |
| 8909 | #ifdef VK_KHR_8bit_storage |
| 8910 | #endif |
| 8911 | #ifdef VK_EXT_debug_report |
| 8912 | VkResult VkEncoder::vkCreateDebugReportCallbackEXT( |
| 8913 | VkInstance instance, |
| 8914 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 8915 | const VkAllocationCallbacks* pAllocator, |
| 8916 | VkDebugReportCallbackEXT* pCallback) |
| 8917 | { |
| 8918 | auto stream = mImpl->stream(); |
| 8919 | auto countingStream = mImpl->countingStream(); |
| 8920 | countingStream->rewind(); |
| 8921 | { |
| 8922 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8923 | marshal_VkDebugReportCallbackCreateInfoEXT(countingStream, (const VkDebugReportCallbackCreateInfoEXT*)(pCreateInfo)); |
| 8924 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8925 | if (pAllocator) |
| 8926 | { |
| 8927 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8928 | } |
| 8929 | countingStream->write((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8930 | } |
| 8931 | uint32_t packetSize_vkCreateDebugReportCallbackEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8932 | countingStream->rewind(); |
| 8933 | uint32_t opcode_vkCreateDebugReportCallbackEXT = OP_vkCreateDebugReportCallbackEXT; |
| 8934 | stream->write(&opcode_vkCreateDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8935 | stream->write(&packetSize_vkCreateDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8936 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8937 | marshal_VkDebugReportCallbackCreateInfoEXT(stream, (const VkDebugReportCallbackCreateInfoEXT*)(pCreateInfo)); |
| 8938 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8939 | if (pAllocator) |
| 8940 | { |
| 8941 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8942 | } |
| 8943 | stream->write((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8944 | stream->read((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8945 | VkResult vkCreateDebugReportCallbackEXT_VkResult_return = (VkResult)0; |
| 8946 | stream->read(&vkCreateDebugReportCallbackEXT_VkResult_return, sizeof(VkResult)); |
| 8947 | return vkCreateDebugReportCallbackEXT_VkResult_return; |
| 8948 | } |
| 8949 | |
| 8950 | void VkEncoder::vkDestroyDebugReportCallbackEXT( |
| 8951 | VkInstance instance, |
| 8952 | VkDebugReportCallbackEXT callback, |
| 8953 | const VkAllocationCallbacks* pAllocator) |
| 8954 | { |
| 8955 | auto stream = mImpl->stream(); |
| 8956 | auto countingStream = mImpl->countingStream(); |
| 8957 | countingStream->rewind(); |
| 8958 | { |
| 8959 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8960 | countingStream->write((VkDebugReportCallbackEXT*)&callback, sizeof(VkDebugReportCallbackEXT)); |
| 8961 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8962 | if (pAllocator) |
| 8963 | { |
| 8964 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8965 | } |
| 8966 | } |
| 8967 | uint32_t packetSize_vkDestroyDebugReportCallbackEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8968 | countingStream->rewind(); |
| 8969 | uint32_t opcode_vkDestroyDebugReportCallbackEXT = OP_vkDestroyDebugReportCallbackEXT; |
| 8970 | stream->write(&opcode_vkDestroyDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8971 | stream->write(&packetSize_vkDestroyDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8972 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8973 | stream->write((VkDebugReportCallbackEXT*)&callback, sizeof(VkDebugReportCallbackEXT)); |
| 8974 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8975 | if (pAllocator) |
| 8976 | { |
| 8977 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8978 | } |
| 8979 | } |
| 8980 | |
| 8981 | void VkEncoder::vkDebugReportMessageEXT( |
| 8982 | VkInstance instance, |
| 8983 | VkDebugReportFlagsEXT flags, |
| 8984 | VkDebugReportObjectTypeEXT objectType, |
| 8985 | uint64_t object, |
| 8986 | size_t location, |
| 8987 | int32_t messageCode, |
| 8988 | const char* pLayerPrefix, |
| 8989 | const char* pMessage) |
| 8990 | { |
| 8991 | auto stream = mImpl->stream(); |
| 8992 | auto countingStream = mImpl->countingStream(); |
| 8993 | countingStream->rewind(); |
| 8994 | { |
| 8995 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8996 | countingStream->write((VkDebugReportFlagsEXT*)&flags, sizeof(VkDebugReportFlagsEXT)); |
| 8997 | countingStream->write((VkDebugReportObjectTypeEXT*)&objectType, sizeof(VkDebugReportObjectTypeEXT)); |
| 8998 | countingStream->write((uint64_t*)&object, sizeof(uint64_t)); |
| 8999 | countingStream->write((size_t*)&location, sizeof(size_t)); |
| 9000 | countingStream->write((int32_t*)&messageCode, sizeof(int32_t)); |
| 9001 | countingStream->putString(pLayerPrefix); |
| 9002 | countingStream->putString(pMessage); |
| 9003 | } |
| 9004 | uint32_t packetSize_vkDebugReportMessageEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9005 | countingStream->rewind(); |
| 9006 | uint32_t opcode_vkDebugReportMessageEXT = OP_vkDebugReportMessageEXT; |
| 9007 | stream->write(&opcode_vkDebugReportMessageEXT, sizeof(uint32_t)); |
| 9008 | stream->write(&packetSize_vkDebugReportMessageEXT, sizeof(uint32_t)); |
| 9009 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9010 | stream->write((VkDebugReportFlagsEXT*)&flags, sizeof(VkDebugReportFlagsEXT)); |
| 9011 | stream->write((VkDebugReportObjectTypeEXT*)&objectType, sizeof(VkDebugReportObjectTypeEXT)); |
| 9012 | stream->write((uint64_t*)&object, sizeof(uint64_t)); |
| 9013 | stream->write((size_t*)&location, sizeof(size_t)); |
| 9014 | stream->write((int32_t*)&messageCode, sizeof(int32_t)); |
| 9015 | stream->putString(pLayerPrefix); |
| 9016 | stream->putString(pMessage); |
| 9017 | } |
| 9018 | |
| 9019 | #endif |
| 9020 | #ifdef VK_NV_glsl_shader |
| 9021 | #endif |
| 9022 | #ifdef VK_EXT_depth_range_unrestricted |
| 9023 | #endif |
| 9024 | #ifdef VK_IMG_filter_cubic |
| 9025 | #endif |
| 9026 | #ifdef VK_AMD_rasterization_order |
| 9027 | #endif |
| 9028 | #ifdef VK_AMD_shader_trinary_minmax |
| 9029 | #endif |
| 9030 | #ifdef VK_AMD_shader_explicit_vertex_parameter |
| 9031 | #endif |
| 9032 | #ifdef VK_EXT_debug_marker |
| 9033 | VkResult VkEncoder::vkDebugMarkerSetObjectTagEXT( |
| 9034 | VkDevice device, |
| 9035 | const VkDebugMarkerObjectTagInfoEXT* pTagInfo) |
| 9036 | { |
| 9037 | auto stream = mImpl->stream(); |
| 9038 | auto countingStream = mImpl->countingStream(); |
| 9039 | countingStream->rewind(); |
| 9040 | { |
| 9041 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9042 | marshal_VkDebugMarkerObjectTagInfoEXT(countingStream, (const VkDebugMarkerObjectTagInfoEXT*)(pTagInfo)); |
| 9043 | } |
| 9044 | uint32_t packetSize_vkDebugMarkerSetObjectTagEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9045 | countingStream->rewind(); |
| 9046 | uint32_t opcode_vkDebugMarkerSetObjectTagEXT = OP_vkDebugMarkerSetObjectTagEXT; |
| 9047 | stream->write(&opcode_vkDebugMarkerSetObjectTagEXT, sizeof(uint32_t)); |
| 9048 | stream->write(&packetSize_vkDebugMarkerSetObjectTagEXT, sizeof(uint32_t)); |
| 9049 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9050 | marshal_VkDebugMarkerObjectTagInfoEXT(stream, (const VkDebugMarkerObjectTagInfoEXT*)(pTagInfo)); |
| 9051 | VkResult vkDebugMarkerSetObjectTagEXT_VkResult_return = (VkResult)0; |
| 9052 | stream->read(&vkDebugMarkerSetObjectTagEXT_VkResult_return, sizeof(VkResult)); |
| 9053 | return vkDebugMarkerSetObjectTagEXT_VkResult_return; |
| 9054 | } |
| 9055 | |
| 9056 | VkResult VkEncoder::vkDebugMarkerSetObjectNameEXT( |
| 9057 | VkDevice device, |
| 9058 | const VkDebugMarkerObjectNameInfoEXT* pNameInfo) |
| 9059 | { |
| 9060 | auto stream = mImpl->stream(); |
| 9061 | auto countingStream = mImpl->countingStream(); |
| 9062 | countingStream->rewind(); |
| 9063 | { |
| 9064 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9065 | marshal_VkDebugMarkerObjectNameInfoEXT(countingStream, (const VkDebugMarkerObjectNameInfoEXT*)(pNameInfo)); |
| 9066 | } |
| 9067 | uint32_t packetSize_vkDebugMarkerSetObjectNameEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9068 | countingStream->rewind(); |
| 9069 | uint32_t opcode_vkDebugMarkerSetObjectNameEXT = OP_vkDebugMarkerSetObjectNameEXT; |
| 9070 | stream->write(&opcode_vkDebugMarkerSetObjectNameEXT, sizeof(uint32_t)); |
| 9071 | stream->write(&packetSize_vkDebugMarkerSetObjectNameEXT, sizeof(uint32_t)); |
| 9072 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9073 | marshal_VkDebugMarkerObjectNameInfoEXT(stream, (const VkDebugMarkerObjectNameInfoEXT*)(pNameInfo)); |
| 9074 | VkResult vkDebugMarkerSetObjectNameEXT_VkResult_return = (VkResult)0; |
| 9075 | stream->read(&vkDebugMarkerSetObjectNameEXT_VkResult_return, sizeof(VkResult)); |
| 9076 | return vkDebugMarkerSetObjectNameEXT_VkResult_return; |
| 9077 | } |
| 9078 | |
| 9079 | void VkEncoder::vkCmdDebugMarkerBeginEXT( |
| 9080 | VkCommandBuffer commandBuffer, |
| 9081 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 9082 | { |
| 9083 | auto stream = mImpl->stream(); |
| 9084 | auto countingStream = mImpl->countingStream(); |
| 9085 | countingStream->rewind(); |
| 9086 | { |
| 9087 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9088 | marshal_VkDebugMarkerMarkerInfoEXT(countingStream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9089 | } |
| 9090 | uint32_t packetSize_vkCmdDebugMarkerBeginEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9091 | countingStream->rewind(); |
| 9092 | uint32_t opcode_vkCmdDebugMarkerBeginEXT = OP_vkCmdDebugMarkerBeginEXT; |
| 9093 | stream->write(&opcode_vkCmdDebugMarkerBeginEXT, sizeof(uint32_t)); |
| 9094 | stream->write(&packetSize_vkCmdDebugMarkerBeginEXT, sizeof(uint32_t)); |
| 9095 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9096 | marshal_VkDebugMarkerMarkerInfoEXT(stream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9097 | } |
| 9098 | |
| 9099 | void VkEncoder::vkCmdDebugMarkerEndEXT( |
| 9100 | VkCommandBuffer commandBuffer) |
| 9101 | { |
| 9102 | auto stream = mImpl->stream(); |
| 9103 | auto countingStream = mImpl->countingStream(); |
| 9104 | countingStream->rewind(); |
| 9105 | { |
| 9106 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9107 | } |
| 9108 | uint32_t packetSize_vkCmdDebugMarkerEndEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9109 | countingStream->rewind(); |
| 9110 | uint32_t opcode_vkCmdDebugMarkerEndEXT = OP_vkCmdDebugMarkerEndEXT; |
| 9111 | stream->write(&opcode_vkCmdDebugMarkerEndEXT, sizeof(uint32_t)); |
| 9112 | stream->write(&packetSize_vkCmdDebugMarkerEndEXT, sizeof(uint32_t)); |
| 9113 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9114 | } |
| 9115 | |
| 9116 | void VkEncoder::vkCmdDebugMarkerInsertEXT( |
| 9117 | VkCommandBuffer commandBuffer, |
| 9118 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 9119 | { |
| 9120 | auto stream = mImpl->stream(); |
| 9121 | auto countingStream = mImpl->countingStream(); |
| 9122 | countingStream->rewind(); |
| 9123 | { |
| 9124 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9125 | marshal_VkDebugMarkerMarkerInfoEXT(countingStream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9126 | } |
| 9127 | uint32_t packetSize_vkCmdDebugMarkerInsertEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9128 | countingStream->rewind(); |
| 9129 | uint32_t opcode_vkCmdDebugMarkerInsertEXT = OP_vkCmdDebugMarkerInsertEXT; |
| 9130 | stream->write(&opcode_vkCmdDebugMarkerInsertEXT, sizeof(uint32_t)); |
| 9131 | stream->write(&packetSize_vkCmdDebugMarkerInsertEXT, sizeof(uint32_t)); |
| 9132 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9133 | marshal_VkDebugMarkerMarkerInfoEXT(stream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9134 | } |
| 9135 | |
| 9136 | #endif |
| 9137 | #ifdef VK_AMD_gcn_shader |
| 9138 | #endif |
| 9139 | #ifdef VK_NV_dedicated_allocation |
| 9140 | #endif |
| 9141 | #ifdef VK_AMD_draw_indirect_count |
| 9142 | void VkEncoder::vkCmdDrawIndirectCountAMD( |
| 9143 | VkCommandBuffer commandBuffer, |
| 9144 | VkBuffer buffer, |
| 9145 | VkDeviceSize offset, |
| 9146 | VkBuffer countBuffer, |
| 9147 | VkDeviceSize countBufferOffset, |
| 9148 | uint32_t maxDrawCount, |
| 9149 | uint32_t stride) |
| 9150 | { |
| 9151 | auto stream = mImpl->stream(); |
| 9152 | auto countingStream = mImpl->countingStream(); |
| 9153 | countingStream->rewind(); |
| 9154 | { |
| 9155 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9156 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9157 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9158 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9159 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9160 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9161 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9162 | } |
| 9163 | uint32_t packetSize_vkCmdDrawIndirectCountAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9164 | countingStream->rewind(); |
| 9165 | uint32_t opcode_vkCmdDrawIndirectCountAMD = OP_vkCmdDrawIndirectCountAMD; |
| 9166 | stream->write(&opcode_vkCmdDrawIndirectCountAMD, sizeof(uint32_t)); |
| 9167 | stream->write(&packetSize_vkCmdDrawIndirectCountAMD, sizeof(uint32_t)); |
| 9168 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9169 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9170 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9171 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9172 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9173 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9174 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9175 | } |
| 9176 | |
| 9177 | void VkEncoder::vkCmdDrawIndexedIndirectCountAMD( |
| 9178 | VkCommandBuffer commandBuffer, |
| 9179 | VkBuffer buffer, |
| 9180 | VkDeviceSize offset, |
| 9181 | VkBuffer countBuffer, |
| 9182 | VkDeviceSize countBufferOffset, |
| 9183 | uint32_t maxDrawCount, |
| 9184 | uint32_t stride) |
| 9185 | { |
| 9186 | auto stream = mImpl->stream(); |
| 9187 | auto countingStream = mImpl->countingStream(); |
| 9188 | countingStream->rewind(); |
| 9189 | { |
| 9190 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9191 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9192 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9193 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9194 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9195 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9196 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9197 | } |
| 9198 | uint32_t packetSize_vkCmdDrawIndexedIndirectCountAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9199 | countingStream->rewind(); |
| 9200 | uint32_t opcode_vkCmdDrawIndexedIndirectCountAMD = OP_vkCmdDrawIndexedIndirectCountAMD; |
| 9201 | stream->write(&opcode_vkCmdDrawIndexedIndirectCountAMD, sizeof(uint32_t)); |
| 9202 | stream->write(&packetSize_vkCmdDrawIndexedIndirectCountAMD, sizeof(uint32_t)); |
| 9203 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9204 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9205 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9206 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9207 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9208 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9209 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9210 | } |
| 9211 | |
| 9212 | #endif |
| 9213 | #ifdef VK_AMD_negative_viewport_height |
| 9214 | #endif |
| 9215 | #ifdef VK_AMD_gpu_shader_half_float |
| 9216 | #endif |
| 9217 | #ifdef VK_AMD_shader_ballot |
| 9218 | #endif |
| 9219 | #ifdef VK_AMD_texture_gather_bias_lod |
| 9220 | #endif |
| 9221 | #ifdef VK_AMD_shader_info |
| 9222 | VkResult VkEncoder::vkGetShaderInfoAMD( |
| 9223 | VkDevice device, |
| 9224 | VkPipeline pipeline, |
| 9225 | VkShaderStageFlagBits shaderStage, |
| 9226 | VkShaderInfoTypeAMD infoType, |
| 9227 | size_t* pInfoSize, |
| 9228 | void* pInfo) |
| 9229 | { |
| 9230 | auto stream = mImpl->stream(); |
| 9231 | auto countingStream = mImpl->countingStream(); |
| 9232 | countingStream->rewind(); |
| 9233 | { |
| 9234 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9235 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 9236 | countingStream->write((VkShaderStageFlagBits*)&shaderStage, sizeof(VkShaderStageFlagBits)); |
| 9237 | countingStream->write((VkShaderInfoTypeAMD*)&infoType, sizeof(VkShaderInfoTypeAMD)); |
| 9238 | countingStream->write((size_t**)&pInfoSize, sizeof(size_t*)); |
| 9239 | if (pInfoSize) |
| 9240 | { |
| 9241 | countingStream->write((size_t*)pInfoSize, sizeof(size_t)); |
| 9242 | } |
| 9243 | countingStream->write((void**)&pInfo, sizeof(void*)); |
| 9244 | if (pInfo) |
| 9245 | { |
| 9246 | countingStream->write((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9247 | } |
| 9248 | } |
| 9249 | uint32_t packetSize_vkGetShaderInfoAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9250 | countingStream->rewind(); |
| 9251 | uint32_t opcode_vkGetShaderInfoAMD = OP_vkGetShaderInfoAMD; |
| 9252 | stream->write(&opcode_vkGetShaderInfoAMD, sizeof(uint32_t)); |
| 9253 | stream->write(&packetSize_vkGetShaderInfoAMD, sizeof(uint32_t)); |
| 9254 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9255 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 9256 | stream->write((VkShaderStageFlagBits*)&shaderStage, sizeof(VkShaderStageFlagBits)); |
| 9257 | stream->write((VkShaderInfoTypeAMD*)&infoType, sizeof(VkShaderInfoTypeAMD)); |
| 9258 | stream->write((size_t**)&pInfoSize, sizeof(size_t*)); |
| 9259 | if (pInfoSize) |
| 9260 | { |
| 9261 | stream->write((size_t*)pInfoSize, sizeof(size_t)); |
| 9262 | } |
| 9263 | stream->write((void**)&pInfo, sizeof(void*)); |
| 9264 | if (pInfo) |
| 9265 | { |
| 9266 | stream->write((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9267 | } |
| 9268 | size_t* check_pInfoSize; |
| 9269 | stream->read((size_t**)&check_pInfoSize, sizeof(size_t*)); |
| 9270 | if (pInfoSize) |
| 9271 | { |
| 9272 | if (!(check_pInfoSize)) |
| 9273 | { |
| 9274 | fprintf(stderr, "fatal: pInfoSize inconsistent between guest and host\n"); |
| 9275 | } |
| 9276 | stream->read((size_t*)pInfoSize, sizeof(size_t)); |
| 9277 | } |
| 9278 | void* check_pInfo; |
| 9279 | stream->read((void**)&check_pInfo, sizeof(void*)); |
| 9280 | if (pInfo) |
| 9281 | { |
| 9282 | if (!(check_pInfo)) |
| 9283 | { |
| 9284 | fprintf(stderr, "fatal: pInfo inconsistent between guest and host\n"); |
| 9285 | } |
| 9286 | stream->read((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9287 | } |
| 9288 | VkResult vkGetShaderInfoAMD_VkResult_return = (VkResult)0; |
| 9289 | stream->read(&vkGetShaderInfoAMD_VkResult_return, sizeof(VkResult)); |
| 9290 | return vkGetShaderInfoAMD_VkResult_return; |
| 9291 | } |
| 9292 | |
| 9293 | #endif |
| 9294 | #ifdef VK_AMD_shader_image_load_store_lod |
| 9295 | #endif |
| 9296 | #ifdef VK_IMG_format_pvrtc |
| 9297 | #endif |
| 9298 | #ifdef VK_NV_external_memory_capabilities |
| 9299 | VkResult VkEncoder::vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 9300 | VkPhysicalDevice physicalDevice, |
| 9301 | VkFormat format, |
| 9302 | VkImageType type, |
| 9303 | VkImageTiling tiling, |
| 9304 | VkImageUsageFlags usage, |
| 9305 | VkImageCreateFlags flags, |
| 9306 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 9307 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) |
| 9308 | { |
| 9309 | auto stream = mImpl->stream(); |
| 9310 | auto countingStream = mImpl->countingStream(); |
| 9311 | countingStream->rewind(); |
| 9312 | { |
| 9313 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9314 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 9315 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 9316 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 9317 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 9318 | countingStream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 9319 | countingStream->write((VkExternalMemoryHandleTypeFlagsNV*)&externalHandleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9320 | marshal_VkExternalImageFormatPropertiesNV(countingStream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9321 | } |
| 9322 | uint32_t packetSize_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9323 | countingStream->rewind(); |
| 9324 | uint32_t opcode_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = OP_vkGetPhysicalDeviceExternalImageFormatPropertiesNV; |
| 9325 | stream->write(&opcode_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, sizeof(uint32_t)); |
| 9326 | stream->write(&packetSize_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, sizeof(uint32_t)); |
| 9327 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9328 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 9329 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 9330 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 9331 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 9332 | stream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 9333 | stream->write((VkExternalMemoryHandleTypeFlagsNV*)&externalHandleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9334 | marshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9335 | unmarshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9336 | VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return = (VkResult)0; |
| 9337 | stream->read(&vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return, sizeof(VkResult)); |
| 9338 | return vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return; |
| 9339 | } |
| 9340 | |
| 9341 | #endif |
| 9342 | #ifdef VK_NV_external_memory |
| 9343 | #endif |
| 9344 | #ifdef VK_NV_external_memory_win32 |
| 9345 | VkResult VkEncoder::vkGetMemoryWin32HandleNV( |
| 9346 | VkDevice device, |
| 9347 | VkDeviceMemory memory, |
| 9348 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 9349 | HANDLE* pHandle) |
| 9350 | { |
| 9351 | auto stream = mImpl->stream(); |
| 9352 | auto countingStream = mImpl->countingStream(); |
| 9353 | countingStream->rewind(); |
| 9354 | { |
| 9355 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9356 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 9357 | countingStream->write((VkExternalMemoryHandleTypeFlagsNV*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9358 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9359 | } |
| 9360 | uint32_t packetSize_vkGetMemoryWin32HandleNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9361 | countingStream->rewind(); |
| 9362 | uint32_t opcode_vkGetMemoryWin32HandleNV = OP_vkGetMemoryWin32HandleNV; |
| 9363 | stream->write(&opcode_vkGetMemoryWin32HandleNV, sizeof(uint32_t)); |
| 9364 | stream->write(&packetSize_vkGetMemoryWin32HandleNV, sizeof(uint32_t)); |
| 9365 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9366 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 9367 | stream->write((VkExternalMemoryHandleTypeFlagsNV*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9368 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9369 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9370 | VkResult vkGetMemoryWin32HandleNV_VkResult_return = (VkResult)0; |
| 9371 | stream->read(&vkGetMemoryWin32HandleNV_VkResult_return, sizeof(VkResult)); |
| 9372 | return vkGetMemoryWin32HandleNV_VkResult_return; |
| 9373 | } |
| 9374 | |
| 9375 | #endif |
| 9376 | #ifdef VK_NV_win32_keyed_mutex |
| 9377 | #endif |
| 9378 | #ifdef VK_EXT_validation_flags |
| 9379 | #endif |
| 9380 | #ifdef VK_NN_vi_surface |
| 9381 | VkResult VkEncoder::vkCreateViSurfaceNN( |
| 9382 | VkInstance instance, |
| 9383 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 9384 | const VkAllocationCallbacks* pAllocator, |
| 9385 | VkSurfaceKHR* pSurface) |
| 9386 | { |
| 9387 | auto stream = mImpl->stream(); |
| 9388 | auto countingStream = mImpl->countingStream(); |
| 9389 | countingStream->rewind(); |
| 9390 | { |
| 9391 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9392 | marshal_VkViSurfaceCreateInfoNN(countingStream, (const VkViSurfaceCreateInfoNN*)(pCreateInfo)); |
| 9393 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9394 | if (pAllocator) |
| 9395 | { |
| 9396 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9397 | } |
| 9398 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9399 | } |
| 9400 | uint32_t packetSize_vkCreateViSurfaceNN = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9401 | countingStream->rewind(); |
| 9402 | uint32_t opcode_vkCreateViSurfaceNN = OP_vkCreateViSurfaceNN; |
| 9403 | stream->write(&opcode_vkCreateViSurfaceNN, sizeof(uint32_t)); |
| 9404 | stream->write(&packetSize_vkCreateViSurfaceNN, sizeof(uint32_t)); |
| 9405 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9406 | marshal_VkViSurfaceCreateInfoNN(stream, (const VkViSurfaceCreateInfoNN*)(pCreateInfo)); |
| 9407 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9408 | if (pAllocator) |
| 9409 | { |
| 9410 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9411 | } |
| 9412 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9413 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9414 | VkResult vkCreateViSurfaceNN_VkResult_return = (VkResult)0; |
| 9415 | stream->read(&vkCreateViSurfaceNN_VkResult_return, sizeof(VkResult)); |
| 9416 | return vkCreateViSurfaceNN_VkResult_return; |
| 9417 | } |
| 9418 | |
| 9419 | #endif |
| 9420 | #ifdef VK_EXT_shader_subgroup_ballot |
| 9421 | #endif |
| 9422 | #ifdef VK_EXT_shader_subgroup_vote |
| 9423 | #endif |
| 9424 | #ifdef VK_EXT_conditional_rendering |
| 9425 | void VkEncoder::vkCmdBeginConditionalRenderingEXT( |
| 9426 | VkCommandBuffer commandBuffer, |
| 9427 | const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) |
| 9428 | { |
| 9429 | auto stream = mImpl->stream(); |
| 9430 | auto countingStream = mImpl->countingStream(); |
| 9431 | countingStream->rewind(); |
| 9432 | { |
| 9433 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9434 | marshal_VkConditionalRenderingBeginInfoEXT(countingStream, (const VkConditionalRenderingBeginInfoEXT*)(pConditionalRenderingBegin)); |
| 9435 | } |
| 9436 | uint32_t packetSize_vkCmdBeginConditionalRenderingEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9437 | countingStream->rewind(); |
| 9438 | uint32_t opcode_vkCmdBeginConditionalRenderingEXT = OP_vkCmdBeginConditionalRenderingEXT; |
| 9439 | stream->write(&opcode_vkCmdBeginConditionalRenderingEXT, sizeof(uint32_t)); |
| 9440 | stream->write(&packetSize_vkCmdBeginConditionalRenderingEXT, sizeof(uint32_t)); |
| 9441 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9442 | marshal_VkConditionalRenderingBeginInfoEXT(stream, (const VkConditionalRenderingBeginInfoEXT*)(pConditionalRenderingBegin)); |
| 9443 | } |
| 9444 | |
| 9445 | void VkEncoder::vkCmdEndConditionalRenderingEXT( |
| 9446 | VkCommandBuffer commandBuffer) |
| 9447 | { |
| 9448 | auto stream = mImpl->stream(); |
| 9449 | auto countingStream = mImpl->countingStream(); |
| 9450 | countingStream->rewind(); |
| 9451 | { |
| 9452 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9453 | } |
| 9454 | uint32_t packetSize_vkCmdEndConditionalRenderingEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9455 | countingStream->rewind(); |
| 9456 | uint32_t opcode_vkCmdEndConditionalRenderingEXT = OP_vkCmdEndConditionalRenderingEXT; |
| 9457 | stream->write(&opcode_vkCmdEndConditionalRenderingEXT, sizeof(uint32_t)); |
| 9458 | stream->write(&packetSize_vkCmdEndConditionalRenderingEXT, sizeof(uint32_t)); |
| 9459 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9460 | } |
| 9461 | |
| 9462 | #endif |
| 9463 | #ifdef VK_NVX_device_generated_commands |
| 9464 | void VkEncoder::vkCmdProcessCommandsNVX( |
| 9465 | VkCommandBuffer commandBuffer, |
| 9466 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) |
| 9467 | { |
| 9468 | auto stream = mImpl->stream(); |
| 9469 | auto countingStream = mImpl->countingStream(); |
| 9470 | countingStream->rewind(); |
| 9471 | { |
| 9472 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9473 | marshal_VkCmdProcessCommandsInfoNVX(countingStream, (const VkCmdProcessCommandsInfoNVX*)(pProcessCommandsInfo)); |
| 9474 | } |
| 9475 | uint32_t packetSize_vkCmdProcessCommandsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9476 | countingStream->rewind(); |
| 9477 | uint32_t opcode_vkCmdProcessCommandsNVX = OP_vkCmdProcessCommandsNVX; |
| 9478 | stream->write(&opcode_vkCmdProcessCommandsNVX, sizeof(uint32_t)); |
| 9479 | stream->write(&packetSize_vkCmdProcessCommandsNVX, sizeof(uint32_t)); |
| 9480 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9481 | marshal_VkCmdProcessCommandsInfoNVX(stream, (const VkCmdProcessCommandsInfoNVX*)(pProcessCommandsInfo)); |
| 9482 | } |
| 9483 | |
| 9484 | void VkEncoder::vkCmdReserveSpaceForCommandsNVX( |
| 9485 | VkCommandBuffer commandBuffer, |
| 9486 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) |
| 9487 | { |
| 9488 | auto stream = mImpl->stream(); |
| 9489 | auto countingStream = mImpl->countingStream(); |
| 9490 | countingStream->rewind(); |
| 9491 | { |
| 9492 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9493 | marshal_VkCmdReserveSpaceForCommandsInfoNVX(countingStream, (const VkCmdReserveSpaceForCommandsInfoNVX*)(pReserveSpaceInfo)); |
| 9494 | } |
| 9495 | uint32_t packetSize_vkCmdReserveSpaceForCommandsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9496 | countingStream->rewind(); |
| 9497 | uint32_t opcode_vkCmdReserveSpaceForCommandsNVX = OP_vkCmdReserveSpaceForCommandsNVX; |
| 9498 | stream->write(&opcode_vkCmdReserveSpaceForCommandsNVX, sizeof(uint32_t)); |
| 9499 | stream->write(&packetSize_vkCmdReserveSpaceForCommandsNVX, sizeof(uint32_t)); |
| 9500 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9501 | marshal_VkCmdReserveSpaceForCommandsInfoNVX(stream, (const VkCmdReserveSpaceForCommandsInfoNVX*)(pReserveSpaceInfo)); |
| 9502 | } |
| 9503 | |
| 9504 | VkResult VkEncoder::vkCreateIndirectCommandsLayoutNVX( |
| 9505 | VkDevice device, |
| 9506 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 9507 | const VkAllocationCallbacks* pAllocator, |
| 9508 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) |
| 9509 | { |
| 9510 | auto stream = mImpl->stream(); |
| 9511 | auto countingStream = mImpl->countingStream(); |
| 9512 | countingStream->rewind(); |
| 9513 | { |
| 9514 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9515 | marshal_VkIndirectCommandsLayoutCreateInfoNVX(countingStream, (const VkIndirectCommandsLayoutCreateInfoNVX*)(pCreateInfo)); |
| 9516 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9517 | if (pAllocator) |
| 9518 | { |
| 9519 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9520 | } |
| 9521 | countingStream->write((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9522 | } |
| 9523 | uint32_t packetSize_vkCreateIndirectCommandsLayoutNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9524 | countingStream->rewind(); |
| 9525 | uint32_t opcode_vkCreateIndirectCommandsLayoutNVX = OP_vkCreateIndirectCommandsLayoutNVX; |
| 9526 | stream->write(&opcode_vkCreateIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9527 | stream->write(&packetSize_vkCreateIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9528 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9529 | marshal_VkIndirectCommandsLayoutCreateInfoNVX(stream, (const VkIndirectCommandsLayoutCreateInfoNVX*)(pCreateInfo)); |
| 9530 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9531 | if (pAllocator) |
| 9532 | { |
| 9533 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9534 | } |
| 9535 | stream->write((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9536 | stream->read((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9537 | VkResult vkCreateIndirectCommandsLayoutNVX_VkResult_return = (VkResult)0; |
| 9538 | stream->read(&vkCreateIndirectCommandsLayoutNVX_VkResult_return, sizeof(VkResult)); |
| 9539 | return vkCreateIndirectCommandsLayoutNVX_VkResult_return; |
| 9540 | } |
| 9541 | |
| 9542 | void VkEncoder::vkDestroyIndirectCommandsLayoutNVX( |
| 9543 | VkDevice device, |
| 9544 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 9545 | const VkAllocationCallbacks* pAllocator) |
| 9546 | { |
| 9547 | auto stream = mImpl->stream(); |
| 9548 | auto countingStream = mImpl->countingStream(); |
| 9549 | countingStream->rewind(); |
| 9550 | { |
| 9551 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9552 | countingStream->write((VkIndirectCommandsLayoutNVX*)&indirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9553 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9554 | if (pAllocator) |
| 9555 | { |
| 9556 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9557 | } |
| 9558 | } |
| 9559 | uint32_t packetSize_vkDestroyIndirectCommandsLayoutNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9560 | countingStream->rewind(); |
| 9561 | uint32_t opcode_vkDestroyIndirectCommandsLayoutNVX = OP_vkDestroyIndirectCommandsLayoutNVX; |
| 9562 | stream->write(&opcode_vkDestroyIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9563 | stream->write(&packetSize_vkDestroyIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9564 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9565 | stream->write((VkIndirectCommandsLayoutNVX*)&indirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9566 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9567 | if (pAllocator) |
| 9568 | { |
| 9569 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9570 | } |
| 9571 | } |
| 9572 | |
| 9573 | VkResult VkEncoder::vkCreateObjectTableNVX( |
| 9574 | VkDevice device, |
| 9575 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 9576 | const VkAllocationCallbacks* pAllocator, |
| 9577 | VkObjectTableNVX* pObjectTable) |
| 9578 | { |
| 9579 | auto stream = mImpl->stream(); |
| 9580 | auto countingStream = mImpl->countingStream(); |
| 9581 | countingStream->rewind(); |
| 9582 | { |
| 9583 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9584 | marshal_VkObjectTableCreateInfoNVX(countingStream, (const VkObjectTableCreateInfoNVX*)(pCreateInfo)); |
| 9585 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9586 | if (pAllocator) |
| 9587 | { |
| 9588 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9589 | } |
| 9590 | countingStream->write((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9591 | } |
| 9592 | uint32_t packetSize_vkCreateObjectTableNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9593 | countingStream->rewind(); |
| 9594 | uint32_t opcode_vkCreateObjectTableNVX = OP_vkCreateObjectTableNVX; |
| 9595 | stream->write(&opcode_vkCreateObjectTableNVX, sizeof(uint32_t)); |
| 9596 | stream->write(&packetSize_vkCreateObjectTableNVX, sizeof(uint32_t)); |
| 9597 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9598 | marshal_VkObjectTableCreateInfoNVX(stream, (const VkObjectTableCreateInfoNVX*)(pCreateInfo)); |
| 9599 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9600 | if (pAllocator) |
| 9601 | { |
| 9602 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9603 | } |
| 9604 | stream->write((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9605 | stream->read((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9606 | VkResult vkCreateObjectTableNVX_VkResult_return = (VkResult)0; |
| 9607 | stream->read(&vkCreateObjectTableNVX_VkResult_return, sizeof(VkResult)); |
| 9608 | return vkCreateObjectTableNVX_VkResult_return; |
| 9609 | } |
| 9610 | |
| 9611 | void VkEncoder::vkDestroyObjectTableNVX( |
| 9612 | VkDevice device, |
| 9613 | VkObjectTableNVX objectTable, |
| 9614 | const VkAllocationCallbacks* pAllocator) |
| 9615 | { |
| 9616 | auto stream = mImpl->stream(); |
| 9617 | auto countingStream = mImpl->countingStream(); |
| 9618 | countingStream->rewind(); |
| 9619 | { |
| 9620 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9621 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9622 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9623 | if (pAllocator) |
| 9624 | { |
| 9625 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9626 | } |
| 9627 | } |
| 9628 | uint32_t packetSize_vkDestroyObjectTableNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9629 | countingStream->rewind(); |
| 9630 | uint32_t opcode_vkDestroyObjectTableNVX = OP_vkDestroyObjectTableNVX; |
| 9631 | stream->write(&opcode_vkDestroyObjectTableNVX, sizeof(uint32_t)); |
| 9632 | stream->write(&packetSize_vkDestroyObjectTableNVX, sizeof(uint32_t)); |
| 9633 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9634 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9635 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9636 | if (pAllocator) |
| 9637 | { |
| 9638 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9639 | } |
| 9640 | } |
| 9641 | |
| 9642 | VkResult VkEncoder::vkRegisterObjectsNVX( |
| 9643 | VkDevice device, |
| 9644 | VkObjectTableNVX objectTable, |
| 9645 | uint32_t objectCount, |
| 9646 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 9647 | const uint32_t* pObjectIndices) |
| 9648 | { |
| 9649 | auto stream = mImpl->stream(); |
| 9650 | auto countingStream = mImpl->countingStream(); |
| 9651 | countingStream->rewind(); |
| 9652 | { |
| 9653 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9654 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9655 | countingStream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9656 | countingStream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9657 | } |
| 9658 | uint32_t packetSize_vkRegisterObjectsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9659 | countingStream->rewind(); |
| 9660 | uint32_t opcode_vkRegisterObjectsNVX = OP_vkRegisterObjectsNVX; |
| 9661 | stream->write(&opcode_vkRegisterObjectsNVX, sizeof(uint32_t)); |
| 9662 | stream->write(&packetSize_vkRegisterObjectsNVX, sizeof(uint32_t)); |
| 9663 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9664 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9665 | stream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9666 | stream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9667 | VkResult vkRegisterObjectsNVX_VkResult_return = (VkResult)0; |
| 9668 | stream->read(&vkRegisterObjectsNVX_VkResult_return, sizeof(VkResult)); |
| 9669 | return vkRegisterObjectsNVX_VkResult_return; |
| 9670 | } |
| 9671 | |
| 9672 | VkResult VkEncoder::vkUnregisterObjectsNVX( |
| 9673 | VkDevice device, |
| 9674 | VkObjectTableNVX objectTable, |
| 9675 | uint32_t objectCount, |
| 9676 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 9677 | const uint32_t* pObjectIndices) |
| 9678 | { |
| 9679 | auto stream = mImpl->stream(); |
| 9680 | auto countingStream = mImpl->countingStream(); |
| 9681 | countingStream->rewind(); |
| 9682 | { |
| 9683 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9684 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9685 | countingStream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9686 | countingStream->write((const VkObjectEntryTypeNVX*)pObjectEntryTypes, ((objectCount)) * sizeof(const VkObjectEntryTypeNVX)); |
| 9687 | countingStream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9688 | } |
| 9689 | uint32_t packetSize_vkUnregisterObjectsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9690 | countingStream->rewind(); |
| 9691 | uint32_t opcode_vkUnregisterObjectsNVX = OP_vkUnregisterObjectsNVX; |
| 9692 | stream->write(&opcode_vkUnregisterObjectsNVX, sizeof(uint32_t)); |
| 9693 | stream->write(&packetSize_vkUnregisterObjectsNVX, sizeof(uint32_t)); |
| 9694 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9695 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9696 | stream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9697 | stream->write((const VkObjectEntryTypeNVX*)pObjectEntryTypes, ((objectCount)) * sizeof(const VkObjectEntryTypeNVX)); |
| 9698 | stream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9699 | VkResult vkUnregisterObjectsNVX_VkResult_return = (VkResult)0; |
| 9700 | stream->read(&vkUnregisterObjectsNVX_VkResult_return, sizeof(VkResult)); |
| 9701 | return vkUnregisterObjectsNVX_VkResult_return; |
| 9702 | } |
| 9703 | |
| 9704 | void VkEncoder::vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 9705 | VkPhysicalDevice physicalDevice, |
| 9706 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 9707 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) |
| 9708 | { |
| 9709 | auto stream = mImpl->stream(); |
| 9710 | auto countingStream = mImpl->countingStream(); |
| 9711 | countingStream->rewind(); |
| 9712 | { |
| 9713 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9714 | marshal_VkDeviceGeneratedCommandsFeaturesNVX(countingStream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9715 | marshal_VkDeviceGeneratedCommandsLimitsNVX(countingStream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9716 | } |
| 9717 | uint32_t packetSize_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9718 | countingStream->rewind(); |
| 9719 | uint32_t opcode_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = OP_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX; |
| 9720 | stream->write(&opcode_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, sizeof(uint32_t)); |
| 9721 | stream->write(&packetSize_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, sizeof(uint32_t)); |
| 9722 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9723 | marshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9724 | marshal_VkDeviceGeneratedCommandsLimitsNVX(stream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9725 | unmarshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9726 | unmarshal_VkDeviceGeneratedCommandsLimitsNVX(stream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9727 | } |
| 9728 | |
| 9729 | #endif |
| 9730 | #ifdef VK_NV_clip_space_w_scaling |
| 9731 | void VkEncoder::vkCmdSetViewportWScalingNV( |
| 9732 | VkCommandBuffer commandBuffer, |
| 9733 | uint32_t firstViewport, |
| 9734 | uint32_t viewportCount, |
| 9735 | const VkViewportWScalingNV* pViewportWScalings) |
| 9736 | { |
| 9737 | auto stream = mImpl->stream(); |
| 9738 | auto countingStream = mImpl->countingStream(); |
| 9739 | countingStream->rewind(); |
| 9740 | { |
| 9741 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9742 | countingStream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 9743 | countingStream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 9744 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 9745 | { |
| 9746 | marshal_VkViewportWScalingNV(countingStream, (const VkViewportWScalingNV*)(pViewportWScalings + i)); |
| 9747 | } |
| 9748 | } |
| 9749 | uint32_t packetSize_vkCmdSetViewportWScalingNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9750 | countingStream->rewind(); |
| 9751 | uint32_t opcode_vkCmdSetViewportWScalingNV = OP_vkCmdSetViewportWScalingNV; |
| 9752 | stream->write(&opcode_vkCmdSetViewportWScalingNV, sizeof(uint32_t)); |
| 9753 | stream->write(&packetSize_vkCmdSetViewportWScalingNV, sizeof(uint32_t)); |
| 9754 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9755 | stream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 9756 | stream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 9757 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 9758 | { |
| 9759 | marshal_VkViewportWScalingNV(stream, (const VkViewportWScalingNV*)(pViewportWScalings + i)); |
| 9760 | } |
| 9761 | } |
| 9762 | |
| 9763 | #endif |
| 9764 | #ifdef VK_EXT_direct_mode_display |
| 9765 | VkResult VkEncoder::vkReleaseDisplayEXT( |
| 9766 | VkPhysicalDevice physicalDevice, |
| 9767 | VkDisplayKHR display) |
| 9768 | { |
| 9769 | auto stream = mImpl->stream(); |
| 9770 | auto countingStream = mImpl->countingStream(); |
| 9771 | countingStream->rewind(); |
| 9772 | { |
| 9773 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9774 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9775 | } |
| 9776 | uint32_t packetSize_vkReleaseDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9777 | countingStream->rewind(); |
| 9778 | uint32_t opcode_vkReleaseDisplayEXT = OP_vkReleaseDisplayEXT; |
| 9779 | stream->write(&opcode_vkReleaseDisplayEXT, sizeof(uint32_t)); |
| 9780 | stream->write(&packetSize_vkReleaseDisplayEXT, sizeof(uint32_t)); |
| 9781 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9782 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9783 | VkResult vkReleaseDisplayEXT_VkResult_return = (VkResult)0; |
| 9784 | stream->read(&vkReleaseDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9785 | return vkReleaseDisplayEXT_VkResult_return; |
| 9786 | } |
| 9787 | |
| 9788 | #endif |
| 9789 | #ifdef VK_EXT_acquire_xlib_display |
| 9790 | VkResult VkEncoder::vkAcquireXlibDisplayEXT( |
| 9791 | VkPhysicalDevice physicalDevice, |
| 9792 | Display* dpy, |
| 9793 | VkDisplayKHR display) |
| 9794 | { |
| 9795 | auto stream = mImpl->stream(); |
| 9796 | auto countingStream = mImpl->countingStream(); |
| 9797 | countingStream->rewind(); |
| 9798 | { |
| 9799 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9800 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 9801 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9802 | } |
| 9803 | uint32_t packetSize_vkAcquireXlibDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9804 | countingStream->rewind(); |
| 9805 | uint32_t opcode_vkAcquireXlibDisplayEXT = OP_vkAcquireXlibDisplayEXT; |
| 9806 | stream->write(&opcode_vkAcquireXlibDisplayEXT, sizeof(uint32_t)); |
| 9807 | stream->write(&packetSize_vkAcquireXlibDisplayEXT, sizeof(uint32_t)); |
| 9808 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9809 | stream->write((Display*)dpy, sizeof(Display)); |
| 9810 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9811 | stream->read((Display*)dpy, sizeof(Display)); |
| 9812 | VkResult vkAcquireXlibDisplayEXT_VkResult_return = (VkResult)0; |
| 9813 | stream->read(&vkAcquireXlibDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9814 | return vkAcquireXlibDisplayEXT_VkResult_return; |
| 9815 | } |
| 9816 | |
| 9817 | VkResult VkEncoder::vkGetRandROutputDisplayEXT( |
| 9818 | VkPhysicalDevice physicalDevice, |
| 9819 | Display* dpy, |
| 9820 | RROutput rrOutput, |
| 9821 | VkDisplayKHR* pDisplay) |
| 9822 | { |
| 9823 | auto stream = mImpl->stream(); |
| 9824 | auto countingStream = mImpl->countingStream(); |
| 9825 | countingStream->rewind(); |
| 9826 | { |
| 9827 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9828 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 9829 | countingStream->write((RROutput*)&rrOutput, sizeof(RROutput)); |
| 9830 | countingStream->write((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9831 | } |
| 9832 | uint32_t packetSize_vkGetRandROutputDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9833 | countingStream->rewind(); |
| 9834 | uint32_t opcode_vkGetRandROutputDisplayEXT = OP_vkGetRandROutputDisplayEXT; |
| 9835 | stream->write(&opcode_vkGetRandROutputDisplayEXT, sizeof(uint32_t)); |
| 9836 | stream->write(&packetSize_vkGetRandROutputDisplayEXT, sizeof(uint32_t)); |
| 9837 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9838 | stream->write((Display*)dpy, sizeof(Display)); |
| 9839 | stream->write((RROutput*)&rrOutput, sizeof(RROutput)); |
| 9840 | stream->write((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9841 | stream->read((Display*)dpy, sizeof(Display)); |
| 9842 | stream->read((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9843 | VkResult vkGetRandROutputDisplayEXT_VkResult_return = (VkResult)0; |
| 9844 | stream->read(&vkGetRandROutputDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9845 | return vkGetRandROutputDisplayEXT_VkResult_return; |
| 9846 | } |
| 9847 | |
| 9848 | #endif |
| 9849 | #ifdef VK_EXT_display_surface_counter |
| 9850 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 9851 | VkPhysicalDevice physicalDevice, |
| 9852 | VkSurfaceKHR surface, |
| 9853 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) |
| 9854 | { |
| 9855 | auto stream = mImpl->stream(); |
| 9856 | auto countingStream = mImpl->countingStream(); |
| 9857 | countingStream->rewind(); |
| 9858 | { |
| 9859 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9860 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 9861 | marshal_VkSurfaceCapabilities2EXT(countingStream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9862 | } |
| 9863 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilities2EXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9864 | countingStream->rewind(); |
| 9865 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilities2EXT = OP_vkGetPhysicalDeviceSurfaceCapabilities2EXT; |
| 9866 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilities2EXT, sizeof(uint32_t)); |
| 9867 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilities2EXT, sizeof(uint32_t)); |
| 9868 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9869 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 9870 | marshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9871 | unmarshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9872 | VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return = (VkResult)0; |
| 9873 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return, sizeof(VkResult)); |
| 9874 | return vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return; |
| 9875 | } |
| 9876 | |
| 9877 | #endif |
| 9878 | #ifdef VK_EXT_display_control |
| 9879 | VkResult VkEncoder::vkDisplayPowerControlEXT( |
| 9880 | VkDevice device, |
| 9881 | VkDisplayKHR display, |
| 9882 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) |
| 9883 | { |
| 9884 | auto stream = mImpl->stream(); |
| 9885 | auto countingStream = mImpl->countingStream(); |
| 9886 | countingStream->rewind(); |
| 9887 | { |
| 9888 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9889 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9890 | marshal_VkDisplayPowerInfoEXT(countingStream, (const VkDisplayPowerInfoEXT*)(pDisplayPowerInfo)); |
| 9891 | } |
| 9892 | uint32_t packetSize_vkDisplayPowerControlEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9893 | countingStream->rewind(); |
| 9894 | uint32_t opcode_vkDisplayPowerControlEXT = OP_vkDisplayPowerControlEXT; |
| 9895 | stream->write(&opcode_vkDisplayPowerControlEXT, sizeof(uint32_t)); |
| 9896 | stream->write(&packetSize_vkDisplayPowerControlEXT, sizeof(uint32_t)); |
| 9897 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9898 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9899 | marshal_VkDisplayPowerInfoEXT(stream, (const VkDisplayPowerInfoEXT*)(pDisplayPowerInfo)); |
| 9900 | VkResult vkDisplayPowerControlEXT_VkResult_return = (VkResult)0; |
| 9901 | stream->read(&vkDisplayPowerControlEXT_VkResult_return, sizeof(VkResult)); |
| 9902 | return vkDisplayPowerControlEXT_VkResult_return; |
| 9903 | } |
| 9904 | |
| 9905 | VkResult VkEncoder::vkRegisterDeviceEventEXT( |
| 9906 | VkDevice device, |
| 9907 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 9908 | const VkAllocationCallbacks* pAllocator, |
| 9909 | VkFence* pFence) |
| 9910 | { |
| 9911 | auto stream = mImpl->stream(); |
| 9912 | auto countingStream = mImpl->countingStream(); |
| 9913 | countingStream->rewind(); |
| 9914 | { |
| 9915 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9916 | marshal_VkDeviceEventInfoEXT(countingStream, (const VkDeviceEventInfoEXT*)(pDeviceEventInfo)); |
| 9917 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9918 | if (pAllocator) |
| 9919 | { |
| 9920 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9921 | } |
| 9922 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9923 | } |
| 9924 | uint32_t packetSize_vkRegisterDeviceEventEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9925 | countingStream->rewind(); |
| 9926 | uint32_t opcode_vkRegisterDeviceEventEXT = OP_vkRegisterDeviceEventEXT; |
| 9927 | stream->write(&opcode_vkRegisterDeviceEventEXT, sizeof(uint32_t)); |
| 9928 | stream->write(&packetSize_vkRegisterDeviceEventEXT, sizeof(uint32_t)); |
| 9929 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9930 | marshal_VkDeviceEventInfoEXT(stream, (const VkDeviceEventInfoEXT*)(pDeviceEventInfo)); |
| 9931 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9932 | if (pAllocator) |
| 9933 | { |
| 9934 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9935 | } |
| 9936 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9937 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 9938 | VkResult vkRegisterDeviceEventEXT_VkResult_return = (VkResult)0; |
| 9939 | stream->read(&vkRegisterDeviceEventEXT_VkResult_return, sizeof(VkResult)); |
| 9940 | return vkRegisterDeviceEventEXT_VkResult_return; |
| 9941 | } |
| 9942 | |
| 9943 | VkResult VkEncoder::vkRegisterDisplayEventEXT( |
| 9944 | VkDevice device, |
| 9945 | VkDisplayKHR display, |
| 9946 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 9947 | const VkAllocationCallbacks* pAllocator, |
| 9948 | VkFence* pFence) |
| 9949 | { |
| 9950 | auto stream = mImpl->stream(); |
| 9951 | auto countingStream = mImpl->countingStream(); |
| 9952 | countingStream->rewind(); |
| 9953 | { |
| 9954 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9955 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9956 | marshal_VkDisplayEventInfoEXT(countingStream, (const VkDisplayEventInfoEXT*)(pDisplayEventInfo)); |
| 9957 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9958 | if (pAllocator) |
| 9959 | { |
| 9960 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9961 | } |
| 9962 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9963 | } |
| 9964 | uint32_t packetSize_vkRegisterDisplayEventEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9965 | countingStream->rewind(); |
| 9966 | uint32_t opcode_vkRegisterDisplayEventEXT = OP_vkRegisterDisplayEventEXT; |
| 9967 | stream->write(&opcode_vkRegisterDisplayEventEXT, sizeof(uint32_t)); |
| 9968 | stream->write(&packetSize_vkRegisterDisplayEventEXT, sizeof(uint32_t)); |
| 9969 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9970 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9971 | marshal_VkDisplayEventInfoEXT(stream, (const VkDisplayEventInfoEXT*)(pDisplayEventInfo)); |
| 9972 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9973 | if (pAllocator) |
| 9974 | { |
| 9975 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9976 | } |
| 9977 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9978 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 9979 | VkResult vkRegisterDisplayEventEXT_VkResult_return = (VkResult)0; |
| 9980 | stream->read(&vkRegisterDisplayEventEXT_VkResult_return, sizeof(VkResult)); |
| 9981 | return vkRegisterDisplayEventEXT_VkResult_return; |
| 9982 | } |
| 9983 | |
| 9984 | VkResult VkEncoder::vkGetSwapchainCounterEXT( |
| 9985 | VkDevice device, |
| 9986 | VkSwapchainKHR swapchain, |
| 9987 | VkSurfaceCounterFlagBitsEXT counter, |
| 9988 | uint64_t* pCounterValue) |
| 9989 | { |
| 9990 | auto stream = mImpl->stream(); |
| 9991 | auto countingStream = mImpl->countingStream(); |
| 9992 | countingStream->rewind(); |
| 9993 | { |
| 9994 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9995 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 9996 | countingStream->write((VkSurfaceCounterFlagBitsEXT*)&counter, sizeof(VkSurfaceCounterFlagBitsEXT)); |
| 9997 | countingStream->write((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 9998 | } |
| 9999 | uint32_t packetSize_vkGetSwapchainCounterEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10000 | countingStream->rewind(); |
| 10001 | uint32_t opcode_vkGetSwapchainCounterEXT = OP_vkGetSwapchainCounterEXT; |
| 10002 | stream->write(&opcode_vkGetSwapchainCounterEXT, sizeof(uint32_t)); |
| 10003 | stream->write(&packetSize_vkGetSwapchainCounterEXT, sizeof(uint32_t)); |
| 10004 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10005 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10006 | stream->write((VkSurfaceCounterFlagBitsEXT*)&counter, sizeof(VkSurfaceCounterFlagBitsEXT)); |
| 10007 | stream->write((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 10008 | stream->read((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 10009 | VkResult vkGetSwapchainCounterEXT_VkResult_return = (VkResult)0; |
| 10010 | stream->read(&vkGetSwapchainCounterEXT_VkResult_return, sizeof(VkResult)); |
| 10011 | return vkGetSwapchainCounterEXT_VkResult_return; |
| 10012 | } |
| 10013 | |
| 10014 | #endif |
| 10015 | #ifdef VK_GOOGLE_display_timing |
| 10016 | VkResult VkEncoder::vkGetRefreshCycleDurationGOOGLE( |
| 10017 | VkDevice device, |
| 10018 | VkSwapchainKHR swapchain, |
| 10019 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) |
| 10020 | { |
| 10021 | auto stream = mImpl->stream(); |
| 10022 | auto countingStream = mImpl->countingStream(); |
| 10023 | countingStream->rewind(); |
| 10024 | { |
| 10025 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10026 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10027 | marshal_VkRefreshCycleDurationGOOGLE(countingStream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10028 | } |
| 10029 | uint32_t packetSize_vkGetRefreshCycleDurationGOOGLE = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10030 | countingStream->rewind(); |
| 10031 | uint32_t opcode_vkGetRefreshCycleDurationGOOGLE = OP_vkGetRefreshCycleDurationGOOGLE; |
| 10032 | stream->write(&opcode_vkGetRefreshCycleDurationGOOGLE, sizeof(uint32_t)); |
| 10033 | stream->write(&packetSize_vkGetRefreshCycleDurationGOOGLE, sizeof(uint32_t)); |
| 10034 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10035 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10036 | marshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10037 | unmarshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10038 | VkResult vkGetRefreshCycleDurationGOOGLE_VkResult_return = (VkResult)0; |
| 10039 | stream->read(&vkGetRefreshCycleDurationGOOGLE_VkResult_return, sizeof(VkResult)); |
| 10040 | return vkGetRefreshCycleDurationGOOGLE_VkResult_return; |
| 10041 | } |
| 10042 | |
| 10043 | VkResult VkEncoder::vkGetPastPresentationTimingGOOGLE( |
| 10044 | VkDevice device, |
| 10045 | VkSwapchainKHR swapchain, |
| 10046 | uint32_t* pPresentationTimingCount, |
| 10047 | VkPastPresentationTimingGOOGLE* pPresentationTimings) |
| 10048 | { |
| 10049 | auto stream = mImpl->stream(); |
| 10050 | auto countingStream = mImpl->countingStream(); |
| 10051 | countingStream->rewind(); |
| 10052 | { |
| 10053 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10054 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10055 | countingStream->write((uint32_t**)&pPresentationTimingCount, sizeof(uint32_t*)); |
| 10056 | if (pPresentationTimingCount) |
| 10057 | { |
| 10058 | countingStream->write((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10059 | } |
| 10060 | countingStream->write((VkPastPresentationTimingGOOGLE**)&pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10061 | if (pPresentationTimings) |
| 10062 | { |
| 10063 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10064 | { |
| 10065 | marshal_VkPastPresentationTimingGOOGLE(countingStream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10066 | } |
| 10067 | } |
| 10068 | } |
| 10069 | uint32_t packetSize_vkGetPastPresentationTimingGOOGLE = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10070 | countingStream->rewind(); |
| 10071 | uint32_t opcode_vkGetPastPresentationTimingGOOGLE = OP_vkGetPastPresentationTimingGOOGLE; |
| 10072 | stream->write(&opcode_vkGetPastPresentationTimingGOOGLE, sizeof(uint32_t)); |
| 10073 | stream->write(&packetSize_vkGetPastPresentationTimingGOOGLE, sizeof(uint32_t)); |
| 10074 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10075 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10076 | stream->write((uint32_t**)&pPresentationTimingCount, sizeof(uint32_t*)); |
| 10077 | if (pPresentationTimingCount) |
| 10078 | { |
| 10079 | stream->write((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10080 | } |
| 10081 | stream->write((VkPastPresentationTimingGOOGLE**)&pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10082 | if (pPresentationTimings) |
| 10083 | { |
| 10084 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10085 | { |
| 10086 | marshal_VkPastPresentationTimingGOOGLE(stream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10087 | } |
| 10088 | } |
| 10089 | uint32_t* check_pPresentationTimingCount; |
| 10090 | stream->read((uint32_t**)&check_pPresentationTimingCount, sizeof(uint32_t*)); |
| 10091 | if (pPresentationTimingCount) |
| 10092 | { |
| 10093 | if (!(check_pPresentationTimingCount)) |
| 10094 | { |
| 10095 | fprintf(stderr, "fatal: pPresentationTimingCount inconsistent between guest and host\n"); |
| 10096 | } |
| 10097 | stream->read((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10098 | } |
| 10099 | VkPastPresentationTimingGOOGLE* check_pPresentationTimings; |
| 10100 | stream->read((VkPastPresentationTimingGOOGLE**)&check_pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10101 | if (pPresentationTimings) |
| 10102 | { |
| 10103 | if (!(check_pPresentationTimings)) |
| 10104 | { |
| 10105 | fprintf(stderr, "fatal: pPresentationTimings inconsistent between guest and host\n"); |
| 10106 | } |
| 10107 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10108 | { |
| 10109 | unmarshal_VkPastPresentationTimingGOOGLE(stream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10110 | } |
| 10111 | } |
| 10112 | VkResult vkGetPastPresentationTimingGOOGLE_VkResult_return = (VkResult)0; |
| 10113 | stream->read(&vkGetPastPresentationTimingGOOGLE_VkResult_return, sizeof(VkResult)); |
| 10114 | return vkGetPastPresentationTimingGOOGLE_VkResult_return; |
| 10115 | } |
| 10116 | |
| 10117 | #endif |
| 10118 | #ifdef VK_NV_sample_mask_override_coverage |
| 10119 | #endif |
| 10120 | #ifdef VK_NV_geometry_shader_passthrough |
| 10121 | #endif |
| 10122 | #ifdef VK_NV_viewport_array2 |
| 10123 | #endif |
| 10124 | #ifdef VK_NVX_multiview_per_view_attributes |
| 10125 | #endif |
| 10126 | #ifdef VK_NV_viewport_swizzle |
| 10127 | #endif |
| 10128 | #ifdef VK_EXT_discard_rectangles |
| 10129 | void VkEncoder::vkCmdSetDiscardRectangleEXT( |
| 10130 | VkCommandBuffer commandBuffer, |
| 10131 | uint32_t firstDiscardRectangle, |
| 10132 | uint32_t discardRectangleCount, |
| 10133 | const VkRect2D* pDiscardRectangles) |
| 10134 | { |
| 10135 | auto stream = mImpl->stream(); |
| 10136 | auto countingStream = mImpl->countingStream(); |
| 10137 | countingStream->rewind(); |
| 10138 | { |
| 10139 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10140 | countingStream->write((uint32_t*)&firstDiscardRectangle, sizeof(uint32_t)); |
| 10141 | countingStream->write((uint32_t*)&discardRectangleCount, sizeof(uint32_t)); |
| 10142 | for (uint32_t i = 0; i < (uint32_t)((discardRectangleCount)); ++i) |
| 10143 | { |
| 10144 | marshal_VkRect2D(countingStream, (const VkRect2D*)(pDiscardRectangles + i)); |
| 10145 | } |
| 10146 | } |
| 10147 | uint32_t packetSize_vkCmdSetDiscardRectangleEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10148 | countingStream->rewind(); |
| 10149 | uint32_t opcode_vkCmdSetDiscardRectangleEXT = OP_vkCmdSetDiscardRectangleEXT; |
| 10150 | stream->write(&opcode_vkCmdSetDiscardRectangleEXT, sizeof(uint32_t)); |
| 10151 | stream->write(&packetSize_vkCmdSetDiscardRectangleEXT, sizeof(uint32_t)); |
| 10152 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10153 | stream->write((uint32_t*)&firstDiscardRectangle, sizeof(uint32_t)); |
| 10154 | stream->write((uint32_t*)&discardRectangleCount, sizeof(uint32_t)); |
| 10155 | for (uint32_t i = 0; i < (uint32_t)((discardRectangleCount)); ++i) |
| 10156 | { |
| 10157 | marshal_VkRect2D(stream, (const VkRect2D*)(pDiscardRectangles + i)); |
| 10158 | } |
| 10159 | } |
| 10160 | |
| 10161 | #endif |
| 10162 | #ifdef VK_EXT_conservative_rasterization |
| 10163 | #endif |
| 10164 | #ifdef VK_EXT_swapchain_colorspace |
| 10165 | #endif |
| 10166 | #ifdef VK_EXT_hdr_metadata |
| 10167 | void VkEncoder::vkSetHdrMetadataEXT( |
| 10168 | VkDevice device, |
| 10169 | uint32_t swapchainCount, |
| 10170 | const VkSwapchainKHR* pSwapchains, |
| 10171 | const VkHdrMetadataEXT* pMetadata) |
| 10172 | { |
| 10173 | auto stream = mImpl->stream(); |
| 10174 | auto countingStream = mImpl->countingStream(); |
| 10175 | countingStream->rewind(); |
| 10176 | { |
| 10177 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10178 | countingStream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 10179 | countingStream->write((const VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(const VkSwapchainKHR)); |
| 10180 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 10181 | { |
| 10182 | marshal_VkHdrMetadataEXT(countingStream, (const VkHdrMetadataEXT*)(pMetadata + i)); |
| 10183 | } |
| 10184 | } |
| 10185 | uint32_t packetSize_vkSetHdrMetadataEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10186 | countingStream->rewind(); |
| 10187 | uint32_t opcode_vkSetHdrMetadataEXT = OP_vkSetHdrMetadataEXT; |
| 10188 | stream->write(&opcode_vkSetHdrMetadataEXT, sizeof(uint32_t)); |
| 10189 | stream->write(&packetSize_vkSetHdrMetadataEXT, sizeof(uint32_t)); |
| 10190 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10191 | stream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 10192 | stream->write((const VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(const VkSwapchainKHR)); |
| 10193 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 10194 | { |
| 10195 | marshal_VkHdrMetadataEXT(stream, (const VkHdrMetadataEXT*)(pMetadata + i)); |
| 10196 | } |
| 10197 | } |
| 10198 | |
| 10199 | #endif |
| 10200 | #ifdef VK_MVK_ios_surface |
| 10201 | VkResult VkEncoder::vkCreateIOSSurfaceMVK( |
| 10202 | VkInstance instance, |
| 10203 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 10204 | const VkAllocationCallbacks* pAllocator, |
| 10205 | VkSurfaceKHR* pSurface) |
| 10206 | { |
| 10207 | auto stream = mImpl->stream(); |
| 10208 | auto countingStream = mImpl->countingStream(); |
| 10209 | countingStream->rewind(); |
| 10210 | { |
| 10211 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10212 | marshal_VkIOSSurfaceCreateInfoMVK(countingStream, (const VkIOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10213 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10214 | if (pAllocator) |
| 10215 | { |
| 10216 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10217 | } |
| 10218 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10219 | } |
| 10220 | uint32_t packetSize_vkCreateIOSSurfaceMVK = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10221 | countingStream->rewind(); |
| 10222 | uint32_t opcode_vkCreateIOSSurfaceMVK = OP_vkCreateIOSSurfaceMVK; |
| 10223 | stream->write(&opcode_vkCreateIOSSurfaceMVK, sizeof(uint32_t)); |
| 10224 | stream->write(&packetSize_vkCreateIOSSurfaceMVK, sizeof(uint32_t)); |
| 10225 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10226 | marshal_VkIOSSurfaceCreateInfoMVK(stream, (const VkIOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10227 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10228 | if (pAllocator) |
| 10229 | { |
| 10230 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10231 | } |
| 10232 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10233 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10234 | VkResult vkCreateIOSSurfaceMVK_VkResult_return = (VkResult)0; |
| 10235 | stream->read(&vkCreateIOSSurfaceMVK_VkResult_return, sizeof(VkResult)); |
| 10236 | return vkCreateIOSSurfaceMVK_VkResult_return; |
| 10237 | } |
| 10238 | |
| 10239 | #endif |
| 10240 | #ifdef VK_MVK_macos_surface |
| 10241 | VkResult VkEncoder::vkCreateMacOSSurfaceMVK( |
| 10242 | VkInstance instance, |
| 10243 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 10244 | const VkAllocationCallbacks* pAllocator, |
| 10245 | VkSurfaceKHR* pSurface) |
| 10246 | { |
| 10247 | auto stream = mImpl->stream(); |
| 10248 | auto countingStream = mImpl->countingStream(); |
| 10249 | countingStream->rewind(); |
| 10250 | { |
| 10251 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10252 | marshal_VkMacOSSurfaceCreateInfoMVK(countingStream, (const VkMacOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10253 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10254 | if (pAllocator) |
| 10255 | { |
| 10256 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10257 | } |
| 10258 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10259 | } |
| 10260 | uint32_t packetSize_vkCreateMacOSSurfaceMVK = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10261 | countingStream->rewind(); |
| 10262 | uint32_t opcode_vkCreateMacOSSurfaceMVK = OP_vkCreateMacOSSurfaceMVK; |
| 10263 | stream->write(&opcode_vkCreateMacOSSurfaceMVK, sizeof(uint32_t)); |
| 10264 | stream->write(&packetSize_vkCreateMacOSSurfaceMVK, sizeof(uint32_t)); |
| 10265 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10266 | marshal_VkMacOSSurfaceCreateInfoMVK(stream, (const VkMacOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10267 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10268 | if (pAllocator) |
| 10269 | { |
| 10270 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10271 | } |
| 10272 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10273 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10274 | VkResult vkCreateMacOSSurfaceMVK_VkResult_return = (VkResult)0; |
| 10275 | stream->read(&vkCreateMacOSSurfaceMVK_VkResult_return, sizeof(VkResult)); |
| 10276 | return vkCreateMacOSSurfaceMVK_VkResult_return; |
| 10277 | } |
| 10278 | |
| 10279 | #endif |
| 10280 | #ifdef VK_EXT_external_memory_dma_buf |
| 10281 | #endif |
| 10282 | #ifdef VK_EXT_queue_family_foreign |
| 10283 | #endif |
| 10284 | #ifdef VK_EXT_debug_utils |
| 10285 | VkResult VkEncoder::vkSetDebugUtilsObjectNameEXT( |
| 10286 | VkDevice device, |
| 10287 | const VkDebugUtilsObjectNameInfoEXT* pNameInfo) |
| 10288 | { |
| 10289 | auto stream = mImpl->stream(); |
| 10290 | auto countingStream = mImpl->countingStream(); |
| 10291 | countingStream->rewind(); |
| 10292 | { |
| 10293 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10294 | marshal_VkDebugUtilsObjectNameInfoEXT(countingStream, (const VkDebugUtilsObjectNameInfoEXT*)(pNameInfo)); |
| 10295 | } |
| 10296 | uint32_t packetSize_vkSetDebugUtilsObjectNameEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10297 | countingStream->rewind(); |
| 10298 | uint32_t opcode_vkSetDebugUtilsObjectNameEXT = OP_vkSetDebugUtilsObjectNameEXT; |
| 10299 | stream->write(&opcode_vkSetDebugUtilsObjectNameEXT, sizeof(uint32_t)); |
| 10300 | stream->write(&packetSize_vkSetDebugUtilsObjectNameEXT, sizeof(uint32_t)); |
| 10301 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10302 | marshal_VkDebugUtilsObjectNameInfoEXT(stream, (const VkDebugUtilsObjectNameInfoEXT*)(pNameInfo)); |
| 10303 | VkResult vkSetDebugUtilsObjectNameEXT_VkResult_return = (VkResult)0; |
| 10304 | stream->read(&vkSetDebugUtilsObjectNameEXT_VkResult_return, sizeof(VkResult)); |
| 10305 | return vkSetDebugUtilsObjectNameEXT_VkResult_return; |
| 10306 | } |
| 10307 | |
| 10308 | VkResult VkEncoder::vkSetDebugUtilsObjectTagEXT( |
| 10309 | VkDevice device, |
| 10310 | const VkDebugUtilsObjectTagInfoEXT* pTagInfo) |
| 10311 | { |
| 10312 | auto stream = mImpl->stream(); |
| 10313 | auto countingStream = mImpl->countingStream(); |
| 10314 | countingStream->rewind(); |
| 10315 | { |
| 10316 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10317 | marshal_VkDebugUtilsObjectTagInfoEXT(countingStream, (const VkDebugUtilsObjectTagInfoEXT*)(pTagInfo)); |
| 10318 | } |
| 10319 | uint32_t packetSize_vkSetDebugUtilsObjectTagEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10320 | countingStream->rewind(); |
| 10321 | uint32_t opcode_vkSetDebugUtilsObjectTagEXT = OP_vkSetDebugUtilsObjectTagEXT; |
| 10322 | stream->write(&opcode_vkSetDebugUtilsObjectTagEXT, sizeof(uint32_t)); |
| 10323 | stream->write(&packetSize_vkSetDebugUtilsObjectTagEXT, sizeof(uint32_t)); |
| 10324 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10325 | marshal_VkDebugUtilsObjectTagInfoEXT(stream, (const VkDebugUtilsObjectTagInfoEXT*)(pTagInfo)); |
| 10326 | VkResult vkSetDebugUtilsObjectTagEXT_VkResult_return = (VkResult)0; |
| 10327 | stream->read(&vkSetDebugUtilsObjectTagEXT_VkResult_return, sizeof(VkResult)); |
| 10328 | return vkSetDebugUtilsObjectTagEXT_VkResult_return; |
| 10329 | } |
| 10330 | |
| 10331 | void VkEncoder::vkQueueBeginDebugUtilsLabelEXT( |
| 10332 | VkQueue queue, |
| 10333 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10334 | { |
| 10335 | auto stream = mImpl->stream(); |
| 10336 | auto countingStream = mImpl->countingStream(); |
| 10337 | countingStream->rewind(); |
| 10338 | { |
| 10339 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10340 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10341 | } |
| 10342 | uint32_t packetSize_vkQueueBeginDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10343 | countingStream->rewind(); |
| 10344 | uint32_t opcode_vkQueueBeginDebugUtilsLabelEXT = OP_vkQueueBeginDebugUtilsLabelEXT; |
| 10345 | stream->write(&opcode_vkQueueBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10346 | stream->write(&packetSize_vkQueueBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10347 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10348 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10349 | } |
| 10350 | |
| 10351 | void VkEncoder::vkQueueEndDebugUtilsLabelEXT( |
| 10352 | VkQueue queue) |
| 10353 | { |
| 10354 | auto stream = mImpl->stream(); |
| 10355 | auto countingStream = mImpl->countingStream(); |
| 10356 | countingStream->rewind(); |
| 10357 | { |
| 10358 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10359 | } |
| 10360 | uint32_t packetSize_vkQueueEndDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10361 | countingStream->rewind(); |
| 10362 | uint32_t opcode_vkQueueEndDebugUtilsLabelEXT = OP_vkQueueEndDebugUtilsLabelEXT; |
| 10363 | stream->write(&opcode_vkQueueEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10364 | stream->write(&packetSize_vkQueueEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10365 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10366 | } |
| 10367 | |
| 10368 | void VkEncoder::vkQueueInsertDebugUtilsLabelEXT( |
| 10369 | VkQueue queue, |
| 10370 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10371 | { |
| 10372 | auto stream = mImpl->stream(); |
| 10373 | auto countingStream = mImpl->countingStream(); |
| 10374 | countingStream->rewind(); |
| 10375 | { |
| 10376 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10377 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10378 | } |
| 10379 | uint32_t packetSize_vkQueueInsertDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10380 | countingStream->rewind(); |
| 10381 | uint32_t opcode_vkQueueInsertDebugUtilsLabelEXT = OP_vkQueueInsertDebugUtilsLabelEXT; |
| 10382 | stream->write(&opcode_vkQueueInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10383 | stream->write(&packetSize_vkQueueInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10384 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10385 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10386 | } |
| 10387 | |
| 10388 | void VkEncoder::vkCmdBeginDebugUtilsLabelEXT( |
| 10389 | VkCommandBuffer commandBuffer, |
| 10390 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10391 | { |
| 10392 | auto stream = mImpl->stream(); |
| 10393 | auto countingStream = mImpl->countingStream(); |
| 10394 | countingStream->rewind(); |
| 10395 | { |
| 10396 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10397 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10398 | } |
| 10399 | uint32_t packetSize_vkCmdBeginDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10400 | countingStream->rewind(); |
| 10401 | uint32_t opcode_vkCmdBeginDebugUtilsLabelEXT = OP_vkCmdBeginDebugUtilsLabelEXT; |
| 10402 | stream->write(&opcode_vkCmdBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10403 | stream->write(&packetSize_vkCmdBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10404 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10405 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10406 | } |
| 10407 | |
| 10408 | void VkEncoder::vkCmdEndDebugUtilsLabelEXT( |
| 10409 | VkCommandBuffer commandBuffer) |
| 10410 | { |
| 10411 | auto stream = mImpl->stream(); |
| 10412 | auto countingStream = mImpl->countingStream(); |
| 10413 | countingStream->rewind(); |
| 10414 | { |
| 10415 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10416 | } |
| 10417 | uint32_t packetSize_vkCmdEndDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10418 | countingStream->rewind(); |
| 10419 | uint32_t opcode_vkCmdEndDebugUtilsLabelEXT = OP_vkCmdEndDebugUtilsLabelEXT; |
| 10420 | stream->write(&opcode_vkCmdEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10421 | stream->write(&packetSize_vkCmdEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10422 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10423 | } |
| 10424 | |
| 10425 | void VkEncoder::vkCmdInsertDebugUtilsLabelEXT( |
| 10426 | VkCommandBuffer commandBuffer, |
| 10427 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10428 | { |
| 10429 | auto stream = mImpl->stream(); |
| 10430 | auto countingStream = mImpl->countingStream(); |
| 10431 | countingStream->rewind(); |
| 10432 | { |
| 10433 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10434 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10435 | } |
| 10436 | uint32_t packetSize_vkCmdInsertDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10437 | countingStream->rewind(); |
| 10438 | uint32_t opcode_vkCmdInsertDebugUtilsLabelEXT = OP_vkCmdInsertDebugUtilsLabelEXT; |
| 10439 | stream->write(&opcode_vkCmdInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10440 | stream->write(&packetSize_vkCmdInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10441 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10442 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10443 | } |
| 10444 | |
| 10445 | VkResult VkEncoder::vkCreateDebugUtilsMessengerEXT( |
| 10446 | VkInstance instance, |
| 10447 | const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, |
| 10448 | const VkAllocationCallbacks* pAllocator, |
| 10449 | VkDebugUtilsMessengerEXT* pMessenger) |
| 10450 | { |
| 10451 | auto stream = mImpl->stream(); |
| 10452 | auto countingStream = mImpl->countingStream(); |
| 10453 | countingStream->rewind(); |
| 10454 | { |
| 10455 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10456 | marshal_VkDebugUtilsMessengerCreateInfoEXT(countingStream, (const VkDebugUtilsMessengerCreateInfoEXT*)(pCreateInfo)); |
| 10457 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10458 | if (pAllocator) |
| 10459 | { |
| 10460 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10461 | } |
| 10462 | countingStream->write((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10463 | } |
| 10464 | uint32_t packetSize_vkCreateDebugUtilsMessengerEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10465 | countingStream->rewind(); |
| 10466 | uint32_t opcode_vkCreateDebugUtilsMessengerEXT = OP_vkCreateDebugUtilsMessengerEXT; |
| 10467 | stream->write(&opcode_vkCreateDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10468 | stream->write(&packetSize_vkCreateDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10469 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10470 | marshal_VkDebugUtilsMessengerCreateInfoEXT(stream, (const VkDebugUtilsMessengerCreateInfoEXT*)(pCreateInfo)); |
| 10471 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10472 | if (pAllocator) |
| 10473 | { |
| 10474 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10475 | } |
| 10476 | stream->write((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10477 | stream->read((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10478 | VkResult vkCreateDebugUtilsMessengerEXT_VkResult_return = (VkResult)0; |
| 10479 | stream->read(&vkCreateDebugUtilsMessengerEXT_VkResult_return, sizeof(VkResult)); |
| 10480 | return vkCreateDebugUtilsMessengerEXT_VkResult_return; |
| 10481 | } |
| 10482 | |
| 10483 | void VkEncoder::vkDestroyDebugUtilsMessengerEXT( |
| 10484 | VkInstance instance, |
| 10485 | VkDebugUtilsMessengerEXT messenger, |
| 10486 | const VkAllocationCallbacks* pAllocator) |
| 10487 | { |
| 10488 | auto stream = mImpl->stream(); |
| 10489 | auto countingStream = mImpl->countingStream(); |
| 10490 | countingStream->rewind(); |
| 10491 | { |
| 10492 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10493 | countingStream->write((VkDebugUtilsMessengerEXT*)&messenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10494 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10495 | if (pAllocator) |
| 10496 | { |
| 10497 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10498 | } |
| 10499 | } |
| 10500 | uint32_t packetSize_vkDestroyDebugUtilsMessengerEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10501 | countingStream->rewind(); |
| 10502 | uint32_t opcode_vkDestroyDebugUtilsMessengerEXT = OP_vkDestroyDebugUtilsMessengerEXT; |
| 10503 | stream->write(&opcode_vkDestroyDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10504 | stream->write(&packetSize_vkDestroyDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10505 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10506 | stream->write((VkDebugUtilsMessengerEXT*)&messenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10507 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10508 | if (pAllocator) |
| 10509 | { |
| 10510 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10511 | } |
| 10512 | } |
| 10513 | |
| 10514 | void VkEncoder::vkSubmitDebugUtilsMessageEXT( |
| 10515 | VkInstance instance, |
| 10516 | VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, |
| 10517 | VkDebugUtilsMessageTypeFlagsEXT messageTypes, |
| 10518 | const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) |
| 10519 | { |
| 10520 | auto stream = mImpl->stream(); |
| 10521 | auto countingStream = mImpl->countingStream(); |
| 10522 | countingStream->rewind(); |
| 10523 | { |
| 10524 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10525 | countingStream->write((VkDebugUtilsMessageSeverityFlagBitsEXT*)&messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagBitsEXT)); |
| 10526 | countingStream->write((VkDebugUtilsMessageTypeFlagsEXT*)&messageTypes, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); |
| 10527 | marshal_VkDebugUtilsMessengerCallbackDataEXT(countingStream, (const VkDebugUtilsMessengerCallbackDataEXT*)(pCallbackData)); |
| 10528 | } |
| 10529 | uint32_t packetSize_vkSubmitDebugUtilsMessageEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10530 | countingStream->rewind(); |
| 10531 | uint32_t opcode_vkSubmitDebugUtilsMessageEXT = OP_vkSubmitDebugUtilsMessageEXT; |
| 10532 | stream->write(&opcode_vkSubmitDebugUtilsMessageEXT, sizeof(uint32_t)); |
| 10533 | stream->write(&packetSize_vkSubmitDebugUtilsMessageEXT, sizeof(uint32_t)); |
| 10534 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10535 | stream->write((VkDebugUtilsMessageSeverityFlagBitsEXT*)&messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagBitsEXT)); |
| 10536 | stream->write((VkDebugUtilsMessageTypeFlagsEXT*)&messageTypes, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); |
| 10537 | marshal_VkDebugUtilsMessengerCallbackDataEXT(stream, (const VkDebugUtilsMessengerCallbackDataEXT*)(pCallbackData)); |
| 10538 | } |
| 10539 | |
| 10540 | #endif |
| 10541 | #ifdef VK_ANDROID_external_memory_android_hardware_buffer |
| 10542 | VkResult VkEncoder::vkGetAndroidHardwareBufferPropertiesANDROID( |
| 10543 | VkDevice device, |
| 10544 | const AHardwareBuffer* buffer, |
| 10545 | VkAndroidHardwareBufferPropertiesANDROID* pProperties) |
| 10546 | { |
| 10547 | auto stream = mImpl->stream(); |
| 10548 | auto countingStream = mImpl->countingStream(); |
| 10549 | countingStream->rewind(); |
| 10550 | { |
| 10551 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10552 | countingStream->write((const AHardwareBuffer*)buffer, sizeof(const AHardwareBuffer)); |
| 10553 | marshal_VkAndroidHardwareBufferPropertiesANDROID(countingStream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10554 | } |
| 10555 | uint32_t packetSize_vkGetAndroidHardwareBufferPropertiesANDROID = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10556 | countingStream->rewind(); |
| 10557 | uint32_t opcode_vkGetAndroidHardwareBufferPropertiesANDROID = OP_vkGetAndroidHardwareBufferPropertiesANDROID; |
| 10558 | stream->write(&opcode_vkGetAndroidHardwareBufferPropertiesANDROID, sizeof(uint32_t)); |
| 10559 | stream->write(&packetSize_vkGetAndroidHardwareBufferPropertiesANDROID, sizeof(uint32_t)); |
| 10560 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10561 | stream->write((const AHardwareBuffer*)buffer, sizeof(const AHardwareBuffer)); |
| 10562 | marshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10563 | unmarshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10564 | VkResult vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return = (VkResult)0; |
| 10565 | stream->read(&vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return, sizeof(VkResult)); |
| 10566 | return vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return; |
| 10567 | } |
| 10568 | |
| 10569 | VkResult VkEncoder::vkGetMemoryAndroidHardwareBufferANDROID( |
| 10570 | VkDevice device, |
| 10571 | const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, |
| 10572 | AHardwareBuffer** pBuffer) |
| 10573 | { |
| 10574 | auto stream = mImpl->stream(); |
| 10575 | auto countingStream = mImpl->countingStream(); |
| 10576 | countingStream->rewind(); |
| 10577 | { |
| 10578 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10579 | marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(countingStream, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)(pInfo)); |
| 10580 | countingStream->write((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10581 | } |
| 10582 | uint32_t packetSize_vkGetMemoryAndroidHardwareBufferANDROID = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10583 | countingStream->rewind(); |
| 10584 | uint32_t opcode_vkGetMemoryAndroidHardwareBufferANDROID = OP_vkGetMemoryAndroidHardwareBufferANDROID; |
| 10585 | stream->write(&opcode_vkGetMemoryAndroidHardwareBufferANDROID, sizeof(uint32_t)); |
| 10586 | stream->write(&packetSize_vkGetMemoryAndroidHardwareBufferANDROID, sizeof(uint32_t)); |
| 10587 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10588 | marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(stream, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)(pInfo)); |
| 10589 | stream->write((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10590 | stream->read((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10591 | VkResult vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return = (VkResult)0; |
| 10592 | stream->read(&vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return, sizeof(VkResult)); |
| 10593 | return vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return; |
| 10594 | } |
| 10595 | |
| 10596 | #endif |
| 10597 | #ifdef VK_EXT_sampler_filter_minmax |
| 10598 | #endif |
| 10599 | #ifdef VK_AMD_gpu_shader_int16 |
| 10600 | #endif |
| 10601 | #ifdef VK_AMD_mixed_attachment_samples |
| 10602 | #endif |
| 10603 | #ifdef VK_AMD_shader_fragment_mask |
| 10604 | #endif |
| 10605 | #ifdef VK_EXT_shader_stencil_export |
| 10606 | #endif |
| 10607 | #ifdef VK_EXT_sample_locations |
| 10608 | void VkEncoder::vkCmdSetSampleLocationsEXT( |
| 10609 | VkCommandBuffer commandBuffer, |
| 10610 | const VkSampleLocationsInfoEXT* pSampleLocationsInfo) |
| 10611 | { |
| 10612 | auto stream = mImpl->stream(); |
| 10613 | auto countingStream = mImpl->countingStream(); |
| 10614 | countingStream->rewind(); |
| 10615 | { |
| 10616 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10617 | marshal_VkSampleLocationsInfoEXT(countingStream, (const VkSampleLocationsInfoEXT*)(pSampleLocationsInfo)); |
| 10618 | } |
| 10619 | uint32_t packetSize_vkCmdSetSampleLocationsEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10620 | countingStream->rewind(); |
| 10621 | uint32_t opcode_vkCmdSetSampleLocationsEXT = OP_vkCmdSetSampleLocationsEXT; |
| 10622 | stream->write(&opcode_vkCmdSetSampleLocationsEXT, sizeof(uint32_t)); |
| 10623 | stream->write(&packetSize_vkCmdSetSampleLocationsEXT, sizeof(uint32_t)); |
| 10624 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10625 | marshal_VkSampleLocationsInfoEXT(stream, (const VkSampleLocationsInfoEXT*)(pSampleLocationsInfo)); |
| 10626 | } |
| 10627 | |
| 10628 | void VkEncoder::vkGetPhysicalDeviceMultisamplePropertiesEXT( |
| 10629 | VkPhysicalDevice physicalDevice, |
| 10630 | VkSampleCountFlagBits samples, |
| 10631 | VkMultisamplePropertiesEXT* pMultisampleProperties) |
| 10632 | { |
| 10633 | auto stream = mImpl->stream(); |
| 10634 | auto countingStream = mImpl->countingStream(); |
| 10635 | countingStream->rewind(); |
| 10636 | { |
| 10637 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 10638 | countingStream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 10639 | marshal_VkMultisamplePropertiesEXT(countingStream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10640 | } |
| 10641 | uint32_t packetSize_vkGetPhysicalDeviceMultisamplePropertiesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10642 | countingStream->rewind(); |
| 10643 | uint32_t opcode_vkGetPhysicalDeviceMultisamplePropertiesEXT = OP_vkGetPhysicalDeviceMultisamplePropertiesEXT; |
| 10644 | stream->write(&opcode_vkGetPhysicalDeviceMultisamplePropertiesEXT, sizeof(uint32_t)); |
| 10645 | stream->write(&packetSize_vkGetPhysicalDeviceMultisamplePropertiesEXT, sizeof(uint32_t)); |
| 10646 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 10647 | stream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 10648 | marshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10649 | unmarshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10650 | } |
| 10651 | |
| 10652 | #endif |
| 10653 | #ifdef VK_EXT_blend_operation_advanced |
| 10654 | #endif |
| 10655 | #ifdef VK_NV_fragment_coverage_to_color |
| 10656 | #endif |
| 10657 | #ifdef VK_NV_framebuffer_mixed_samples |
| 10658 | #endif |
| 10659 | #ifdef VK_NV_fill_rectangle |
| 10660 | #endif |
| 10661 | #ifdef VK_EXT_post_depth_coverage |
| 10662 | #endif |
| 10663 | #ifdef VK_EXT_validation_cache |
| 10664 | VkResult VkEncoder::vkCreateValidationCacheEXT( |
| 10665 | VkDevice device, |
| 10666 | const VkValidationCacheCreateInfoEXT* pCreateInfo, |
| 10667 | const VkAllocationCallbacks* pAllocator, |
| 10668 | VkValidationCacheEXT* pValidationCache) |
| 10669 | { |
| 10670 | auto stream = mImpl->stream(); |
| 10671 | auto countingStream = mImpl->countingStream(); |
| 10672 | countingStream->rewind(); |
| 10673 | { |
| 10674 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10675 | marshal_VkValidationCacheCreateInfoEXT(countingStream, (const VkValidationCacheCreateInfoEXT*)(pCreateInfo)); |
| 10676 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10677 | if (pAllocator) |
| 10678 | { |
| 10679 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10680 | } |
| 10681 | countingStream->write((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10682 | } |
| 10683 | uint32_t packetSize_vkCreateValidationCacheEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10684 | countingStream->rewind(); |
| 10685 | uint32_t opcode_vkCreateValidationCacheEXT = OP_vkCreateValidationCacheEXT; |
| 10686 | stream->write(&opcode_vkCreateValidationCacheEXT, sizeof(uint32_t)); |
| 10687 | stream->write(&packetSize_vkCreateValidationCacheEXT, sizeof(uint32_t)); |
| 10688 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10689 | marshal_VkValidationCacheCreateInfoEXT(stream, (const VkValidationCacheCreateInfoEXT*)(pCreateInfo)); |
| 10690 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10691 | if (pAllocator) |
| 10692 | { |
| 10693 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10694 | } |
| 10695 | stream->write((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10696 | stream->read((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10697 | VkResult vkCreateValidationCacheEXT_VkResult_return = (VkResult)0; |
| 10698 | stream->read(&vkCreateValidationCacheEXT_VkResult_return, sizeof(VkResult)); |
| 10699 | return vkCreateValidationCacheEXT_VkResult_return; |
| 10700 | } |
| 10701 | |
| 10702 | void VkEncoder::vkDestroyValidationCacheEXT( |
| 10703 | VkDevice device, |
| 10704 | VkValidationCacheEXT validationCache, |
| 10705 | const VkAllocationCallbacks* pAllocator) |
| 10706 | { |
| 10707 | auto stream = mImpl->stream(); |
| 10708 | auto countingStream = mImpl->countingStream(); |
| 10709 | countingStream->rewind(); |
| 10710 | { |
| 10711 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10712 | countingStream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10713 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10714 | if (pAllocator) |
| 10715 | { |
| 10716 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10717 | } |
| 10718 | } |
| 10719 | uint32_t packetSize_vkDestroyValidationCacheEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10720 | countingStream->rewind(); |
| 10721 | uint32_t opcode_vkDestroyValidationCacheEXT = OP_vkDestroyValidationCacheEXT; |
| 10722 | stream->write(&opcode_vkDestroyValidationCacheEXT, sizeof(uint32_t)); |
| 10723 | stream->write(&packetSize_vkDestroyValidationCacheEXT, sizeof(uint32_t)); |
| 10724 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10725 | stream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10726 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10727 | if (pAllocator) |
| 10728 | { |
| 10729 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10730 | } |
| 10731 | } |
| 10732 | |
| 10733 | VkResult VkEncoder::vkMergeValidationCachesEXT( |
| 10734 | VkDevice device, |
| 10735 | VkValidationCacheEXT dstCache, |
| 10736 | uint32_t srcCacheCount, |
| 10737 | const VkValidationCacheEXT* pSrcCaches) |
| 10738 | { |
| 10739 | auto stream = mImpl->stream(); |
| 10740 | auto countingStream = mImpl->countingStream(); |
| 10741 | countingStream->rewind(); |
| 10742 | { |
| 10743 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10744 | countingStream->write((VkValidationCacheEXT*)&dstCache, sizeof(VkValidationCacheEXT)); |
| 10745 | countingStream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 10746 | countingStream->write((const VkValidationCacheEXT*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkValidationCacheEXT)); |
| 10747 | } |
| 10748 | uint32_t packetSize_vkMergeValidationCachesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10749 | countingStream->rewind(); |
| 10750 | uint32_t opcode_vkMergeValidationCachesEXT = OP_vkMergeValidationCachesEXT; |
| 10751 | stream->write(&opcode_vkMergeValidationCachesEXT, sizeof(uint32_t)); |
| 10752 | stream->write(&packetSize_vkMergeValidationCachesEXT, sizeof(uint32_t)); |
| 10753 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10754 | stream->write((VkValidationCacheEXT*)&dstCache, sizeof(VkValidationCacheEXT)); |
| 10755 | stream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 10756 | stream->write((const VkValidationCacheEXT*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkValidationCacheEXT)); |
| 10757 | VkResult vkMergeValidationCachesEXT_VkResult_return = (VkResult)0; |
| 10758 | stream->read(&vkMergeValidationCachesEXT_VkResult_return, sizeof(VkResult)); |
| 10759 | return vkMergeValidationCachesEXT_VkResult_return; |
| 10760 | } |
| 10761 | |
| 10762 | VkResult VkEncoder::vkGetValidationCacheDataEXT( |
| 10763 | VkDevice device, |
| 10764 | VkValidationCacheEXT validationCache, |
| 10765 | size_t* pDataSize, |
| 10766 | void* pData) |
| 10767 | { |
| 10768 | auto stream = mImpl->stream(); |
| 10769 | auto countingStream = mImpl->countingStream(); |
| 10770 | countingStream->rewind(); |
| 10771 | { |
| 10772 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10773 | countingStream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10774 | countingStream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 10775 | if (pDataSize) |
| 10776 | { |
| 10777 | countingStream->write((size_t*)pDataSize, sizeof(size_t)); |
| 10778 | } |
| 10779 | countingStream->write((void**)&pData, sizeof(void*)); |
| 10780 | if (pData) |
| 10781 | { |
| 10782 | countingStream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10783 | } |
| 10784 | } |
| 10785 | uint32_t packetSize_vkGetValidationCacheDataEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10786 | countingStream->rewind(); |
| 10787 | uint32_t opcode_vkGetValidationCacheDataEXT = OP_vkGetValidationCacheDataEXT; |
| 10788 | stream->write(&opcode_vkGetValidationCacheDataEXT, sizeof(uint32_t)); |
| 10789 | stream->write(&packetSize_vkGetValidationCacheDataEXT, sizeof(uint32_t)); |
| 10790 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10791 | stream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10792 | stream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 10793 | if (pDataSize) |
| 10794 | { |
| 10795 | stream->write((size_t*)pDataSize, sizeof(size_t)); |
| 10796 | } |
| 10797 | stream->write((void**)&pData, sizeof(void*)); |
| 10798 | if (pData) |
| 10799 | { |
| 10800 | stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10801 | } |
| 10802 | size_t* check_pDataSize; |
| 10803 | stream->read((size_t**)&check_pDataSize, sizeof(size_t*)); |
| 10804 | if (pDataSize) |
| 10805 | { |
| 10806 | if (!(check_pDataSize)) |
| 10807 | { |
| 10808 | fprintf(stderr, "fatal: pDataSize inconsistent between guest and host\n"); |
| 10809 | } |
| 10810 | stream->read((size_t*)pDataSize, sizeof(size_t)); |
| 10811 | } |
| 10812 | void* check_pData; |
| 10813 | stream->read((void**)&check_pData, sizeof(void*)); |
| 10814 | if (pData) |
| 10815 | { |
| 10816 | if (!(check_pData)) |
| 10817 | { |
| 10818 | fprintf(stderr, "fatal: pData inconsistent between guest and host\n"); |
| 10819 | } |
| 10820 | stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10821 | } |
| 10822 | VkResult vkGetValidationCacheDataEXT_VkResult_return = (VkResult)0; |
| 10823 | stream->read(&vkGetValidationCacheDataEXT_VkResult_return, sizeof(VkResult)); |
| 10824 | return vkGetValidationCacheDataEXT_VkResult_return; |
| 10825 | } |
| 10826 | |
| 10827 | #endif |
| 10828 | #ifdef VK_EXT_descriptor_indexing |
| 10829 | #endif |
| 10830 | #ifdef VK_EXT_shader_viewport_index_layer |
| 10831 | #endif |
| 10832 | #ifdef VK_EXT_global_priority |
| 10833 | #endif |
| 10834 | #ifdef VK_EXT_external_memory_host |
| 10835 | VkResult VkEncoder::vkGetMemoryHostPointerPropertiesEXT( |
| 10836 | VkDevice device, |
| 10837 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 10838 | const void* pHostPointer, |
| 10839 | VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) |
| 10840 | { |
| 10841 | auto stream = mImpl->stream(); |
| 10842 | auto countingStream = mImpl->countingStream(); |
| 10843 | countingStream->rewind(); |
| 10844 | { |
| 10845 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10846 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 10847 | countingStream->write((const void**)&pHostPointer, sizeof(const void*)); |
| 10848 | if (pHostPointer) |
| 10849 | { |
| 10850 | countingStream->write((const void*)pHostPointer, sizeof(const uint8_t)); |
| 10851 | } |
| 10852 | marshal_VkMemoryHostPointerPropertiesEXT(countingStream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10853 | } |
| 10854 | uint32_t packetSize_vkGetMemoryHostPointerPropertiesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10855 | countingStream->rewind(); |
| 10856 | uint32_t opcode_vkGetMemoryHostPointerPropertiesEXT = OP_vkGetMemoryHostPointerPropertiesEXT; |
| 10857 | stream->write(&opcode_vkGetMemoryHostPointerPropertiesEXT, sizeof(uint32_t)); |
| 10858 | stream->write(&packetSize_vkGetMemoryHostPointerPropertiesEXT, sizeof(uint32_t)); |
| 10859 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10860 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 10861 | stream->write((const void**)&pHostPointer, sizeof(const void*)); |
| 10862 | if (pHostPointer) |
| 10863 | { |
| 10864 | stream->write((const void*)pHostPointer, sizeof(const uint8_t)); |
| 10865 | } |
| 10866 | marshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10867 | unmarshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10868 | VkResult vkGetMemoryHostPointerPropertiesEXT_VkResult_return = (VkResult)0; |
| 10869 | stream->read(&vkGetMemoryHostPointerPropertiesEXT_VkResult_return, sizeof(VkResult)); |
| 10870 | return vkGetMemoryHostPointerPropertiesEXT_VkResult_return; |
| 10871 | } |
| 10872 | |
| 10873 | #endif |
| 10874 | #ifdef VK_AMD_buffer_marker |
| 10875 | void VkEncoder::vkCmdWriteBufferMarkerAMD( |
| 10876 | VkCommandBuffer commandBuffer, |
| 10877 | VkPipelineStageFlagBits pipelineStage, |
| 10878 | VkBuffer dstBuffer, |
| 10879 | VkDeviceSize dstOffset, |
| 10880 | uint32_t marker) |
| 10881 | { |
| 10882 | auto stream = mImpl->stream(); |
| 10883 | auto countingStream = mImpl->countingStream(); |
| 10884 | countingStream->rewind(); |
| 10885 | { |
| 10886 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10887 | countingStream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 10888 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 10889 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 10890 | countingStream->write((uint32_t*)&marker, sizeof(uint32_t)); |
| 10891 | } |
| 10892 | uint32_t packetSize_vkCmdWriteBufferMarkerAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10893 | countingStream->rewind(); |
| 10894 | uint32_t opcode_vkCmdWriteBufferMarkerAMD = OP_vkCmdWriteBufferMarkerAMD; |
| 10895 | stream->write(&opcode_vkCmdWriteBufferMarkerAMD, sizeof(uint32_t)); |
| 10896 | stream->write(&packetSize_vkCmdWriteBufferMarkerAMD, sizeof(uint32_t)); |
| 10897 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10898 | stream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 10899 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 10900 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 10901 | stream->write((uint32_t*)&marker, sizeof(uint32_t)); |
| 10902 | } |
| 10903 | |
| 10904 | #endif |
| 10905 | #ifdef VK_AMD_shader_core_properties |
| 10906 | #endif |
| 10907 | #ifdef VK_EXT_vertex_attribute_divisor |
| 10908 | #endif |
| 10909 | #ifdef VK_NV_shader_subgroup_partitioned |
| 10910 | #endif |
| 10911 | #ifdef VK_NV_device_diagnostic_checkpoints |
| 10912 | void VkEncoder::vkCmdSetCheckpointNV( |
| 10913 | VkCommandBuffer commandBuffer, |
| 10914 | const void* pCheckpointMarker) |
| 10915 | { |
| 10916 | auto stream = mImpl->stream(); |
| 10917 | auto countingStream = mImpl->countingStream(); |
| 10918 | countingStream->rewind(); |
| 10919 | { |
| 10920 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10921 | countingStream->write((const void**)&pCheckpointMarker, sizeof(const void*)); |
| 10922 | if (pCheckpointMarker) |
| 10923 | { |
| 10924 | countingStream->write((const void*)pCheckpointMarker, sizeof(const uint8_t)); |
| 10925 | } |
| 10926 | } |
| 10927 | uint32_t packetSize_vkCmdSetCheckpointNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10928 | countingStream->rewind(); |
| 10929 | uint32_t opcode_vkCmdSetCheckpointNV = OP_vkCmdSetCheckpointNV; |
| 10930 | stream->write(&opcode_vkCmdSetCheckpointNV, sizeof(uint32_t)); |
| 10931 | stream->write(&packetSize_vkCmdSetCheckpointNV, sizeof(uint32_t)); |
| 10932 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10933 | stream->write((const void**)&pCheckpointMarker, sizeof(const void*)); |
| 10934 | if (pCheckpointMarker) |
| 10935 | { |
| 10936 | stream->write((const void*)pCheckpointMarker, sizeof(const uint8_t)); |
| 10937 | } |
| 10938 | } |
| 10939 | |
| 10940 | void VkEncoder::vkGetQueueCheckpointDataNV( |
| 10941 | VkQueue queue, |
| 10942 | uint32_t* pCheckpointDataCount, |
| 10943 | VkCheckpointDataNV* pCheckpointData) |
| 10944 | { |
| 10945 | auto stream = mImpl->stream(); |
| 10946 | auto countingStream = mImpl->countingStream(); |
| 10947 | countingStream->rewind(); |
| 10948 | { |
| 10949 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10950 | countingStream->write((uint32_t**)&pCheckpointDataCount, sizeof(uint32_t*)); |
| 10951 | if (pCheckpointDataCount) |
| 10952 | { |
| 10953 | countingStream->write((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10954 | } |
| 10955 | countingStream->write((VkCheckpointDataNV**)&pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10956 | if (pCheckpointData) |
| 10957 | { |
| 10958 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10959 | { |
| 10960 | marshal_VkCheckpointDataNV(countingStream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10961 | } |
| 10962 | } |
| 10963 | } |
| 10964 | uint32_t packetSize_vkGetQueueCheckpointDataNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10965 | countingStream->rewind(); |
| 10966 | uint32_t opcode_vkGetQueueCheckpointDataNV = OP_vkGetQueueCheckpointDataNV; |
| 10967 | stream->write(&opcode_vkGetQueueCheckpointDataNV, sizeof(uint32_t)); |
| 10968 | stream->write(&packetSize_vkGetQueueCheckpointDataNV, sizeof(uint32_t)); |
| 10969 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10970 | stream->write((uint32_t**)&pCheckpointDataCount, sizeof(uint32_t*)); |
| 10971 | if (pCheckpointDataCount) |
| 10972 | { |
| 10973 | stream->write((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10974 | } |
| 10975 | stream->write((VkCheckpointDataNV**)&pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10976 | if (pCheckpointData) |
| 10977 | { |
| 10978 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10979 | { |
| 10980 | marshal_VkCheckpointDataNV(stream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10981 | } |
| 10982 | } |
| 10983 | uint32_t* check_pCheckpointDataCount; |
| 10984 | stream->read((uint32_t**)&check_pCheckpointDataCount, sizeof(uint32_t*)); |
| 10985 | if (pCheckpointDataCount) |
| 10986 | { |
| 10987 | if (!(check_pCheckpointDataCount)) |
| 10988 | { |
| 10989 | fprintf(stderr, "fatal: pCheckpointDataCount inconsistent between guest and host\n"); |
| 10990 | } |
| 10991 | stream->read((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10992 | } |
| 10993 | VkCheckpointDataNV* check_pCheckpointData; |
| 10994 | stream->read((VkCheckpointDataNV**)&check_pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10995 | if (pCheckpointData) |
| 10996 | { |
| 10997 | if (!(check_pCheckpointData)) |
| 10998 | { |
| 10999 | fprintf(stderr, "fatal: pCheckpointData inconsistent between guest and host\n"); |
| 11000 | } |
| 11001 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 11002 | { |
| 11003 | unmarshal_VkCheckpointDataNV(stream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 11004 | } |
| 11005 | } |
| 11006 | } |
| 11007 | |
| 11008 | #endif |
| 11009 | |
| 11010 | |