| 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)); |
| 995 | return vkMapMemory_VkResult_return; |
| 996 | } |
| 997 | |
| 998 | void VkEncoder::vkUnmapMemory( |
| 999 | VkDevice device, |
| 1000 | VkDeviceMemory memory) |
| 1001 | { |
| 1002 | auto stream = mImpl->stream(); |
| 1003 | auto countingStream = mImpl->countingStream(); |
| 1004 | countingStream->rewind(); |
| 1005 | { |
| 1006 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1007 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1008 | } |
| 1009 | uint32_t packetSize_vkUnmapMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1010 | countingStream->rewind(); |
| 1011 | uint32_t opcode_vkUnmapMemory = OP_vkUnmapMemory; |
| 1012 | stream->write(&opcode_vkUnmapMemory, sizeof(uint32_t)); |
| 1013 | stream->write(&packetSize_vkUnmapMemory, sizeof(uint32_t)); |
| 1014 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1015 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1016 | } |
| 1017 | |
| 1018 | VkResult VkEncoder::vkFlushMappedMemoryRanges( |
| 1019 | VkDevice device, |
| 1020 | uint32_t memoryRangeCount, |
| 1021 | const VkMappedMemoryRange* pMemoryRanges) |
| 1022 | { |
| 1023 | auto stream = mImpl->stream(); |
| 1024 | auto countingStream = mImpl->countingStream(); |
| 1025 | countingStream->rewind(); |
| 1026 | { |
| 1027 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1028 | countingStream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1029 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1030 | { |
| 1031 | marshal_VkMappedMemoryRange(countingStream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1032 | } |
| 1033 | } |
| 1034 | uint32_t packetSize_vkFlushMappedMemoryRanges = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1035 | countingStream->rewind(); |
| 1036 | uint32_t opcode_vkFlushMappedMemoryRanges = OP_vkFlushMappedMemoryRanges; |
| 1037 | stream->write(&opcode_vkFlushMappedMemoryRanges, sizeof(uint32_t)); |
| 1038 | stream->write(&packetSize_vkFlushMappedMemoryRanges, sizeof(uint32_t)); |
| 1039 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1040 | stream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1041 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1042 | { |
| 1043 | marshal_VkMappedMemoryRange(stream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1044 | } |
| 1045 | VkResult vkFlushMappedMemoryRanges_VkResult_return = (VkResult)0; |
| 1046 | stream->read(&vkFlushMappedMemoryRanges_VkResult_return, sizeof(VkResult)); |
| 1047 | return vkFlushMappedMemoryRanges_VkResult_return; |
| 1048 | } |
| 1049 | |
| 1050 | VkResult VkEncoder::vkInvalidateMappedMemoryRanges( |
| 1051 | VkDevice device, |
| 1052 | uint32_t memoryRangeCount, |
| 1053 | const VkMappedMemoryRange* pMemoryRanges) |
| 1054 | { |
| 1055 | auto stream = mImpl->stream(); |
| 1056 | auto countingStream = mImpl->countingStream(); |
| 1057 | countingStream->rewind(); |
| 1058 | { |
| 1059 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1060 | countingStream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1061 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1062 | { |
| 1063 | marshal_VkMappedMemoryRange(countingStream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1064 | } |
| 1065 | } |
| 1066 | uint32_t packetSize_vkInvalidateMappedMemoryRanges = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1067 | countingStream->rewind(); |
| 1068 | uint32_t opcode_vkInvalidateMappedMemoryRanges = OP_vkInvalidateMappedMemoryRanges; |
| 1069 | stream->write(&opcode_vkInvalidateMappedMemoryRanges, sizeof(uint32_t)); |
| 1070 | stream->write(&packetSize_vkInvalidateMappedMemoryRanges, sizeof(uint32_t)); |
| 1071 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1072 | stream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1073 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1074 | { |
| 1075 | marshal_VkMappedMemoryRange(stream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1076 | } |
| 1077 | VkResult vkInvalidateMappedMemoryRanges_VkResult_return = (VkResult)0; |
| 1078 | stream->read(&vkInvalidateMappedMemoryRanges_VkResult_return, sizeof(VkResult)); |
| 1079 | return vkInvalidateMappedMemoryRanges_VkResult_return; |
| 1080 | } |
| 1081 | |
| 1082 | void VkEncoder::vkGetDeviceMemoryCommitment( |
| 1083 | VkDevice device, |
| 1084 | VkDeviceMemory memory, |
| 1085 | VkDeviceSize* pCommittedMemoryInBytes) |
| 1086 | { |
| 1087 | auto stream = mImpl->stream(); |
| 1088 | auto countingStream = mImpl->countingStream(); |
| 1089 | countingStream->rewind(); |
| 1090 | { |
| 1091 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1092 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1093 | countingStream->write((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1094 | } |
| 1095 | uint32_t packetSize_vkGetDeviceMemoryCommitment = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1096 | countingStream->rewind(); |
| 1097 | uint32_t opcode_vkGetDeviceMemoryCommitment = OP_vkGetDeviceMemoryCommitment; |
| 1098 | stream->write(&opcode_vkGetDeviceMemoryCommitment, sizeof(uint32_t)); |
| 1099 | stream->write(&packetSize_vkGetDeviceMemoryCommitment, sizeof(uint32_t)); |
| 1100 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1101 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1102 | stream->write((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1103 | stream->read((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1104 | } |
| 1105 | |
| 1106 | VkResult VkEncoder::vkBindBufferMemory( |
| 1107 | VkDevice device, |
| 1108 | VkBuffer buffer, |
| 1109 | VkDeviceMemory memory, |
| 1110 | VkDeviceSize memoryOffset) |
| 1111 | { |
| 1112 | auto stream = mImpl->stream(); |
| 1113 | auto countingStream = mImpl->countingStream(); |
| 1114 | countingStream->rewind(); |
| 1115 | { |
| 1116 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1117 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1118 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1119 | countingStream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1120 | } |
| 1121 | uint32_t packetSize_vkBindBufferMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1122 | countingStream->rewind(); |
| 1123 | uint32_t opcode_vkBindBufferMemory = OP_vkBindBufferMemory; |
| 1124 | stream->write(&opcode_vkBindBufferMemory, sizeof(uint32_t)); |
| 1125 | stream->write(&packetSize_vkBindBufferMemory, sizeof(uint32_t)); |
| 1126 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1127 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1128 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1129 | stream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1130 | VkResult vkBindBufferMemory_VkResult_return = (VkResult)0; |
| 1131 | stream->read(&vkBindBufferMemory_VkResult_return, sizeof(VkResult)); |
| 1132 | return vkBindBufferMemory_VkResult_return; |
| 1133 | } |
| 1134 | |
| 1135 | VkResult VkEncoder::vkBindImageMemory( |
| 1136 | VkDevice device, |
| 1137 | VkImage image, |
| 1138 | VkDeviceMemory memory, |
| 1139 | VkDeviceSize memoryOffset) |
| 1140 | { |
| 1141 | auto stream = mImpl->stream(); |
| 1142 | auto countingStream = mImpl->countingStream(); |
| 1143 | countingStream->rewind(); |
| 1144 | { |
| 1145 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1146 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1147 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1148 | countingStream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1149 | } |
| 1150 | uint32_t packetSize_vkBindImageMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1151 | countingStream->rewind(); |
| 1152 | uint32_t opcode_vkBindImageMemory = OP_vkBindImageMemory; |
| 1153 | stream->write(&opcode_vkBindImageMemory, sizeof(uint32_t)); |
| 1154 | stream->write(&packetSize_vkBindImageMemory, sizeof(uint32_t)); |
| 1155 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1156 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1157 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1158 | stream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1159 | VkResult vkBindImageMemory_VkResult_return = (VkResult)0; |
| 1160 | stream->read(&vkBindImageMemory_VkResult_return, sizeof(VkResult)); |
| 1161 | return vkBindImageMemory_VkResult_return; |
| 1162 | } |
| 1163 | |
| 1164 | void VkEncoder::vkGetBufferMemoryRequirements( |
| 1165 | VkDevice device, |
| 1166 | VkBuffer buffer, |
| 1167 | VkMemoryRequirements* pMemoryRequirements) |
| 1168 | { |
| 1169 | auto stream = mImpl->stream(); |
| 1170 | auto countingStream = mImpl->countingStream(); |
| 1171 | countingStream->rewind(); |
| 1172 | { |
| 1173 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1174 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1175 | marshal_VkMemoryRequirements(countingStream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1176 | } |
| 1177 | uint32_t packetSize_vkGetBufferMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1178 | countingStream->rewind(); |
| 1179 | uint32_t opcode_vkGetBufferMemoryRequirements = OP_vkGetBufferMemoryRequirements; |
| 1180 | stream->write(&opcode_vkGetBufferMemoryRequirements, sizeof(uint32_t)); |
| 1181 | stream->write(&packetSize_vkGetBufferMemoryRequirements, sizeof(uint32_t)); |
| 1182 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1183 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1184 | marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1185 | unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1186 | } |
| 1187 | |
| 1188 | void VkEncoder::vkGetImageMemoryRequirements( |
| 1189 | VkDevice device, |
| 1190 | VkImage image, |
| 1191 | VkMemoryRequirements* pMemoryRequirements) |
| 1192 | { |
| 1193 | auto stream = mImpl->stream(); |
| 1194 | auto countingStream = mImpl->countingStream(); |
| 1195 | countingStream->rewind(); |
| 1196 | { |
| 1197 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1198 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1199 | marshal_VkMemoryRequirements(countingStream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1200 | } |
| 1201 | uint32_t packetSize_vkGetImageMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1202 | countingStream->rewind(); |
| 1203 | uint32_t opcode_vkGetImageMemoryRequirements = OP_vkGetImageMemoryRequirements; |
| 1204 | stream->write(&opcode_vkGetImageMemoryRequirements, sizeof(uint32_t)); |
| 1205 | stream->write(&packetSize_vkGetImageMemoryRequirements, sizeof(uint32_t)); |
| 1206 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1207 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1208 | marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1209 | unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1210 | } |
| 1211 | |
| 1212 | void VkEncoder::vkGetImageSparseMemoryRequirements( |
| 1213 | VkDevice device, |
| 1214 | VkImage image, |
| 1215 | uint32_t* pSparseMemoryRequirementCount, |
| 1216 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) |
| 1217 | { |
| 1218 | auto stream = mImpl->stream(); |
| 1219 | auto countingStream = mImpl->countingStream(); |
| 1220 | countingStream->rewind(); |
| 1221 | { |
| 1222 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1223 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1224 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1225 | if (pSparseMemoryRequirementCount) |
| 1226 | { |
| 1227 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1228 | } |
| 1229 | countingStream->write((VkSparseImageMemoryRequirements**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1230 | if (pSparseMemoryRequirements) |
| 1231 | { |
| 1232 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1233 | { |
| 1234 | marshal_VkSparseImageMemoryRequirements(countingStream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1235 | } |
| 1236 | } |
| 1237 | } |
| 1238 | uint32_t packetSize_vkGetImageSparseMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1239 | countingStream->rewind(); |
| 1240 | uint32_t opcode_vkGetImageSparseMemoryRequirements = OP_vkGetImageSparseMemoryRequirements; |
| 1241 | stream->write(&opcode_vkGetImageSparseMemoryRequirements, sizeof(uint32_t)); |
| 1242 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements, sizeof(uint32_t)); |
| 1243 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1244 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1245 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1246 | if (pSparseMemoryRequirementCount) |
| 1247 | { |
| 1248 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1249 | } |
| 1250 | stream->write((VkSparseImageMemoryRequirements**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1251 | if (pSparseMemoryRequirements) |
| 1252 | { |
| 1253 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1254 | { |
| 1255 | marshal_VkSparseImageMemoryRequirements(stream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1256 | } |
| 1257 | } |
| 1258 | uint32_t* check_pSparseMemoryRequirementCount; |
| 1259 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1260 | if (pSparseMemoryRequirementCount) |
| 1261 | { |
| 1262 | if (!(check_pSparseMemoryRequirementCount)) |
| 1263 | { |
| 1264 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 1265 | } |
| 1266 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1267 | } |
| 1268 | VkSparseImageMemoryRequirements* check_pSparseMemoryRequirements; |
| 1269 | stream->read((VkSparseImageMemoryRequirements**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1270 | if (pSparseMemoryRequirements) |
| 1271 | { |
| 1272 | if (!(check_pSparseMemoryRequirements)) |
| 1273 | { |
| 1274 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 1275 | } |
| 1276 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1277 | { |
| 1278 | unmarshal_VkSparseImageMemoryRequirements(stream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1279 | } |
| 1280 | } |
| 1281 | } |
| 1282 | |
| 1283 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties( |
| 1284 | VkPhysicalDevice physicalDevice, |
| 1285 | VkFormat format, |
| 1286 | VkImageType type, |
| 1287 | VkSampleCountFlagBits samples, |
| 1288 | VkImageUsageFlags usage, |
| 1289 | VkImageTiling tiling, |
| 1290 | uint32_t* pPropertyCount, |
| 1291 | VkSparseImageFormatProperties* pProperties) |
| 1292 | { |
| 1293 | auto stream = mImpl->stream(); |
| 1294 | auto countingStream = mImpl->countingStream(); |
| 1295 | countingStream->rewind(); |
| 1296 | { |
| 1297 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 1298 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 1299 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 1300 | countingStream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 1301 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 1302 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 1303 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 1304 | if (pPropertyCount) |
| 1305 | { |
| 1306 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1307 | } |
| 1308 | countingStream->write((VkSparseImageFormatProperties**)&pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1309 | if (pProperties) |
| 1310 | { |
| 1311 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1312 | { |
| 1313 | marshal_VkSparseImageFormatProperties(countingStream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1314 | } |
| 1315 | } |
| 1316 | } |
| 1317 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1318 | countingStream->rewind(); |
| 1319 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties = OP_vkGetPhysicalDeviceSparseImageFormatProperties; |
| 1320 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties, sizeof(uint32_t)); |
| 1321 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties, sizeof(uint32_t)); |
| 1322 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 1323 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 1324 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 1325 | stream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 1326 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 1327 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 1328 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 1329 | if (pPropertyCount) |
| 1330 | { |
| 1331 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1332 | } |
| 1333 | stream->write((VkSparseImageFormatProperties**)&pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1334 | if (pProperties) |
| 1335 | { |
| 1336 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1337 | { |
| 1338 | marshal_VkSparseImageFormatProperties(stream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1339 | } |
| 1340 | } |
| 1341 | uint32_t* check_pPropertyCount; |
| 1342 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 1343 | if (pPropertyCount) |
| 1344 | { |
| 1345 | if (!(check_pPropertyCount)) |
| 1346 | { |
| 1347 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 1348 | } |
| 1349 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1350 | } |
| 1351 | VkSparseImageFormatProperties* check_pProperties; |
| 1352 | stream->read((VkSparseImageFormatProperties**)&check_pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1353 | if (pProperties) |
| 1354 | { |
| 1355 | if (!(check_pProperties)) |
| 1356 | { |
| 1357 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 1358 | } |
| 1359 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1360 | { |
| 1361 | unmarshal_VkSparseImageFormatProperties(stream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1362 | } |
| 1363 | } |
| 1364 | } |
| 1365 | |
| 1366 | VkResult VkEncoder::vkQueueBindSparse( |
| 1367 | VkQueue queue, |
| 1368 | uint32_t bindInfoCount, |
| 1369 | const VkBindSparseInfo* pBindInfo, |
| 1370 | VkFence fence) |
| 1371 | { |
| 1372 | auto stream = mImpl->stream(); |
| 1373 | auto countingStream = mImpl->countingStream(); |
| 1374 | countingStream->rewind(); |
| 1375 | { |
| 1376 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 1377 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 1378 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 1379 | { |
| 1380 | marshal_VkBindSparseInfo(countingStream, (const VkBindSparseInfo*)(pBindInfo + i)); |
| 1381 | } |
| 1382 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1383 | } |
| 1384 | uint32_t packetSize_vkQueueBindSparse = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1385 | countingStream->rewind(); |
| 1386 | uint32_t opcode_vkQueueBindSparse = OP_vkQueueBindSparse; |
| 1387 | stream->write(&opcode_vkQueueBindSparse, sizeof(uint32_t)); |
| 1388 | stream->write(&packetSize_vkQueueBindSparse, sizeof(uint32_t)); |
| 1389 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 1390 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 1391 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 1392 | { |
| 1393 | marshal_VkBindSparseInfo(stream, (const VkBindSparseInfo*)(pBindInfo + i)); |
| 1394 | } |
| 1395 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1396 | VkResult vkQueueBindSparse_VkResult_return = (VkResult)0; |
| 1397 | stream->read(&vkQueueBindSparse_VkResult_return, sizeof(VkResult)); |
| 1398 | return vkQueueBindSparse_VkResult_return; |
| 1399 | } |
| 1400 | |
| 1401 | VkResult VkEncoder::vkCreateFence( |
| 1402 | VkDevice device, |
| 1403 | const VkFenceCreateInfo* pCreateInfo, |
| 1404 | const VkAllocationCallbacks* pAllocator, |
| 1405 | VkFence* pFence) |
| 1406 | { |
| 1407 | auto stream = mImpl->stream(); |
| 1408 | auto countingStream = mImpl->countingStream(); |
| 1409 | countingStream->rewind(); |
| 1410 | { |
| 1411 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1412 | marshal_VkFenceCreateInfo(countingStream, (const VkFenceCreateInfo*)(pCreateInfo)); |
| 1413 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1414 | if (pAllocator) |
| 1415 | { |
| 1416 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1417 | } |
| 1418 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 1419 | } |
| 1420 | uint32_t packetSize_vkCreateFence = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1421 | countingStream->rewind(); |
| 1422 | uint32_t opcode_vkCreateFence = OP_vkCreateFence; |
| 1423 | stream->write(&opcode_vkCreateFence, sizeof(uint32_t)); |
| 1424 | stream->write(&packetSize_vkCreateFence, sizeof(uint32_t)); |
| 1425 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1426 | marshal_VkFenceCreateInfo(stream, (const VkFenceCreateInfo*)(pCreateInfo)); |
| 1427 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1428 | if (pAllocator) |
| 1429 | { |
| 1430 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1431 | } |
| 1432 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 1433 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 1434 | VkResult vkCreateFence_VkResult_return = (VkResult)0; |
| 1435 | stream->read(&vkCreateFence_VkResult_return, sizeof(VkResult)); |
| 1436 | return vkCreateFence_VkResult_return; |
| 1437 | } |
| 1438 | |
| 1439 | void VkEncoder::vkDestroyFence( |
| 1440 | VkDevice device, |
| 1441 | VkFence fence, |
| 1442 | const VkAllocationCallbacks* pAllocator) |
| 1443 | { |
| 1444 | auto stream = mImpl->stream(); |
| 1445 | auto countingStream = mImpl->countingStream(); |
| 1446 | countingStream->rewind(); |
| 1447 | { |
| 1448 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1449 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1450 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1451 | if (pAllocator) |
| 1452 | { |
| 1453 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1454 | } |
| 1455 | } |
| 1456 | uint32_t packetSize_vkDestroyFence = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1457 | countingStream->rewind(); |
| 1458 | uint32_t opcode_vkDestroyFence = OP_vkDestroyFence; |
| 1459 | stream->write(&opcode_vkDestroyFence, sizeof(uint32_t)); |
| 1460 | stream->write(&packetSize_vkDestroyFence, sizeof(uint32_t)); |
| 1461 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1462 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1463 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1464 | if (pAllocator) |
| 1465 | { |
| 1466 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1467 | } |
| 1468 | } |
| 1469 | |
| 1470 | VkResult VkEncoder::vkResetFences( |
| 1471 | VkDevice device, |
| 1472 | uint32_t fenceCount, |
| 1473 | const VkFence* pFences) |
| 1474 | { |
| 1475 | auto stream = mImpl->stream(); |
| 1476 | auto countingStream = mImpl->countingStream(); |
| 1477 | countingStream->rewind(); |
| 1478 | { |
| 1479 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1480 | countingStream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1481 | countingStream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1482 | } |
| 1483 | uint32_t packetSize_vkResetFences = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1484 | countingStream->rewind(); |
| 1485 | uint32_t opcode_vkResetFences = OP_vkResetFences; |
| 1486 | stream->write(&opcode_vkResetFences, sizeof(uint32_t)); |
| 1487 | stream->write(&packetSize_vkResetFences, sizeof(uint32_t)); |
| 1488 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1489 | stream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1490 | stream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1491 | VkResult vkResetFences_VkResult_return = (VkResult)0; |
| 1492 | stream->read(&vkResetFences_VkResult_return, sizeof(VkResult)); |
| 1493 | return vkResetFences_VkResult_return; |
| 1494 | } |
| 1495 | |
| 1496 | VkResult VkEncoder::vkGetFenceStatus( |
| 1497 | VkDevice device, |
| 1498 | VkFence fence) |
| 1499 | { |
| 1500 | auto stream = mImpl->stream(); |
| 1501 | auto countingStream = mImpl->countingStream(); |
| 1502 | countingStream->rewind(); |
| 1503 | { |
| 1504 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1505 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1506 | } |
| 1507 | uint32_t packetSize_vkGetFenceStatus = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1508 | countingStream->rewind(); |
| 1509 | uint32_t opcode_vkGetFenceStatus = OP_vkGetFenceStatus; |
| 1510 | stream->write(&opcode_vkGetFenceStatus, sizeof(uint32_t)); |
| 1511 | stream->write(&packetSize_vkGetFenceStatus, sizeof(uint32_t)); |
| 1512 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1513 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1514 | VkResult vkGetFenceStatus_VkResult_return = (VkResult)0; |
| 1515 | stream->read(&vkGetFenceStatus_VkResult_return, sizeof(VkResult)); |
| 1516 | return vkGetFenceStatus_VkResult_return; |
| 1517 | } |
| 1518 | |
| 1519 | VkResult VkEncoder::vkWaitForFences( |
| 1520 | VkDevice device, |
| 1521 | uint32_t fenceCount, |
| 1522 | const VkFence* pFences, |
| 1523 | VkBool32 waitAll, |
| 1524 | uint64_t timeout) |
| 1525 | { |
| 1526 | auto stream = mImpl->stream(); |
| 1527 | auto countingStream = mImpl->countingStream(); |
| 1528 | countingStream->rewind(); |
| 1529 | { |
| 1530 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1531 | countingStream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1532 | countingStream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1533 | countingStream->write((VkBool32*)&waitAll, sizeof(VkBool32)); |
| 1534 | countingStream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 1535 | } |
| 1536 | uint32_t packetSize_vkWaitForFences = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1537 | countingStream->rewind(); |
| 1538 | uint32_t opcode_vkWaitForFences = OP_vkWaitForFences; |
| 1539 | stream->write(&opcode_vkWaitForFences, sizeof(uint32_t)); |
| 1540 | stream->write(&packetSize_vkWaitForFences, sizeof(uint32_t)); |
| 1541 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1542 | stream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1543 | stream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1544 | stream->write((VkBool32*)&waitAll, sizeof(VkBool32)); |
| 1545 | stream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 1546 | VkResult vkWaitForFences_VkResult_return = (VkResult)0; |
| 1547 | stream->read(&vkWaitForFences_VkResult_return, sizeof(VkResult)); |
| 1548 | return vkWaitForFences_VkResult_return; |
| 1549 | } |
| 1550 | |
| 1551 | VkResult VkEncoder::vkCreateSemaphore( |
| 1552 | VkDevice device, |
| 1553 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 1554 | const VkAllocationCallbacks* pAllocator, |
| 1555 | VkSemaphore* pSemaphore) |
| 1556 | { |
| 1557 | auto stream = mImpl->stream(); |
| 1558 | auto countingStream = mImpl->countingStream(); |
| 1559 | countingStream->rewind(); |
| 1560 | { |
| 1561 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1562 | marshal_VkSemaphoreCreateInfo(countingStream, (const VkSemaphoreCreateInfo*)(pCreateInfo)); |
| 1563 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1564 | if (pAllocator) |
| 1565 | { |
| 1566 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1567 | } |
| 1568 | countingStream->write((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1569 | } |
| 1570 | uint32_t packetSize_vkCreateSemaphore = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1571 | countingStream->rewind(); |
| 1572 | uint32_t opcode_vkCreateSemaphore = OP_vkCreateSemaphore; |
| 1573 | stream->write(&opcode_vkCreateSemaphore, sizeof(uint32_t)); |
| 1574 | stream->write(&packetSize_vkCreateSemaphore, sizeof(uint32_t)); |
| 1575 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1576 | marshal_VkSemaphoreCreateInfo(stream, (const VkSemaphoreCreateInfo*)(pCreateInfo)); |
| 1577 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1578 | if (pAllocator) |
| 1579 | { |
| 1580 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1581 | } |
| 1582 | stream->write((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1583 | stream->read((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1584 | VkResult vkCreateSemaphore_VkResult_return = (VkResult)0; |
| 1585 | stream->read(&vkCreateSemaphore_VkResult_return, sizeof(VkResult)); |
| 1586 | return vkCreateSemaphore_VkResult_return; |
| 1587 | } |
| 1588 | |
| 1589 | void VkEncoder::vkDestroySemaphore( |
| 1590 | VkDevice device, |
| 1591 | VkSemaphore semaphore, |
| 1592 | const VkAllocationCallbacks* pAllocator) |
| 1593 | { |
| 1594 | auto stream = mImpl->stream(); |
| 1595 | auto countingStream = mImpl->countingStream(); |
| 1596 | countingStream->rewind(); |
| 1597 | { |
| 1598 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1599 | countingStream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 1600 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1601 | if (pAllocator) |
| 1602 | { |
| 1603 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1604 | } |
| 1605 | } |
| 1606 | uint32_t packetSize_vkDestroySemaphore = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1607 | countingStream->rewind(); |
| 1608 | uint32_t opcode_vkDestroySemaphore = OP_vkDestroySemaphore; |
| 1609 | stream->write(&opcode_vkDestroySemaphore, sizeof(uint32_t)); |
| 1610 | stream->write(&packetSize_vkDestroySemaphore, sizeof(uint32_t)); |
| 1611 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1612 | stream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 1613 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1614 | if (pAllocator) |
| 1615 | { |
| 1616 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1617 | } |
| 1618 | } |
| 1619 | |
| 1620 | VkResult VkEncoder::vkCreateEvent( |
| 1621 | VkDevice device, |
| 1622 | const VkEventCreateInfo* pCreateInfo, |
| 1623 | const VkAllocationCallbacks* pAllocator, |
| 1624 | VkEvent* pEvent) |
| 1625 | { |
| 1626 | auto stream = mImpl->stream(); |
| 1627 | auto countingStream = mImpl->countingStream(); |
| 1628 | countingStream->rewind(); |
| 1629 | { |
| 1630 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1631 | marshal_VkEventCreateInfo(countingStream, (const VkEventCreateInfo*)(pCreateInfo)); |
| 1632 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1633 | if (pAllocator) |
| 1634 | { |
| 1635 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1636 | } |
| 1637 | countingStream->write((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1638 | } |
| 1639 | uint32_t packetSize_vkCreateEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1640 | countingStream->rewind(); |
| 1641 | uint32_t opcode_vkCreateEvent = OP_vkCreateEvent; |
| 1642 | stream->write(&opcode_vkCreateEvent, sizeof(uint32_t)); |
| 1643 | stream->write(&packetSize_vkCreateEvent, sizeof(uint32_t)); |
| 1644 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1645 | marshal_VkEventCreateInfo(stream, (const VkEventCreateInfo*)(pCreateInfo)); |
| 1646 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1647 | if (pAllocator) |
| 1648 | { |
| 1649 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1650 | } |
| 1651 | stream->write((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1652 | stream->read((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1653 | VkResult vkCreateEvent_VkResult_return = (VkResult)0; |
| 1654 | stream->read(&vkCreateEvent_VkResult_return, sizeof(VkResult)); |
| 1655 | return vkCreateEvent_VkResult_return; |
| 1656 | } |
| 1657 | |
| 1658 | void VkEncoder::vkDestroyEvent( |
| 1659 | VkDevice device, |
| 1660 | VkEvent event, |
| 1661 | const VkAllocationCallbacks* pAllocator) |
| 1662 | { |
| 1663 | auto stream = mImpl->stream(); |
| 1664 | auto countingStream = mImpl->countingStream(); |
| 1665 | countingStream->rewind(); |
| 1666 | { |
| 1667 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1668 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1669 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1670 | if (pAllocator) |
| 1671 | { |
| 1672 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1673 | } |
| 1674 | } |
| 1675 | uint32_t packetSize_vkDestroyEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1676 | countingStream->rewind(); |
| 1677 | uint32_t opcode_vkDestroyEvent = OP_vkDestroyEvent; |
| 1678 | stream->write(&opcode_vkDestroyEvent, sizeof(uint32_t)); |
| 1679 | stream->write(&packetSize_vkDestroyEvent, sizeof(uint32_t)); |
| 1680 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1681 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1682 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1683 | if (pAllocator) |
| 1684 | { |
| 1685 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1686 | } |
| 1687 | } |
| 1688 | |
| 1689 | VkResult VkEncoder::vkGetEventStatus( |
| 1690 | VkDevice device, |
| 1691 | VkEvent event) |
| 1692 | { |
| 1693 | auto stream = mImpl->stream(); |
| 1694 | auto countingStream = mImpl->countingStream(); |
| 1695 | countingStream->rewind(); |
| 1696 | { |
| 1697 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1698 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1699 | } |
| 1700 | uint32_t packetSize_vkGetEventStatus = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1701 | countingStream->rewind(); |
| 1702 | uint32_t opcode_vkGetEventStatus = OP_vkGetEventStatus; |
| 1703 | stream->write(&opcode_vkGetEventStatus, sizeof(uint32_t)); |
| 1704 | stream->write(&packetSize_vkGetEventStatus, sizeof(uint32_t)); |
| 1705 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1706 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1707 | VkResult vkGetEventStatus_VkResult_return = (VkResult)0; |
| 1708 | stream->read(&vkGetEventStatus_VkResult_return, sizeof(VkResult)); |
| 1709 | return vkGetEventStatus_VkResult_return; |
| 1710 | } |
| 1711 | |
| 1712 | VkResult VkEncoder::vkSetEvent( |
| 1713 | VkDevice device, |
| 1714 | VkEvent event) |
| 1715 | { |
| 1716 | auto stream = mImpl->stream(); |
| 1717 | auto countingStream = mImpl->countingStream(); |
| 1718 | countingStream->rewind(); |
| 1719 | { |
| 1720 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1721 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1722 | } |
| 1723 | uint32_t packetSize_vkSetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1724 | countingStream->rewind(); |
| 1725 | uint32_t opcode_vkSetEvent = OP_vkSetEvent; |
| 1726 | stream->write(&opcode_vkSetEvent, sizeof(uint32_t)); |
| 1727 | stream->write(&packetSize_vkSetEvent, sizeof(uint32_t)); |
| 1728 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1729 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1730 | VkResult vkSetEvent_VkResult_return = (VkResult)0; |
| 1731 | stream->read(&vkSetEvent_VkResult_return, sizeof(VkResult)); |
| 1732 | return vkSetEvent_VkResult_return; |
| 1733 | } |
| 1734 | |
| 1735 | VkResult VkEncoder::vkResetEvent( |
| 1736 | VkDevice device, |
| 1737 | VkEvent event) |
| 1738 | { |
| 1739 | auto stream = mImpl->stream(); |
| 1740 | auto countingStream = mImpl->countingStream(); |
| 1741 | countingStream->rewind(); |
| 1742 | { |
| 1743 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1744 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1745 | } |
| 1746 | uint32_t packetSize_vkResetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1747 | countingStream->rewind(); |
| 1748 | uint32_t opcode_vkResetEvent = OP_vkResetEvent; |
| 1749 | stream->write(&opcode_vkResetEvent, sizeof(uint32_t)); |
| 1750 | stream->write(&packetSize_vkResetEvent, sizeof(uint32_t)); |
| 1751 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1752 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1753 | VkResult vkResetEvent_VkResult_return = (VkResult)0; |
| 1754 | stream->read(&vkResetEvent_VkResult_return, sizeof(VkResult)); |
| 1755 | return vkResetEvent_VkResult_return; |
| 1756 | } |
| 1757 | |
| 1758 | VkResult VkEncoder::vkCreateQueryPool( |
| 1759 | VkDevice device, |
| 1760 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 1761 | const VkAllocationCallbacks* pAllocator, |
| 1762 | VkQueryPool* pQueryPool) |
| 1763 | { |
| 1764 | auto stream = mImpl->stream(); |
| 1765 | auto countingStream = mImpl->countingStream(); |
| 1766 | countingStream->rewind(); |
| 1767 | { |
| 1768 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1769 | marshal_VkQueryPoolCreateInfo(countingStream, (const VkQueryPoolCreateInfo*)(pCreateInfo)); |
| 1770 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1771 | if (pAllocator) |
| 1772 | { |
| 1773 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1774 | } |
| 1775 | countingStream->write((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1776 | } |
| 1777 | uint32_t packetSize_vkCreateQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1778 | countingStream->rewind(); |
| 1779 | uint32_t opcode_vkCreateQueryPool = OP_vkCreateQueryPool; |
| 1780 | stream->write(&opcode_vkCreateQueryPool, sizeof(uint32_t)); |
| 1781 | stream->write(&packetSize_vkCreateQueryPool, sizeof(uint32_t)); |
| 1782 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1783 | marshal_VkQueryPoolCreateInfo(stream, (const VkQueryPoolCreateInfo*)(pCreateInfo)); |
| 1784 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1785 | if (pAllocator) |
| 1786 | { |
| 1787 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1788 | } |
| 1789 | stream->write((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1790 | stream->read((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1791 | VkResult vkCreateQueryPool_VkResult_return = (VkResult)0; |
| 1792 | stream->read(&vkCreateQueryPool_VkResult_return, sizeof(VkResult)); |
| 1793 | return vkCreateQueryPool_VkResult_return; |
| 1794 | } |
| 1795 | |
| 1796 | void VkEncoder::vkDestroyQueryPool( |
| 1797 | VkDevice device, |
| 1798 | VkQueryPool queryPool, |
| 1799 | const VkAllocationCallbacks* pAllocator) |
| 1800 | { |
| 1801 | auto stream = mImpl->stream(); |
| 1802 | auto countingStream = mImpl->countingStream(); |
| 1803 | countingStream->rewind(); |
| 1804 | { |
| 1805 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1806 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1807 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1808 | if (pAllocator) |
| 1809 | { |
| 1810 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1811 | } |
| 1812 | } |
| 1813 | uint32_t packetSize_vkDestroyQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1814 | countingStream->rewind(); |
| 1815 | uint32_t opcode_vkDestroyQueryPool = OP_vkDestroyQueryPool; |
| 1816 | stream->write(&opcode_vkDestroyQueryPool, sizeof(uint32_t)); |
| 1817 | stream->write(&packetSize_vkDestroyQueryPool, sizeof(uint32_t)); |
| 1818 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1819 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1820 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1821 | if (pAllocator) |
| 1822 | { |
| 1823 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1824 | } |
| 1825 | } |
| 1826 | |
| 1827 | VkResult VkEncoder::vkGetQueryPoolResults( |
| 1828 | VkDevice device, |
| 1829 | VkQueryPool queryPool, |
| 1830 | uint32_t firstQuery, |
| 1831 | uint32_t queryCount, |
| 1832 | size_t dataSize, |
| 1833 | void* pData, |
| 1834 | VkDeviceSize stride, |
| 1835 | VkQueryResultFlags flags) |
| 1836 | { |
| 1837 | auto stream = mImpl->stream(); |
| 1838 | auto countingStream = mImpl->countingStream(); |
| 1839 | countingStream->rewind(); |
| 1840 | { |
| 1841 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1842 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1843 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 1844 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 1845 | countingStream->write((size_t*)&dataSize, sizeof(size_t)); |
| 1846 | countingStream->write((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1847 | countingStream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 1848 | countingStream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 1849 | } |
| 1850 | uint32_t packetSize_vkGetQueryPoolResults = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1851 | countingStream->rewind(); |
| 1852 | uint32_t opcode_vkGetQueryPoolResults = OP_vkGetQueryPoolResults; |
| 1853 | stream->write(&opcode_vkGetQueryPoolResults, sizeof(uint32_t)); |
| 1854 | stream->write(&packetSize_vkGetQueryPoolResults, sizeof(uint32_t)); |
| 1855 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1856 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1857 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 1858 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 1859 | stream->write((size_t*)&dataSize, sizeof(size_t)); |
| 1860 | stream->write((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1861 | stream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 1862 | stream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 1863 | stream->read((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1864 | VkResult vkGetQueryPoolResults_VkResult_return = (VkResult)0; |
| 1865 | stream->read(&vkGetQueryPoolResults_VkResult_return, sizeof(VkResult)); |
| 1866 | return vkGetQueryPoolResults_VkResult_return; |
| 1867 | } |
| 1868 | |
| 1869 | VkResult VkEncoder::vkCreateBuffer( |
| 1870 | VkDevice device, |
| 1871 | const VkBufferCreateInfo* pCreateInfo, |
| 1872 | const VkAllocationCallbacks* pAllocator, |
| 1873 | VkBuffer* pBuffer) |
| 1874 | { |
| 1875 | auto stream = mImpl->stream(); |
| 1876 | auto countingStream = mImpl->countingStream(); |
| 1877 | countingStream->rewind(); |
| 1878 | { |
| 1879 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1880 | marshal_VkBufferCreateInfo(countingStream, (const VkBufferCreateInfo*)(pCreateInfo)); |
| 1881 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1882 | if (pAllocator) |
| 1883 | { |
| 1884 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1885 | } |
| 1886 | countingStream->write((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1887 | } |
| 1888 | uint32_t packetSize_vkCreateBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1889 | countingStream->rewind(); |
| 1890 | uint32_t opcode_vkCreateBuffer = OP_vkCreateBuffer; |
| 1891 | stream->write(&opcode_vkCreateBuffer, sizeof(uint32_t)); |
| 1892 | stream->write(&packetSize_vkCreateBuffer, sizeof(uint32_t)); |
| 1893 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1894 | marshal_VkBufferCreateInfo(stream, (const VkBufferCreateInfo*)(pCreateInfo)); |
| 1895 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1896 | if (pAllocator) |
| 1897 | { |
| 1898 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1899 | } |
| 1900 | stream->write((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1901 | stream->read((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1902 | VkResult vkCreateBuffer_VkResult_return = (VkResult)0; |
| 1903 | stream->read(&vkCreateBuffer_VkResult_return, sizeof(VkResult)); |
| 1904 | return vkCreateBuffer_VkResult_return; |
| 1905 | } |
| 1906 | |
| 1907 | void VkEncoder::vkDestroyBuffer( |
| 1908 | VkDevice device, |
| 1909 | VkBuffer buffer, |
| 1910 | const VkAllocationCallbacks* pAllocator) |
| 1911 | { |
| 1912 | auto stream = mImpl->stream(); |
| 1913 | auto countingStream = mImpl->countingStream(); |
| 1914 | countingStream->rewind(); |
| 1915 | { |
| 1916 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1917 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1918 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1919 | if (pAllocator) |
| 1920 | { |
| 1921 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1922 | } |
| 1923 | } |
| 1924 | uint32_t packetSize_vkDestroyBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1925 | countingStream->rewind(); |
| 1926 | uint32_t opcode_vkDestroyBuffer = OP_vkDestroyBuffer; |
| 1927 | stream->write(&opcode_vkDestroyBuffer, sizeof(uint32_t)); |
| 1928 | stream->write(&packetSize_vkDestroyBuffer, sizeof(uint32_t)); |
| 1929 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1930 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1931 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1932 | if (pAllocator) |
| 1933 | { |
| 1934 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1935 | } |
| 1936 | } |
| 1937 | |
| 1938 | VkResult VkEncoder::vkCreateBufferView( |
| 1939 | VkDevice device, |
| 1940 | const VkBufferViewCreateInfo* pCreateInfo, |
| 1941 | const VkAllocationCallbacks* pAllocator, |
| 1942 | VkBufferView* pView) |
| 1943 | { |
| 1944 | auto stream = mImpl->stream(); |
| 1945 | auto countingStream = mImpl->countingStream(); |
| 1946 | countingStream->rewind(); |
| 1947 | { |
| 1948 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1949 | marshal_VkBufferViewCreateInfo(countingStream, (const VkBufferViewCreateInfo*)(pCreateInfo)); |
| 1950 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1951 | if (pAllocator) |
| 1952 | { |
| 1953 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1954 | } |
| 1955 | countingStream->write((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1956 | } |
| 1957 | uint32_t packetSize_vkCreateBufferView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1958 | countingStream->rewind(); |
| 1959 | uint32_t opcode_vkCreateBufferView = OP_vkCreateBufferView; |
| 1960 | stream->write(&opcode_vkCreateBufferView, sizeof(uint32_t)); |
| 1961 | stream->write(&packetSize_vkCreateBufferView, sizeof(uint32_t)); |
| 1962 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1963 | marshal_VkBufferViewCreateInfo(stream, (const VkBufferViewCreateInfo*)(pCreateInfo)); |
| 1964 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1965 | if (pAllocator) |
| 1966 | { |
| 1967 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1968 | } |
| 1969 | stream->write((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1970 | stream->read((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1971 | VkResult vkCreateBufferView_VkResult_return = (VkResult)0; |
| 1972 | stream->read(&vkCreateBufferView_VkResult_return, sizeof(VkResult)); |
| 1973 | return vkCreateBufferView_VkResult_return; |
| 1974 | } |
| 1975 | |
| 1976 | void VkEncoder::vkDestroyBufferView( |
| 1977 | VkDevice device, |
| 1978 | VkBufferView bufferView, |
| 1979 | const VkAllocationCallbacks* pAllocator) |
| 1980 | { |
| 1981 | auto stream = mImpl->stream(); |
| 1982 | auto countingStream = mImpl->countingStream(); |
| 1983 | countingStream->rewind(); |
| 1984 | { |
| 1985 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1986 | countingStream->write((VkBufferView*)&bufferView, sizeof(VkBufferView)); |
| 1987 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1988 | if (pAllocator) |
| 1989 | { |
| 1990 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1991 | } |
| 1992 | } |
| 1993 | uint32_t packetSize_vkDestroyBufferView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1994 | countingStream->rewind(); |
| 1995 | uint32_t opcode_vkDestroyBufferView = OP_vkDestroyBufferView; |
| 1996 | stream->write(&opcode_vkDestroyBufferView, sizeof(uint32_t)); |
| 1997 | stream->write(&packetSize_vkDestroyBufferView, sizeof(uint32_t)); |
| 1998 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1999 | stream->write((VkBufferView*)&bufferView, sizeof(VkBufferView)); |
| 2000 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2001 | if (pAllocator) |
| 2002 | { |
| 2003 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2004 | } |
| 2005 | } |
| 2006 | |
| 2007 | VkResult VkEncoder::vkCreateImage( |
| 2008 | VkDevice device, |
| 2009 | const VkImageCreateInfo* pCreateInfo, |
| 2010 | const VkAllocationCallbacks* pAllocator, |
| 2011 | VkImage* pImage) |
| 2012 | { |
| 2013 | auto stream = mImpl->stream(); |
| 2014 | auto countingStream = mImpl->countingStream(); |
| 2015 | countingStream->rewind(); |
| 2016 | { |
| 2017 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2018 | marshal_VkImageCreateInfo(countingStream, (const VkImageCreateInfo*)(pCreateInfo)); |
| 2019 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2020 | if (pAllocator) |
| 2021 | { |
| 2022 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2023 | } |
| 2024 | countingStream->write((VkImage*)pImage, sizeof(VkImage)); |
| 2025 | } |
| 2026 | uint32_t packetSize_vkCreateImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2027 | countingStream->rewind(); |
| 2028 | uint32_t opcode_vkCreateImage = OP_vkCreateImage; |
| 2029 | stream->write(&opcode_vkCreateImage, sizeof(uint32_t)); |
| 2030 | stream->write(&packetSize_vkCreateImage, sizeof(uint32_t)); |
| 2031 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2032 | marshal_VkImageCreateInfo(stream, (const VkImageCreateInfo*)(pCreateInfo)); |
| 2033 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2034 | if (pAllocator) |
| 2035 | { |
| 2036 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2037 | } |
| 2038 | stream->write((VkImage*)pImage, sizeof(VkImage)); |
| 2039 | stream->read((VkImage*)pImage, sizeof(VkImage)); |
| 2040 | VkResult vkCreateImage_VkResult_return = (VkResult)0; |
| 2041 | stream->read(&vkCreateImage_VkResult_return, sizeof(VkResult)); |
| 2042 | return vkCreateImage_VkResult_return; |
| 2043 | } |
| 2044 | |
| 2045 | void VkEncoder::vkDestroyImage( |
| 2046 | VkDevice device, |
| 2047 | VkImage image, |
| 2048 | const VkAllocationCallbacks* pAllocator) |
| 2049 | { |
| 2050 | auto stream = mImpl->stream(); |
| 2051 | auto countingStream = mImpl->countingStream(); |
| 2052 | countingStream->rewind(); |
| 2053 | { |
| 2054 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2055 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 2056 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2057 | if (pAllocator) |
| 2058 | { |
| 2059 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2060 | } |
| 2061 | } |
| 2062 | uint32_t packetSize_vkDestroyImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2063 | countingStream->rewind(); |
| 2064 | uint32_t opcode_vkDestroyImage = OP_vkDestroyImage; |
| 2065 | stream->write(&opcode_vkDestroyImage, sizeof(uint32_t)); |
| 2066 | stream->write(&packetSize_vkDestroyImage, sizeof(uint32_t)); |
| 2067 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2068 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 2069 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2070 | if (pAllocator) |
| 2071 | { |
| 2072 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2073 | } |
| 2074 | } |
| 2075 | |
| 2076 | void VkEncoder::vkGetImageSubresourceLayout( |
| 2077 | VkDevice device, |
| 2078 | VkImage image, |
| 2079 | const VkImageSubresource* pSubresource, |
| 2080 | VkSubresourceLayout* pLayout) |
| 2081 | { |
| 2082 | auto stream = mImpl->stream(); |
| 2083 | auto countingStream = mImpl->countingStream(); |
| 2084 | countingStream->rewind(); |
| 2085 | { |
| 2086 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2087 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 2088 | marshal_VkImageSubresource(countingStream, (const VkImageSubresource*)(pSubresource)); |
| 2089 | marshal_VkSubresourceLayout(countingStream, (VkSubresourceLayout*)(pLayout)); |
| 2090 | } |
| 2091 | uint32_t packetSize_vkGetImageSubresourceLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2092 | countingStream->rewind(); |
| 2093 | uint32_t opcode_vkGetImageSubresourceLayout = OP_vkGetImageSubresourceLayout; |
| 2094 | stream->write(&opcode_vkGetImageSubresourceLayout, sizeof(uint32_t)); |
| 2095 | stream->write(&packetSize_vkGetImageSubresourceLayout, sizeof(uint32_t)); |
| 2096 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2097 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 2098 | marshal_VkImageSubresource(stream, (const VkImageSubresource*)(pSubresource)); |
| 2099 | marshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout)); |
| 2100 | unmarshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout)); |
| 2101 | } |
| 2102 | |
| 2103 | VkResult VkEncoder::vkCreateImageView( |
| 2104 | VkDevice device, |
| 2105 | const VkImageViewCreateInfo* pCreateInfo, |
| 2106 | const VkAllocationCallbacks* pAllocator, |
| 2107 | VkImageView* pView) |
| 2108 | { |
| 2109 | auto stream = mImpl->stream(); |
| 2110 | auto countingStream = mImpl->countingStream(); |
| 2111 | countingStream->rewind(); |
| 2112 | { |
| 2113 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2114 | marshal_VkImageViewCreateInfo(countingStream, (const VkImageViewCreateInfo*)(pCreateInfo)); |
| 2115 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2116 | if (pAllocator) |
| 2117 | { |
| 2118 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2119 | } |
| 2120 | countingStream->write((VkImageView*)pView, sizeof(VkImageView)); |
| 2121 | } |
| 2122 | uint32_t packetSize_vkCreateImageView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2123 | countingStream->rewind(); |
| 2124 | uint32_t opcode_vkCreateImageView = OP_vkCreateImageView; |
| 2125 | stream->write(&opcode_vkCreateImageView, sizeof(uint32_t)); |
| 2126 | stream->write(&packetSize_vkCreateImageView, sizeof(uint32_t)); |
| 2127 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2128 | marshal_VkImageViewCreateInfo(stream, (const VkImageViewCreateInfo*)(pCreateInfo)); |
| 2129 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2130 | if (pAllocator) |
| 2131 | { |
| 2132 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2133 | } |
| 2134 | stream->write((VkImageView*)pView, sizeof(VkImageView)); |
| 2135 | stream->read((VkImageView*)pView, sizeof(VkImageView)); |
| 2136 | VkResult vkCreateImageView_VkResult_return = (VkResult)0; |
| 2137 | stream->read(&vkCreateImageView_VkResult_return, sizeof(VkResult)); |
| 2138 | return vkCreateImageView_VkResult_return; |
| 2139 | } |
| 2140 | |
| 2141 | void VkEncoder::vkDestroyImageView( |
| 2142 | VkDevice device, |
| 2143 | VkImageView imageView, |
| 2144 | const VkAllocationCallbacks* pAllocator) |
| 2145 | { |
| 2146 | auto stream = mImpl->stream(); |
| 2147 | auto countingStream = mImpl->countingStream(); |
| 2148 | countingStream->rewind(); |
| 2149 | { |
| 2150 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2151 | countingStream->write((VkImageView*)&imageView, sizeof(VkImageView)); |
| 2152 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2153 | if (pAllocator) |
| 2154 | { |
| 2155 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2156 | } |
| 2157 | } |
| 2158 | uint32_t packetSize_vkDestroyImageView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2159 | countingStream->rewind(); |
| 2160 | uint32_t opcode_vkDestroyImageView = OP_vkDestroyImageView; |
| 2161 | stream->write(&opcode_vkDestroyImageView, sizeof(uint32_t)); |
| 2162 | stream->write(&packetSize_vkDestroyImageView, sizeof(uint32_t)); |
| 2163 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2164 | stream->write((VkImageView*)&imageView, sizeof(VkImageView)); |
| 2165 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2166 | if (pAllocator) |
| 2167 | { |
| 2168 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2169 | } |
| 2170 | } |
| 2171 | |
| 2172 | VkResult VkEncoder::vkCreateShaderModule( |
| 2173 | VkDevice device, |
| 2174 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 2175 | const VkAllocationCallbacks* pAllocator, |
| 2176 | VkShaderModule* pShaderModule) |
| 2177 | { |
| 2178 | auto stream = mImpl->stream(); |
| 2179 | auto countingStream = mImpl->countingStream(); |
| 2180 | countingStream->rewind(); |
| 2181 | { |
| 2182 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2183 | marshal_VkShaderModuleCreateInfo(countingStream, (const VkShaderModuleCreateInfo*)(pCreateInfo)); |
| 2184 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2185 | if (pAllocator) |
| 2186 | { |
| 2187 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2188 | } |
| 2189 | countingStream->write((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2190 | } |
| 2191 | uint32_t packetSize_vkCreateShaderModule = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2192 | countingStream->rewind(); |
| 2193 | uint32_t opcode_vkCreateShaderModule = OP_vkCreateShaderModule; |
| 2194 | stream->write(&opcode_vkCreateShaderModule, sizeof(uint32_t)); |
| 2195 | stream->write(&packetSize_vkCreateShaderModule, sizeof(uint32_t)); |
| 2196 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2197 | marshal_VkShaderModuleCreateInfo(stream, (const VkShaderModuleCreateInfo*)(pCreateInfo)); |
| 2198 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2199 | if (pAllocator) |
| 2200 | { |
| 2201 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2202 | } |
| 2203 | stream->write((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2204 | stream->read((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2205 | VkResult vkCreateShaderModule_VkResult_return = (VkResult)0; |
| 2206 | stream->read(&vkCreateShaderModule_VkResult_return, sizeof(VkResult)); |
| 2207 | return vkCreateShaderModule_VkResult_return; |
| 2208 | } |
| 2209 | |
| 2210 | void VkEncoder::vkDestroyShaderModule( |
| 2211 | VkDevice device, |
| 2212 | VkShaderModule shaderModule, |
| 2213 | const VkAllocationCallbacks* pAllocator) |
| 2214 | { |
| 2215 | auto stream = mImpl->stream(); |
| 2216 | auto countingStream = mImpl->countingStream(); |
| 2217 | countingStream->rewind(); |
| 2218 | { |
| 2219 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2220 | countingStream->write((VkShaderModule*)&shaderModule, sizeof(VkShaderModule)); |
| 2221 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2222 | if (pAllocator) |
| 2223 | { |
| 2224 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2225 | } |
| 2226 | } |
| 2227 | uint32_t packetSize_vkDestroyShaderModule = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2228 | countingStream->rewind(); |
| 2229 | uint32_t opcode_vkDestroyShaderModule = OP_vkDestroyShaderModule; |
| 2230 | stream->write(&opcode_vkDestroyShaderModule, sizeof(uint32_t)); |
| 2231 | stream->write(&packetSize_vkDestroyShaderModule, sizeof(uint32_t)); |
| 2232 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2233 | stream->write((VkShaderModule*)&shaderModule, sizeof(VkShaderModule)); |
| 2234 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2235 | if (pAllocator) |
| 2236 | { |
| 2237 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2238 | } |
| 2239 | } |
| 2240 | |
| 2241 | VkResult VkEncoder::vkCreatePipelineCache( |
| 2242 | VkDevice device, |
| 2243 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 2244 | const VkAllocationCallbacks* pAllocator, |
| 2245 | VkPipelineCache* pPipelineCache) |
| 2246 | { |
| 2247 | auto stream = mImpl->stream(); |
| 2248 | auto countingStream = mImpl->countingStream(); |
| 2249 | countingStream->rewind(); |
| 2250 | { |
| 2251 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2252 | marshal_VkPipelineCacheCreateInfo(countingStream, (const VkPipelineCacheCreateInfo*)(pCreateInfo)); |
| 2253 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2254 | if (pAllocator) |
| 2255 | { |
| 2256 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2257 | } |
| 2258 | countingStream->write((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2259 | } |
| 2260 | uint32_t packetSize_vkCreatePipelineCache = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2261 | countingStream->rewind(); |
| 2262 | uint32_t opcode_vkCreatePipelineCache = OP_vkCreatePipelineCache; |
| 2263 | stream->write(&opcode_vkCreatePipelineCache, sizeof(uint32_t)); |
| 2264 | stream->write(&packetSize_vkCreatePipelineCache, sizeof(uint32_t)); |
| 2265 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2266 | marshal_VkPipelineCacheCreateInfo(stream, (const VkPipelineCacheCreateInfo*)(pCreateInfo)); |
| 2267 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2268 | if (pAllocator) |
| 2269 | { |
| 2270 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2271 | } |
| 2272 | stream->write((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2273 | stream->read((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2274 | VkResult vkCreatePipelineCache_VkResult_return = (VkResult)0; |
| 2275 | stream->read(&vkCreatePipelineCache_VkResult_return, sizeof(VkResult)); |
| 2276 | return vkCreatePipelineCache_VkResult_return; |
| 2277 | } |
| 2278 | |
| 2279 | void VkEncoder::vkDestroyPipelineCache( |
| 2280 | VkDevice device, |
| 2281 | VkPipelineCache pipelineCache, |
| 2282 | const VkAllocationCallbacks* pAllocator) |
| 2283 | { |
| 2284 | auto stream = mImpl->stream(); |
| 2285 | auto countingStream = mImpl->countingStream(); |
| 2286 | countingStream->rewind(); |
| 2287 | { |
| 2288 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2289 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2290 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2291 | if (pAllocator) |
| 2292 | { |
| 2293 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2294 | } |
| 2295 | } |
| 2296 | uint32_t packetSize_vkDestroyPipelineCache = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2297 | countingStream->rewind(); |
| 2298 | uint32_t opcode_vkDestroyPipelineCache = OP_vkDestroyPipelineCache; |
| 2299 | stream->write(&opcode_vkDestroyPipelineCache, sizeof(uint32_t)); |
| 2300 | stream->write(&packetSize_vkDestroyPipelineCache, sizeof(uint32_t)); |
| 2301 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2302 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2303 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2304 | if (pAllocator) |
| 2305 | { |
| 2306 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2307 | } |
| 2308 | } |
| 2309 | |
| 2310 | VkResult VkEncoder::vkGetPipelineCacheData( |
| 2311 | VkDevice device, |
| 2312 | VkPipelineCache pipelineCache, |
| 2313 | size_t* pDataSize, |
| 2314 | void* pData) |
| 2315 | { |
| 2316 | auto stream = mImpl->stream(); |
| 2317 | auto countingStream = mImpl->countingStream(); |
| 2318 | countingStream->rewind(); |
| 2319 | { |
| 2320 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2321 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2322 | countingStream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 2323 | if (pDataSize) |
| 2324 | { |
| 2325 | countingStream->write((size_t*)pDataSize, sizeof(size_t)); |
| 2326 | } |
| 2327 | countingStream->write((void**)&pData, sizeof(void*)); |
| 2328 | if (pData) |
| 2329 | { |
| 2330 | countingStream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2331 | } |
| 2332 | } |
| 2333 | uint32_t packetSize_vkGetPipelineCacheData = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2334 | countingStream->rewind(); |
| 2335 | uint32_t opcode_vkGetPipelineCacheData = OP_vkGetPipelineCacheData; |
| 2336 | stream->write(&opcode_vkGetPipelineCacheData, sizeof(uint32_t)); |
| 2337 | stream->write(&packetSize_vkGetPipelineCacheData, sizeof(uint32_t)); |
| 2338 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2339 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2340 | stream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 2341 | if (pDataSize) |
| 2342 | { |
| 2343 | stream->write((size_t*)pDataSize, sizeof(size_t)); |
| 2344 | } |
| 2345 | stream->write((void**)&pData, sizeof(void*)); |
| 2346 | if (pData) |
| 2347 | { |
| 2348 | stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2349 | } |
| 2350 | size_t* check_pDataSize; |
| 2351 | stream->read((size_t**)&check_pDataSize, sizeof(size_t*)); |
| 2352 | if (pDataSize) |
| 2353 | { |
| 2354 | if (!(check_pDataSize)) |
| 2355 | { |
| 2356 | fprintf(stderr, "fatal: pDataSize inconsistent between guest and host\n"); |
| 2357 | } |
| 2358 | stream->read((size_t*)pDataSize, sizeof(size_t)); |
| 2359 | } |
| 2360 | void* check_pData; |
| 2361 | stream->read((void**)&check_pData, sizeof(void*)); |
| 2362 | if (pData) |
| 2363 | { |
| 2364 | if (!(check_pData)) |
| 2365 | { |
| 2366 | fprintf(stderr, "fatal: pData inconsistent between guest and host\n"); |
| 2367 | } |
| 2368 | stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2369 | } |
| 2370 | VkResult vkGetPipelineCacheData_VkResult_return = (VkResult)0; |
| 2371 | stream->read(&vkGetPipelineCacheData_VkResult_return, sizeof(VkResult)); |
| 2372 | return vkGetPipelineCacheData_VkResult_return; |
| 2373 | } |
| 2374 | |
| 2375 | VkResult VkEncoder::vkMergePipelineCaches( |
| 2376 | VkDevice device, |
| 2377 | VkPipelineCache dstCache, |
| 2378 | uint32_t srcCacheCount, |
| 2379 | const VkPipelineCache* pSrcCaches) |
| 2380 | { |
| 2381 | auto stream = mImpl->stream(); |
| 2382 | auto countingStream = mImpl->countingStream(); |
| 2383 | countingStream->rewind(); |
| 2384 | { |
| 2385 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2386 | countingStream->write((VkPipelineCache*)&dstCache, sizeof(VkPipelineCache)); |
| 2387 | countingStream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 2388 | countingStream->write((const VkPipelineCache*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkPipelineCache)); |
| 2389 | } |
| 2390 | uint32_t packetSize_vkMergePipelineCaches = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2391 | countingStream->rewind(); |
| 2392 | uint32_t opcode_vkMergePipelineCaches = OP_vkMergePipelineCaches; |
| 2393 | stream->write(&opcode_vkMergePipelineCaches, sizeof(uint32_t)); |
| 2394 | stream->write(&packetSize_vkMergePipelineCaches, sizeof(uint32_t)); |
| 2395 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2396 | stream->write((VkPipelineCache*)&dstCache, sizeof(VkPipelineCache)); |
| 2397 | stream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 2398 | stream->write((const VkPipelineCache*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkPipelineCache)); |
| 2399 | VkResult vkMergePipelineCaches_VkResult_return = (VkResult)0; |
| 2400 | stream->read(&vkMergePipelineCaches_VkResult_return, sizeof(VkResult)); |
| 2401 | return vkMergePipelineCaches_VkResult_return; |
| 2402 | } |
| 2403 | |
| 2404 | VkResult VkEncoder::vkCreateGraphicsPipelines( |
| 2405 | VkDevice device, |
| 2406 | VkPipelineCache pipelineCache, |
| 2407 | uint32_t createInfoCount, |
| 2408 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 2409 | const VkAllocationCallbacks* pAllocator, |
| 2410 | VkPipeline* pPipelines) |
| 2411 | { |
| 2412 | auto stream = mImpl->stream(); |
| 2413 | auto countingStream = mImpl->countingStream(); |
| 2414 | countingStream->rewind(); |
| 2415 | { |
| 2416 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2417 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2418 | countingStream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2419 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2420 | { |
| 2421 | marshal_VkGraphicsPipelineCreateInfo(countingStream, (const VkGraphicsPipelineCreateInfo*)(pCreateInfos + i)); |
| 2422 | } |
| 2423 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2424 | if (pAllocator) |
| 2425 | { |
| 2426 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2427 | } |
| 2428 | countingStream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2429 | } |
| 2430 | uint32_t packetSize_vkCreateGraphicsPipelines = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2431 | countingStream->rewind(); |
| 2432 | uint32_t opcode_vkCreateGraphicsPipelines = OP_vkCreateGraphicsPipelines; |
| 2433 | stream->write(&opcode_vkCreateGraphicsPipelines, sizeof(uint32_t)); |
| 2434 | stream->write(&packetSize_vkCreateGraphicsPipelines, sizeof(uint32_t)); |
| 2435 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2436 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2437 | stream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2438 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2439 | { |
| 2440 | marshal_VkGraphicsPipelineCreateInfo(stream, (const VkGraphicsPipelineCreateInfo*)(pCreateInfos + i)); |
| 2441 | } |
| 2442 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2443 | if (pAllocator) |
| 2444 | { |
| 2445 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2446 | } |
| 2447 | stream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2448 | stream->read((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2449 | VkResult vkCreateGraphicsPipelines_VkResult_return = (VkResult)0; |
| 2450 | stream->read(&vkCreateGraphicsPipelines_VkResult_return, sizeof(VkResult)); |
| 2451 | return vkCreateGraphicsPipelines_VkResult_return; |
| 2452 | } |
| 2453 | |
| 2454 | VkResult VkEncoder::vkCreateComputePipelines( |
| 2455 | VkDevice device, |
| 2456 | VkPipelineCache pipelineCache, |
| 2457 | uint32_t createInfoCount, |
| 2458 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 2459 | const VkAllocationCallbacks* pAllocator, |
| 2460 | VkPipeline* pPipelines) |
| 2461 | { |
| 2462 | auto stream = mImpl->stream(); |
| 2463 | auto countingStream = mImpl->countingStream(); |
| 2464 | countingStream->rewind(); |
| 2465 | { |
| 2466 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2467 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2468 | countingStream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2469 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2470 | { |
| 2471 | marshal_VkComputePipelineCreateInfo(countingStream, (const VkComputePipelineCreateInfo*)(pCreateInfos + i)); |
| 2472 | } |
| 2473 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2474 | if (pAllocator) |
| 2475 | { |
| 2476 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2477 | } |
| 2478 | countingStream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2479 | } |
| 2480 | uint32_t packetSize_vkCreateComputePipelines = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2481 | countingStream->rewind(); |
| 2482 | uint32_t opcode_vkCreateComputePipelines = OP_vkCreateComputePipelines; |
| 2483 | stream->write(&opcode_vkCreateComputePipelines, sizeof(uint32_t)); |
| 2484 | stream->write(&packetSize_vkCreateComputePipelines, sizeof(uint32_t)); |
| 2485 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2486 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2487 | stream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2488 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2489 | { |
| 2490 | marshal_VkComputePipelineCreateInfo(stream, (const VkComputePipelineCreateInfo*)(pCreateInfos + i)); |
| 2491 | } |
| 2492 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2493 | if (pAllocator) |
| 2494 | { |
| 2495 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2496 | } |
| 2497 | stream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2498 | stream->read((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2499 | VkResult vkCreateComputePipelines_VkResult_return = (VkResult)0; |
| 2500 | stream->read(&vkCreateComputePipelines_VkResult_return, sizeof(VkResult)); |
| 2501 | return vkCreateComputePipelines_VkResult_return; |
| 2502 | } |
| 2503 | |
| 2504 | void VkEncoder::vkDestroyPipeline( |
| 2505 | VkDevice device, |
| 2506 | VkPipeline pipeline, |
| 2507 | const VkAllocationCallbacks* pAllocator) |
| 2508 | { |
| 2509 | auto stream = mImpl->stream(); |
| 2510 | auto countingStream = mImpl->countingStream(); |
| 2511 | countingStream->rewind(); |
| 2512 | { |
| 2513 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2514 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 2515 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2516 | if (pAllocator) |
| 2517 | { |
| 2518 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2519 | } |
| 2520 | } |
| 2521 | uint32_t packetSize_vkDestroyPipeline = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2522 | countingStream->rewind(); |
| 2523 | uint32_t opcode_vkDestroyPipeline = OP_vkDestroyPipeline; |
| 2524 | stream->write(&opcode_vkDestroyPipeline, sizeof(uint32_t)); |
| 2525 | stream->write(&packetSize_vkDestroyPipeline, sizeof(uint32_t)); |
| 2526 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2527 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 2528 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2529 | if (pAllocator) |
| 2530 | { |
| 2531 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2532 | } |
| 2533 | } |
| 2534 | |
| 2535 | VkResult VkEncoder::vkCreatePipelineLayout( |
| 2536 | VkDevice device, |
| 2537 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 2538 | const VkAllocationCallbacks* pAllocator, |
| 2539 | VkPipelineLayout* pPipelineLayout) |
| 2540 | { |
| 2541 | auto stream = mImpl->stream(); |
| 2542 | auto countingStream = mImpl->countingStream(); |
| 2543 | countingStream->rewind(); |
| 2544 | { |
| 2545 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2546 | marshal_VkPipelineLayoutCreateInfo(countingStream, (const VkPipelineLayoutCreateInfo*)(pCreateInfo)); |
| 2547 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2548 | if (pAllocator) |
| 2549 | { |
| 2550 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2551 | } |
| 2552 | countingStream->write((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2553 | } |
| 2554 | uint32_t packetSize_vkCreatePipelineLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2555 | countingStream->rewind(); |
| 2556 | uint32_t opcode_vkCreatePipelineLayout = OP_vkCreatePipelineLayout; |
| 2557 | stream->write(&opcode_vkCreatePipelineLayout, sizeof(uint32_t)); |
| 2558 | stream->write(&packetSize_vkCreatePipelineLayout, sizeof(uint32_t)); |
| 2559 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2560 | marshal_VkPipelineLayoutCreateInfo(stream, (const VkPipelineLayoutCreateInfo*)(pCreateInfo)); |
| 2561 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2562 | if (pAllocator) |
| 2563 | { |
| 2564 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2565 | } |
| 2566 | stream->write((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2567 | stream->read((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2568 | VkResult vkCreatePipelineLayout_VkResult_return = (VkResult)0; |
| 2569 | stream->read(&vkCreatePipelineLayout_VkResult_return, sizeof(VkResult)); |
| 2570 | return vkCreatePipelineLayout_VkResult_return; |
| 2571 | } |
| 2572 | |
| 2573 | void VkEncoder::vkDestroyPipelineLayout( |
| 2574 | VkDevice device, |
| 2575 | VkPipelineLayout pipelineLayout, |
| 2576 | const VkAllocationCallbacks* pAllocator) |
| 2577 | { |
| 2578 | auto stream = mImpl->stream(); |
| 2579 | auto countingStream = mImpl->countingStream(); |
| 2580 | countingStream->rewind(); |
| 2581 | { |
| 2582 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2583 | countingStream->write((VkPipelineLayout*)&pipelineLayout, sizeof(VkPipelineLayout)); |
| 2584 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2585 | if (pAllocator) |
| 2586 | { |
| 2587 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2588 | } |
| 2589 | } |
| 2590 | uint32_t packetSize_vkDestroyPipelineLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2591 | countingStream->rewind(); |
| 2592 | uint32_t opcode_vkDestroyPipelineLayout = OP_vkDestroyPipelineLayout; |
| 2593 | stream->write(&opcode_vkDestroyPipelineLayout, sizeof(uint32_t)); |
| 2594 | stream->write(&packetSize_vkDestroyPipelineLayout, sizeof(uint32_t)); |
| 2595 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2596 | stream->write((VkPipelineLayout*)&pipelineLayout, sizeof(VkPipelineLayout)); |
| 2597 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2598 | if (pAllocator) |
| 2599 | { |
| 2600 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2601 | } |
| 2602 | } |
| 2603 | |
| 2604 | VkResult VkEncoder::vkCreateSampler( |
| 2605 | VkDevice device, |
| 2606 | const VkSamplerCreateInfo* pCreateInfo, |
| 2607 | const VkAllocationCallbacks* pAllocator, |
| 2608 | VkSampler* pSampler) |
| 2609 | { |
| 2610 | auto stream = mImpl->stream(); |
| 2611 | auto countingStream = mImpl->countingStream(); |
| 2612 | countingStream->rewind(); |
| 2613 | { |
| 2614 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2615 | marshal_VkSamplerCreateInfo(countingStream, (const VkSamplerCreateInfo*)(pCreateInfo)); |
| 2616 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2617 | if (pAllocator) |
| 2618 | { |
| 2619 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2620 | } |
| 2621 | countingStream->write((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2622 | } |
| 2623 | uint32_t packetSize_vkCreateSampler = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2624 | countingStream->rewind(); |
| 2625 | uint32_t opcode_vkCreateSampler = OP_vkCreateSampler; |
| 2626 | stream->write(&opcode_vkCreateSampler, sizeof(uint32_t)); |
| 2627 | stream->write(&packetSize_vkCreateSampler, sizeof(uint32_t)); |
| 2628 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2629 | marshal_VkSamplerCreateInfo(stream, (const VkSamplerCreateInfo*)(pCreateInfo)); |
| 2630 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2631 | if (pAllocator) |
| 2632 | { |
| 2633 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2634 | } |
| 2635 | stream->write((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2636 | stream->read((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2637 | VkResult vkCreateSampler_VkResult_return = (VkResult)0; |
| 2638 | stream->read(&vkCreateSampler_VkResult_return, sizeof(VkResult)); |
| 2639 | return vkCreateSampler_VkResult_return; |
| 2640 | } |
| 2641 | |
| 2642 | void VkEncoder::vkDestroySampler( |
| 2643 | VkDevice device, |
| 2644 | VkSampler sampler, |
| 2645 | const VkAllocationCallbacks* pAllocator) |
| 2646 | { |
| 2647 | auto stream = mImpl->stream(); |
| 2648 | auto countingStream = mImpl->countingStream(); |
| 2649 | countingStream->rewind(); |
| 2650 | { |
| 2651 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2652 | countingStream->write((VkSampler*)&sampler, sizeof(VkSampler)); |
| 2653 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2654 | if (pAllocator) |
| 2655 | { |
| 2656 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2657 | } |
| 2658 | } |
| 2659 | uint32_t packetSize_vkDestroySampler = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2660 | countingStream->rewind(); |
| 2661 | uint32_t opcode_vkDestroySampler = OP_vkDestroySampler; |
| 2662 | stream->write(&opcode_vkDestroySampler, sizeof(uint32_t)); |
| 2663 | stream->write(&packetSize_vkDestroySampler, sizeof(uint32_t)); |
| 2664 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2665 | stream->write((VkSampler*)&sampler, sizeof(VkSampler)); |
| 2666 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2667 | if (pAllocator) |
| 2668 | { |
| 2669 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2670 | } |
| 2671 | } |
| 2672 | |
| 2673 | VkResult VkEncoder::vkCreateDescriptorSetLayout( |
| 2674 | VkDevice device, |
| 2675 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 2676 | const VkAllocationCallbacks* pAllocator, |
| 2677 | VkDescriptorSetLayout* pSetLayout) |
| 2678 | { |
| 2679 | auto stream = mImpl->stream(); |
| 2680 | auto countingStream = mImpl->countingStream(); |
| 2681 | countingStream->rewind(); |
| 2682 | { |
| 2683 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2684 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 2685 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2686 | if (pAllocator) |
| 2687 | { |
| 2688 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2689 | } |
| 2690 | countingStream->write((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2691 | } |
| 2692 | uint32_t packetSize_vkCreateDescriptorSetLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2693 | countingStream->rewind(); |
| 2694 | uint32_t opcode_vkCreateDescriptorSetLayout = OP_vkCreateDescriptorSetLayout; |
| 2695 | stream->write(&opcode_vkCreateDescriptorSetLayout, sizeof(uint32_t)); |
| 2696 | stream->write(&packetSize_vkCreateDescriptorSetLayout, sizeof(uint32_t)); |
| 2697 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2698 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 2699 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2700 | if (pAllocator) |
| 2701 | { |
| 2702 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2703 | } |
| 2704 | stream->write((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2705 | stream->read((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2706 | VkResult vkCreateDescriptorSetLayout_VkResult_return = (VkResult)0; |
| 2707 | stream->read(&vkCreateDescriptorSetLayout_VkResult_return, sizeof(VkResult)); |
| 2708 | return vkCreateDescriptorSetLayout_VkResult_return; |
| 2709 | } |
| 2710 | |
| 2711 | void VkEncoder::vkDestroyDescriptorSetLayout( |
| 2712 | VkDevice device, |
| 2713 | VkDescriptorSetLayout descriptorSetLayout, |
| 2714 | const VkAllocationCallbacks* pAllocator) |
| 2715 | { |
| 2716 | auto stream = mImpl->stream(); |
| 2717 | auto countingStream = mImpl->countingStream(); |
| 2718 | countingStream->rewind(); |
| 2719 | { |
| 2720 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2721 | countingStream->write((VkDescriptorSetLayout*)&descriptorSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2722 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2723 | if (pAllocator) |
| 2724 | { |
| 2725 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2726 | } |
| 2727 | } |
| 2728 | uint32_t packetSize_vkDestroyDescriptorSetLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2729 | countingStream->rewind(); |
| 2730 | uint32_t opcode_vkDestroyDescriptorSetLayout = OP_vkDestroyDescriptorSetLayout; |
| 2731 | stream->write(&opcode_vkDestroyDescriptorSetLayout, sizeof(uint32_t)); |
| 2732 | stream->write(&packetSize_vkDestroyDescriptorSetLayout, sizeof(uint32_t)); |
| 2733 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2734 | stream->write((VkDescriptorSetLayout*)&descriptorSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2735 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2736 | if (pAllocator) |
| 2737 | { |
| 2738 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2739 | } |
| 2740 | } |
| 2741 | |
| 2742 | VkResult VkEncoder::vkCreateDescriptorPool( |
| 2743 | VkDevice device, |
| 2744 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 2745 | const VkAllocationCallbacks* pAllocator, |
| 2746 | VkDescriptorPool* pDescriptorPool) |
| 2747 | { |
| 2748 | auto stream = mImpl->stream(); |
| 2749 | auto countingStream = mImpl->countingStream(); |
| 2750 | countingStream->rewind(); |
| 2751 | { |
| 2752 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2753 | marshal_VkDescriptorPoolCreateInfo(countingStream, (const VkDescriptorPoolCreateInfo*)(pCreateInfo)); |
| 2754 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2755 | if (pAllocator) |
| 2756 | { |
| 2757 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2758 | } |
| 2759 | countingStream->write((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2760 | } |
| 2761 | uint32_t packetSize_vkCreateDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2762 | countingStream->rewind(); |
| 2763 | uint32_t opcode_vkCreateDescriptorPool = OP_vkCreateDescriptorPool; |
| 2764 | stream->write(&opcode_vkCreateDescriptorPool, sizeof(uint32_t)); |
| 2765 | stream->write(&packetSize_vkCreateDescriptorPool, sizeof(uint32_t)); |
| 2766 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2767 | marshal_VkDescriptorPoolCreateInfo(stream, (const VkDescriptorPoolCreateInfo*)(pCreateInfo)); |
| 2768 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2769 | if (pAllocator) |
| 2770 | { |
| 2771 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2772 | } |
| 2773 | stream->write((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2774 | stream->read((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2775 | VkResult vkCreateDescriptorPool_VkResult_return = (VkResult)0; |
| 2776 | stream->read(&vkCreateDescriptorPool_VkResult_return, sizeof(VkResult)); |
| 2777 | return vkCreateDescriptorPool_VkResult_return; |
| 2778 | } |
| 2779 | |
| 2780 | void VkEncoder::vkDestroyDescriptorPool( |
| 2781 | VkDevice device, |
| 2782 | VkDescriptorPool descriptorPool, |
| 2783 | const VkAllocationCallbacks* pAllocator) |
| 2784 | { |
| 2785 | auto stream = mImpl->stream(); |
| 2786 | auto countingStream = mImpl->countingStream(); |
| 2787 | countingStream->rewind(); |
| 2788 | { |
| 2789 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2790 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2791 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2792 | if (pAllocator) |
| 2793 | { |
| 2794 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2795 | } |
| 2796 | } |
| 2797 | uint32_t packetSize_vkDestroyDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2798 | countingStream->rewind(); |
| 2799 | uint32_t opcode_vkDestroyDescriptorPool = OP_vkDestroyDescriptorPool; |
| 2800 | stream->write(&opcode_vkDestroyDescriptorPool, sizeof(uint32_t)); |
| 2801 | stream->write(&packetSize_vkDestroyDescriptorPool, sizeof(uint32_t)); |
| 2802 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2803 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2804 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2805 | if (pAllocator) |
| 2806 | { |
| 2807 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2808 | } |
| 2809 | } |
| 2810 | |
| 2811 | VkResult VkEncoder::vkResetDescriptorPool( |
| 2812 | VkDevice device, |
| 2813 | VkDescriptorPool descriptorPool, |
| 2814 | VkDescriptorPoolResetFlags flags) |
| 2815 | { |
| 2816 | auto stream = mImpl->stream(); |
| 2817 | auto countingStream = mImpl->countingStream(); |
| 2818 | countingStream->rewind(); |
| 2819 | { |
| 2820 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2821 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2822 | countingStream->write((VkDescriptorPoolResetFlags*)&flags, sizeof(VkDescriptorPoolResetFlags)); |
| 2823 | } |
| 2824 | uint32_t packetSize_vkResetDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2825 | countingStream->rewind(); |
| 2826 | uint32_t opcode_vkResetDescriptorPool = OP_vkResetDescriptorPool; |
| 2827 | stream->write(&opcode_vkResetDescriptorPool, sizeof(uint32_t)); |
| 2828 | stream->write(&packetSize_vkResetDescriptorPool, sizeof(uint32_t)); |
| 2829 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2830 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2831 | stream->write((VkDescriptorPoolResetFlags*)&flags, sizeof(VkDescriptorPoolResetFlags)); |
| 2832 | VkResult vkResetDescriptorPool_VkResult_return = (VkResult)0; |
| 2833 | stream->read(&vkResetDescriptorPool_VkResult_return, sizeof(VkResult)); |
| 2834 | return vkResetDescriptorPool_VkResult_return; |
| 2835 | } |
| 2836 | |
| 2837 | VkResult VkEncoder::vkAllocateDescriptorSets( |
| 2838 | VkDevice device, |
| 2839 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
| 2840 | VkDescriptorSet* pDescriptorSets) |
| 2841 | { |
| 2842 | auto stream = mImpl->stream(); |
| 2843 | auto countingStream = mImpl->countingStream(); |
| 2844 | countingStream->rewind(); |
| 2845 | { |
| 2846 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2847 | marshal_VkDescriptorSetAllocateInfo(countingStream, (const VkDescriptorSetAllocateInfo*)(pAllocateInfo)); |
| 2848 | countingStream->write((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2849 | } |
| 2850 | uint32_t packetSize_vkAllocateDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2851 | countingStream->rewind(); |
| 2852 | uint32_t opcode_vkAllocateDescriptorSets = OP_vkAllocateDescriptorSets; |
| 2853 | stream->write(&opcode_vkAllocateDescriptorSets, sizeof(uint32_t)); |
| 2854 | stream->write(&packetSize_vkAllocateDescriptorSets, sizeof(uint32_t)); |
| 2855 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2856 | marshal_VkDescriptorSetAllocateInfo(stream, (const VkDescriptorSetAllocateInfo*)(pAllocateInfo)); |
| 2857 | stream->write((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2858 | stream->read((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2859 | VkResult vkAllocateDescriptorSets_VkResult_return = (VkResult)0; |
| 2860 | stream->read(&vkAllocateDescriptorSets_VkResult_return, sizeof(VkResult)); |
| 2861 | return vkAllocateDescriptorSets_VkResult_return; |
| 2862 | } |
| 2863 | |
| 2864 | VkResult VkEncoder::vkFreeDescriptorSets( |
| 2865 | VkDevice device, |
| 2866 | VkDescriptorPool descriptorPool, |
| 2867 | uint32_t descriptorSetCount, |
| 2868 | const VkDescriptorSet* pDescriptorSets) |
| 2869 | { |
| 2870 | auto stream = mImpl->stream(); |
| 2871 | auto countingStream = mImpl->countingStream(); |
| 2872 | countingStream->rewind(); |
| 2873 | { |
| 2874 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2875 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2876 | countingStream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 2877 | countingStream->write((const VkDescriptorSet**)&pDescriptorSets, sizeof(const VkDescriptorSet*)); |
| 2878 | if (pDescriptorSets) |
| 2879 | { |
| 2880 | countingStream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 2881 | } |
| 2882 | } |
| 2883 | uint32_t packetSize_vkFreeDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2884 | countingStream->rewind(); |
| 2885 | uint32_t opcode_vkFreeDescriptorSets = OP_vkFreeDescriptorSets; |
| 2886 | stream->write(&opcode_vkFreeDescriptorSets, sizeof(uint32_t)); |
| 2887 | stream->write(&packetSize_vkFreeDescriptorSets, sizeof(uint32_t)); |
| 2888 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2889 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2890 | stream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 2891 | stream->write((const VkDescriptorSet**)&pDescriptorSets, sizeof(const VkDescriptorSet*)); |
| 2892 | if (pDescriptorSets) |
| 2893 | { |
| 2894 | stream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 2895 | } |
| 2896 | VkResult vkFreeDescriptorSets_VkResult_return = (VkResult)0; |
| 2897 | stream->read(&vkFreeDescriptorSets_VkResult_return, sizeof(VkResult)); |
| 2898 | return vkFreeDescriptorSets_VkResult_return; |
| 2899 | } |
| 2900 | |
| 2901 | void VkEncoder::vkUpdateDescriptorSets( |
| 2902 | VkDevice device, |
| 2903 | uint32_t descriptorWriteCount, |
| 2904 | const VkWriteDescriptorSet* pDescriptorWrites, |
| 2905 | uint32_t descriptorCopyCount, |
| 2906 | const VkCopyDescriptorSet* pDescriptorCopies) |
| 2907 | { |
| 2908 | auto stream = mImpl->stream(); |
| 2909 | auto countingStream = mImpl->countingStream(); |
| 2910 | countingStream->rewind(); |
| 2911 | { |
| 2912 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2913 | countingStream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 2914 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 2915 | { |
| 2916 | marshal_VkWriteDescriptorSet(countingStream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 2917 | } |
| 2918 | countingStream->write((uint32_t*)&descriptorCopyCount, sizeof(uint32_t)); |
| 2919 | for (uint32_t i = 0; i < (uint32_t)((descriptorCopyCount)); ++i) |
| 2920 | { |
| 2921 | marshal_VkCopyDescriptorSet(countingStream, (const VkCopyDescriptorSet*)(pDescriptorCopies + i)); |
| 2922 | } |
| 2923 | } |
| 2924 | uint32_t packetSize_vkUpdateDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2925 | countingStream->rewind(); |
| 2926 | uint32_t opcode_vkUpdateDescriptorSets = OP_vkUpdateDescriptorSets; |
| 2927 | stream->write(&opcode_vkUpdateDescriptorSets, sizeof(uint32_t)); |
| 2928 | stream->write(&packetSize_vkUpdateDescriptorSets, sizeof(uint32_t)); |
| 2929 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2930 | stream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 2931 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 2932 | { |
| 2933 | marshal_VkWriteDescriptorSet(stream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 2934 | } |
| 2935 | stream->write((uint32_t*)&descriptorCopyCount, sizeof(uint32_t)); |
| 2936 | for (uint32_t i = 0; i < (uint32_t)((descriptorCopyCount)); ++i) |
| 2937 | { |
| 2938 | marshal_VkCopyDescriptorSet(stream, (const VkCopyDescriptorSet*)(pDescriptorCopies + i)); |
| 2939 | } |
| 2940 | } |
| 2941 | |
| 2942 | VkResult VkEncoder::vkCreateFramebuffer( |
| 2943 | VkDevice device, |
| 2944 | const VkFramebufferCreateInfo* pCreateInfo, |
| 2945 | const VkAllocationCallbacks* pAllocator, |
| 2946 | VkFramebuffer* pFramebuffer) |
| 2947 | { |
| 2948 | auto stream = mImpl->stream(); |
| 2949 | auto countingStream = mImpl->countingStream(); |
| 2950 | countingStream->rewind(); |
| 2951 | { |
| 2952 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2953 | marshal_VkFramebufferCreateInfo(countingStream, (const VkFramebufferCreateInfo*)(pCreateInfo)); |
| 2954 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2955 | if (pAllocator) |
| 2956 | { |
| 2957 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2958 | } |
| 2959 | countingStream->write((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2960 | } |
| 2961 | uint32_t packetSize_vkCreateFramebuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2962 | countingStream->rewind(); |
| 2963 | uint32_t opcode_vkCreateFramebuffer = OP_vkCreateFramebuffer; |
| 2964 | stream->write(&opcode_vkCreateFramebuffer, sizeof(uint32_t)); |
| 2965 | stream->write(&packetSize_vkCreateFramebuffer, sizeof(uint32_t)); |
| 2966 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2967 | marshal_VkFramebufferCreateInfo(stream, (const VkFramebufferCreateInfo*)(pCreateInfo)); |
| 2968 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2969 | if (pAllocator) |
| 2970 | { |
| 2971 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2972 | } |
| 2973 | stream->write((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2974 | stream->read((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2975 | VkResult vkCreateFramebuffer_VkResult_return = (VkResult)0; |
| 2976 | stream->read(&vkCreateFramebuffer_VkResult_return, sizeof(VkResult)); |
| 2977 | return vkCreateFramebuffer_VkResult_return; |
| 2978 | } |
| 2979 | |
| 2980 | void VkEncoder::vkDestroyFramebuffer( |
| 2981 | VkDevice device, |
| 2982 | VkFramebuffer framebuffer, |
| 2983 | const VkAllocationCallbacks* pAllocator) |
| 2984 | { |
| 2985 | auto stream = mImpl->stream(); |
| 2986 | auto countingStream = mImpl->countingStream(); |
| 2987 | countingStream->rewind(); |
| 2988 | { |
| 2989 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2990 | countingStream->write((VkFramebuffer*)&framebuffer, sizeof(VkFramebuffer)); |
| 2991 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2992 | if (pAllocator) |
| 2993 | { |
| 2994 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2995 | } |
| 2996 | } |
| 2997 | uint32_t packetSize_vkDestroyFramebuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2998 | countingStream->rewind(); |
| 2999 | uint32_t opcode_vkDestroyFramebuffer = OP_vkDestroyFramebuffer; |
| 3000 | stream->write(&opcode_vkDestroyFramebuffer, sizeof(uint32_t)); |
| 3001 | stream->write(&packetSize_vkDestroyFramebuffer, sizeof(uint32_t)); |
| 3002 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3003 | stream->write((VkFramebuffer*)&framebuffer, sizeof(VkFramebuffer)); |
| 3004 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3005 | if (pAllocator) |
| 3006 | { |
| 3007 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3008 | } |
| 3009 | } |
| 3010 | |
| 3011 | VkResult VkEncoder::vkCreateRenderPass( |
| 3012 | VkDevice device, |
| 3013 | const VkRenderPassCreateInfo* pCreateInfo, |
| 3014 | const VkAllocationCallbacks* pAllocator, |
| 3015 | VkRenderPass* pRenderPass) |
| 3016 | { |
| 3017 | auto stream = mImpl->stream(); |
| 3018 | auto countingStream = mImpl->countingStream(); |
| 3019 | countingStream->rewind(); |
| 3020 | { |
| 3021 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3022 | marshal_VkRenderPassCreateInfo(countingStream, (const VkRenderPassCreateInfo*)(pCreateInfo)); |
| 3023 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3024 | if (pAllocator) |
| 3025 | { |
| 3026 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3027 | } |
| 3028 | countingStream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3029 | } |
| 3030 | uint32_t packetSize_vkCreateRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3031 | countingStream->rewind(); |
| 3032 | uint32_t opcode_vkCreateRenderPass = OP_vkCreateRenderPass; |
| 3033 | stream->write(&opcode_vkCreateRenderPass, sizeof(uint32_t)); |
| 3034 | stream->write(&packetSize_vkCreateRenderPass, sizeof(uint32_t)); |
| 3035 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3036 | marshal_VkRenderPassCreateInfo(stream, (const VkRenderPassCreateInfo*)(pCreateInfo)); |
| 3037 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3038 | if (pAllocator) |
| 3039 | { |
| 3040 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3041 | } |
| 3042 | stream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3043 | stream->read((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3044 | VkResult vkCreateRenderPass_VkResult_return = (VkResult)0; |
| 3045 | stream->read(&vkCreateRenderPass_VkResult_return, sizeof(VkResult)); |
| 3046 | return vkCreateRenderPass_VkResult_return; |
| 3047 | } |
| 3048 | |
| 3049 | void VkEncoder::vkDestroyRenderPass( |
| 3050 | VkDevice device, |
| 3051 | VkRenderPass renderPass, |
| 3052 | const VkAllocationCallbacks* pAllocator) |
| 3053 | { |
| 3054 | auto stream = mImpl->stream(); |
| 3055 | auto countingStream = mImpl->countingStream(); |
| 3056 | countingStream->rewind(); |
| 3057 | { |
| 3058 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3059 | countingStream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3060 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3061 | if (pAllocator) |
| 3062 | { |
| 3063 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3064 | } |
| 3065 | } |
| 3066 | uint32_t packetSize_vkDestroyRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3067 | countingStream->rewind(); |
| 3068 | uint32_t opcode_vkDestroyRenderPass = OP_vkDestroyRenderPass; |
| 3069 | stream->write(&opcode_vkDestroyRenderPass, sizeof(uint32_t)); |
| 3070 | stream->write(&packetSize_vkDestroyRenderPass, sizeof(uint32_t)); |
| 3071 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3072 | stream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3073 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3074 | if (pAllocator) |
| 3075 | { |
| 3076 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3077 | } |
| 3078 | } |
| 3079 | |
| 3080 | void VkEncoder::vkGetRenderAreaGranularity( |
| 3081 | VkDevice device, |
| 3082 | VkRenderPass renderPass, |
| 3083 | VkExtent2D* pGranularity) |
| 3084 | { |
| 3085 | auto stream = mImpl->stream(); |
| 3086 | auto countingStream = mImpl->countingStream(); |
| 3087 | countingStream->rewind(); |
| 3088 | { |
| 3089 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3090 | countingStream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3091 | marshal_VkExtent2D(countingStream, (VkExtent2D*)(pGranularity)); |
| 3092 | } |
| 3093 | uint32_t packetSize_vkGetRenderAreaGranularity = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3094 | countingStream->rewind(); |
| 3095 | uint32_t opcode_vkGetRenderAreaGranularity = OP_vkGetRenderAreaGranularity; |
| 3096 | stream->write(&opcode_vkGetRenderAreaGranularity, sizeof(uint32_t)); |
| 3097 | stream->write(&packetSize_vkGetRenderAreaGranularity, sizeof(uint32_t)); |
| 3098 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3099 | stream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3100 | marshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity)); |
| 3101 | unmarshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity)); |
| 3102 | } |
| 3103 | |
| 3104 | VkResult VkEncoder::vkCreateCommandPool( |
| 3105 | VkDevice device, |
| 3106 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 3107 | const VkAllocationCallbacks* pAllocator, |
| 3108 | VkCommandPool* pCommandPool) |
| 3109 | { |
| 3110 | auto stream = mImpl->stream(); |
| 3111 | auto countingStream = mImpl->countingStream(); |
| 3112 | countingStream->rewind(); |
| 3113 | { |
| 3114 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3115 | marshal_VkCommandPoolCreateInfo(countingStream, (const VkCommandPoolCreateInfo*)(pCreateInfo)); |
| 3116 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3117 | if (pAllocator) |
| 3118 | { |
| 3119 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3120 | } |
| 3121 | countingStream->write((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3122 | } |
| 3123 | uint32_t packetSize_vkCreateCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3124 | countingStream->rewind(); |
| 3125 | uint32_t opcode_vkCreateCommandPool = OP_vkCreateCommandPool; |
| 3126 | stream->write(&opcode_vkCreateCommandPool, sizeof(uint32_t)); |
| 3127 | stream->write(&packetSize_vkCreateCommandPool, sizeof(uint32_t)); |
| 3128 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3129 | marshal_VkCommandPoolCreateInfo(stream, (const VkCommandPoolCreateInfo*)(pCreateInfo)); |
| 3130 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3131 | if (pAllocator) |
| 3132 | { |
| 3133 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3134 | } |
| 3135 | stream->write((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3136 | stream->read((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3137 | VkResult vkCreateCommandPool_VkResult_return = (VkResult)0; |
| 3138 | stream->read(&vkCreateCommandPool_VkResult_return, sizeof(VkResult)); |
| 3139 | return vkCreateCommandPool_VkResult_return; |
| 3140 | } |
| 3141 | |
| 3142 | void VkEncoder::vkDestroyCommandPool( |
| 3143 | VkDevice device, |
| 3144 | VkCommandPool commandPool, |
| 3145 | const VkAllocationCallbacks* pAllocator) |
| 3146 | { |
| 3147 | auto stream = mImpl->stream(); |
| 3148 | auto countingStream = mImpl->countingStream(); |
| 3149 | countingStream->rewind(); |
| 3150 | { |
| 3151 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3152 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3153 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3154 | if (pAllocator) |
| 3155 | { |
| 3156 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3157 | } |
| 3158 | } |
| 3159 | uint32_t packetSize_vkDestroyCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3160 | countingStream->rewind(); |
| 3161 | uint32_t opcode_vkDestroyCommandPool = OP_vkDestroyCommandPool; |
| 3162 | stream->write(&opcode_vkDestroyCommandPool, sizeof(uint32_t)); |
| 3163 | stream->write(&packetSize_vkDestroyCommandPool, sizeof(uint32_t)); |
| 3164 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3165 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3166 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3167 | if (pAllocator) |
| 3168 | { |
| 3169 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3170 | } |
| 3171 | } |
| 3172 | |
| 3173 | VkResult VkEncoder::vkResetCommandPool( |
| 3174 | VkDevice device, |
| 3175 | VkCommandPool commandPool, |
| 3176 | VkCommandPoolResetFlags flags) |
| 3177 | { |
| 3178 | auto stream = mImpl->stream(); |
| 3179 | auto countingStream = mImpl->countingStream(); |
| 3180 | countingStream->rewind(); |
| 3181 | { |
| 3182 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3183 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3184 | countingStream->write((VkCommandPoolResetFlags*)&flags, sizeof(VkCommandPoolResetFlags)); |
| 3185 | } |
| 3186 | uint32_t packetSize_vkResetCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3187 | countingStream->rewind(); |
| 3188 | uint32_t opcode_vkResetCommandPool = OP_vkResetCommandPool; |
| 3189 | stream->write(&opcode_vkResetCommandPool, sizeof(uint32_t)); |
| 3190 | stream->write(&packetSize_vkResetCommandPool, sizeof(uint32_t)); |
| 3191 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3192 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3193 | stream->write((VkCommandPoolResetFlags*)&flags, sizeof(VkCommandPoolResetFlags)); |
| 3194 | VkResult vkResetCommandPool_VkResult_return = (VkResult)0; |
| 3195 | stream->read(&vkResetCommandPool_VkResult_return, sizeof(VkResult)); |
| 3196 | return vkResetCommandPool_VkResult_return; |
| 3197 | } |
| 3198 | |
| 3199 | VkResult VkEncoder::vkAllocateCommandBuffers( |
| 3200 | VkDevice device, |
| 3201 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 3202 | VkCommandBuffer* pCommandBuffers) |
| 3203 | { |
| 3204 | auto stream = mImpl->stream(); |
| 3205 | auto countingStream = mImpl->countingStream(); |
| 3206 | countingStream->rewind(); |
| 3207 | { |
| 3208 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3209 | marshal_VkCommandBufferAllocateInfo(countingStream, (const VkCommandBufferAllocateInfo*)(pAllocateInfo)); |
| 3210 | countingStream->write((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3211 | } |
| 3212 | uint32_t packetSize_vkAllocateCommandBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3213 | countingStream->rewind(); |
| 3214 | uint32_t opcode_vkAllocateCommandBuffers = OP_vkAllocateCommandBuffers; |
| 3215 | stream->write(&opcode_vkAllocateCommandBuffers, sizeof(uint32_t)); |
| 3216 | stream->write(&packetSize_vkAllocateCommandBuffers, sizeof(uint32_t)); |
| 3217 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3218 | marshal_VkCommandBufferAllocateInfo(stream, (const VkCommandBufferAllocateInfo*)(pAllocateInfo)); |
| 3219 | stream->write((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3220 | stream->read((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3221 | VkResult vkAllocateCommandBuffers_VkResult_return = (VkResult)0; |
| 3222 | stream->read(&vkAllocateCommandBuffers_VkResult_return, sizeof(VkResult)); |
| 3223 | return vkAllocateCommandBuffers_VkResult_return; |
| 3224 | } |
| 3225 | |
| 3226 | void VkEncoder::vkFreeCommandBuffers( |
| 3227 | VkDevice device, |
| 3228 | VkCommandPool commandPool, |
| 3229 | uint32_t commandBufferCount, |
| 3230 | const VkCommandBuffer* pCommandBuffers) |
| 3231 | { |
| 3232 | auto stream = mImpl->stream(); |
| 3233 | auto countingStream = mImpl->countingStream(); |
| 3234 | countingStream->rewind(); |
| 3235 | { |
| 3236 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3237 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3238 | countingStream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 3239 | countingStream->write((const VkCommandBuffer**)&pCommandBuffers, sizeof(const VkCommandBuffer*)); |
| 3240 | if (pCommandBuffers) |
| 3241 | { |
| 3242 | countingStream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 3243 | } |
| 3244 | } |
| 3245 | uint32_t packetSize_vkFreeCommandBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3246 | countingStream->rewind(); |
| 3247 | uint32_t opcode_vkFreeCommandBuffers = OP_vkFreeCommandBuffers; |
| 3248 | stream->write(&opcode_vkFreeCommandBuffers, sizeof(uint32_t)); |
| 3249 | stream->write(&packetSize_vkFreeCommandBuffers, sizeof(uint32_t)); |
| 3250 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3251 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3252 | stream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 3253 | stream->write((const VkCommandBuffer**)&pCommandBuffers, sizeof(const VkCommandBuffer*)); |
| 3254 | if (pCommandBuffers) |
| 3255 | { |
| 3256 | stream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 3257 | } |
| 3258 | } |
| 3259 | |
| 3260 | VkResult VkEncoder::vkBeginCommandBuffer( |
| 3261 | VkCommandBuffer commandBuffer, |
| 3262 | const VkCommandBufferBeginInfo* pBeginInfo) |
| 3263 | { |
| 3264 | auto stream = mImpl->stream(); |
| 3265 | auto countingStream = mImpl->countingStream(); |
| 3266 | countingStream->rewind(); |
| 3267 | { |
| 3268 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3269 | marshal_VkCommandBufferBeginInfo(countingStream, (const VkCommandBufferBeginInfo*)(pBeginInfo)); |
| 3270 | } |
| 3271 | uint32_t packetSize_vkBeginCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3272 | countingStream->rewind(); |
| 3273 | uint32_t opcode_vkBeginCommandBuffer = OP_vkBeginCommandBuffer; |
| 3274 | stream->write(&opcode_vkBeginCommandBuffer, sizeof(uint32_t)); |
| 3275 | stream->write(&packetSize_vkBeginCommandBuffer, sizeof(uint32_t)); |
| 3276 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3277 | marshal_VkCommandBufferBeginInfo(stream, (const VkCommandBufferBeginInfo*)(pBeginInfo)); |
| 3278 | VkResult vkBeginCommandBuffer_VkResult_return = (VkResult)0; |
| 3279 | stream->read(&vkBeginCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3280 | return vkBeginCommandBuffer_VkResult_return; |
| 3281 | } |
| 3282 | |
| 3283 | VkResult VkEncoder::vkEndCommandBuffer( |
| 3284 | VkCommandBuffer commandBuffer) |
| 3285 | { |
| 3286 | auto stream = mImpl->stream(); |
| 3287 | auto countingStream = mImpl->countingStream(); |
| 3288 | countingStream->rewind(); |
| 3289 | { |
| 3290 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3291 | } |
| 3292 | uint32_t packetSize_vkEndCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3293 | countingStream->rewind(); |
| 3294 | uint32_t opcode_vkEndCommandBuffer = OP_vkEndCommandBuffer; |
| 3295 | stream->write(&opcode_vkEndCommandBuffer, sizeof(uint32_t)); |
| 3296 | stream->write(&packetSize_vkEndCommandBuffer, sizeof(uint32_t)); |
| 3297 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3298 | VkResult vkEndCommandBuffer_VkResult_return = (VkResult)0; |
| 3299 | stream->read(&vkEndCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3300 | return vkEndCommandBuffer_VkResult_return; |
| 3301 | } |
| 3302 | |
| 3303 | VkResult VkEncoder::vkResetCommandBuffer( |
| 3304 | VkCommandBuffer commandBuffer, |
| 3305 | VkCommandBufferResetFlags flags) |
| 3306 | { |
| 3307 | auto stream = mImpl->stream(); |
| 3308 | auto countingStream = mImpl->countingStream(); |
| 3309 | countingStream->rewind(); |
| 3310 | { |
| 3311 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3312 | countingStream->write((VkCommandBufferResetFlags*)&flags, sizeof(VkCommandBufferResetFlags)); |
| 3313 | } |
| 3314 | uint32_t packetSize_vkResetCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3315 | countingStream->rewind(); |
| 3316 | uint32_t opcode_vkResetCommandBuffer = OP_vkResetCommandBuffer; |
| 3317 | stream->write(&opcode_vkResetCommandBuffer, sizeof(uint32_t)); |
| 3318 | stream->write(&packetSize_vkResetCommandBuffer, sizeof(uint32_t)); |
| 3319 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3320 | stream->write((VkCommandBufferResetFlags*)&flags, sizeof(VkCommandBufferResetFlags)); |
| 3321 | VkResult vkResetCommandBuffer_VkResult_return = (VkResult)0; |
| 3322 | stream->read(&vkResetCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3323 | return vkResetCommandBuffer_VkResult_return; |
| 3324 | } |
| 3325 | |
| 3326 | void VkEncoder::vkCmdBindPipeline( |
| 3327 | VkCommandBuffer commandBuffer, |
| 3328 | VkPipelineBindPoint pipelineBindPoint, |
| 3329 | VkPipeline pipeline) |
| 3330 | { |
| 3331 | auto stream = mImpl->stream(); |
| 3332 | auto countingStream = mImpl->countingStream(); |
| 3333 | countingStream->rewind(); |
| 3334 | { |
| 3335 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3336 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3337 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 3338 | } |
| 3339 | uint32_t packetSize_vkCmdBindPipeline = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3340 | countingStream->rewind(); |
| 3341 | uint32_t opcode_vkCmdBindPipeline = OP_vkCmdBindPipeline; |
| 3342 | stream->write(&opcode_vkCmdBindPipeline, sizeof(uint32_t)); |
| 3343 | stream->write(&packetSize_vkCmdBindPipeline, sizeof(uint32_t)); |
| 3344 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3345 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3346 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 3347 | } |
| 3348 | |
| 3349 | void VkEncoder::vkCmdSetViewport( |
| 3350 | VkCommandBuffer commandBuffer, |
| 3351 | uint32_t firstViewport, |
| 3352 | uint32_t viewportCount, |
| 3353 | const VkViewport* pViewports) |
| 3354 | { |
| 3355 | auto stream = mImpl->stream(); |
| 3356 | auto countingStream = mImpl->countingStream(); |
| 3357 | countingStream->rewind(); |
| 3358 | { |
| 3359 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3360 | countingStream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 3361 | countingStream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 3362 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 3363 | { |
| 3364 | marshal_VkViewport(countingStream, (const VkViewport*)(pViewports + i)); |
| 3365 | } |
| 3366 | } |
| 3367 | uint32_t packetSize_vkCmdSetViewport = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3368 | countingStream->rewind(); |
| 3369 | uint32_t opcode_vkCmdSetViewport = OP_vkCmdSetViewport; |
| 3370 | stream->write(&opcode_vkCmdSetViewport, sizeof(uint32_t)); |
| 3371 | stream->write(&packetSize_vkCmdSetViewport, sizeof(uint32_t)); |
| 3372 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3373 | stream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 3374 | stream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 3375 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 3376 | { |
| 3377 | marshal_VkViewport(stream, (const VkViewport*)(pViewports + i)); |
| 3378 | } |
| 3379 | } |
| 3380 | |
| 3381 | void VkEncoder::vkCmdSetScissor( |
| 3382 | VkCommandBuffer commandBuffer, |
| 3383 | uint32_t firstScissor, |
| 3384 | uint32_t scissorCount, |
| 3385 | const VkRect2D* pScissors) |
| 3386 | { |
| 3387 | auto stream = mImpl->stream(); |
| 3388 | auto countingStream = mImpl->countingStream(); |
| 3389 | countingStream->rewind(); |
| 3390 | { |
| 3391 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3392 | countingStream->write((uint32_t*)&firstScissor, sizeof(uint32_t)); |
| 3393 | countingStream->write((uint32_t*)&scissorCount, sizeof(uint32_t)); |
| 3394 | for (uint32_t i = 0; i < (uint32_t)((scissorCount)); ++i) |
| 3395 | { |
| 3396 | marshal_VkRect2D(countingStream, (const VkRect2D*)(pScissors + i)); |
| 3397 | } |
| 3398 | } |
| 3399 | uint32_t packetSize_vkCmdSetScissor = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3400 | countingStream->rewind(); |
| 3401 | uint32_t opcode_vkCmdSetScissor = OP_vkCmdSetScissor; |
| 3402 | stream->write(&opcode_vkCmdSetScissor, sizeof(uint32_t)); |
| 3403 | stream->write(&packetSize_vkCmdSetScissor, sizeof(uint32_t)); |
| 3404 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3405 | stream->write((uint32_t*)&firstScissor, sizeof(uint32_t)); |
| 3406 | stream->write((uint32_t*)&scissorCount, sizeof(uint32_t)); |
| 3407 | for (uint32_t i = 0; i < (uint32_t)((scissorCount)); ++i) |
| 3408 | { |
| 3409 | marshal_VkRect2D(stream, (const VkRect2D*)(pScissors + i)); |
| 3410 | } |
| 3411 | } |
| 3412 | |
| 3413 | void VkEncoder::vkCmdSetLineWidth( |
| 3414 | VkCommandBuffer commandBuffer, |
| 3415 | float lineWidth) |
| 3416 | { |
| 3417 | auto stream = mImpl->stream(); |
| 3418 | auto countingStream = mImpl->countingStream(); |
| 3419 | countingStream->rewind(); |
| 3420 | { |
| 3421 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3422 | countingStream->write((float*)&lineWidth, sizeof(float)); |
| 3423 | } |
| 3424 | uint32_t packetSize_vkCmdSetLineWidth = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3425 | countingStream->rewind(); |
| 3426 | uint32_t opcode_vkCmdSetLineWidth = OP_vkCmdSetLineWidth; |
| 3427 | stream->write(&opcode_vkCmdSetLineWidth, sizeof(uint32_t)); |
| 3428 | stream->write(&packetSize_vkCmdSetLineWidth, sizeof(uint32_t)); |
| 3429 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3430 | stream->write((float*)&lineWidth, sizeof(float)); |
| 3431 | } |
| 3432 | |
| 3433 | void VkEncoder::vkCmdSetDepthBias( |
| 3434 | VkCommandBuffer commandBuffer, |
| 3435 | float depthBiasConstantFactor, |
| 3436 | float depthBiasClamp, |
| 3437 | float depthBiasSlopeFactor) |
| 3438 | { |
| 3439 | auto stream = mImpl->stream(); |
| 3440 | auto countingStream = mImpl->countingStream(); |
| 3441 | countingStream->rewind(); |
| 3442 | { |
| 3443 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3444 | countingStream->write((float*)&depthBiasConstantFactor, sizeof(float)); |
| 3445 | countingStream->write((float*)&depthBiasClamp, sizeof(float)); |
| 3446 | countingStream->write((float*)&depthBiasSlopeFactor, sizeof(float)); |
| 3447 | } |
| 3448 | uint32_t packetSize_vkCmdSetDepthBias = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3449 | countingStream->rewind(); |
| 3450 | uint32_t opcode_vkCmdSetDepthBias = OP_vkCmdSetDepthBias; |
| 3451 | stream->write(&opcode_vkCmdSetDepthBias, sizeof(uint32_t)); |
| 3452 | stream->write(&packetSize_vkCmdSetDepthBias, sizeof(uint32_t)); |
| 3453 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3454 | stream->write((float*)&depthBiasConstantFactor, sizeof(float)); |
| 3455 | stream->write((float*)&depthBiasClamp, sizeof(float)); |
| 3456 | stream->write((float*)&depthBiasSlopeFactor, sizeof(float)); |
| 3457 | } |
| 3458 | |
| 3459 | void VkEncoder::vkCmdSetBlendConstants( |
| 3460 | VkCommandBuffer commandBuffer, |
| 3461 | const float blendConstants) |
| 3462 | { |
| 3463 | auto stream = mImpl->stream(); |
| 3464 | auto countingStream = mImpl->countingStream(); |
| 3465 | countingStream->rewind(); |
| 3466 | { |
| 3467 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3468 | countingStream->write((const float*)&blendConstants, 4 * sizeof(const float)); |
| 3469 | } |
| 3470 | uint32_t packetSize_vkCmdSetBlendConstants = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3471 | countingStream->rewind(); |
| 3472 | uint32_t opcode_vkCmdSetBlendConstants = OP_vkCmdSetBlendConstants; |
| 3473 | stream->write(&opcode_vkCmdSetBlendConstants, sizeof(uint32_t)); |
| 3474 | stream->write(&packetSize_vkCmdSetBlendConstants, sizeof(uint32_t)); |
| 3475 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3476 | stream->write((const float*)&blendConstants, 4 * sizeof(const float)); |
| 3477 | } |
| 3478 | |
| 3479 | void VkEncoder::vkCmdSetDepthBounds( |
| 3480 | VkCommandBuffer commandBuffer, |
| 3481 | float minDepthBounds, |
| 3482 | float maxDepthBounds) |
| 3483 | { |
| 3484 | auto stream = mImpl->stream(); |
| 3485 | auto countingStream = mImpl->countingStream(); |
| 3486 | countingStream->rewind(); |
| 3487 | { |
| 3488 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3489 | countingStream->write((float*)&minDepthBounds, sizeof(float)); |
| 3490 | countingStream->write((float*)&maxDepthBounds, sizeof(float)); |
| 3491 | } |
| 3492 | uint32_t packetSize_vkCmdSetDepthBounds = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3493 | countingStream->rewind(); |
| 3494 | uint32_t opcode_vkCmdSetDepthBounds = OP_vkCmdSetDepthBounds; |
| 3495 | stream->write(&opcode_vkCmdSetDepthBounds, sizeof(uint32_t)); |
| 3496 | stream->write(&packetSize_vkCmdSetDepthBounds, sizeof(uint32_t)); |
| 3497 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3498 | stream->write((float*)&minDepthBounds, sizeof(float)); |
| 3499 | stream->write((float*)&maxDepthBounds, sizeof(float)); |
| 3500 | } |
| 3501 | |
| 3502 | void VkEncoder::vkCmdSetStencilCompareMask( |
| 3503 | VkCommandBuffer commandBuffer, |
| 3504 | VkStencilFaceFlags faceMask, |
| 3505 | uint32_t compareMask) |
| 3506 | { |
| 3507 | auto stream = mImpl->stream(); |
| 3508 | auto countingStream = mImpl->countingStream(); |
| 3509 | countingStream->rewind(); |
| 3510 | { |
| 3511 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3512 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3513 | countingStream->write((uint32_t*)&compareMask, sizeof(uint32_t)); |
| 3514 | } |
| 3515 | uint32_t packetSize_vkCmdSetStencilCompareMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3516 | countingStream->rewind(); |
| 3517 | uint32_t opcode_vkCmdSetStencilCompareMask = OP_vkCmdSetStencilCompareMask; |
| 3518 | stream->write(&opcode_vkCmdSetStencilCompareMask, sizeof(uint32_t)); |
| 3519 | stream->write(&packetSize_vkCmdSetStencilCompareMask, sizeof(uint32_t)); |
| 3520 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3521 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3522 | stream->write((uint32_t*)&compareMask, sizeof(uint32_t)); |
| 3523 | } |
| 3524 | |
| 3525 | void VkEncoder::vkCmdSetStencilWriteMask( |
| 3526 | VkCommandBuffer commandBuffer, |
| 3527 | VkStencilFaceFlags faceMask, |
| 3528 | uint32_t writeMask) |
| 3529 | { |
| 3530 | auto stream = mImpl->stream(); |
| 3531 | auto countingStream = mImpl->countingStream(); |
| 3532 | countingStream->rewind(); |
| 3533 | { |
| 3534 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3535 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3536 | countingStream->write((uint32_t*)&writeMask, sizeof(uint32_t)); |
| 3537 | } |
| 3538 | uint32_t packetSize_vkCmdSetStencilWriteMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3539 | countingStream->rewind(); |
| 3540 | uint32_t opcode_vkCmdSetStencilWriteMask = OP_vkCmdSetStencilWriteMask; |
| 3541 | stream->write(&opcode_vkCmdSetStencilWriteMask, sizeof(uint32_t)); |
| 3542 | stream->write(&packetSize_vkCmdSetStencilWriteMask, sizeof(uint32_t)); |
| 3543 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3544 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3545 | stream->write((uint32_t*)&writeMask, sizeof(uint32_t)); |
| 3546 | } |
| 3547 | |
| 3548 | void VkEncoder::vkCmdSetStencilReference( |
| 3549 | VkCommandBuffer commandBuffer, |
| 3550 | VkStencilFaceFlags faceMask, |
| 3551 | uint32_t reference) |
| 3552 | { |
| 3553 | auto stream = mImpl->stream(); |
| 3554 | auto countingStream = mImpl->countingStream(); |
| 3555 | countingStream->rewind(); |
| 3556 | { |
| 3557 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3558 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3559 | countingStream->write((uint32_t*)&reference, sizeof(uint32_t)); |
| 3560 | } |
| 3561 | uint32_t packetSize_vkCmdSetStencilReference = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3562 | countingStream->rewind(); |
| 3563 | uint32_t opcode_vkCmdSetStencilReference = OP_vkCmdSetStencilReference; |
| 3564 | stream->write(&opcode_vkCmdSetStencilReference, sizeof(uint32_t)); |
| 3565 | stream->write(&packetSize_vkCmdSetStencilReference, sizeof(uint32_t)); |
| 3566 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3567 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3568 | stream->write((uint32_t*)&reference, sizeof(uint32_t)); |
| 3569 | } |
| 3570 | |
| 3571 | void VkEncoder::vkCmdBindDescriptorSets( |
| 3572 | VkCommandBuffer commandBuffer, |
| 3573 | VkPipelineBindPoint pipelineBindPoint, |
| 3574 | VkPipelineLayout layout, |
| 3575 | uint32_t firstSet, |
| 3576 | uint32_t descriptorSetCount, |
| 3577 | const VkDescriptorSet* pDescriptorSets, |
| 3578 | uint32_t dynamicOffsetCount, |
| 3579 | const uint32_t* pDynamicOffsets) |
| 3580 | { |
| 3581 | auto stream = mImpl->stream(); |
| 3582 | auto countingStream = mImpl->countingStream(); |
| 3583 | countingStream->rewind(); |
| 3584 | { |
| 3585 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3586 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3587 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 3588 | countingStream->write((uint32_t*)&firstSet, sizeof(uint32_t)); |
| 3589 | countingStream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 3590 | countingStream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 3591 | countingStream->write((uint32_t*)&dynamicOffsetCount, sizeof(uint32_t)); |
| 3592 | countingStream->write((const uint32_t*)pDynamicOffsets, ((dynamicOffsetCount)) * sizeof(const uint32_t)); |
| 3593 | } |
| 3594 | uint32_t packetSize_vkCmdBindDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3595 | countingStream->rewind(); |
| 3596 | uint32_t opcode_vkCmdBindDescriptorSets = OP_vkCmdBindDescriptorSets; |
| 3597 | stream->write(&opcode_vkCmdBindDescriptorSets, sizeof(uint32_t)); |
| 3598 | stream->write(&packetSize_vkCmdBindDescriptorSets, sizeof(uint32_t)); |
| 3599 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3600 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3601 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 3602 | stream->write((uint32_t*)&firstSet, sizeof(uint32_t)); |
| 3603 | stream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 3604 | stream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 3605 | stream->write((uint32_t*)&dynamicOffsetCount, sizeof(uint32_t)); |
| 3606 | stream->write((const uint32_t*)pDynamicOffsets, ((dynamicOffsetCount)) * sizeof(const uint32_t)); |
| 3607 | } |
| 3608 | |
| 3609 | void VkEncoder::vkCmdBindIndexBuffer( |
| 3610 | VkCommandBuffer commandBuffer, |
| 3611 | VkBuffer buffer, |
| 3612 | VkDeviceSize offset, |
| 3613 | VkIndexType indexType) |
| 3614 | { |
| 3615 | auto stream = mImpl->stream(); |
| 3616 | auto countingStream = mImpl->countingStream(); |
| 3617 | countingStream->rewind(); |
| 3618 | { |
| 3619 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3620 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3621 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3622 | countingStream->write((VkIndexType*)&indexType, sizeof(VkIndexType)); |
| 3623 | } |
| 3624 | uint32_t packetSize_vkCmdBindIndexBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3625 | countingStream->rewind(); |
| 3626 | uint32_t opcode_vkCmdBindIndexBuffer = OP_vkCmdBindIndexBuffer; |
| 3627 | stream->write(&opcode_vkCmdBindIndexBuffer, sizeof(uint32_t)); |
| 3628 | stream->write(&packetSize_vkCmdBindIndexBuffer, sizeof(uint32_t)); |
| 3629 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3630 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3631 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3632 | stream->write((VkIndexType*)&indexType, sizeof(VkIndexType)); |
| 3633 | } |
| 3634 | |
| 3635 | void VkEncoder::vkCmdBindVertexBuffers( |
| 3636 | VkCommandBuffer commandBuffer, |
| 3637 | uint32_t firstBinding, |
| 3638 | uint32_t bindingCount, |
| 3639 | const VkBuffer* pBuffers, |
| 3640 | const VkDeviceSize* pOffsets) |
| 3641 | { |
| 3642 | auto stream = mImpl->stream(); |
| 3643 | auto countingStream = mImpl->countingStream(); |
| 3644 | countingStream->rewind(); |
| 3645 | { |
| 3646 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3647 | countingStream->write((uint32_t*)&firstBinding, sizeof(uint32_t)); |
| 3648 | countingStream->write((uint32_t*)&bindingCount, sizeof(uint32_t)); |
| 3649 | countingStream->write((const VkBuffer*)pBuffers, ((bindingCount)) * sizeof(const VkBuffer)); |
| 3650 | countingStream->write((const VkDeviceSize*)pOffsets, ((bindingCount)) * sizeof(const VkDeviceSize)); |
| 3651 | } |
| 3652 | uint32_t packetSize_vkCmdBindVertexBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3653 | countingStream->rewind(); |
| 3654 | uint32_t opcode_vkCmdBindVertexBuffers = OP_vkCmdBindVertexBuffers; |
| 3655 | stream->write(&opcode_vkCmdBindVertexBuffers, sizeof(uint32_t)); |
| 3656 | stream->write(&packetSize_vkCmdBindVertexBuffers, sizeof(uint32_t)); |
| 3657 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3658 | stream->write((uint32_t*)&firstBinding, sizeof(uint32_t)); |
| 3659 | stream->write((uint32_t*)&bindingCount, sizeof(uint32_t)); |
| 3660 | stream->write((const VkBuffer*)pBuffers, ((bindingCount)) * sizeof(const VkBuffer)); |
| 3661 | stream->write((const VkDeviceSize*)pOffsets, ((bindingCount)) * sizeof(const VkDeviceSize)); |
| 3662 | } |
| 3663 | |
| 3664 | void VkEncoder::vkCmdDraw( |
| 3665 | VkCommandBuffer commandBuffer, |
| 3666 | uint32_t vertexCount, |
| 3667 | uint32_t instanceCount, |
| 3668 | uint32_t firstVertex, |
| 3669 | uint32_t firstInstance) |
| 3670 | { |
| 3671 | auto stream = mImpl->stream(); |
| 3672 | auto countingStream = mImpl->countingStream(); |
| 3673 | countingStream->rewind(); |
| 3674 | { |
| 3675 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3676 | countingStream->write((uint32_t*)&vertexCount, sizeof(uint32_t)); |
| 3677 | countingStream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3678 | countingStream->write((uint32_t*)&firstVertex, sizeof(uint32_t)); |
| 3679 | countingStream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3680 | } |
| 3681 | uint32_t packetSize_vkCmdDraw = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3682 | countingStream->rewind(); |
| 3683 | uint32_t opcode_vkCmdDraw = OP_vkCmdDraw; |
| 3684 | stream->write(&opcode_vkCmdDraw, sizeof(uint32_t)); |
| 3685 | stream->write(&packetSize_vkCmdDraw, sizeof(uint32_t)); |
| 3686 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3687 | stream->write((uint32_t*)&vertexCount, sizeof(uint32_t)); |
| 3688 | stream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3689 | stream->write((uint32_t*)&firstVertex, sizeof(uint32_t)); |
| 3690 | stream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3691 | } |
| 3692 | |
| 3693 | void VkEncoder::vkCmdDrawIndexed( |
| 3694 | VkCommandBuffer commandBuffer, |
| 3695 | uint32_t indexCount, |
| 3696 | uint32_t instanceCount, |
| 3697 | uint32_t firstIndex, |
| 3698 | int32_t vertexOffset, |
| 3699 | uint32_t firstInstance) |
| 3700 | { |
| 3701 | auto stream = mImpl->stream(); |
| 3702 | auto countingStream = mImpl->countingStream(); |
| 3703 | countingStream->rewind(); |
| 3704 | { |
| 3705 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3706 | countingStream->write((uint32_t*)&indexCount, sizeof(uint32_t)); |
| 3707 | countingStream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3708 | countingStream->write((uint32_t*)&firstIndex, sizeof(uint32_t)); |
| 3709 | countingStream->write((int32_t*)&vertexOffset, sizeof(int32_t)); |
| 3710 | countingStream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3711 | } |
| 3712 | uint32_t packetSize_vkCmdDrawIndexed = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3713 | countingStream->rewind(); |
| 3714 | uint32_t opcode_vkCmdDrawIndexed = OP_vkCmdDrawIndexed; |
| 3715 | stream->write(&opcode_vkCmdDrawIndexed, sizeof(uint32_t)); |
| 3716 | stream->write(&packetSize_vkCmdDrawIndexed, sizeof(uint32_t)); |
| 3717 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3718 | stream->write((uint32_t*)&indexCount, sizeof(uint32_t)); |
| 3719 | stream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3720 | stream->write((uint32_t*)&firstIndex, sizeof(uint32_t)); |
| 3721 | stream->write((int32_t*)&vertexOffset, sizeof(int32_t)); |
| 3722 | stream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3723 | } |
| 3724 | |
| 3725 | void VkEncoder::vkCmdDrawIndirect( |
| 3726 | VkCommandBuffer commandBuffer, |
| 3727 | VkBuffer buffer, |
| 3728 | VkDeviceSize offset, |
| 3729 | uint32_t drawCount, |
| 3730 | uint32_t stride) |
| 3731 | { |
| 3732 | auto stream = mImpl->stream(); |
| 3733 | auto countingStream = mImpl->countingStream(); |
| 3734 | countingStream->rewind(); |
| 3735 | { |
| 3736 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3737 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3738 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3739 | countingStream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3740 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3741 | } |
| 3742 | uint32_t packetSize_vkCmdDrawIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3743 | countingStream->rewind(); |
| 3744 | uint32_t opcode_vkCmdDrawIndirect = OP_vkCmdDrawIndirect; |
| 3745 | stream->write(&opcode_vkCmdDrawIndirect, sizeof(uint32_t)); |
| 3746 | stream->write(&packetSize_vkCmdDrawIndirect, sizeof(uint32_t)); |
| 3747 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3748 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3749 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3750 | stream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3751 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3752 | } |
| 3753 | |
| 3754 | void VkEncoder::vkCmdDrawIndexedIndirect( |
| 3755 | VkCommandBuffer commandBuffer, |
| 3756 | VkBuffer buffer, |
| 3757 | VkDeviceSize offset, |
| 3758 | uint32_t drawCount, |
| 3759 | uint32_t stride) |
| 3760 | { |
| 3761 | auto stream = mImpl->stream(); |
| 3762 | auto countingStream = mImpl->countingStream(); |
| 3763 | countingStream->rewind(); |
| 3764 | { |
| 3765 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3766 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3767 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3768 | countingStream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3769 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3770 | } |
| 3771 | uint32_t packetSize_vkCmdDrawIndexedIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3772 | countingStream->rewind(); |
| 3773 | uint32_t opcode_vkCmdDrawIndexedIndirect = OP_vkCmdDrawIndexedIndirect; |
| 3774 | stream->write(&opcode_vkCmdDrawIndexedIndirect, sizeof(uint32_t)); |
| 3775 | stream->write(&packetSize_vkCmdDrawIndexedIndirect, sizeof(uint32_t)); |
| 3776 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3777 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3778 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3779 | stream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3780 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3781 | } |
| 3782 | |
| 3783 | void VkEncoder::vkCmdDispatch( |
| 3784 | VkCommandBuffer commandBuffer, |
| 3785 | uint32_t groupCountX, |
| 3786 | uint32_t groupCountY, |
| 3787 | uint32_t groupCountZ) |
| 3788 | { |
| 3789 | auto stream = mImpl->stream(); |
| 3790 | auto countingStream = mImpl->countingStream(); |
| 3791 | countingStream->rewind(); |
| 3792 | { |
| 3793 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3794 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 3795 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 3796 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 3797 | } |
| 3798 | uint32_t packetSize_vkCmdDispatch = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3799 | countingStream->rewind(); |
| 3800 | uint32_t opcode_vkCmdDispatch = OP_vkCmdDispatch; |
| 3801 | stream->write(&opcode_vkCmdDispatch, sizeof(uint32_t)); |
| 3802 | stream->write(&packetSize_vkCmdDispatch, sizeof(uint32_t)); |
| 3803 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3804 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 3805 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 3806 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 3807 | } |
| 3808 | |
| 3809 | void VkEncoder::vkCmdDispatchIndirect( |
| 3810 | VkCommandBuffer commandBuffer, |
| 3811 | VkBuffer buffer, |
| 3812 | VkDeviceSize offset) |
| 3813 | { |
| 3814 | auto stream = mImpl->stream(); |
| 3815 | auto countingStream = mImpl->countingStream(); |
| 3816 | countingStream->rewind(); |
| 3817 | { |
| 3818 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3819 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3820 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3821 | } |
| 3822 | uint32_t packetSize_vkCmdDispatchIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3823 | countingStream->rewind(); |
| 3824 | uint32_t opcode_vkCmdDispatchIndirect = OP_vkCmdDispatchIndirect; |
| 3825 | stream->write(&opcode_vkCmdDispatchIndirect, sizeof(uint32_t)); |
| 3826 | stream->write(&packetSize_vkCmdDispatchIndirect, sizeof(uint32_t)); |
| 3827 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3828 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3829 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3830 | } |
| 3831 | |
| 3832 | void VkEncoder::vkCmdCopyBuffer( |
| 3833 | VkCommandBuffer commandBuffer, |
| 3834 | VkBuffer srcBuffer, |
| 3835 | VkBuffer dstBuffer, |
| 3836 | uint32_t regionCount, |
| 3837 | const VkBufferCopy* pRegions) |
| 3838 | { |
| 3839 | auto stream = mImpl->stream(); |
| 3840 | auto countingStream = mImpl->countingStream(); |
| 3841 | countingStream->rewind(); |
| 3842 | { |
| 3843 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3844 | countingStream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3845 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 3846 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3847 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3848 | { |
| 3849 | marshal_VkBufferCopy(countingStream, (const VkBufferCopy*)(pRegions + i)); |
| 3850 | } |
| 3851 | } |
| 3852 | uint32_t packetSize_vkCmdCopyBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3853 | countingStream->rewind(); |
| 3854 | uint32_t opcode_vkCmdCopyBuffer = OP_vkCmdCopyBuffer; |
| 3855 | stream->write(&opcode_vkCmdCopyBuffer, sizeof(uint32_t)); |
| 3856 | stream->write(&packetSize_vkCmdCopyBuffer, sizeof(uint32_t)); |
| 3857 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3858 | stream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3859 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 3860 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3861 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3862 | { |
| 3863 | marshal_VkBufferCopy(stream, (const VkBufferCopy*)(pRegions + i)); |
| 3864 | } |
| 3865 | } |
| 3866 | |
| 3867 | void VkEncoder::vkCmdCopyImage( |
| 3868 | VkCommandBuffer commandBuffer, |
| 3869 | VkImage srcImage, |
| 3870 | VkImageLayout srcImageLayout, |
| 3871 | VkImage dstImage, |
| 3872 | VkImageLayout dstImageLayout, |
| 3873 | uint32_t regionCount, |
| 3874 | const VkImageCopy* pRegions) |
| 3875 | { |
| 3876 | auto stream = mImpl->stream(); |
| 3877 | auto countingStream = mImpl->countingStream(); |
| 3878 | countingStream->rewind(); |
| 3879 | { |
| 3880 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3881 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3882 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3883 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3884 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3885 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3886 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3887 | { |
| 3888 | marshal_VkImageCopy(countingStream, (const VkImageCopy*)(pRegions + i)); |
| 3889 | } |
| 3890 | } |
| 3891 | uint32_t packetSize_vkCmdCopyImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3892 | countingStream->rewind(); |
| 3893 | uint32_t opcode_vkCmdCopyImage = OP_vkCmdCopyImage; |
| 3894 | stream->write(&opcode_vkCmdCopyImage, sizeof(uint32_t)); |
| 3895 | stream->write(&packetSize_vkCmdCopyImage, sizeof(uint32_t)); |
| 3896 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3897 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3898 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3899 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3900 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3901 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3902 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3903 | { |
| 3904 | marshal_VkImageCopy(stream, (const VkImageCopy*)(pRegions + i)); |
| 3905 | } |
| 3906 | } |
| 3907 | |
| 3908 | void VkEncoder::vkCmdBlitImage( |
| 3909 | VkCommandBuffer commandBuffer, |
| 3910 | VkImage srcImage, |
| 3911 | VkImageLayout srcImageLayout, |
| 3912 | VkImage dstImage, |
| 3913 | VkImageLayout dstImageLayout, |
| 3914 | uint32_t regionCount, |
| 3915 | const VkImageBlit* pRegions, |
| 3916 | VkFilter filter) |
| 3917 | { |
| 3918 | auto stream = mImpl->stream(); |
| 3919 | auto countingStream = mImpl->countingStream(); |
| 3920 | countingStream->rewind(); |
| 3921 | { |
| 3922 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3923 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3924 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3925 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3926 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3927 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3928 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3929 | { |
| 3930 | marshal_VkImageBlit(countingStream, (const VkImageBlit*)(pRegions + i)); |
| 3931 | } |
| 3932 | countingStream->write((VkFilter*)&filter, sizeof(VkFilter)); |
| 3933 | } |
| 3934 | uint32_t packetSize_vkCmdBlitImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3935 | countingStream->rewind(); |
| 3936 | uint32_t opcode_vkCmdBlitImage = OP_vkCmdBlitImage; |
| 3937 | stream->write(&opcode_vkCmdBlitImage, sizeof(uint32_t)); |
| 3938 | stream->write(&packetSize_vkCmdBlitImage, sizeof(uint32_t)); |
| 3939 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3940 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3941 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3942 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3943 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3944 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3945 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3946 | { |
| 3947 | marshal_VkImageBlit(stream, (const VkImageBlit*)(pRegions + i)); |
| 3948 | } |
| 3949 | stream->write((VkFilter*)&filter, sizeof(VkFilter)); |
| 3950 | } |
| 3951 | |
| 3952 | void VkEncoder::vkCmdCopyBufferToImage( |
| 3953 | VkCommandBuffer commandBuffer, |
| 3954 | VkBuffer srcBuffer, |
| 3955 | VkImage dstImage, |
| 3956 | VkImageLayout dstImageLayout, |
| 3957 | uint32_t regionCount, |
| 3958 | const VkBufferImageCopy* pRegions) |
| 3959 | { |
| 3960 | auto stream = mImpl->stream(); |
| 3961 | auto countingStream = mImpl->countingStream(); |
| 3962 | countingStream->rewind(); |
| 3963 | { |
| 3964 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3965 | countingStream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3966 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3967 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3968 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3969 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3970 | { |
| 3971 | marshal_VkBufferImageCopy(countingStream, (const VkBufferImageCopy*)(pRegions + i)); |
| 3972 | } |
| 3973 | } |
| 3974 | uint32_t packetSize_vkCmdCopyBufferToImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3975 | countingStream->rewind(); |
| 3976 | uint32_t opcode_vkCmdCopyBufferToImage = OP_vkCmdCopyBufferToImage; |
| 3977 | stream->write(&opcode_vkCmdCopyBufferToImage, sizeof(uint32_t)); |
| 3978 | stream->write(&packetSize_vkCmdCopyBufferToImage, sizeof(uint32_t)); |
| 3979 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3980 | stream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3981 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3982 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3983 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3984 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3985 | { |
| 3986 | marshal_VkBufferImageCopy(stream, (const VkBufferImageCopy*)(pRegions + i)); |
| 3987 | } |
| 3988 | } |
| 3989 | |
| 3990 | void VkEncoder::vkCmdCopyImageToBuffer( |
| 3991 | VkCommandBuffer commandBuffer, |
| 3992 | VkImage srcImage, |
| 3993 | VkImageLayout srcImageLayout, |
| 3994 | VkBuffer dstBuffer, |
| 3995 | uint32_t regionCount, |
| 3996 | const VkBufferImageCopy* pRegions) |
| 3997 | { |
| 3998 | auto stream = mImpl->stream(); |
| 3999 | auto countingStream = mImpl->countingStream(); |
| 4000 | countingStream->rewind(); |
| 4001 | { |
| 4002 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4003 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4004 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4005 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4006 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4007 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4008 | { |
| 4009 | marshal_VkBufferImageCopy(countingStream, (const VkBufferImageCopy*)(pRegions + i)); |
| 4010 | } |
| 4011 | } |
| 4012 | uint32_t packetSize_vkCmdCopyImageToBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4013 | countingStream->rewind(); |
| 4014 | uint32_t opcode_vkCmdCopyImageToBuffer = OP_vkCmdCopyImageToBuffer; |
| 4015 | stream->write(&opcode_vkCmdCopyImageToBuffer, sizeof(uint32_t)); |
| 4016 | stream->write(&packetSize_vkCmdCopyImageToBuffer, sizeof(uint32_t)); |
| 4017 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4018 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4019 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4020 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4021 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4022 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4023 | { |
| 4024 | marshal_VkBufferImageCopy(stream, (const VkBufferImageCopy*)(pRegions + i)); |
| 4025 | } |
| 4026 | } |
| 4027 | |
| 4028 | void VkEncoder::vkCmdUpdateBuffer( |
| 4029 | VkCommandBuffer commandBuffer, |
| 4030 | VkBuffer dstBuffer, |
| 4031 | VkDeviceSize dstOffset, |
| 4032 | VkDeviceSize dataSize, |
| 4033 | const void* pData) |
| 4034 | { |
| 4035 | auto stream = mImpl->stream(); |
| 4036 | auto countingStream = mImpl->countingStream(); |
| 4037 | countingStream->rewind(); |
| 4038 | { |
| 4039 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4040 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4041 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4042 | countingStream->write((VkDeviceSize*)&dataSize, sizeof(VkDeviceSize)); |
| 4043 | countingStream->write((const void*)pData, ((dataSize)) * sizeof(const uint8_t)); |
| 4044 | } |
| 4045 | uint32_t packetSize_vkCmdUpdateBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4046 | countingStream->rewind(); |
| 4047 | uint32_t opcode_vkCmdUpdateBuffer = OP_vkCmdUpdateBuffer; |
| 4048 | stream->write(&opcode_vkCmdUpdateBuffer, sizeof(uint32_t)); |
| 4049 | stream->write(&packetSize_vkCmdUpdateBuffer, sizeof(uint32_t)); |
| 4050 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4051 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4052 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4053 | stream->write((VkDeviceSize*)&dataSize, sizeof(VkDeviceSize)); |
| 4054 | stream->write((const void*)pData, ((dataSize)) * sizeof(const uint8_t)); |
| 4055 | } |
| 4056 | |
| 4057 | void VkEncoder::vkCmdFillBuffer( |
| 4058 | VkCommandBuffer commandBuffer, |
| 4059 | VkBuffer dstBuffer, |
| 4060 | VkDeviceSize dstOffset, |
| 4061 | VkDeviceSize size, |
| 4062 | uint32_t data) |
| 4063 | { |
| 4064 | auto stream = mImpl->stream(); |
| 4065 | auto countingStream = mImpl->countingStream(); |
| 4066 | countingStream->rewind(); |
| 4067 | { |
| 4068 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4069 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4070 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4071 | countingStream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 4072 | countingStream->write((uint32_t*)&data, sizeof(uint32_t)); |
| 4073 | } |
| 4074 | uint32_t packetSize_vkCmdFillBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4075 | countingStream->rewind(); |
| 4076 | uint32_t opcode_vkCmdFillBuffer = OP_vkCmdFillBuffer; |
| 4077 | stream->write(&opcode_vkCmdFillBuffer, sizeof(uint32_t)); |
| 4078 | stream->write(&packetSize_vkCmdFillBuffer, sizeof(uint32_t)); |
| 4079 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4080 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4081 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4082 | stream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 4083 | stream->write((uint32_t*)&data, sizeof(uint32_t)); |
| 4084 | } |
| 4085 | |
| 4086 | void VkEncoder::vkCmdClearColorImage( |
| 4087 | VkCommandBuffer commandBuffer, |
| 4088 | VkImage image, |
| 4089 | VkImageLayout imageLayout, |
| 4090 | const VkClearColorValue* pColor, |
| 4091 | uint32_t rangeCount, |
| 4092 | const VkImageSubresourceRange* pRanges) |
| 4093 | { |
| 4094 | auto stream = mImpl->stream(); |
| 4095 | auto countingStream = mImpl->countingStream(); |
| 4096 | countingStream->rewind(); |
| 4097 | { |
| 4098 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4099 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 4100 | countingStream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4101 | marshal_VkClearColorValue(countingStream, (const VkClearColorValue*)(pColor)); |
| 4102 | countingStream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4103 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4104 | { |
| 4105 | marshal_VkImageSubresourceRange(countingStream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4106 | } |
| 4107 | } |
| 4108 | uint32_t packetSize_vkCmdClearColorImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4109 | countingStream->rewind(); |
| 4110 | uint32_t opcode_vkCmdClearColorImage = OP_vkCmdClearColorImage; |
| 4111 | stream->write(&opcode_vkCmdClearColorImage, sizeof(uint32_t)); |
| 4112 | stream->write(&packetSize_vkCmdClearColorImage, sizeof(uint32_t)); |
| 4113 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4114 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 4115 | stream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4116 | marshal_VkClearColorValue(stream, (const VkClearColorValue*)(pColor)); |
| 4117 | stream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4118 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4119 | { |
| 4120 | marshal_VkImageSubresourceRange(stream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4121 | } |
| 4122 | } |
| 4123 | |
| 4124 | void VkEncoder::vkCmdClearDepthStencilImage( |
| 4125 | VkCommandBuffer commandBuffer, |
| 4126 | VkImage image, |
| 4127 | VkImageLayout imageLayout, |
| 4128 | const VkClearDepthStencilValue* pDepthStencil, |
| 4129 | uint32_t rangeCount, |
| 4130 | const VkImageSubresourceRange* pRanges) |
| 4131 | { |
| 4132 | auto stream = mImpl->stream(); |
| 4133 | auto countingStream = mImpl->countingStream(); |
| 4134 | countingStream->rewind(); |
| 4135 | { |
| 4136 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4137 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 4138 | countingStream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4139 | marshal_VkClearDepthStencilValue(countingStream, (const VkClearDepthStencilValue*)(pDepthStencil)); |
| 4140 | countingStream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4141 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4142 | { |
| 4143 | marshal_VkImageSubresourceRange(countingStream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4144 | } |
| 4145 | } |
| 4146 | uint32_t packetSize_vkCmdClearDepthStencilImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4147 | countingStream->rewind(); |
| 4148 | uint32_t opcode_vkCmdClearDepthStencilImage = OP_vkCmdClearDepthStencilImage; |
| 4149 | stream->write(&opcode_vkCmdClearDepthStencilImage, sizeof(uint32_t)); |
| 4150 | stream->write(&packetSize_vkCmdClearDepthStencilImage, sizeof(uint32_t)); |
| 4151 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4152 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 4153 | stream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4154 | marshal_VkClearDepthStencilValue(stream, (const VkClearDepthStencilValue*)(pDepthStencil)); |
| 4155 | stream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4156 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4157 | { |
| 4158 | marshal_VkImageSubresourceRange(stream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4159 | } |
| 4160 | } |
| 4161 | |
| 4162 | void VkEncoder::vkCmdClearAttachments( |
| 4163 | VkCommandBuffer commandBuffer, |
| 4164 | uint32_t attachmentCount, |
| 4165 | const VkClearAttachment* pAttachments, |
| 4166 | uint32_t rectCount, |
| 4167 | const VkClearRect* pRects) |
| 4168 | { |
| 4169 | auto stream = mImpl->stream(); |
| 4170 | auto countingStream = mImpl->countingStream(); |
| 4171 | countingStream->rewind(); |
| 4172 | { |
| 4173 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4174 | countingStream->write((uint32_t*)&attachmentCount, sizeof(uint32_t)); |
| 4175 | for (uint32_t i = 0; i < (uint32_t)((attachmentCount)); ++i) |
| 4176 | { |
| 4177 | marshal_VkClearAttachment(countingStream, (const VkClearAttachment*)(pAttachments + i)); |
| 4178 | } |
| 4179 | countingStream->write((uint32_t*)&rectCount, sizeof(uint32_t)); |
| 4180 | for (uint32_t i = 0; i < (uint32_t)((rectCount)); ++i) |
| 4181 | { |
| 4182 | marshal_VkClearRect(countingStream, (const VkClearRect*)(pRects + i)); |
| 4183 | } |
| 4184 | } |
| 4185 | uint32_t packetSize_vkCmdClearAttachments = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4186 | countingStream->rewind(); |
| 4187 | uint32_t opcode_vkCmdClearAttachments = OP_vkCmdClearAttachments; |
| 4188 | stream->write(&opcode_vkCmdClearAttachments, sizeof(uint32_t)); |
| 4189 | stream->write(&packetSize_vkCmdClearAttachments, sizeof(uint32_t)); |
| 4190 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4191 | stream->write((uint32_t*)&attachmentCount, sizeof(uint32_t)); |
| 4192 | for (uint32_t i = 0; i < (uint32_t)((attachmentCount)); ++i) |
| 4193 | { |
| 4194 | marshal_VkClearAttachment(stream, (const VkClearAttachment*)(pAttachments + i)); |
| 4195 | } |
| 4196 | stream->write((uint32_t*)&rectCount, sizeof(uint32_t)); |
| 4197 | for (uint32_t i = 0; i < (uint32_t)((rectCount)); ++i) |
| 4198 | { |
| 4199 | marshal_VkClearRect(stream, (const VkClearRect*)(pRects + i)); |
| 4200 | } |
| 4201 | } |
| 4202 | |
| 4203 | void VkEncoder::vkCmdResolveImage( |
| 4204 | VkCommandBuffer commandBuffer, |
| 4205 | VkImage srcImage, |
| 4206 | VkImageLayout srcImageLayout, |
| 4207 | VkImage dstImage, |
| 4208 | VkImageLayout dstImageLayout, |
| 4209 | uint32_t regionCount, |
| 4210 | const VkImageResolve* pRegions) |
| 4211 | { |
| 4212 | auto stream = mImpl->stream(); |
| 4213 | auto countingStream = mImpl->countingStream(); |
| 4214 | countingStream->rewind(); |
| 4215 | { |
| 4216 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4217 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4218 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4219 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 4220 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 4221 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4222 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4223 | { |
| 4224 | marshal_VkImageResolve(countingStream, (const VkImageResolve*)(pRegions + i)); |
| 4225 | } |
| 4226 | } |
| 4227 | uint32_t packetSize_vkCmdResolveImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4228 | countingStream->rewind(); |
| 4229 | uint32_t opcode_vkCmdResolveImage = OP_vkCmdResolveImage; |
| 4230 | stream->write(&opcode_vkCmdResolveImage, sizeof(uint32_t)); |
| 4231 | stream->write(&packetSize_vkCmdResolveImage, sizeof(uint32_t)); |
| 4232 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4233 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4234 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4235 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 4236 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 4237 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4238 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4239 | { |
| 4240 | marshal_VkImageResolve(stream, (const VkImageResolve*)(pRegions + i)); |
| 4241 | } |
| 4242 | } |
| 4243 | |
| 4244 | void VkEncoder::vkCmdSetEvent( |
| 4245 | VkCommandBuffer commandBuffer, |
| 4246 | VkEvent event, |
| 4247 | VkPipelineStageFlags stageMask) |
| 4248 | { |
| 4249 | auto stream = mImpl->stream(); |
| 4250 | auto countingStream = mImpl->countingStream(); |
| 4251 | countingStream->rewind(); |
| 4252 | { |
| 4253 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4254 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4255 | countingStream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4256 | } |
| 4257 | uint32_t packetSize_vkCmdSetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4258 | countingStream->rewind(); |
| 4259 | uint32_t opcode_vkCmdSetEvent = OP_vkCmdSetEvent; |
| 4260 | stream->write(&opcode_vkCmdSetEvent, sizeof(uint32_t)); |
| 4261 | stream->write(&packetSize_vkCmdSetEvent, sizeof(uint32_t)); |
| 4262 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4263 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4264 | stream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4265 | } |
| 4266 | |
| 4267 | void VkEncoder::vkCmdResetEvent( |
| 4268 | VkCommandBuffer commandBuffer, |
| 4269 | VkEvent event, |
| 4270 | VkPipelineStageFlags stageMask) |
| 4271 | { |
| 4272 | auto stream = mImpl->stream(); |
| 4273 | auto countingStream = mImpl->countingStream(); |
| 4274 | countingStream->rewind(); |
| 4275 | { |
| 4276 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4277 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4278 | countingStream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4279 | } |
| 4280 | uint32_t packetSize_vkCmdResetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4281 | countingStream->rewind(); |
| 4282 | uint32_t opcode_vkCmdResetEvent = OP_vkCmdResetEvent; |
| 4283 | stream->write(&opcode_vkCmdResetEvent, sizeof(uint32_t)); |
| 4284 | stream->write(&packetSize_vkCmdResetEvent, sizeof(uint32_t)); |
| 4285 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4286 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4287 | stream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4288 | } |
| 4289 | |
| 4290 | void VkEncoder::vkCmdWaitEvents( |
| 4291 | VkCommandBuffer commandBuffer, |
| 4292 | uint32_t eventCount, |
| 4293 | const VkEvent* pEvents, |
| 4294 | VkPipelineStageFlags srcStageMask, |
| 4295 | VkPipelineStageFlags dstStageMask, |
| 4296 | uint32_t memoryBarrierCount, |
| 4297 | const VkMemoryBarrier* pMemoryBarriers, |
| 4298 | uint32_t bufferMemoryBarrierCount, |
| 4299 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 4300 | uint32_t imageMemoryBarrierCount, |
| 4301 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 4302 | { |
| 4303 | auto stream = mImpl->stream(); |
| 4304 | auto countingStream = mImpl->countingStream(); |
| 4305 | countingStream->rewind(); |
| 4306 | { |
| 4307 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4308 | countingStream->write((uint32_t*)&eventCount, sizeof(uint32_t)); |
| 4309 | countingStream->write((const VkEvent*)pEvents, ((eventCount)) * sizeof(const VkEvent)); |
| 4310 | countingStream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4311 | countingStream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4312 | countingStream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4313 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4314 | { |
| 4315 | marshal_VkMemoryBarrier(countingStream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4316 | } |
| 4317 | countingStream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4318 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4319 | { |
| 4320 | marshal_VkBufferMemoryBarrier(countingStream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4321 | } |
| 4322 | countingStream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4323 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4324 | { |
| 4325 | marshal_VkImageMemoryBarrier(countingStream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4326 | } |
| 4327 | } |
| 4328 | uint32_t packetSize_vkCmdWaitEvents = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4329 | countingStream->rewind(); |
| 4330 | uint32_t opcode_vkCmdWaitEvents = OP_vkCmdWaitEvents; |
| 4331 | stream->write(&opcode_vkCmdWaitEvents, sizeof(uint32_t)); |
| 4332 | stream->write(&packetSize_vkCmdWaitEvents, sizeof(uint32_t)); |
| 4333 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4334 | stream->write((uint32_t*)&eventCount, sizeof(uint32_t)); |
| 4335 | stream->write((const VkEvent*)pEvents, ((eventCount)) * sizeof(const VkEvent)); |
| 4336 | stream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4337 | stream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4338 | stream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4339 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4340 | { |
| 4341 | marshal_VkMemoryBarrier(stream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4342 | } |
| 4343 | stream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4344 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4345 | { |
| 4346 | marshal_VkBufferMemoryBarrier(stream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4347 | } |
| 4348 | stream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4349 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4350 | { |
| 4351 | marshal_VkImageMemoryBarrier(stream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4352 | } |
| 4353 | } |
| 4354 | |
| 4355 | void VkEncoder::vkCmdPipelineBarrier( |
| 4356 | VkCommandBuffer commandBuffer, |
| 4357 | VkPipelineStageFlags srcStageMask, |
| 4358 | VkPipelineStageFlags dstStageMask, |
| 4359 | VkDependencyFlags dependencyFlags, |
| 4360 | uint32_t memoryBarrierCount, |
| 4361 | const VkMemoryBarrier* pMemoryBarriers, |
| 4362 | uint32_t bufferMemoryBarrierCount, |
| 4363 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 4364 | uint32_t imageMemoryBarrierCount, |
| 4365 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 4366 | { |
| 4367 | auto stream = mImpl->stream(); |
| 4368 | auto countingStream = mImpl->countingStream(); |
| 4369 | countingStream->rewind(); |
| 4370 | { |
| 4371 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4372 | countingStream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4373 | countingStream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4374 | countingStream->write((VkDependencyFlags*)&dependencyFlags, sizeof(VkDependencyFlags)); |
| 4375 | countingStream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4376 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4377 | { |
| 4378 | marshal_VkMemoryBarrier(countingStream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4379 | } |
| 4380 | countingStream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4381 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4382 | { |
| 4383 | marshal_VkBufferMemoryBarrier(countingStream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4384 | } |
| 4385 | countingStream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4386 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4387 | { |
| 4388 | marshal_VkImageMemoryBarrier(countingStream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4389 | } |
| 4390 | } |
| 4391 | uint32_t packetSize_vkCmdPipelineBarrier = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4392 | countingStream->rewind(); |
| 4393 | uint32_t opcode_vkCmdPipelineBarrier = OP_vkCmdPipelineBarrier; |
| 4394 | stream->write(&opcode_vkCmdPipelineBarrier, sizeof(uint32_t)); |
| 4395 | stream->write(&packetSize_vkCmdPipelineBarrier, sizeof(uint32_t)); |
| 4396 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4397 | stream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4398 | stream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4399 | stream->write((VkDependencyFlags*)&dependencyFlags, sizeof(VkDependencyFlags)); |
| 4400 | stream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4401 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4402 | { |
| 4403 | marshal_VkMemoryBarrier(stream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4404 | } |
| 4405 | stream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4406 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4407 | { |
| 4408 | marshal_VkBufferMemoryBarrier(stream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4409 | } |
| 4410 | stream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4411 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4412 | { |
| 4413 | marshal_VkImageMemoryBarrier(stream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4414 | } |
| 4415 | } |
| 4416 | |
| 4417 | void VkEncoder::vkCmdBeginQuery( |
| 4418 | VkCommandBuffer commandBuffer, |
| 4419 | VkQueryPool queryPool, |
| 4420 | uint32_t query, |
| 4421 | VkQueryControlFlags flags) |
| 4422 | { |
| 4423 | auto stream = mImpl->stream(); |
| 4424 | auto countingStream = mImpl->countingStream(); |
| 4425 | countingStream->rewind(); |
| 4426 | { |
| 4427 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4428 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4429 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4430 | countingStream->write((VkQueryControlFlags*)&flags, sizeof(VkQueryControlFlags)); |
| 4431 | } |
| 4432 | uint32_t packetSize_vkCmdBeginQuery = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4433 | countingStream->rewind(); |
| 4434 | uint32_t opcode_vkCmdBeginQuery = OP_vkCmdBeginQuery; |
| 4435 | stream->write(&opcode_vkCmdBeginQuery, sizeof(uint32_t)); |
| 4436 | stream->write(&packetSize_vkCmdBeginQuery, sizeof(uint32_t)); |
| 4437 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4438 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4439 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4440 | stream->write((VkQueryControlFlags*)&flags, sizeof(VkQueryControlFlags)); |
| 4441 | } |
| 4442 | |
| 4443 | void VkEncoder::vkCmdEndQuery( |
| 4444 | VkCommandBuffer commandBuffer, |
| 4445 | VkQueryPool queryPool, |
| 4446 | uint32_t query) |
| 4447 | { |
| 4448 | auto stream = mImpl->stream(); |
| 4449 | auto countingStream = mImpl->countingStream(); |
| 4450 | countingStream->rewind(); |
| 4451 | { |
| 4452 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4453 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4454 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4455 | } |
| 4456 | uint32_t packetSize_vkCmdEndQuery = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4457 | countingStream->rewind(); |
| 4458 | uint32_t opcode_vkCmdEndQuery = OP_vkCmdEndQuery; |
| 4459 | stream->write(&opcode_vkCmdEndQuery, sizeof(uint32_t)); |
| 4460 | stream->write(&packetSize_vkCmdEndQuery, sizeof(uint32_t)); |
| 4461 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4462 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4463 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4464 | } |
| 4465 | |
| 4466 | void VkEncoder::vkCmdResetQueryPool( |
| 4467 | VkCommandBuffer commandBuffer, |
| 4468 | VkQueryPool queryPool, |
| 4469 | uint32_t firstQuery, |
| 4470 | uint32_t queryCount) |
| 4471 | { |
| 4472 | auto stream = mImpl->stream(); |
| 4473 | auto countingStream = mImpl->countingStream(); |
| 4474 | countingStream->rewind(); |
| 4475 | { |
| 4476 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4477 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4478 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4479 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4480 | } |
| 4481 | uint32_t packetSize_vkCmdResetQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4482 | countingStream->rewind(); |
| 4483 | uint32_t opcode_vkCmdResetQueryPool = OP_vkCmdResetQueryPool; |
| 4484 | stream->write(&opcode_vkCmdResetQueryPool, sizeof(uint32_t)); |
| 4485 | stream->write(&packetSize_vkCmdResetQueryPool, sizeof(uint32_t)); |
| 4486 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4487 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4488 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4489 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4490 | } |
| 4491 | |
| 4492 | void VkEncoder::vkCmdWriteTimestamp( |
| 4493 | VkCommandBuffer commandBuffer, |
| 4494 | VkPipelineStageFlagBits pipelineStage, |
| 4495 | VkQueryPool queryPool, |
| 4496 | uint32_t query) |
| 4497 | { |
| 4498 | auto stream = mImpl->stream(); |
| 4499 | auto countingStream = mImpl->countingStream(); |
| 4500 | countingStream->rewind(); |
| 4501 | { |
| 4502 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4503 | countingStream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 4504 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4505 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4506 | } |
| 4507 | uint32_t packetSize_vkCmdWriteTimestamp = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4508 | countingStream->rewind(); |
| 4509 | uint32_t opcode_vkCmdWriteTimestamp = OP_vkCmdWriteTimestamp; |
| 4510 | stream->write(&opcode_vkCmdWriteTimestamp, sizeof(uint32_t)); |
| 4511 | stream->write(&packetSize_vkCmdWriteTimestamp, sizeof(uint32_t)); |
| 4512 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4513 | stream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 4514 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4515 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4516 | } |
| 4517 | |
| 4518 | void VkEncoder::vkCmdCopyQueryPoolResults( |
| 4519 | VkCommandBuffer commandBuffer, |
| 4520 | VkQueryPool queryPool, |
| 4521 | uint32_t firstQuery, |
| 4522 | uint32_t queryCount, |
| 4523 | VkBuffer dstBuffer, |
| 4524 | VkDeviceSize dstOffset, |
| 4525 | VkDeviceSize stride, |
| 4526 | VkQueryResultFlags flags) |
| 4527 | { |
| 4528 | auto stream = mImpl->stream(); |
| 4529 | auto countingStream = mImpl->countingStream(); |
| 4530 | countingStream->rewind(); |
| 4531 | { |
| 4532 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4533 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4534 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4535 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4536 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4537 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4538 | countingStream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 4539 | countingStream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 4540 | } |
| 4541 | uint32_t packetSize_vkCmdCopyQueryPoolResults = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4542 | countingStream->rewind(); |
| 4543 | uint32_t opcode_vkCmdCopyQueryPoolResults = OP_vkCmdCopyQueryPoolResults; |
| 4544 | stream->write(&opcode_vkCmdCopyQueryPoolResults, sizeof(uint32_t)); |
| 4545 | stream->write(&packetSize_vkCmdCopyQueryPoolResults, sizeof(uint32_t)); |
| 4546 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4547 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4548 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4549 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4550 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4551 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4552 | stream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 4553 | stream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 4554 | } |
| 4555 | |
| 4556 | void VkEncoder::vkCmdPushConstants( |
| 4557 | VkCommandBuffer commandBuffer, |
| 4558 | VkPipelineLayout layout, |
| 4559 | VkShaderStageFlags stageFlags, |
| 4560 | uint32_t offset, |
| 4561 | uint32_t size, |
| 4562 | const void* pValues) |
| 4563 | { |
| 4564 | auto stream = mImpl->stream(); |
| 4565 | auto countingStream = mImpl->countingStream(); |
| 4566 | countingStream->rewind(); |
| 4567 | { |
| 4568 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4569 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 4570 | countingStream->write((VkShaderStageFlags*)&stageFlags, sizeof(VkShaderStageFlags)); |
| 4571 | countingStream->write((uint32_t*)&offset, sizeof(uint32_t)); |
| 4572 | countingStream->write((uint32_t*)&size, sizeof(uint32_t)); |
| 4573 | countingStream->write((const void*)pValues, ((size)) * sizeof(const uint8_t)); |
| 4574 | } |
| 4575 | uint32_t packetSize_vkCmdPushConstants = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4576 | countingStream->rewind(); |
| 4577 | uint32_t opcode_vkCmdPushConstants = OP_vkCmdPushConstants; |
| 4578 | stream->write(&opcode_vkCmdPushConstants, sizeof(uint32_t)); |
| 4579 | stream->write(&packetSize_vkCmdPushConstants, sizeof(uint32_t)); |
| 4580 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4581 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 4582 | stream->write((VkShaderStageFlags*)&stageFlags, sizeof(VkShaderStageFlags)); |
| 4583 | stream->write((uint32_t*)&offset, sizeof(uint32_t)); |
| 4584 | stream->write((uint32_t*)&size, sizeof(uint32_t)); |
| 4585 | stream->write((const void*)pValues, ((size)) * sizeof(const uint8_t)); |
| 4586 | } |
| 4587 | |
| 4588 | void VkEncoder::vkCmdBeginRenderPass( |
| 4589 | VkCommandBuffer commandBuffer, |
| 4590 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 4591 | VkSubpassContents contents) |
| 4592 | { |
| 4593 | auto stream = mImpl->stream(); |
| 4594 | auto countingStream = mImpl->countingStream(); |
| 4595 | countingStream->rewind(); |
| 4596 | { |
| 4597 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4598 | marshal_VkRenderPassBeginInfo(countingStream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 4599 | countingStream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4600 | } |
| 4601 | uint32_t packetSize_vkCmdBeginRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4602 | countingStream->rewind(); |
| 4603 | uint32_t opcode_vkCmdBeginRenderPass = OP_vkCmdBeginRenderPass; |
| 4604 | stream->write(&opcode_vkCmdBeginRenderPass, sizeof(uint32_t)); |
| 4605 | stream->write(&packetSize_vkCmdBeginRenderPass, sizeof(uint32_t)); |
| 4606 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4607 | marshal_VkRenderPassBeginInfo(stream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 4608 | stream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4609 | } |
| 4610 | |
| 4611 | void VkEncoder::vkCmdNextSubpass( |
| 4612 | VkCommandBuffer commandBuffer, |
| 4613 | VkSubpassContents contents) |
| 4614 | { |
| 4615 | auto stream = mImpl->stream(); |
| 4616 | auto countingStream = mImpl->countingStream(); |
| 4617 | countingStream->rewind(); |
| 4618 | { |
| 4619 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4620 | countingStream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4621 | } |
| 4622 | uint32_t packetSize_vkCmdNextSubpass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4623 | countingStream->rewind(); |
| 4624 | uint32_t opcode_vkCmdNextSubpass = OP_vkCmdNextSubpass; |
| 4625 | stream->write(&opcode_vkCmdNextSubpass, sizeof(uint32_t)); |
| 4626 | stream->write(&packetSize_vkCmdNextSubpass, sizeof(uint32_t)); |
| 4627 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4628 | stream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4629 | } |
| 4630 | |
| 4631 | void VkEncoder::vkCmdEndRenderPass( |
| 4632 | VkCommandBuffer commandBuffer) |
| 4633 | { |
| 4634 | auto stream = mImpl->stream(); |
| 4635 | auto countingStream = mImpl->countingStream(); |
| 4636 | countingStream->rewind(); |
| 4637 | { |
| 4638 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4639 | } |
| 4640 | uint32_t packetSize_vkCmdEndRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4641 | countingStream->rewind(); |
| 4642 | uint32_t opcode_vkCmdEndRenderPass = OP_vkCmdEndRenderPass; |
| 4643 | stream->write(&opcode_vkCmdEndRenderPass, sizeof(uint32_t)); |
| 4644 | stream->write(&packetSize_vkCmdEndRenderPass, sizeof(uint32_t)); |
| 4645 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4646 | } |
| 4647 | |
| 4648 | void VkEncoder::vkCmdExecuteCommands( |
| 4649 | VkCommandBuffer commandBuffer, |
| 4650 | uint32_t commandBufferCount, |
| 4651 | const VkCommandBuffer* pCommandBuffers) |
| 4652 | { |
| 4653 | auto stream = mImpl->stream(); |
| 4654 | auto countingStream = mImpl->countingStream(); |
| 4655 | countingStream->rewind(); |
| 4656 | { |
| 4657 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4658 | countingStream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 4659 | countingStream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 4660 | } |
| 4661 | uint32_t packetSize_vkCmdExecuteCommands = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4662 | countingStream->rewind(); |
| 4663 | uint32_t opcode_vkCmdExecuteCommands = OP_vkCmdExecuteCommands; |
| 4664 | stream->write(&opcode_vkCmdExecuteCommands, sizeof(uint32_t)); |
| 4665 | stream->write(&packetSize_vkCmdExecuteCommands, sizeof(uint32_t)); |
| 4666 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4667 | stream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 4668 | stream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 4669 | } |
| 4670 | |
| 4671 | #endif |
| 4672 | #ifdef VK_VERSION_1_1 |
| 4673 | VkResult VkEncoder::vkEnumerateInstanceVersion( |
| 4674 | uint32_t* pApiVersion) |
| 4675 | { |
| 4676 | auto stream = mImpl->stream(); |
| 4677 | auto countingStream = mImpl->countingStream(); |
| 4678 | countingStream->rewind(); |
| 4679 | { |
| 4680 | countingStream->write((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4681 | } |
| 4682 | uint32_t packetSize_vkEnumerateInstanceVersion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4683 | countingStream->rewind(); |
| 4684 | uint32_t opcode_vkEnumerateInstanceVersion = OP_vkEnumerateInstanceVersion; |
| 4685 | stream->write(&opcode_vkEnumerateInstanceVersion, sizeof(uint32_t)); |
| 4686 | stream->write(&packetSize_vkEnumerateInstanceVersion, sizeof(uint32_t)); |
| 4687 | stream->write((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4688 | stream->read((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4689 | VkResult vkEnumerateInstanceVersion_VkResult_return = (VkResult)0; |
| 4690 | stream->read(&vkEnumerateInstanceVersion_VkResult_return, sizeof(VkResult)); |
| 4691 | return vkEnumerateInstanceVersion_VkResult_return; |
| 4692 | } |
| 4693 | |
| 4694 | VkResult VkEncoder::vkBindBufferMemory2( |
| 4695 | VkDevice device, |
| 4696 | uint32_t bindInfoCount, |
| 4697 | const VkBindBufferMemoryInfo* pBindInfos) |
| 4698 | { |
| 4699 | auto stream = mImpl->stream(); |
| 4700 | auto countingStream = mImpl->countingStream(); |
| 4701 | countingStream->rewind(); |
| 4702 | { |
| 4703 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4704 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4705 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4706 | { |
| 4707 | marshal_VkBindBufferMemoryInfo(countingStream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 4708 | } |
| 4709 | } |
| 4710 | uint32_t packetSize_vkBindBufferMemory2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4711 | countingStream->rewind(); |
| 4712 | uint32_t opcode_vkBindBufferMemory2 = OP_vkBindBufferMemory2; |
| 4713 | stream->write(&opcode_vkBindBufferMemory2, sizeof(uint32_t)); |
| 4714 | stream->write(&packetSize_vkBindBufferMemory2, sizeof(uint32_t)); |
| 4715 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4716 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4717 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4718 | { |
| 4719 | marshal_VkBindBufferMemoryInfo(stream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 4720 | } |
| 4721 | VkResult vkBindBufferMemory2_VkResult_return = (VkResult)0; |
| 4722 | stream->read(&vkBindBufferMemory2_VkResult_return, sizeof(VkResult)); |
| 4723 | return vkBindBufferMemory2_VkResult_return; |
| 4724 | } |
| 4725 | |
| 4726 | VkResult VkEncoder::vkBindImageMemory2( |
| 4727 | VkDevice device, |
| 4728 | uint32_t bindInfoCount, |
| 4729 | const VkBindImageMemoryInfo* pBindInfos) |
| 4730 | { |
| 4731 | auto stream = mImpl->stream(); |
| 4732 | auto countingStream = mImpl->countingStream(); |
| 4733 | countingStream->rewind(); |
| 4734 | { |
| 4735 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4736 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4737 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4738 | { |
| 4739 | marshal_VkBindImageMemoryInfo(countingStream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 4740 | } |
| 4741 | } |
| 4742 | uint32_t packetSize_vkBindImageMemory2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4743 | countingStream->rewind(); |
| 4744 | uint32_t opcode_vkBindImageMemory2 = OP_vkBindImageMemory2; |
| 4745 | stream->write(&opcode_vkBindImageMemory2, sizeof(uint32_t)); |
| 4746 | stream->write(&packetSize_vkBindImageMemory2, sizeof(uint32_t)); |
| 4747 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4748 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4749 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4750 | { |
| 4751 | marshal_VkBindImageMemoryInfo(stream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 4752 | } |
| 4753 | VkResult vkBindImageMemory2_VkResult_return = (VkResult)0; |
| 4754 | stream->read(&vkBindImageMemory2_VkResult_return, sizeof(VkResult)); |
| 4755 | return vkBindImageMemory2_VkResult_return; |
| 4756 | } |
| 4757 | |
| 4758 | void VkEncoder::vkGetDeviceGroupPeerMemoryFeatures( |
| 4759 | VkDevice device, |
| 4760 | uint32_t heapIndex, |
| 4761 | uint32_t localDeviceIndex, |
| 4762 | uint32_t remoteDeviceIndex, |
| 4763 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 4764 | { |
| 4765 | auto stream = mImpl->stream(); |
| 4766 | auto countingStream = mImpl->countingStream(); |
| 4767 | countingStream->rewind(); |
| 4768 | { |
| 4769 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4770 | countingStream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 4771 | countingStream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 4772 | countingStream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 4773 | countingStream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4774 | } |
| 4775 | uint32_t packetSize_vkGetDeviceGroupPeerMemoryFeatures = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4776 | countingStream->rewind(); |
| 4777 | uint32_t opcode_vkGetDeviceGroupPeerMemoryFeatures = OP_vkGetDeviceGroupPeerMemoryFeatures; |
| 4778 | stream->write(&opcode_vkGetDeviceGroupPeerMemoryFeatures, sizeof(uint32_t)); |
| 4779 | stream->write(&packetSize_vkGetDeviceGroupPeerMemoryFeatures, sizeof(uint32_t)); |
| 4780 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4781 | stream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 4782 | stream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 4783 | stream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 4784 | stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4785 | stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4786 | } |
| 4787 | |
| 4788 | void VkEncoder::vkCmdSetDeviceMask( |
| 4789 | VkCommandBuffer commandBuffer, |
| 4790 | uint32_t deviceMask) |
| 4791 | { |
| 4792 | auto stream = mImpl->stream(); |
| 4793 | auto countingStream = mImpl->countingStream(); |
| 4794 | countingStream->rewind(); |
| 4795 | { |
| 4796 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4797 | countingStream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 4798 | } |
| 4799 | uint32_t packetSize_vkCmdSetDeviceMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4800 | countingStream->rewind(); |
| 4801 | uint32_t opcode_vkCmdSetDeviceMask = OP_vkCmdSetDeviceMask; |
| 4802 | stream->write(&opcode_vkCmdSetDeviceMask, sizeof(uint32_t)); |
| 4803 | stream->write(&packetSize_vkCmdSetDeviceMask, sizeof(uint32_t)); |
| 4804 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4805 | stream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 4806 | } |
| 4807 | |
| 4808 | void VkEncoder::vkCmdDispatchBase( |
| 4809 | VkCommandBuffer commandBuffer, |
| 4810 | uint32_t baseGroupX, |
| 4811 | uint32_t baseGroupY, |
| 4812 | uint32_t baseGroupZ, |
| 4813 | uint32_t groupCountX, |
| 4814 | uint32_t groupCountY, |
| 4815 | uint32_t groupCountZ) |
| 4816 | { |
| 4817 | auto stream = mImpl->stream(); |
| 4818 | auto countingStream = mImpl->countingStream(); |
| 4819 | countingStream->rewind(); |
| 4820 | { |
| 4821 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4822 | countingStream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 4823 | countingStream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 4824 | countingStream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 4825 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 4826 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 4827 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 4828 | } |
| 4829 | uint32_t packetSize_vkCmdDispatchBase = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4830 | countingStream->rewind(); |
| 4831 | uint32_t opcode_vkCmdDispatchBase = OP_vkCmdDispatchBase; |
| 4832 | stream->write(&opcode_vkCmdDispatchBase, sizeof(uint32_t)); |
| 4833 | stream->write(&packetSize_vkCmdDispatchBase, sizeof(uint32_t)); |
| 4834 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4835 | stream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 4836 | stream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 4837 | stream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 4838 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 4839 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 4840 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 4841 | } |
| 4842 | |
| 4843 | VkResult VkEncoder::vkEnumeratePhysicalDeviceGroups( |
| 4844 | VkInstance instance, |
| 4845 | uint32_t* pPhysicalDeviceGroupCount, |
| 4846 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 4847 | { |
| 4848 | auto stream = mImpl->stream(); |
| 4849 | auto countingStream = mImpl->countingStream(); |
| 4850 | countingStream->rewind(); |
| 4851 | { |
| 4852 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 4853 | countingStream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4854 | if (pPhysicalDeviceGroupCount) |
| 4855 | { |
| 4856 | countingStream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4857 | } |
| 4858 | countingStream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4859 | if (pPhysicalDeviceGroupProperties) |
| 4860 | { |
| 4861 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4862 | { |
| 4863 | marshal_VkPhysicalDeviceGroupProperties(countingStream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4864 | } |
| 4865 | } |
| 4866 | } |
| 4867 | uint32_t packetSize_vkEnumeratePhysicalDeviceGroups = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4868 | countingStream->rewind(); |
| 4869 | uint32_t opcode_vkEnumeratePhysicalDeviceGroups = OP_vkEnumeratePhysicalDeviceGroups; |
| 4870 | stream->write(&opcode_vkEnumeratePhysicalDeviceGroups, sizeof(uint32_t)); |
| 4871 | stream->write(&packetSize_vkEnumeratePhysicalDeviceGroups, sizeof(uint32_t)); |
| 4872 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 4873 | stream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4874 | if (pPhysicalDeviceGroupCount) |
| 4875 | { |
| 4876 | stream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4877 | } |
| 4878 | stream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4879 | if (pPhysicalDeviceGroupProperties) |
| 4880 | { |
| 4881 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4882 | { |
| 4883 | marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4884 | } |
| 4885 | } |
| 4886 | uint32_t* check_pPhysicalDeviceGroupCount; |
| 4887 | stream->read((uint32_t**)&check_pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4888 | if (pPhysicalDeviceGroupCount) |
| 4889 | { |
| 4890 | if (!(check_pPhysicalDeviceGroupCount)) |
| 4891 | { |
| 4892 | fprintf(stderr, "fatal: pPhysicalDeviceGroupCount inconsistent between guest and host\n"); |
| 4893 | } |
| 4894 | stream->read((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4895 | } |
| 4896 | VkPhysicalDeviceGroupProperties* check_pPhysicalDeviceGroupProperties; |
| 4897 | stream->read((VkPhysicalDeviceGroupProperties**)&check_pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4898 | if (pPhysicalDeviceGroupProperties) |
| 4899 | { |
| 4900 | if (!(check_pPhysicalDeviceGroupProperties)) |
| 4901 | { |
| 4902 | fprintf(stderr, "fatal: pPhysicalDeviceGroupProperties inconsistent between guest and host\n"); |
| 4903 | } |
| 4904 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4905 | { |
| 4906 | unmarshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4907 | } |
| 4908 | } |
| 4909 | VkResult vkEnumeratePhysicalDeviceGroups_VkResult_return = (VkResult)0; |
| 4910 | stream->read(&vkEnumeratePhysicalDeviceGroups_VkResult_return, sizeof(VkResult)); |
| 4911 | return vkEnumeratePhysicalDeviceGroups_VkResult_return; |
| 4912 | } |
| 4913 | |
| 4914 | void VkEncoder::vkGetImageMemoryRequirements2( |
| 4915 | VkDevice device, |
| 4916 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 4917 | VkMemoryRequirements2* pMemoryRequirements) |
| 4918 | { |
| 4919 | auto stream = mImpl->stream(); |
| 4920 | auto countingStream = mImpl->countingStream(); |
| 4921 | countingStream->rewind(); |
| 4922 | { |
| 4923 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4924 | marshal_VkImageMemoryRequirementsInfo2(countingStream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 4925 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4926 | } |
| 4927 | uint32_t packetSize_vkGetImageMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4928 | countingStream->rewind(); |
| 4929 | uint32_t opcode_vkGetImageMemoryRequirements2 = OP_vkGetImageMemoryRequirements2; |
| 4930 | stream->write(&opcode_vkGetImageMemoryRequirements2, sizeof(uint32_t)); |
| 4931 | stream->write(&packetSize_vkGetImageMemoryRequirements2, sizeof(uint32_t)); |
| 4932 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4933 | marshal_VkImageMemoryRequirementsInfo2(stream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 4934 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4935 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4936 | } |
| 4937 | |
| 4938 | void VkEncoder::vkGetBufferMemoryRequirements2( |
| 4939 | VkDevice device, |
| 4940 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 4941 | VkMemoryRequirements2* pMemoryRequirements) |
| 4942 | { |
| 4943 | auto stream = mImpl->stream(); |
| 4944 | auto countingStream = mImpl->countingStream(); |
| 4945 | countingStream->rewind(); |
| 4946 | { |
| 4947 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4948 | marshal_VkBufferMemoryRequirementsInfo2(countingStream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 4949 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4950 | } |
| 4951 | uint32_t packetSize_vkGetBufferMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4952 | countingStream->rewind(); |
| 4953 | uint32_t opcode_vkGetBufferMemoryRequirements2 = OP_vkGetBufferMemoryRequirements2; |
| 4954 | stream->write(&opcode_vkGetBufferMemoryRequirements2, sizeof(uint32_t)); |
| 4955 | stream->write(&packetSize_vkGetBufferMemoryRequirements2, sizeof(uint32_t)); |
| 4956 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4957 | marshal_VkBufferMemoryRequirementsInfo2(stream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 4958 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4959 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4960 | } |
| 4961 | |
| 4962 | void VkEncoder::vkGetImageSparseMemoryRequirements2( |
| 4963 | VkDevice device, |
| 4964 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 4965 | uint32_t* pSparseMemoryRequirementCount, |
| 4966 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 4967 | { |
| 4968 | auto stream = mImpl->stream(); |
| 4969 | auto countingStream = mImpl->countingStream(); |
| 4970 | countingStream->rewind(); |
| 4971 | { |
| 4972 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4973 | marshal_VkImageSparseMemoryRequirementsInfo2(countingStream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 4974 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 4975 | if (pSparseMemoryRequirementCount) |
| 4976 | { |
| 4977 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 4978 | } |
| 4979 | countingStream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 4980 | if (pSparseMemoryRequirements) |
| 4981 | { |
| 4982 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 4983 | { |
| 4984 | marshal_VkSparseImageMemoryRequirements2(countingStream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 4985 | } |
| 4986 | } |
| 4987 | } |
| 4988 | uint32_t packetSize_vkGetImageSparseMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4989 | countingStream->rewind(); |
| 4990 | uint32_t opcode_vkGetImageSparseMemoryRequirements2 = OP_vkGetImageSparseMemoryRequirements2; |
| 4991 | stream->write(&opcode_vkGetImageSparseMemoryRequirements2, sizeof(uint32_t)); |
| 4992 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements2, sizeof(uint32_t)); |
| 4993 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4994 | marshal_VkImageSparseMemoryRequirementsInfo2(stream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 4995 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 4996 | if (pSparseMemoryRequirementCount) |
| 4997 | { |
| 4998 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 4999 | } |
| 5000 | stream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 5001 | if (pSparseMemoryRequirements) |
| 5002 | { |
| 5003 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 5004 | { |
| 5005 | marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 5006 | } |
| 5007 | } |
| 5008 | uint32_t* check_pSparseMemoryRequirementCount; |
| 5009 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 5010 | if (pSparseMemoryRequirementCount) |
| 5011 | { |
| 5012 | if (!(check_pSparseMemoryRequirementCount)) |
| 5013 | { |
| 5014 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 5015 | } |
| 5016 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 5017 | } |
| 5018 | VkSparseImageMemoryRequirements2* check_pSparseMemoryRequirements; |
| 5019 | stream->read((VkSparseImageMemoryRequirements2**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 5020 | if (pSparseMemoryRequirements) |
| 5021 | { |
| 5022 | if (!(check_pSparseMemoryRequirements)) |
| 5023 | { |
| 5024 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 5025 | } |
| 5026 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 5027 | { |
| 5028 | unmarshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 5029 | } |
| 5030 | } |
| 5031 | } |
| 5032 | |
| 5033 | void VkEncoder::vkGetPhysicalDeviceFeatures2( |
| 5034 | VkPhysicalDevice physicalDevice, |
| 5035 | VkPhysicalDeviceFeatures2* pFeatures) |
| 5036 | { |
| 5037 | auto stream = mImpl->stream(); |
| 5038 | auto countingStream = mImpl->countingStream(); |
| 5039 | countingStream->rewind(); |
| 5040 | { |
| 5041 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5042 | marshal_VkPhysicalDeviceFeatures2(countingStream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5043 | } |
| 5044 | uint32_t packetSize_vkGetPhysicalDeviceFeatures2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5045 | countingStream->rewind(); |
| 5046 | uint32_t opcode_vkGetPhysicalDeviceFeatures2 = OP_vkGetPhysicalDeviceFeatures2; |
| 5047 | stream->write(&opcode_vkGetPhysicalDeviceFeatures2, sizeof(uint32_t)); |
| 5048 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures2, sizeof(uint32_t)); |
| 5049 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5050 | marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5051 | unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5052 | } |
| 5053 | |
| 5054 | void VkEncoder::vkGetPhysicalDeviceProperties2( |
| 5055 | VkPhysicalDevice physicalDevice, |
| 5056 | VkPhysicalDeviceProperties2* pProperties) |
| 5057 | { |
| 5058 | auto stream = mImpl->stream(); |
| 5059 | auto countingStream = mImpl->countingStream(); |
| 5060 | countingStream->rewind(); |
| 5061 | { |
| 5062 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5063 | marshal_VkPhysicalDeviceProperties2(countingStream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5064 | } |
| 5065 | uint32_t packetSize_vkGetPhysicalDeviceProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5066 | countingStream->rewind(); |
| 5067 | uint32_t opcode_vkGetPhysicalDeviceProperties2 = OP_vkGetPhysicalDeviceProperties2; |
| 5068 | stream->write(&opcode_vkGetPhysicalDeviceProperties2, sizeof(uint32_t)); |
| 5069 | stream->write(&packetSize_vkGetPhysicalDeviceProperties2, sizeof(uint32_t)); |
| 5070 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5071 | marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5072 | unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5073 | } |
| 5074 | |
| 5075 | void VkEncoder::vkGetPhysicalDeviceFormatProperties2( |
| 5076 | VkPhysicalDevice physicalDevice, |
| 5077 | VkFormat format, |
| 5078 | VkFormatProperties2* pFormatProperties) |
| 5079 | { |
| 5080 | auto stream = mImpl->stream(); |
| 5081 | auto countingStream = mImpl->countingStream(); |
| 5082 | countingStream->rewind(); |
| 5083 | { |
| 5084 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5085 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 5086 | marshal_VkFormatProperties2(countingStream, (VkFormatProperties2*)(pFormatProperties)); |
| 5087 | } |
| 5088 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5089 | countingStream->rewind(); |
| 5090 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties2 = OP_vkGetPhysicalDeviceFormatProperties2; |
| 5091 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties2, sizeof(uint32_t)); |
| 5092 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties2, sizeof(uint32_t)); |
| 5093 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5094 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 5095 | marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 5096 | unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 5097 | } |
| 5098 | |
| 5099 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties2( |
| 5100 | VkPhysicalDevice physicalDevice, |
| 5101 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 5102 | VkImageFormatProperties2* pImageFormatProperties) |
| 5103 | { |
| 5104 | auto stream = mImpl->stream(); |
| 5105 | auto countingStream = mImpl->countingStream(); |
| 5106 | countingStream->rewind(); |
| 5107 | { |
| 5108 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5109 | marshal_VkPhysicalDeviceImageFormatInfo2(countingStream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 5110 | marshal_VkImageFormatProperties2(countingStream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5111 | } |
| 5112 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5113 | countingStream->rewind(); |
| 5114 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties2 = OP_vkGetPhysicalDeviceImageFormatProperties2; |
| 5115 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties2, sizeof(uint32_t)); |
| 5116 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties2, sizeof(uint32_t)); |
| 5117 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5118 | marshal_VkPhysicalDeviceImageFormatInfo2(stream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 5119 | marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5120 | unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5121 | VkResult vkGetPhysicalDeviceImageFormatProperties2_VkResult_return = (VkResult)0; |
| 5122 | stream->read(&vkGetPhysicalDeviceImageFormatProperties2_VkResult_return, sizeof(VkResult)); |
| 5123 | return vkGetPhysicalDeviceImageFormatProperties2_VkResult_return; |
| 5124 | } |
| 5125 | |
| 5126 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties2( |
| 5127 | VkPhysicalDevice physicalDevice, |
| 5128 | uint32_t* pQueueFamilyPropertyCount, |
| 5129 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 5130 | { |
| 5131 | auto stream = mImpl->stream(); |
| 5132 | auto countingStream = mImpl->countingStream(); |
| 5133 | countingStream->rewind(); |
| 5134 | { |
| 5135 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5136 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5137 | if (pQueueFamilyPropertyCount) |
| 5138 | { |
| 5139 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5140 | } |
| 5141 | countingStream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5142 | if (pQueueFamilyProperties) |
| 5143 | { |
| 5144 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5145 | { |
| 5146 | marshal_VkQueueFamilyProperties2(countingStream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5147 | } |
| 5148 | } |
| 5149 | } |
| 5150 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5151 | countingStream->rewind(); |
| 5152 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties2 = OP_vkGetPhysicalDeviceQueueFamilyProperties2; |
| 5153 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties2, sizeof(uint32_t)); |
| 5154 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties2, sizeof(uint32_t)); |
| 5155 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5156 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5157 | if (pQueueFamilyPropertyCount) |
| 5158 | { |
| 5159 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5160 | } |
| 5161 | stream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5162 | if (pQueueFamilyProperties) |
| 5163 | { |
| 5164 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5165 | { |
| 5166 | marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5167 | } |
| 5168 | } |
| 5169 | uint32_t* check_pQueueFamilyPropertyCount; |
| 5170 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5171 | if (pQueueFamilyPropertyCount) |
| 5172 | { |
| 5173 | if (!(check_pQueueFamilyPropertyCount)) |
| 5174 | { |
| 5175 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 5176 | } |
| 5177 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5178 | } |
| 5179 | VkQueueFamilyProperties2* check_pQueueFamilyProperties; |
| 5180 | stream->read((VkQueueFamilyProperties2**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5181 | if (pQueueFamilyProperties) |
| 5182 | { |
| 5183 | if (!(check_pQueueFamilyProperties)) |
| 5184 | { |
| 5185 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 5186 | } |
| 5187 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5188 | { |
| 5189 | unmarshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5190 | } |
| 5191 | } |
| 5192 | } |
| 5193 | |
| 5194 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties2( |
| 5195 | VkPhysicalDevice physicalDevice, |
| 5196 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 5197 | { |
| 5198 | auto stream = mImpl->stream(); |
| 5199 | auto countingStream = mImpl->countingStream(); |
| 5200 | countingStream->rewind(); |
| 5201 | { |
| 5202 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5203 | marshal_VkPhysicalDeviceMemoryProperties2(countingStream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5204 | } |
| 5205 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5206 | countingStream->rewind(); |
| 5207 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties2 = OP_vkGetPhysicalDeviceMemoryProperties2; |
| 5208 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties2, sizeof(uint32_t)); |
| 5209 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties2, sizeof(uint32_t)); |
| 5210 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5211 | marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5212 | unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5213 | } |
| 5214 | |
| 5215 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties2( |
| 5216 | VkPhysicalDevice physicalDevice, |
| 5217 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 5218 | uint32_t* pPropertyCount, |
| 5219 | VkSparseImageFormatProperties2* pProperties) |
| 5220 | { |
| 5221 | auto stream = mImpl->stream(); |
| 5222 | auto countingStream = mImpl->countingStream(); |
| 5223 | countingStream->rewind(); |
| 5224 | { |
| 5225 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5226 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(countingStream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 5227 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 5228 | if (pPropertyCount) |
| 5229 | { |
| 5230 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5231 | } |
| 5232 | countingStream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5233 | if (pProperties) |
| 5234 | { |
| 5235 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5236 | { |
| 5237 | marshal_VkSparseImageFormatProperties2(countingStream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5238 | } |
| 5239 | } |
| 5240 | } |
| 5241 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5242 | countingStream->rewind(); |
| 5243 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties2 = OP_vkGetPhysicalDeviceSparseImageFormatProperties2; |
| 5244 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties2, sizeof(uint32_t)); |
| 5245 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2, sizeof(uint32_t)); |
| 5246 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5247 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(stream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 5248 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 5249 | if (pPropertyCount) |
| 5250 | { |
| 5251 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5252 | } |
| 5253 | stream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5254 | if (pProperties) |
| 5255 | { |
| 5256 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5257 | { |
| 5258 | marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5259 | } |
| 5260 | } |
| 5261 | uint32_t* check_pPropertyCount; |
| 5262 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 5263 | if (pPropertyCount) |
| 5264 | { |
| 5265 | if (!(check_pPropertyCount)) |
| 5266 | { |
| 5267 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 5268 | } |
| 5269 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5270 | } |
| 5271 | VkSparseImageFormatProperties2* check_pProperties; |
| 5272 | stream->read((VkSparseImageFormatProperties2**)&check_pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5273 | if (pProperties) |
| 5274 | { |
| 5275 | if (!(check_pProperties)) |
| 5276 | { |
| 5277 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 5278 | } |
| 5279 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5280 | { |
| 5281 | unmarshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5282 | } |
| 5283 | } |
| 5284 | } |
| 5285 | |
| 5286 | void VkEncoder::vkTrimCommandPool( |
| 5287 | VkDevice device, |
| 5288 | VkCommandPool commandPool, |
| 5289 | VkCommandPoolTrimFlags flags) |
| 5290 | { |
| 5291 | auto stream = mImpl->stream(); |
| 5292 | auto countingStream = mImpl->countingStream(); |
| 5293 | countingStream->rewind(); |
| 5294 | { |
| 5295 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5296 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 5297 | countingStream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 5298 | } |
| 5299 | uint32_t packetSize_vkTrimCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5300 | countingStream->rewind(); |
| 5301 | uint32_t opcode_vkTrimCommandPool = OP_vkTrimCommandPool; |
| 5302 | stream->write(&opcode_vkTrimCommandPool, sizeof(uint32_t)); |
| 5303 | stream->write(&packetSize_vkTrimCommandPool, sizeof(uint32_t)); |
| 5304 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5305 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 5306 | stream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 5307 | } |
| 5308 | |
| 5309 | void VkEncoder::vkGetDeviceQueue2( |
| 5310 | VkDevice device, |
| 5311 | const VkDeviceQueueInfo2* pQueueInfo, |
| 5312 | VkQueue* pQueue) |
| 5313 | { |
| 5314 | auto stream = mImpl->stream(); |
| 5315 | auto countingStream = mImpl->countingStream(); |
| 5316 | countingStream->rewind(); |
| 5317 | { |
| 5318 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5319 | marshal_VkDeviceQueueInfo2(countingStream, (const VkDeviceQueueInfo2*)(pQueueInfo)); |
| 5320 | countingStream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5321 | } |
| 5322 | uint32_t packetSize_vkGetDeviceQueue2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5323 | countingStream->rewind(); |
| 5324 | uint32_t opcode_vkGetDeviceQueue2 = OP_vkGetDeviceQueue2; |
| 5325 | stream->write(&opcode_vkGetDeviceQueue2, sizeof(uint32_t)); |
| 5326 | stream->write(&packetSize_vkGetDeviceQueue2, sizeof(uint32_t)); |
| 5327 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5328 | marshal_VkDeviceQueueInfo2(stream, (const VkDeviceQueueInfo2*)(pQueueInfo)); |
| 5329 | stream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5330 | stream->read((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5331 | } |
| 5332 | |
| 5333 | VkResult VkEncoder::vkCreateSamplerYcbcrConversion( |
| 5334 | VkDevice device, |
| 5335 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 5336 | const VkAllocationCallbacks* pAllocator, |
| 5337 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 5338 | { |
| 5339 | auto stream = mImpl->stream(); |
| 5340 | auto countingStream = mImpl->countingStream(); |
| 5341 | countingStream->rewind(); |
| 5342 | { |
| 5343 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5344 | marshal_VkSamplerYcbcrConversionCreateInfo(countingStream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 5345 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5346 | if (pAllocator) |
| 5347 | { |
| 5348 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5349 | } |
| 5350 | countingStream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5351 | } |
| 5352 | uint32_t packetSize_vkCreateSamplerYcbcrConversion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5353 | countingStream->rewind(); |
| 5354 | uint32_t opcode_vkCreateSamplerYcbcrConversion = OP_vkCreateSamplerYcbcrConversion; |
| 5355 | stream->write(&opcode_vkCreateSamplerYcbcrConversion, sizeof(uint32_t)); |
| 5356 | stream->write(&packetSize_vkCreateSamplerYcbcrConversion, sizeof(uint32_t)); |
| 5357 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5358 | marshal_VkSamplerYcbcrConversionCreateInfo(stream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 5359 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5360 | if (pAllocator) |
| 5361 | { |
| 5362 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5363 | } |
| 5364 | stream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5365 | stream->read((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5366 | VkResult vkCreateSamplerYcbcrConversion_VkResult_return = (VkResult)0; |
| 5367 | stream->read(&vkCreateSamplerYcbcrConversion_VkResult_return, sizeof(VkResult)); |
| 5368 | return vkCreateSamplerYcbcrConversion_VkResult_return; |
| 5369 | } |
| 5370 | |
| 5371 | void VkEncoder::vkDestroySamplerYcbcrConversion( |
| 5372 | VkDevice device, |
| 5373 | VkSamplerYcbcrConversion ycbcrConversion, |
| 5374 | const VkAllocationCallbacks* pAllocator) |
| 5375 | { |
| 5376 | auto stream = mImpl->stream(); |
| 5377 | auto countingStream = mImpl->countingStream(); |
| 5378 | countingStream->rewind(); |
| 5379 | { |
| 5380 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5381 | countingStream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5382 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5383 | if (pAllocator) |
| 5384 | { |
| 5385 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5386 | } |
| 5387 | } |
| 5388 | uint32_t packetSize_vkDestroySamplerYcbcrConversion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5389 | countingStream->rewind(); |
| 5390 | uint32_t opcode_vkDestroySamplerYcbcrConversion = OP_vkDestroySamplerYcbcrConversion; |
| 5391 | stream->write(&opcode_vkDestroySamplerYcbcrConversion, sizeof(uint32_t)); |
| 5392 | stream->write(&packetSize_vkDestroySamplerYcbcrConversion, sizeof(uint32_t)); |
| 5393 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5394 | stream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5395 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5396 | if (pAllocator) |
| 5397 | { |
| 5398 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5399 | } |
| 5400 | } |
| 5401 | |
| 5402 | VkResult VkEncoder::vkCreateDescriptorUpdateTemplate( |
| 5403 | VkDevice device, |
| 5404 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 5405 | const VkAllocationCallbacks* pAllocator, |
| 5406 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 5407 | { |
| 5408 | auto stream = mImpl->stream(); |
| 5409 | auto countingStream = mImpl->countingStream(); |
| 5410 | countingStream->rewind(); |
| 5411 | { |
| 5412 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5413 | marshal_VkDescriptorUpdateTemplateCreateInfo(countingStream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 5414 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5415 | if (pAllocator) |
| 5416 | { |
| 5417 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5418 | } |
| 5419 | countingStream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5420 | } |
| 5421 | uint32_t packetSize_vkCreateDescriptorUpdateTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5422 | countingStream->rewind(); |
| 5423 | uint32_t opcode_vkCreateDescriptorUpdateTemplate = OP_vkCreateDescriptorUpdateTemplate; |
| 5424 | stream->write(&opcode_vkCreateDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5425 | stream->write(&packetSize_vkCreateDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5426 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5427 | marshal_VkDescriptorUpdateTemplateCreateInfo(stream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 5428 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5429 | if (pAllocator) |
| 5430 | { |
| 5431 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5432 | } |
| 5433 | stream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5434 | stream->read((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5435 | VkResult vkCreateDescriptorUpdateTemplate_VkResult_return = (VkResult)0; |
| 5436 | stream->read(&vkCreateDescriptorUpdateTemplate_VkResult_return, sizeof(VkResult)); |
| 5437 | return vkCreateDescriptorUpdateTemplate_VkResult_return; |
| 5438 | } |
| 5439 | |
| 5440 | void VkEncoder::vkDestroyDescriptorUpdateTemplate( |
| 5441 | VkDevice device, |
| 5442 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 5443 | const VkAllocationCallbacks* pAllocator) |
| 5444 | { |
| 5445 | auto stream = mImpl->stream(); |
| 5446 | auto countingStream = mImpl->countingStream(); |
| 5447 | countingStream->rewind(); |
| 5448 | { |
| 5449 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5450 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5451 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5452 | if (pAllocator) |
| 5453 | { |
| 5454 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5455 | } |
| 5456 | } |
| 5457 | uint32_t packetSize_vkDestroyDescriptorUpdateTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5458 | countingStream->rewind(); |
| 5459 | uint32_t opcode_vkDestroyDescriptorUpdateTemplate = OP_vkDestroyDescriptorUpdateTemplate; |
| 5460 | stream->write(&opcode_vkDestroyDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5461 | stream->write(&packetSize_vkDestroyDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5462 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5463 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5464 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5465 | if (pAllocator) |
| 5466 | { |
| 5467 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5468 | } |
| 5469 | } |
| 5470 | |
| 5471 | void VkEncoder::vkUpdateDescriptorSetWithTemplate( |
| 5472 | VkDevice device, |
| 5473 | VkDescriptorSet descriptorSet, |
| 5474 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 5475 | const void* pData) |
| 5476 | { |
| 5477 | auto stream = mImpl->stream(); |
| 5478 | auto countingStream = mImpl->countingStream(); |
| 5479 | countingStream->rewind(); |
| 5480 | { |
| 5481 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5482 | countingStream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 5483 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5484 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 5485 | if (pData) |
| 5486 | { |
| 5487 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 5488 | } |
| 5489 | } |
| 5490 | uint32_t packetSize_vkUpdateDescriptorSetWithTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5491 | countingStream->rewind(); |
| 5492 | uint32_t opcode_vkUpdateDescriptorSetWithTemplate = OP_vkUpdateDescriptorSetWithTemplate; |
| 5493 | stream->write(&opcode_vkUpdateDescriptorSetWithTemplate, sizeof(uint32_t)); |
| 5494 | stream->write(&packetSize_vkUpdateDescriptorSetWithTemplate, sizeof(uint32_t)); |
| 5495 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5496 | stream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 5497 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5498 | stream->write((const void**)&pData, sizeof(const void*)); |
| 5499 | if (pData) |
| 5500 | { |
| 5501 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 5502 | } |
| 5503 | } |
| 5504 | |
| 5505 | void VkEncoder::vkGetPhysicalDeviceExternalBufferProperties( |
| 5506 | VkPhysicalDevice physicalDevice, |
| 5507 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 5508 | VkExternalBufferProperties* pExternalBufferProperties) |
| 5509 | { |
| 5510 | auto stream = mImpl->stream(); |
| 5511 | auto countingStream = mImpl->countingStream(); |
| 5512 | countingStream->rewind(); |
| 5513 | { |
| 5514 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5515 | marshal_VkPhysicalDeviceExternalBufferInfo(countingStream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 5516 | marshal_VkExternalBufferProperties(countingStream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5517 | } |
| 5518 | uint32_t packetSize_vkGetPhysicalDeviceExternalBufferProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5519 | countingStream->rewind(); |
| 5520 | uint32_t opcode_vkGetPhysicalDeviceExternalBufferProperties = OP_vkGetPhysicalDeviceExternalBufferProperties; |
| 5521 | stream->write(&opcode_vkGetPhysicalDeviceExternalBufferProperties, sizeof(uint32_t)); |
| 5522 | stream->write(&packetSize_vkGetPhysicalDeviceExternalBufferProperties, sizeof(uint32_t)); |
| 5523 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5524 | marshal_VkPhysicalDeviceExternalBufferInfo(stream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 5525 | marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5526 | unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5527 | } |
| 5528 | |
| 5529 | void VkEncoder::vkGetPhysicalDeviceExternalFenceProperties( |
| 5530 | VkPhysicalDevice physicalDevice, |
| 5531 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 5532 | VkExternalFenceProperties* pExternalFenceProperties) |
| 5533 | { |
| 5534 | auto stream = mImpl->stream(); |
| 5535 | auto countingStream = mImpl->countingStream(); |
| 5536 | countingStream->rewind(); |
| 5537 | { |
| 5538 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5539 | marshal_VkPhysicalDeviceExternalFenceInfo(countingStream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 5540 | marshal_VkExternalFenceProperties(countingStream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5541 | } |
| 5542 | uint32_t packetSize_vkGetPhysicalDeviceExternalFenceProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5543 | countingStream->rewind(); |
| 5544 | uint32_t opcode_vkGetPhysicalDeviceExternalFenceProperties = OP_vkGetPhysicalDeviceExternalFenceProperties; |
| 5545 | stream->write(&opcode_vkGetPhysicalDeviceExternalFenceProperties, sizeof(uint32_t)); |
| 5546 | stream->write(&packetSize_vkGetPhysicalDeviceExternalFenceProperties, sizeof(uint32_t)); |
| 5547 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5548 | marshal_VkPhysicalDeviceExternalFenceInfo(stream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 5549 | marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5550 | unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5551 | } |
| 5552 | |
| 5553 | void VkEncoder::vkGetPhysicalDeviceExternalSemaphoreProperties( |
| 5554 | VkPhysicalDevice physicalDevice, |
| 5555 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 5556 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 5557 | { |
| 5558 | auto stream = mImpl->stream(); |
| 5559 | auto countingStream = mImpl->countingStream(); |
| 5560 | countingStream->rewind(); |
| 5561 | { |
| 5562 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5563 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(countingStream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 5564 | marshal_VkExternalSemaphoreProperties(countingStream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5565 | } |
| 5566 | uint32_t packetSize_vkGetPhysicalDeviceExternalSemaphoreProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5567 | countingStream->rewind(); |
| 5568 | uint32_t opcode_vkGetPhysicalDeviceExternalSemaphoreProperties = OP_vkGetPhysicalDeviceExternalSemaphoreProperties; |
| 5569 | stream->write(&opcode_vkGetPhysicalDeviceExternalSemaphoreProperties, sizeof(uint32_t)); |
| 5570 | stream->write(&packetSize_vkGetPhysicalDeviceExternalSemaphoreProperties, sizeof(uint32_t)); |
| 5571 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5572 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 5573 | marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5574 | unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5575 | } |
| 5576 | |
| 5577 | void VkEncoder::vkGetDescriptorSetLayoutSupport( |
| 5578 | VkDevice device, |
| 5579 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 5580 | VkDescriptorSetLayoutSupport* pSupport) |
| 5581 | { |
| 5582 | auto stream = mImpl->stream(); |
| 5583 | auto countingStream = mImpl->countingStream(); |
| 5584 | countingStream->rewind(); |
| 5585 | { |
| 5586 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5587 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 5588 | marshal_VkDescriptorSetLayoutSupport(countingStream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5589 | } |
| 5590 | uint32_t packetSize_vkGetDescriptorSetLayoutSupport = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5591 | countingStream->rewind(); |
| 5592 | uint32_t opcode_vkGetDescriptorSetLayoutSupport = OP_vkGetDescriptorSetLayoutSupport; |
| 5593 | stream->write(&opcode_vkGetDescriptorSetLayoutSupport, sizeof(uint32_t)); |
| 5594 | stream->write(&packetSize_vkGetDescriptorSetLayoutSupport, sizeof(uint32_t)); |
| 5595 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5596 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 5597 | marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5598 | unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5599 | } |
| 5600 | |
| 5601 | #endif |
| 5602 | #ifdef VK_KHR_surface |
| 5603 | void VkEncoder::vkDestroySurfaceKHR( |
| 5604 | VkInstance instance, |
| 5605 | VkSurfaceKHR surface, |
| 5606 | const VkAllocationCallbacks* pAllocator) |
| 5607 | { |
| 5608 | auto stream = mImpl->stream(); |
| 5609 | auto countingStream = mImpl->countingStream(); |
| 5610 | countingStream->rewind(); |
| 5611 | { |
| 5612 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 5613 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5614 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5615 | if (pAllocator) |
| 5616 | { |
| 5617 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5618 | } |
| 5619 | } |
| 5620 | uint32_t packetSize_vkDestroySurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5621 | countingStream->rewind(); |
| 5622 | uint32_t opcode_vkDestroySurfaceKHR = OP_vkDestroySurfaceKHR; |
| 5623 | stream->write(&opcode_vkDestroySurfaceKHR, sizeof(uint32_t)); |
| 5624 | stream->write(&packetSize_vkDestroySurfaceKHR, sizeof(uint32_t)); |
| 5625 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 5626 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5627 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5628 | if (pAllocator) |
| 5629 | { |
| 5630 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5631 | } |
| 5632 | } |
| 5633 | |
| 5634 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceSupportKHR( |
| 5635 | VkPhysicalDevice physicalDevice, |
| 5636 | uint32_t queueFamilyIndex, |
| 5637 | VkSurfaceKHR surface, |
| 5638 | VkBool32* pSupported) |
| 5639 | { |
| 5640 | auto stream = mImpl->stream(); |
| 5641 | auto countingStream = mImpl->countingStream(); |
| 5642 | countingStream->rewind(); |
| 5643 | { |
| 5644 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5645 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 5646 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5647 | countingStream->write((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5648 | } |
| 5649 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5650 | countingStream->rewind(); |
| 5651 | uint32_t opcode_vkGetPhysicalDeviceSurfaceSupportKHR = OP_vkGetPhysicalDeviceSurfaceSupportKHR; |
| 5652 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceSupportKHR, sizeof(uint32_t)); |
| 5653 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceSupportKHR, sizeof(uint32_t)); |
| 5654 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5655 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 5656 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5657 | stream->write((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5658 | stream->read((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5659 | VkResult vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return = (VkResult)0; |
| 5660 | stream->read(&vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return, sizeof(VkResult)); |
| 5661 | return vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return; |
| 5662 | } |
| 5663 | |
| 5664 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 5665 | VkPhysicalDevice physicalDevice, |
| 5666 | VkSurfaceKHR surface, |
| 5667 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) |
| 5668 | { |
| 5669 | auto stream = mImpl->stream(); |
| 5670 | auto countingStream = mImpl->countingStream(); |
| 5671 | countingStream->rewind(); |
| 5672 | { |
| 5673 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5674 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5675 | marshal_VkSurfaceCapabilitiesKHR(countingStream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5676 | } |
| 5677 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5678 | countingStream->rewind(); |
| 5679 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = OP_vkGetPhysicalDeviceSurfaceCapabilitiesKHR; |
| 5680 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, sizeof(uint32_t)); |
| 5681 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, sizeof(uint32_t)); |
| 5682 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5683 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5684 | marshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5685 | unmarshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5686 | VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 5687 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 5688 | return vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return; |
| 5689 | } |
| 5690 | |
| 5691 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 5692 | VkPhysicalDevice physicalDevice, |
| 5693 | VkSurfaceKHR surface, |
| 5694 | uint32_t* pSurfaceFormatCount, |
| 5695 | VkSurfaceFormatKHR* pSurfaceFormats) |
| 5696 | { |
| 5697 | auto stream = mImpl->stream(); |
| 5698 | auto countingStream = mImpl->countingStream(); |
| 5699 | countingStream->rewind(); |
| 5700 | { |
| 5701 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5702 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5703 | countingStream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5704 | if (pSurfaceFormatCount) |
| 5705 | { |
| 5706 | countingStream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5707 | } |
| 5708 | countingStream->write((VkSurfaceFormatKHR**)&pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5709 | if (pSurfaceFormats) |
| 5710 | { |
| 5711 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5712 | { |
| 5713 | marshal_VkSurfaceFormatKHR(countingStream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5714 | } |
| 5715 | } |
| 5716 | } |
| 5717 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceFormatsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5718 | countingStream->rewind(); |
| 5719 | uint32_t opcode_vkGetPhysicalDeviceSurfaceFormatsKHR = OP_vkGetPhysicalDeviceSurfaceFormatsKHR; |
| 5720 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceFormatsKHR, sizeof(uint32_t)); |
| 5721 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceFormatsKHR, sizeof(uint32_t)); |
| 5722 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5723 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5724 | stream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5725 | if (pSurfaceFormatCount) |
| 5726 | { |
| 5727 | stream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5728 | } |
| 5729 | stream->write((VkSurfaceFormatKHR**)&pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5730 | if (pSurfaceFormats) |
| 5731 | { |
| 5732 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5733 | { |
| 5734 | marshal_VkSurfaceFormatKHR(stream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5735 | } |
| 5736 | } |
| 5737 | uint32_t* check_pSurfaceFormatCount; |
| 5738 | stream->read((uint32_t**)&check_pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5739 | if (pSurfaceFormatCount) |
| 5740 | { |
| 5741 | if (!(check_pSurfaceFormatCount)) |
| 5742 | { |
| 5743 | fprintf(stderr, "fatal: pSurfaceFormatCount inconsistent between guest and host\n"); |
| 5744 | } |
| 5745 | stream->read((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5746 | } |
| 5747 | VkSurfaceFormatKHR* check_pSurfaceFormats; |
| 5748 | stream->read((VkSurfaceFormatKHR**)&check_pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5749 | if (pSurfaceFormats) |
| 5750 | { |
| 5751 | if (!(check_pSurfaceFormats)) |
| 5752 | { |
| 5753 | fprintf(stderr, "fatal: pSurfaceFormats inconsistent between guest and host\n"); |
| 5754 | } |
| 5755 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5756 | { |
| 5757 | unmarshal_VkSurfaceFormatKHR(stream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5758 | } |
| 5759 | } |
| 5760 | VkResult vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return = (VkResult)0; |
| 5761 | stream->read(&vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return, sizeof(VkResult)); |
| 5762 | return vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return; |
| 5763 | } |
| 5764 | |
| 5765 | VkResult VkEncoder::vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 5766 | VkPhysicalDevice physicalDevice, |
| 5767 | VkSurfaceKHR surface, |
| 5768 | uint32_t* pPresentModeCount, |
| 5769 | VkPresentModeKHR* pPresentModes) |
| 5770 | { |
| 5771 | auto stream = mImpl->stream(); |
| 5772 | auto countingStream = mImpl->countingStream(); |
| 5773 | countingStream->rewind(); |
| 5774 | { |
| 5775 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5776 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5777 | countingStream->write((uint32_t**)&pPresentModeCount, sizeof(uint32_t*)); |
| 5778 | if (pPresentModeCount) |
| 5779 | { |
| 5780 | countingStream->write((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5781 | } |
| 5782 | countingStream->write((VkPresentModeKHR**)&pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5783 | if (pPresentModes) |
| 5784 | { |
| 5785 | countingStream->write((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5786 | } |
| 5787 | } |
| 5788 | uint32_t packetSize_vkGetPhysicalDeviceSurfacePresentModesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5789 | countingStream->rewind(); |
| 5790 | uint32_t opcode_vkGetPhysicalDeviceSurfacePresentModesKHR = OP_vkGetPhysicalDeviceSurfacePresentModesKHR; |
| 5791 | stream->write(&opcode_vkGetPhysicalDeviceSurfacePresentModesKHR, sizeof(uint32_t)); |
| 5792 | stream->write(&packetSize_vkGetPhysicalDeviceSurfacePresentModesKHR, sizeof(uint32_t)); |
| 5793 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5794 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5795 | stream->write((uint32_t**)&pPresentModeCount, sizeof(uint32_t*)); |
| 5796 | if (pPresentModeCount) |
| 5797 | { |
| 5798 | stream->write((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5799 | } |
| 5800 | stream->write((VkPresentModeKHR**)&pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5801 | if (pPresentModes) |
| 5802 | { |
| 5803 | stream->write((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5804 | } |
| 5805 | uint32_t* check_pPresentModeCount; |
| 5806 | stream->read((uint32_t**)&check_pPresentModeCount, sizeof(uint32_t*)); |
| 5807 | if (pPresentModeCount) |
| 5808 | { |
| 5809 | if (!(check_pPresentModeCount)) |
| 5810 | { |
| 5811 | fprintf(stderr, "fatal: pPresentModeCount inconsistent between guest and host\n"); |
| 5812 | } |
| 5813 | stream->read((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5814 | } |
| 5815 | VkPresentModeKHR* check_pPresentModes; |
| 5816 | stream->read((VkPresentModeKHR**)&check_pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5817 | if (pPresentModes) |
| 5818 | { |
| 5819 | if (!(check_pPresentModes)) |
| 5820 | { |
| 5821 | fprintf(stderr, "fatal: pPresentModes inconsistent between guest and host\n"); |
| 5822 | } |
| 5823 | stream->read((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5824 | } |
| 5825 | VkResult vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return = (VkResult)0; |
| 5826 | stream->read(&vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return, sizeof(VkResult)); |
| 5827 | return vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return; |
| 5828 | } |
| 5829 | |
| 5830 | #endif |
| 5831 | #ifdef VK_KHR_swapchain |
| 5832 | VkResult VkEncoder::vkCreateSwapchainKHR( |
| 5833 | VkDevice device, |
| 5834 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
| 5835 | const VkAllocationCallbacks* pAllocator, |
| 5836 | VkSwapchainKHR* pSwapchain) |
| 5837 | { |
| 5838 | auto stream = mImpl->stream(); |
| 5839 | auto countingStream = mImpl->countingStream(); |
| 5840 | countingStream->rewind(); |
| 5841 | { |
| 5842 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5843 | marshal_VkSwapchainCreateInfoKHR(countingStream, (const VkSwapchainCreateInfoKHR*)(pCreateInfo)); |
| 5844 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5845 | if (pAllocator) |
| 5846 | { |
| 5847 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5848 | } |
| 5849 | countingStream->write((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5850 | } |
| 5851 | uint32_t packetSize_vkCreateSwapchainKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5852 | countingStream->rewind(); |
| 5853 | uint32_t opcode_vkCreateSwapchainKHR = OP_vkCreateSwapchainKHR; |
| 5854 | stream->write(&opcode_vkCreateSwapchainKHR, sizeof(uint32_t)); |
| 5855 | stream->write(&packetSize_vkCreateSwapchainKHR, sizeof(uint32_t)); |
| 5856 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5857 | marshal_VkSwapchainCreateInfoKHR(stream, (const VkSwapchainCreateInfoKHR*)(pCreateInfo)); |
| 5858 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5859 | if (pAllocator) |
| 5860 | { |
| 5861 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5862 | } |
| 5863 | stream->write((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5864 | stream->read((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5865 | VkResult vkCreateSwapchainKHR_VkResult_return = (VkResult)0; |
| 5866 | stream->read(&vkCreateSwapchainKHR_VkResult_return, sizeof(VkResult)); |
| 5867 | return vkCreateSwapchainKHR_VkResult_return; |
| 5868 | } |
| 5869 | |
| 5870 | void VkEncoder::vkDestroySwapchainKHR( |
| 5871 | VkDevice device, |
| 5872 | VkSwapchainKHR swapchain, |
| 5873 | const VkAllocationCallbacks* pAllocator) |
| 5874 | { |
| 5875 | auto stream = mImpl->stream(); |
| 5876 | auto countingStream = mImpl->countingStream(); |
| 5877 | countingStream->rewind(); |
| 5878 | { |
| 5879 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5880 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5881 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5882 | if (pAllocator) |
| 5883 | { |
| 5884 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5885 | } |
| 5886 | } |
| 5887 | uint32_t packetSize_vkDestroySwapchainKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5888 | countingStream->rewind(); |
| 5889 | uint32_t opcode_vkDestroySwapchainKHR = OP_vkDestroySwapchainKHR; |
| 5890 | stream->write(&opcode_vkDestroySwapchainKHR, sizeof(uint32_t)); |
| 5891 | stream->write(&packetSize_vkDestroySwapchainKHR, sizeof(uint32_t)); |
| 5892 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5893 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5894 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5895 | if (pAllocator) |
| 5896 | { |
| 5897 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5898 | } |
| 5899 | } |
| 5900 | |
| 5901 | VkResult VkEncoder::vkGetSwapchainImagesKHR( |
| 5902 | VkDevice device, |
| 5903 | VkSwapchainKHR swapchain, |
| 5904 | uint32_t* pSwapchainImageCount, |
| 5905 | VkImage* pSwapchainImages) |
| 5906 | { |
| 5907 | auto stream = mImpl->stream(); |
| 5908 | auto countingStream = mImpl->countingStream(); |
| 5909 | countingStream->rewind(); |
| 5910 | { |
| 5911 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5912 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5913 | countingStream->write((uint32_t**)&pSwapchainImageCount, sizeof(uint32_t*)); |
| 5914 | if (pSwapchainImageCount) |
| 5915 | { |
| 5916 | countingStream->write((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5917 | } |
| 5918 | countingStream->write((VkImage**)&pSwapchainImages, sizeof(VkImage*)); |
| 5919 | if (pSwapchainImages) |
| 5920 | { |
| 5921 | countingStream->write((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5922 | } |
| 5923 | } |
| 5924 | uint32_t packetSize_vkGetSwapchainImagesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5925 | countingStream->rewind(); |
| 5926 | uint32_t opcode_vkGetSwapchainImagesKHR = OP_vkGetSwapchainImagesKHR; |
| 5927 | stream->write(&opcode_vkGetSwapchainImagesKHR, sizeof(uint32_t)); |
| 5928 | stream->write(&packetSize_vkGetSwapchainImagesKHR, sizeof(uint32_t)); |
| 5929 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5930 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5931 | stream->write((uint32_t**)&pSwapchainImageCount, sizeof(uint32_t*)); |
| 5932 | if (pSwapchainImageCount) |
| 5933 | { |
| 5934 | stream->write((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5935 | } |
| 5936 | stream->write((VkImage**)&pSwapchainImages, sizeof(VkImage*)); |
| 5937 | if (pSwapchainImages) |
| 5938 | { |
| 5939 | stream->write((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5940 | } |
| 5941 | uint32_t* check_pSwapchainImageCount; |
| 5942 | stream->read((uint32_t**)&check_pSwapchainImageCount, sizeof(uint32_t*)); |
| 5943 | if (pSwapchainImageCount) |
| 5944 | { |
| 5945 | if (!(check_pSwapchainImageCount)) |
| 5946 | { |
| 5947 | fprintf(stderr, "fatal: pSwapchainImageCount inconsistent between guest and host\n"); |
| 5948 | } |
| 5949 | stream->read((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5950 | } |
| 5951 | VkImage* check_pSwapchainImages; |
| 5952 | stream->read((VkImage**)&check_pSwapchainImages, sizeof(VkImage*)); |
| 5953 | if (pSwapchainImages) |
| 5954 | { |
| 5955 | if (!(check_pSwapchainImages)) |
| 5956 | { |
| 5957 | fprintf(stderr, "fatal: pSwapchainImages inconsistent between guest and host\n"); |
| 5958 | } |
| 5959 | stream->read((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5960 | } |
| 5961 | VkResult vkGetSwapchainImagesKHR_VkResult_return = (VkResult)0; |
| 5962 | stream->read(&vkGetSwapchainImagesKHR_VkResult_return, sizeof(VkResult)); |
| 5963 | return vkGetSwapchainImagesKHR_VkResult_return; |
| 5964 | } |
| 5965 | |
| 5966 | VkResult VkEncoder::vkAcquireNextImageKHR( |
| 5967 | VkDevice device, |
| 5968 | VkSwapchainKHR swapchain, |
| 5969 | uint64_t timeout, |
| 5970 | VkSemaphore semaphore, |
| 5971 | VkFence fence, |
| 5972 | uint32_t* pImageIndex) |
| 5973 | { |
| 5974 | auto stream = mImpl->stream(); |
| 5975 | auto countingStream = mImpl->countingStream(); |
| 5976 | countingStream->rewind(); |
| 5977 | { |
| 5978 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5979 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5980 | countingStream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 5981 | countingStream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 5982 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 5983 | countingStream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 5984 | } |
| 5985 | uint32_t packetSize_vkAcquireNextImageKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5986 | countingStream->rewind(); |
| 5987 | uint32_t opcode_vkAcquireNextImageKHR = OP_vkAcquireNextImageKHR; |
| 5988 | stream->write(&opcode_vkAcquireNextImageKHR, sizeof(uint32_t)); |
| 5989 | stream->write(&packetSize_vkAcquireNextImageKHR, sizeof(uint32_t)); |
| 5990 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5991 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5992 | stream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 5993 | stream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 5994 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 5995 | stream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 5996 | stream->read((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 5997 | VkResult vkAcquireNextImageKHR_VkResult_return = (VkResult)0; |
| 5998 | stream->read(&vkAcquireNextImageKHR_VkResult_return, sizeof(VkResult)); |
| 5999 | return vkAcquireNextImageKHR_VkResult_return; |
| 6000 | } |
| 6001 | |
| 6002 | VkResult VkEncoder::vkQueuePresentKHR( |
| 6003 | VkQueue queue, |
| 6004 | const VkPresentInfoKHR* pPresentInfo) |
| 6005 | { |
| 6006 | auto stream = mImpl->stream(); |
| 6007 | auto countingStream = mImpl->countingStream(); |
| 6008 | countingStream->rewind(); |
| 6009 | { |
| 6010 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 6011 | marshal_VkPresentInfoKHR(countingStream, (const VkPresentInfoKHR*)(pPresentInfo)); |
| 6012 | } |
| 6013 | uint32_t packetSize_vkQueuePresentKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6014 | countingStream->rewind(); |
| 6015 | uint32_t opcode_vkQueuePresentKHR = OP_vkQueuePresentKHR; |
| 6016 | stream->write(&opcode_vkQueuePresentKHR, sizeof(uint32_t)); |
| 6017 | stream->write(&packetSize_vkQueuePresentKHR, sizeof(uint32_t)); |
| 6018 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 6019 | marshal_VkPresentInfoKHR(stream, (const VkPresentInfoKHR*)(pPresentInfo)); |
| 6020 | VkResult vkQueuePresentKHR_VkResult_return = (VkResult)0; |
| 6021 | stream->read(&vkQueuePresentKHR_VkResult_return, sizeof(VkResult)); |
| 6022 | return vkQueuePresentKHR_VkResult_return; |
| 6023 | } |
| 6024 | |
| 6025 | VkResult VkEncoder::vkGetDeviceGroupPresentCapabilitiesKHR( |
| 6026 | VkDevice device, |
| 6027 | VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) |
| 6028 | { |
| 6029 | auto stream = mImpl->stream(); |
| 6030 | auto countingStream = mImpl->countingStream(); |
| 6031 | countingStream->rewind(); |
| 6032 | { |
| 6033 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6034 | marshal_VkDeviceGroupPresentCapabilitiesKHR(countingStream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6035 | } |
| 6036 | uint32_t packetSize_vkGetDeviceGroupPresentCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6037 | countingStream->rewind(); |
| 6038 | uint32_t opcode_vkGetDeviceGroupPresentCapabilitiesKHR = OP_vkGetDeviceGroupPresentCapabilitiesKHR; |
| 6039 | stream->write(&opcode_vkGetDeviceGroupPresentCapabilitiesKHR, sizeof(uint32_t)); |
| 6040 | stream->write(&packetSize_vkGetDeviceGroupPresentCapabilitiesKHR, sizeof(uint32_t)); |
| 6041 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6042 | marshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6043 | unmarshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6044 | VkResult vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 6045 | stream->read(&vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 6046 | return vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return; |
| 6047 | } |
| 6048 | |
| 6049 | VkResult VkEncoder::vkGetDeviceGroupSurfacePresentModesKHR( |
| 6050 | VkDevice device, |
| 6051 | VkSurfaceKHR surface, |
| 6052 | VkDeviceGroupPresentModeFlagsKHR* pModes) |
| 6053 | { |
| 6054 | auto stream = mImpl->stream(); |
| 6055 | auto countingStream = mImpl->countingStream(); |
| 6056 | countingStream->rewind(); |
| 6057 | { |
| 6058 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6059 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6060 | countingStream->write((VkDeviceGroupPresentModeFlagsKHR**)&pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6061 | if (pModes) |
| 6062 | { |
| 6063 | countingStream->write((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6064 | } |
| 6065 | } |
| 6066 | uint32_t packetSize_vkGetDeviceGroupSurfacePresentModesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6067 | countingStream->rewind(); |
| 6068 | uint32_t opcode_vkGetDeviceGroupSurfacePresentModesKHR = OP_vkGetDeviceGroupSurfacePresentModesKHR; |
| 6069 | stream->write(&opcode_vkGetDeviceGroupSurfacePresentModesKHR, sizeof(uint32_t)); |
| 6070 | stream->write(&packetSize_vkGetDeviceGroupSurfacePresentModesKHR, sizeof(uint32_t)); |
| 6071 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6072 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6073 | stream->write((VkDeviceGroupPresentModeFlagsKHR**)&pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6074 | if (pModes) |
| 6075 | { |
| 6076 | stream->write((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6077 | } |
| 6078 | VkDeviceGroupPresentModeFlagsKHR* check_pModes; |
| 6079 | stream->read((VkDeviceGroupPresentModeFlagsKHR**)&check_pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6080 | if (pModes) |
| 6081 | { |
| 6082 | if (!(check_pModes)) |
| 6083 | { |
| 6084 | fprintf(stderr, "fatal: pModes inconsistent between guest and host\n"); |
| 6085 | } |
| 6086 | stream->read((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6087 | } |
| 6088 | VkResult vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return = (VkResult)0; |
| 6089 | stream->read(&vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return, sizeof(VkResult)); |
| 6090 | return vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return; |
| 6091 | } |
| 6092 | |
| 6093 | VkResult VkEncoder::vkGetPhysicalDevicePresentRectanglesKHR( |
| 6094 | VkPhysicalDevice physicalDevice, |
| 6095 | VkSurfaceKHR surface, |
| 6096 | uint32_t* pRectCount, |
| 6097 | VkRect2D* pRects) |
| 6098 | { |
| 6099 | auto stream = mImpl->stream(); |
| 6100 | auto countingStream = mImpl->countingStream(); |
| 6101 | countingStream->rewind(); |
| 6102 | { |
| 6103 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6104 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6105 | countingStream->write((uint32_t**)&pRectCount, sizeof(uint32_t*)); |
| 6106 | if (pRectCount) |
| 6107 | { |
| 6108 | countingStream->write((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6109 | } |
| 6110 | countingStream->write((VkRect2D**)&pRects, sizeof(VkRect2D*)); |
| 6111 | if (pRects) |
| 6112 | { |
| 6113 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6114 | { |
| 6115 | marshal_VkRect2D(countingStream, (VkRect2D*)(pRects + i)); |
| 6116 | } |
| 6117 | } |
| 6118 | } |
| 6119 | uint32_t packetSize_vkGetPhysicalDevicePresentRectanglesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6120 | countingStream->rewind(); |
| 6121 | uint32_t opcode_vkGetPhysicalDevicePresentRectanglesKHR = OP_vkGetPhysicalDevicePresentRectanglesKHR; |
| 6122 | stream->write(&opcode_vkGetPhysicalDevicePresentRectanglesKHR, sizeof(uint32_t)); |
| 6123 | stream->write(&packetSize_vkGetPhysicalDevicePresentRectanglesKHR, sizeof(uint32_t)); |
| 6124 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6125 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6126 | stream->write((uint32_t**)&pRectCount, sizeof(uint32_t*)); |
| 6127 | if (pRectCount) |
| 6128 | { |
| 6129 | stream->write((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6130 | } |
| 6131 | stream->write((VkRect2D**)&pRects, sizeof(VkRect2D*)); |
| 6132 | if (pRects) |
| 6133 | { |
| 6134 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6135 | { |
| 6136 | marshal_VkRect2D(stream, (VkRect2D*)(pRects + i)); |
| 6137 | } |
| 6138 | } |
| 6139 | uint32_t* check_pRectCount; |
| 6140 | stream->read((uint32_t**)&check_pRectCount, sizeof(uint32_t*)); |
| 6141 | if (pRectCount) |
| 6142 | { |
| 6143 | if (!(check_pRectCount)) |
| 6144 | { |
| 6145 | fprintf(stderr, "fatal: pRectCount inconsistent between guest and host\n"); |
| 6146 | } |
| 6147 | stream->read((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6148 | } |
| 6149 | VkRect2D* check_pRects; |
| 6150 | stream->read((VkRect2D**)&check_pRects, sizeof(VkRect2D*)); |
| 6151 | if (pRects) |
| 6152 | { |
| 6153 | if (!(check_pRects)) |
| 6154 | { |
| 6155 | fprintf(stderr, "fatal: pRects inconsistent between guest and host\n"); |
| 6156 | } |
| 6157 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6158 | { |
| 6159 | unmarshal_VkRect2D(stream, (VkRect2D*)(pRects + i)); |
| 6160 | } |
| 6161 | } |
| 6162 | VkResult vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return = (VkResult)0; |
| 6163 | stream->read(&vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return, sizeof(VkResult)); |
| 6164 | return vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return; |
| 6165 | } |
| 6166 | |
| 6167 | VkResult VkEncoder::vkAcquireNextImage2KHR( |
| 6168 | VkDevice device, |
| 6169 | const VkAcquireNextImageInfoKHR* pAcquireInfo, |
| 6170 | uint32_t* pImageIndex) |
| 6171 | { |
| 6172 | auto stream = mImpl->stream(); |
| 6173 | auto countingStream = mImpl->countingStream(); |
| 6174 | countingStream->rewind(); |
| 6175 | { |
| 6176 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6177 | marshal_VkAcquireNextImageInfoKHR(countingStream, (const VkAcquireNextImageInfoKHR*)(pAcquireInfo)); |
| 6178 | countingStream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6179 | } |
| 6180 | uint32_t packetSize_vkAcquireNextImage2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6181 | countingStream->rewind(); |
| 6182 | uint32_t opcode_vkAcquireNextImage2KHR = OP_vkAcquireNextImage2KHR; |
| 6183 | stream->write(&opcode_vkAcquireNextImage2KHR, sizeof(uint32_t)); |
| 6184 | stream->write(&packetSize_vkAcquireNextImage2KHR, sizeof(uint32_t)); |
| 6185 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6186 | marshal_VkAcquireNextImageInfoKHR(stream, (const VkAcquireNextImageInfoKHR*)(pAcquireInfo)); |
| 6187 | stream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6188 | stream->read((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6189 | VkResult vkAcquireNextImage2KHR_VkResult_return = (VkResult)0; |
| 6190 | stream->read(&vkAcquireNextImage2KHR_VkResult_return, sizeof(VkResult)); |
| 6191 | return vkAcquireNextImage2KHR_VkResult_return; |
| 6192 | } |
| 6193 | |
| 6194 | #endif |
| 6195 | #ifdef VK_KHR_display |
| 6196 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 6197 | VkPhysicalDevice physicalDevice, |
| 6198 | uint32_t* pPropertyCount, |
| 6199 | VkDisplayPropertiesKHR* pProperties) |
| 6200 | { |
| 6201 | auto stream = mImpl->stream(); |
| 6202 | auto countingStream = mImpl->countingStream(); |
| 6203 | countingStream->rewind(); |
| 6204 | { |
| 6205 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6206 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6207 | if (pPropertyCount) |
| 6208 | { |
| 6209 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6210 | } |
| 6211 | countingStream->write((VkDisplayPropertiesKHR**)&pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6212 | if (pProperties) |
| 6213 | { |
| 6214 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6215 | { |
| 6216 | marshal_VkDisplayPropertiesKHR(countingStream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6217 | } |
| 6218 | } |
| 6219 | } |
| 6220 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6221 | countingStream->rewind(); |
| 6222 | uint32_t opcode_vkGetPhysicalDeviceDisplayPropertiesKHR = OP_vkGetPhysicalDeviceDisplayPropertiesKHR; |
| 6223 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPropertiesKHR, sizeof(uint32_t)); |
| 6224 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPropertiesKHR, sizeof(uint32_t)); |
| 6225 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6226 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6227 | if (pPropertyCount) |
| 6228 | { |
| 6229 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6230 | } |
| 6231 | stream->write((VkDisplayPropertiesKHR**)&pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6232 | if (pProperties) |
| 6233 | { |
| 6234 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6235 | { |
| 6236 | marshal_VkDisplayPropertiesKHR(stream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6237 | } |
| 6238 | } |
| 6239 | uint32_t* check_pPropertyCount; |
| 6240 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6241 | if (pPropertyCount) |
| 6242 | { |
| 6243 | if (!(check_pPropertyCount)) |
| 6244 | { |
| 6245 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6246 | } |
| 6247 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6248 | } |
| 6249 | VkDisplayPropertiesKHR* check_pProperties; |
| 6250 | stream->read((VkDisplayPropertiesKHR**)&check_pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6251 | if (pProperties) |
| 6252 | { |
| 6253 | if (!(check_pProperties)) |
| 6254 | { |
| 6255 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6256 | } |
| 6257 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6258 | { |
| 6259 | unmarshal_VkDisplayPropertiesKHR(stream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6260 | } |
| 6261 | } |
| 6262 | VkResult vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return = (VkResult)0; |
| 6263 | stream->read(&vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6264 | return vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return; |
| 6265 | } |
| 6266 | |
| 6267 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 6268 | VkPhysicalDevice physicalDevice, |
| 6269 | uint32_t* pPropertyCount, |
| 6270 | VkDisplayPlanePropertiesKHR* pProperties) |
| 6271 | { |
| 6272 | auto stream = mImpl->stream(); |
| 6273 | auto countingStream = mImpl->countingStream(); |
| 6274 | countingStream->rewind(); |
| 6275 | { |
| 6276 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6277 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6278 | if (pPropertyCount) |
| 6279 | { |
| 6280 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6281 | } |
| 6282 | countingStream->write((VkDisplayPlanePropertiesKHR**)&pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6283 | if (pProperties) |
| 6284 | { |
| 6285 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6286 | { |
| 6287 | marshal_VkDisplayPlanePropertiesKHR(countingStream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6288 | } |
| 6289 | } |
| 6290 | } |
| 6291 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6292 | countingStream->rewind(); |
| 6293 | uint32_t opcode_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = OP_vkGetPhysicalDeviceDisplayPlanePropertiesKHR; |
| 6294 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, sizeof(uint32_t)); |
| 6295 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, sizeof(uint32_t)); |
| 6296 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6297 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6298 | if (pPropertyCount) |
| 6299 | { |
| 6300 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6301 | } |
| 6302 | stream->write((VkDisplayPlanePropertiesKHR**)&pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6303 | if (pProperties) |
| 6304 | { |
| 6305 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6306 | { |
| 6307 | marshal_VkDisplayPlanePropertiesKHR(stream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6308 | } |
| 6309 | } |
| 6310 | uint32_t* check_pPropertyCount; |
| 6311 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6312 | if (pPropertyCount) |
| 6313 | { |
| 6314 | if (!(check_pPropertyCount)) |
| 6315 | { |
| 6316 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6317 | } |
| 6318 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6319 | } |
| 6320 | VkDisplayPlanePropertiesKHR* check_pProperties; |
| 6321 | stream->read((VkDisplayPlanePropertiesKHR**)&check_pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6322 | if (pProperties) |
| 6323 | { |
| 6324 | if (!(check_pProperties)) |
| 6325 | { |
| 6326 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6327 | } |
| 6328 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6329 | { |
| 6330 | unmarshal_VkDisplayPlanePropertiesKHR(stream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6331 | } |
| 6332 | } |
| 6333 | VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return = (VkResult)0; |
| 6334 | stream->read(&vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6335 | return vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return; |
| 6336 | } |
| 6337 | |
| 6338 | VkResult VkEncoder::vkGetDisplayPlaneSupportedDisplaysKHR( |
| 6339 | VkPhysicalDevice physicalDevice, |
| 6340 | uint32_t planeIndex, |
| 6341 | uint32_t* pDisplayCount, |
| 6342 | VkDisplayKHR* pDisplays) |
| 6343 | { |
| 6344 | auto stream = mImpl->stream(); |
| 6345 | auto countingStream = mImpl->countingStream(); |
| 6346 | countingStream->rewind(); |
| 6347 | { |
| 6348 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6349 | countingStream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6350 | countingStream->write((uint32_t**)&pDisplayCount, sizeof(uint32_t*)); |
| 6351 | if (pDisplayCount) |
| 6352 | { |
| 6353 | countingStream->write((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6354 | } |
| 6355 | countingStream->write((VkDisplayKHR**)&pDisplays, sizeof(VkDisplayKHR*)); |
| 6356 | if (pDisplays) |
| 6357 | { |
| 6358 | countingStream->write((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6359 | } |
| 6360 | } |
| 6361 | uint32_t packetSize_vkGetDisplayPlaneSupportedDisplaysKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6362 | countingStream->rewind(); |
| 6363 | uint32_t opcode_vkGetDisplayPlaneSupportedDisplaysKHR = OP_vkGetDisplayPlaneSupportedDisplaysKHR; |
| 6364 | stream->write(&opcode_vkGetDisplayPlaneSupportedDisplaysKHR, sizeof(uint32_t)); |
| 6365 | stream->write(&packetSize_vkGetDisplayPlaneSupportedDisplaysKHR, sizeof(uint32_t)); |
| 6366 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6367 | stream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6368 | stream->write((uint32_t**)&pDisplayCount, sizeof(uint32_t*)); |
| 6369 | if (pDisplayCount) |
| 6370 | { |
| 6371 | stream->write((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6372 | } |
| 6373 | stream->write((VkDisplayKHR**)&pDisplays, sizeof(VkDisplayKHR*)); |
| 6374 | if (pDisplays) |
| 6375 | { |
| 6376 | stream->write((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6377 | } |
| 6378 | uint32_t* check_pDisplayCount; |
| 6379 | stream->read((uint32_t**)&check_pDisplayCount, sizeof(uint32_t*)); |
| 6380 | if (pDisplayCount) |
| 6381 | { |
| 6382 | if (!(check_pDisplayCount)) |
| 6383 | { |
| 6384 | fprintf(stderr, "fatal: pDisplayCount inconsistent between guest and host\n"); |
| 6385 | } |
| 6386 | stream->read((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6387 | } |
| 6388 | VkDisplayKHR* check_pDisplays; |
| 6389 | stream->read((VkDisplayKHR**)&check_pDisplays, sizeof(VkDisplayKHR*)); |
| 6390 | if (pDisplays) |
| 6391 | { |
| 6392 | if (!(check_pDisplays)) |
| 6393 | { |
| 6394 | fprintf(stderr, "fatal: pDisplays inconsistent between guest and host\n"); |
| 6395 | } |
| 6396 | stream->read((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6397 | } |
| 6398 | VkResult vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return = (VkResult)0; |
| 6399 | stream->read(&vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return, sizeof(VkResult)); |
| 6400 | return vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return; |
| 6401 | } |
| 6402 | |
| 6403 | VkResult VkEncoder::vkGetDisplayModePropertiesKHR( |
| 6404 | VkPhysicalDevice physicalDevice, |
| 6405 | VkDisplayKHR display, |
| 6406 | uint32_t* pPropertyCount, |
| 6407 | VkDisplayModePropertiesKHR* pProperties) |
| 6408 | { |
| 6409 | auto stream = mImpl->stream(); |
| 6410 | auto countingStream = mImpl->countingStream(); |
| 6411 | countingStream->rewind(); |
| 6412 | { |
| 6413 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6414 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6415 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6416 | if (pPropertyCount) |
| 6417 | { |
| 6418 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6419 | } |
| 6420 | countingStream->write((VkDisplayModePropertiesKHR**)&pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6421 | if (pProperties) |
| 6422 | { |
| 6423 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6424 | { |
| 6425 | marshal_VkDisplayModePropertiesKHR(countingStream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6426 | } |
| 6427 | } |
| 6428 | } |
| 6429 | uint32_t packetSize_vkGetDisplayModePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6430 | countingStream->rewind(); |
| 6431 | uint32_t opcode_vkGetDisplayModePropertiesKHR = OP_vkGetDisplayModePropertiesKHR; |
| 6432 | stream->write(&opcode_vkGetDisplayModePropertiesKHR, sizeof(uint32_t)); |
| 6433 | stream->write(&packetSize_vkGetDisplayModePropertiesKHR, sizeof(uint32_t)); |
| 6434 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6435 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6436 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6437 | if (pPropertyCount) |
| 6438 | { |
| 6439 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6440 | } |
| 6441 | stream->write((VkDisplayModePropertiesKHR**)&pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6442 | if (pProperties) |
| 6443 | { |
| 6444 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6445 | { |
| 6446 | marshal_VkDisplayModePropertiesKHR(stream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6447 | } |
| 6448 | } |
| 6449 | uint32_t* check_pPropertyCount; |
| 6450 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6451 | if (pPropertyCount) |
| 6452 | { |
| 6453 | if (!(check_pPropertyCount)) |
| 6454 | { |
| 6455 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6456 | } |
| 6457 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6458 | } |
| 6459 | VkDisplayModePropertiesKHR* check_pProperties; |
| 6460 | stream->read((VkDisplayModePropertiesKHR**)&check_pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6461 | if (pProperties) |
| 6462 | { |
| 6463 | if (!(check_pProperties)) |
| 6464 | { |
| 6465 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6466 | } |
| 6467 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6468 | { |
| 6469 | unmarshal_VkDisplayModePropertiesKHR(stream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6470 | } |
| 6471 | } |
| 6472 | VkResult vkGetDisplayModePropertiesKHR_VkResult_return = (VkResult)0; |
| 6473 | stream->read(&vkGetDisplayModePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6474 | return vkGetDisplayModePropertiesKHR_VkResult_return; |
| 6475 | } |
| 6476 | |
| 6477 | VkResult VkEncoder::vkCreateDisplayModeKHR( |
| 6478 | VkPhysicalDevice physicalDevice, |
| 6479 | VkDisplayKHR display, |
| 6480 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
| 6481 | const VkAllocationCallbacks* pAllocator, |
| 6482 | VkDisplayModeKHR* pMode) |
| 6483 | { |
| 6484 | auto stream = mImpl->stream(); |
| 6485 | auto countingStream = mImpl->countingStream(); |
| 6486 | countingStream->rewind(); |
| 6487 | { |
| 6488 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6489 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6490 | marshal_VkDisplayModeCreateInfoKHR(countingStream, (const VkDisplayModeCreateInfoKHR*)(pCreateInfo)); |
| 6491 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6492 | if (pAllocator) |
| 6493 | { |
| 6494 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6495 | } |
| 6496 | countingStream->write((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6497 | } |
| 6498 | uint32_t packetSize_vkCreateDisplayModeKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6499 | countingStream->rewind(); |
| 6500 | uint32_t opcode_vkCreateDisplayModeKHR = OP_vkCreateDisplayModeKHR; |
| 6501 | stream->write(&opcode_vkCreateDisplayModeKHR, sizeof(uint32_t)); |
| 6502 | stream->write(&packetSize_vkCreateDisplayModeKHR, sizeof(uint32_t)); |
| 6503 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6504 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6505 | marshal_VkDisplayModeCreateInfoKHR(stream, (const VkDisplayModeCreateInfoKHR*)(pCreateInfo)); |
| 6506 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6507 | if (pAllocator) |
| 6508 | { |
| 6509 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6510 | } |
| 6511 | stream->write((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6512 | stream->read((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6513 | VkResult vkCreateDisplayModeKHR_VkResult_return = (VkResult)0; |
| 6514 | stream->read(&vkCreateDisplayModeKHR_VkResult_return, sizeof(VkResult)); |
| 6515 | return vkCreateDisplayModeKHR_VkResult_return; |
| 6516 | } |
| 6517 | |
| 6518 | VkResult VkEncoder::vkGetDisplayPlaneCapabilitiesKHR( |
| 6519 | VkPhysicalDevice physicalDevice, |
| 6520 | VkDisplayModeKHR mode, |
| 6521 | uint32_t planeIndex, |
| 6522 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) |
| 6523 | { |
| 6524 | auto stream = mImpl->stream(); |
| 6525 | auto countingStream = mImpl->countingStream(); |
| 6526 | countingStream->rewind(); |
| 6527 | { |
| 6528 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6529 | countingStream->write((VkDisplayModeKHR*)&mode, sizeof(VkDisplayModeKHR)); |
| 6530 | countingStream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6531 | marshal_VkDisplayPlaneCapabilitiesKHR(countingStream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6532 | } |
| 6533 | uint32_t packetSize_vkGetDisplayPlaneCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6534 | countingStream->rewind(); |
| 6535 | uint32_t opcode_vkGetDisplayPlaneCapabilitiesKHR = OP_vkGetDisplayPlaneCapabilitiesKHR; |
| 6536 | stream->write(&opcode_vkGetDisplayPlaneCapabilitiesKHR, sizeof(uint32_t)); |
| 6537 | stream->write(&packetSize_vkGetDisplayPlaneCapabilitiesKHR, sizeof(uint32_t)); |
| 6538 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6539 | stream->write((VkDisplayModeKHR*)&mode, sizeof(VkDisplayModeKHR)); |
| 6540 | stream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6541 | marshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6542 | unmarshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6543 | VkResult vkGetDisplayPlaneCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 6544 | stream->read(&vkGetDisplayPlaneCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 6545 | return vkGetDisplayPlaneCapabilitiesKHR_VkResult_return; |
| 6546 | } |
| 6547 | |
| 6548 | VkResult VkEncoder::vkCreateDisplayPlaneSurfaceKHR( |
| 6549 | VkInstance instance, |
| 6550 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
| 6551 | const VkAllocationCallbacks* pAllocator, |
| 6552 | VkSurfaceKHR* pSurface) |
| 6553 | { |
| 6554 | auto stream = mImpl->stream(); |
| 6555 | auto countingStream = mImpl->countingStream(); |
| 6556 | countingStream->rewind(); |
| 6557 | { |
| 6558 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6559 | marshal_VkDisplaySurfaceCreateInfoKHR(countingStream, (const VkDisplaySurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6560 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6561 | if (pAllocator) |
| 6562 | { |
| 6563 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6564 | } |
| 6565 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6566 | } |
| 6567 | uint32_t packetSize_vkCreateDisplayPlaneSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6568 | countingStream->rewind(); |
| 6569 | uint32_t opcode_vkCreateDisplayPlaneSurfaceKHR = OP_vkCreateDisplayPlaneSurfaceKHR; |
| 6570 | stream->write(&opcode_vkCreateDisplayPlaneSurfaceKHR, sizeof(uint32_t)); |
| 6571 | stream->write(&packetSize_vkCreateDisplayPlaneSurfaceKHR, sizeof(uint32_t)); |
| 6572 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6573 | marshal_VkDisplaySurfaceCreateInfoKHR(stream, (const VkDisplaySurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6574 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6575 | if (pAllocator) |
| 6576 | { |
| 6577 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6578 | } |
| 6579 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6580 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6581 | VkResult vkCreateDisplayPlaneSurfaceKHR_VkResult_return = (VkResult)0; |
| 6582 | stream->read(&vkCreateDisplayPlaneSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6583 | return vkCreateDisplayPlaneSurfaceKHR_VkResult_return; |
| 6584 | } |
| 6585 | |
| 6586 | #endif |
| 6587 | #ifdef VK_KHR_display_swapchain |
| 6588 | VkResult VkEncoder::vkCreateSharedSwapchainsKHR( |
| 6589 | VkDevice device, |
| 6590 | uint32_t swapchainCount, |
| 6591 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 6592 | const VkAllocationCallbacks* pAllocator, |
| 6593 | VkSwapchainKHR* pSwapchains) |
| 6594 | { |
| 6595 | auto stream = mImpl->stream(); |
| 6596 | auto countingStream = mImpl->countingStream(); |
| 6597 | countingStream->rewind(); |
| 6598 | { |
| 6599 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6600 | countingStream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 6601 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 6602 | { |
| 6603 | marshal_VkSwapchainCreateInfoKHR(countingStream, (const VkSwapchainCreateInfoKHR*)(pCreateInfos + i)); |
| 6604 | } |
| 6605 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6606 | if (pAllocator) |
| 6607 | { |
| 6608 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6609 | } |
| 6610 | countingStream->write((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6611 | } |
| 6612 | uint32_t packetSize_vkCreateSharedSwapchainsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6613 | countingStream->rewind(); |
| 6614 | uint32_t opcode_vkCreateSharedSwapchainsKHR = OP_vkCreateSharedSwapchainsKHR; |
| 6615 | stream->write(&opcode_vkCreateSharedSwapchainsKHR, sizeof(uint32_t)); |
| 6616 | stream->write(&packetSize_vkCreateSharedSwapchainsKHR, sizeof(uint32_t)); |
| 6617 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6618 | stream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 6619 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 6620 | { |
| 6621 | marshal_VkSwapchainCreateInfoKHR(stream, (const VkSwapchainCreateInfoKHR*)(pCreateInfos + i)); |
| 6622 | } |
| 6623 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6624 | if (pAllocator) |
| 6625 | { |
| 6626 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6627 | } |
| 6628 | stream->write((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6629 | stream->read((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6630 | VkResult vkCreateSharedSwapchainsKHR_VkResult_return = (VkResult)0; |
| 6631 | stream->read(&vkCreateSharedSwapchainsKHR_VkResult_return, sizeof(VkResult)); |
| 6632 | return vkCreateSharedSwapchainsKHR_VkResult_return; |
| 6633 | } |
| 6634 | |
| 6635 | #endif |
| 6636 | #ifdef VK_KHR_xlib_surface |
| 6637 | VkResult VkEncoder::vkCreateXlibSurfaceKHR( |
| 6638 | VkInstance instance, |
| 6639 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
| 6640 | const VkAllocationCallbacks* pAllocator, |
| 6641 | VkSurfaceKHR* pSurface) |
| 6642 | { |
| 6643 | auto stream = mImpl->stream(); |
| 6644 | auto countingStream = mImpl->countingStream(); |
| 6645 | countingStream->rewind(); |
| 6646 | { |
| 6647 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6648 | marshal_VkXlibSurfaceCreateInfoKHR(countingStream, (const VkXlibSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6649 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6650 | if (pAllocator) |
| 6651 | { |
| 6652 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6653 | } |
| 6654 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6655 | } |
| 6656 | uint32_t packetSize_vkCreateXlibSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6657 | countingStream->rewind(); |
| 6658 | uint32_t opcode_vkCreateXlibSurfaceKHR = OP_vkCreateXlibSurfaceKHR; |
| 6659 | stream->write(&opcode_vkCreateXlibSurfaceKHR, sizeof(uint32_t)); |
| 6660 | stream->write(&packetSize_vkCreateXlibSurfaceKHR, sizeof(uint32_t)); |
| 6661 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6662 | marshal_VkXlibSurfaceCreateInfoKHR(stream, (const VkXlibSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6663 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6664 | if (pAllocator) |
| 6665 | { |
| 6666 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6667 | } |
| 6668 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6669 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6670 | VkResult vkCreateXlibSurfaceKHR_VkResult_return = (VkResult)0; |
| 6671 | stream->read(&vkCreateXlibSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6672 | return vkCreateXlibSurfaceKHR_VkResult_return; |
| 6673 | } |
| 6674 | |
| 6675 | VkBool32 VkEncoder::vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 6676 | VkPhysicalDevice physicalDevice, |
| 6677 | uint32_t queueFamilyIndex, |
| 6678 | Display* dpy, |
| 6679 | VisualID visualID) |
| 6680 | { |
| 6681 | auto stream = mImpl->stream(); |
| 6682 | auto countingStream = mImpl->countingStream(); |
| 6683 | countingStream->rewind(); |
| 6684 | { |
| 6685 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6686 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6687 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 6688 | countingStream->write((VisualID*)&visualID, sizeof(VisualID)); |
| 6689 | } |
| 6690 | uint32_t packetSize_vkGetPhysicalDeviceXlibPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6691 | countingStream->rewind(); |
| 6692 | uint32_t opcode_vkGetPhysicalDeviceXlibPresentationSupportKHR = OP_vkGetPhysicalDeviceXlibPresentationSupportKHR; |
| 6693 | stream->write(&opcode_vkGetPhysicalDeviceXlibPresentationSupportKHR, sizeof(uint32_t)); |
| 6694 | stream->write(&packetSize_vkGetPhysicalDeviceXlibPresentationSupportKHR, sizeof(uint32_t)); |
| 6695 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6696 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6697 | stream->write((Display*)dpy, sizeof(Display)); |
| 6698 | stream->write((VisualID*)&visualID, sizeof(VisualID)); |
| 6699 | stream->read((Display*)dpy, sizeof(Display)); |
| 6700 | VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6701 | stream->read(&vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6702 | return vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return; |
| 6703 | } |
| 6704 | |
| 6705 | #endif |
| 6706 | #ifdef VK_KHR_xcb_surface |
| 6707 | VkResult VkEncoder::vkCreateXcbSurfaceKHR( |
| 6708 | VkInstance instance, |
| 6709 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
| 6710 | const VkAllocationCallbacks* pAllocator, |
| 6711 | VkSurfaceKHR* pSurface) |
| 6712 | { |
| 6713 | auto stream = mImpl->stream(); |
| 6714 | auto countingStream = mImpl->countingStream(); |
| 6715 | countingStream->rewind(); |
| 6716 | { |
| 6717 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6718 | marshal_VkXcbSurfaceCreateInfoKHR(countingStream, (const VkXcbSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6719 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6720 | if (pAllocator) |
| 6721 | { |
| 6722 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6723 | } |
| 6724 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6725 | } |
| 6726 | uint32_t packetSize_vkCreateXcbSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6727 | countingStream->rewind(); |
| 6728 | uint32_t opcode_vkCreateXcbSurfaceKHR = OP_vkCreateXcbSurfaceKHR; |
| 6729 | stream->write(&opcode_vkCreateXcbSurfaceKHR, sizeof(uint32_t)); |
| 6730 | stream->write(&packetSize_vkCreateXcbSurfaceKHR, sizeof(uint32_t)); |
| 6731 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6732 | marshal_VkXcbSurfaceCreateInfoKHR(stream, (const VkXcbSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6733 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6734 | if (pAllocator) |
| 6735 | { |
| 6736 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6737 | } |
| 6738 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6739 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6740 | VkResult vkCreateXcbSurfaceKHR_VkResult_return = (VkResult)0; |
| 6741 | stream->read(&vkCreateXcbSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6742 | return vkCreateXcbSurfaceKHR_VkResult_return; |
| 6743 | } |
| 6744 | |
| 6745 | VkBool32 VkEncoder::vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 6746 | VkPhysicalDevice physicalDevice, |
| 6747 | uint32_t queueFamilyIndex, |
| 6748 | xcb_connection_t* connection, |
| 6749 | xcb_visualid_t visual_id) |
| 6750 | { |
| 6751 | auto stream = mImpl->stream(); |
| 6752 | auto countingStream = mImpl->countingStream(); |
| 6753 | countingStream->rewind(); |
| 6754 | { |
| 6755 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6756 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6757 | countingStream->write((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6758 | countingStream->write((xcb_visualid_t*)&visual_id, sizeof(xcb_visualid_t)); |
| 6759 | } |
| 6760 | uint32_t packetSize_vkGetPhysicalDeviceXcbPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6761 | countingStream->rewind(); |
| 6762 | uint32_t opcode_vkGetPhysicalDeviceXcbPresentationSupportKHR = OP_vkGetPhysicalDeviceXcbPresentationSupportKHR; |
| 6763 | stream->write(&opcode_vkGetPhysicalDeviceXcbPresentationSupportKHR, sizeof(uint32_t)); |
| 6764 | stream->write(&packetSize_vkGetPhysicalDeviceXcbPresentationSupportKHR, sizeof(uint32_t)); |
| 6765 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6766 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6767 | stream->write((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6768 | stream->write((xcb_visualid_t*)&visual_id, sizeof(xcb_visualid_t)); |
| 6769 | stream->read((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6770 | VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6771 | stream->read(&vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6772 | return vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return; |
| 6773 | } |
| 6774 | |
| 6775 | #endif |
| 6776 | #ifdef VK_KHR_wayland_surface |
| 6777 | VkResult VkEncoder::vkCreateWaylandSurfaceKHR( |
| 6778 | VkInstance instance, |
| 6779 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
| 6780 | const VkAllocationCallbacks* pAllocator, |
| 6781 | VkSurfaceKHR* pSurface) |
| 6782 | { |
| 6783 | auto stream = mImpl->stream(); |
| 6784 | auto countingStream = mImpl->countingStream(); |
| 6785 | countingStream->rewind(); |
| 6786 | { |
| 6787 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6788 | marshal_VkWaylandSurfaceCreateInfoKHR(countingStream, (const VkWaylandSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6789 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6790 | if (pAllocator) |
| 6791 | { |
| 6792 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6793 | } |
| 6794 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6795 | } |
| 6796 | uint32_t packetSize_vkCreateWaylandSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6797 | countingStream->rewind(); |
| 6798 | uint32_t opcode_vkCreateWaylandSurfaceKHR = OP_vkCreateWaylandSurfaceKHR; |
| 6799 | stream->write(&opcode_vkCreateWaylandSurfaceKHR, sizeof(uint32_t)); |
| 6800 | stream->write(&packetSize_vkCreateWaylandSurfaceKHR, sizeof(uint32_t)); |
| 6801 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6802 | marshal_VkWaylandSurfaceCreateInfoKHR(stream, (const VkWaylandSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6803 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6804 | if (pAllocator) |
| 6805 | { |
| 6806 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6807 | } |
| 6808 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6809 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6810 | VkResult vkCreateWaylandSurfaceKHR_VkResult_return = (VkResult)0; |
| 6811 | stream->read(&vkCreateWaylandSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6812 | return vkCreateWaylandSurfaceKHR_VkResult_return; |
| 6813 | } |
| 6814 | |
| 6815 | VkBool32 VkEncoder::vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 6816 | VkPhysicalDevice physicalDevice, |
| 6817 | uint32_t queueFamilyIndex, |
| 6818 | wl_display* display) |
| 6819 | { |
| 6820 | auto stream = mImpl->stream(); |
| 6821 | auto countingStream = mImpl->countingStream(); |
| 6822 | countingStream->rewind(); |
| 6823 | { |
| 6824 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6825 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6826 | countingStream->write((wl_display*)display, sizeof(wl_display)); |
| 6827 | } |
| 6828 | uint32_t packetSize_vkGetPhysicalDeviceWaylandPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6829 | countingStream->rewind(); |
| 6830 | uint32_t opcode_vkGetPhysicalDeviceWaylandPresentationSupportKHR = OP_vkGetPhysicalDeviceWaylandPresentationSupportKHR; |
| 6831 | stream->write(&opcode_vkGetPhysicalDeviceWaylandPresentationSupportKHR, sizeof(uint32_t)); |
| 6832 | stream->write(&packetSize_vkGetPhysicalDeviceWaylandPresentationSupportKHR, sizeof(uint32_t)); |
| 6833 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6834 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6835 | stream->write((wl_display*)display, sizeof(wl_display)); |
| 6836 | stream->read((wl_display*)display, sizeof(wl_display)); |
| 6837 | VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6838 | stream->read(&vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6839 | return vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return; |
| 6840 | } |
| 6841 | |
| 6842 | #endif |
| 6843 | #ifdef VK_KHR_mir_surface |
| 6844 | VkResult VkEncoder::vkCreateMirSurfaceKHR( |
| 6845 | VkInstance instance, |
| 6846 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
| 6847 | const VkAllocationCallbacks* pAllocator, |
| 6848 | VkSurfaceKHR* pSurface) |
| 6849 | { |
| 6850 | auto stream = mImpl->stream(); |
| 6851 | auto countingStream = mImpl->countingStream(); |
| 6852 | countingStream->rewind(); |
| 6853 | { |
| 6854 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6855 | marshal_VkMirSurfaceCreateInfoKHR(countingStream, (const VkMirSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6856 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6857 | if (pAllocator) |
| 6858 | { |
| 6859 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6860 | } |
| 6861 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6862 | } |
| 6863 | uint32_t packetSize_vkCreateMirSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6864 | countingStream->rewind(); |
| 6865 | uint32_t opcode_vkCreateMirSurfaceKHR = OP_vkCreateMirSurfaceKHR; |
| 6866 | stream->write(&opcode_vkCreateMirSurfaceKHR, sizeof(uint32_t)); |
| 6867 | stream->write(&packetSize_vkCreateMirSurfaceKHR, sizeof(uint32_t)); |
| 6868 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6869 | marshal_VkMirSurfaceCreateInfoKHR(stream, (const VkMirSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6870 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6871 | if (pAllocator) |
| 6872 | { |
| 6873 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6874 | } |
| 6875 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6876 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6877 | VkResult vkCreateMirSurfaceKHR_VkResult_return = (VkResult)0; |
| 6878 | stream->read(&vkCreateMirSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6879 | return vkCreateMirSurfaceKHR_VkResult_return; |
| 6880 | } |
| 6881 | |
| 6882 | VkBool32 VkEncoder::vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 6883 | VkPhysicalDevice physicalDevice, |
| 6884 | uint32_t queueFamilyIndex, |
| 6885 | MirConnection* connection) |
| 6886 | { |
| 6887 | auto stream = mImpl->stream(); |
| 6888 | auto countingStream = mImpl->countingStream(); |
| 6889 | countingStream->rewind(); |
| 6890 | { |
| 6891 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6892 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6893 | countingStream->write((MirConnection*)connection, sizeof(MirConnection)); |
| 6894 | } |
| 6895 | uint32_t packetSize_vkGetPhysicalDeviceMirPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6896 | countingStream->rewind(); |
| 6897 | uint32_t opcode_vkGetPhysicalDeviceMirPresentationSupportKHR = OP_vkGetPhysicalDeviceMirPresentationSupportKHR; |
| 6898 | stream->write(&opcode_vkGetPhysicalDeviceMirPresentationSupportKHR, sizeof(uint32_t)); |
| 6899 | stream->write(&packetSize_vkGetPhysicalDeviceMirPresentationSupportKHR, sizeof(uint32_t)); |
| 6900 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6901 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6902 | stream->write((MirConnection*)connection, sizeof(MirConnection)); |
| 6903 | stream->read((MirConnection*)connection, sizeof(MirConnection)); |
| 6904 | VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6905 | stream->read(&vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6906 | return vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return; |
| 6907 | } |
| 6908 | |
| 6909 | #endif |
| 6910 | #ifdef VK_KHR_android_surface |
| 6911 | VkResult VkEncoder::vkCreateAndroidSurfaceKHR( |
| 6912 | VkInstance instance, |
| 6913 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
| 6914 | const VkAllocationCallbacks* pAllocator, |
| 6915 | VkSurfaceKHR* pSurface) |
| 6916 | { |
| 6917 | auto stream = mImpl->stream(); |
| 6918 | auto countingStream = mImpl->countingStream(); |
| 6919 | countingStream->rewind(); |
| 6920 | { |
| 6921 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6922 | marshal_VkAndroidSurfaceCreateInfoKHR(countingStream, (const VkAndroidSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6923 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6924 | if (pAllocator) |
| 6925 | { |
| 6926 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6927 | } |
| 6928 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6929 | } |
| 6930 | uint32_t packetSize_vkCreateAndroidSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6931 | countingStream->rewind(); |
| 6932 | uint32_t opcode_vkCreateAndroidSurfaceKHR = OP_vkCreateAndroidSurfaceKHR; |
| 6933 | stream->write(&opcode_vkCreateAndroidSurfaceKHR, sizeof(uint32_t)); |
| 6934 | stream->write(&packetSize_vkCreateAndroidSurfaceKHR, sizeof(uint32_t)); |
| 6935 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6936 | marshal_VkAndroidSurfaceCreateInfoKHR(stream, (const VkAndroidSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6937 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6938 | if (pAllocator) |
| 6939 | { |
| 6940 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6941 | } |
| 6942 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6943 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6944 | VkResult vkCreateAndroidSurfaceKHR_VkResult_return = (VkResult)0; |
| 6945 | stream->read(&vkCreateAndroidSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6946 | return vkCreateAndroidSurfaceKHR_VkResult_return; |
| 6947 | } |
| 6948 | |
| 6949 | #endif |
| 6950 | #ifdef VK_KHR_win32_surface |
| 6951 | VkResult VkEncoder::vkCreateWin32SurfaceKHR( |
| 6952 | VkInstance instance, |
| 6953 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
| 6954 | const VkAllocationCallbacks* pAllocator, |
| 6955 | VkSurfaceKHR* pSurface) |
| 6956 | { |
| 6957 | auto stream = mImpl->stream(); |
| 6958 | auto countingStream = mImpl->countingStream(); |
| 6959 | countingStream->rewind(); |
| 6960 | { |
| 6961 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6962 | marshal_VkWin32SurfaceCreateInfoKHR(countingStream, (const VkWin32SurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6963 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6964 | if (pAllocator) |
| 6965 | { |
| 6966 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6967 | } |
| 6968 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6969 | } |
| 6970 | uint32_t packetSize_vkCreateWin32SurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6971 | countingStream->rewind(); |
| 6972 | uint32_t opcode_vkCreateWin32SurfaceKHR = OP_vkCreateWin32SurfaceKHR; |
| 6973 | stream->write(&opcode_vkCreateWin32SurfaceKHR, sizeof(uint32_t)); |
| 6974 | stream->write(&packetSize_vkCreateWin32SurfaceKHR, sizeof(uint32_t)); |
| 6975 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6976 | marshal_VkWin32SurfaceCreateInfoKHR(stream, (const VkWin32SurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6977 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6978 | if (pAllocator) |
| 6979 | { |
| 6980 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6981 | } |
| 6982 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6983 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6984 | VkResult vkCreateWin32SurfaceKHR_VkResult_return = (VkResult)0; |
| 6985 | stream->read(&vkCreateWin32SurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6986 | return vkCreateWin32SurfaceKHR_VkResult_return; |
| 6987 | } |
| 6988 | |
| 6989 | VkBool32 VkEncoder::vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 6990 | VkPhysicalDevice physicalDevice, |
| 6991 | uint32_t queueFamilyIndex) |
| 6992 | { |
| 6993 | auto stream = mImpl->stream(); |
| 6994 | auto countingStream = mImpl->countingStream(); |
| 6995 | countingStream->rewind(); |
| 6996 | { |
| 6997 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6998 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6999 | } |
| 7000 | uint32_t packetSize_vkGetPhysicalDeviceWin32PresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7001 | countingStream->rewind(); |
| 7002 | uint32_t opcode_vkGetPhysicalDeviceWin32PresentationSupportKHR = OP_vkGetPhysicalDeviceWin32PresentationSupportKHR; |
| 7003 | stream->write(&opcode_vkGetPhysicalDeviceWin32PresentationSupportKHR, sizeof(uint32_t)); |
| 7004 | stream->write(&packetSize_vkGetPhysicalDeviceWin32PresentationSupportKHR, sizeof(uint32_t)); |
| 7005 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7006 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 7007 | VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 7008 | stream->read(&vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 7009 | return vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return; |
| 7010 | } |
| 7011 | |
| 7012 | #endif |
| 7013 | #ifdef VK_KHR_sampler_mirror_clamp_to_edge |
| 7014 | #endif |
| 7015 | #ifdef VK_KHR_multiview |
| 7016 | #endif |
| 7017 | #ifdef VK_KHR_get_physical_device_properties2 |
| 7018 | void VkEncoder::vkGetPhysicalDeviceFeatures2KHR( |
| 7019 | VkPhysicalDevice physicalDevice, |
| 7020 | VkPhysicalDeviceFeatures2* pFeatures) |
| 7021 | { |
| 7022 | auto stream = mImpl->stream(); |
| 7023 | auto countingStream = mImpl->countingStream(); |
| 7024 | countingStream->rewind(); |
| 7025 | { |
| 7026 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7027 | marshal_VkPhysicalDeviceFeatures2(countingStream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7028 | } |
| 7029 | uint32_t packetSize_vkGetPhysicalDeviceFeatures2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7030 | countingStream->rewind(); |
| 7031 | uint32_t opcode_vkGetPhysicalDeviceFeatures2KHR = OP_vkGetPhysicalDeviceFeatures2KHR; |
| 7032 | stream->write(&opcode_vkGetPhysicalDeviceFeatures2KHR, sizeof(uint32_t)); |
| 7033 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures2KHR, sizeof(uint32_t)); |
| 7034 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7035 | marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7036 | unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7037 | } |
| 7038 | |
| 7039 | void VkEncoder::vkGetPhysicalDeviceProperties2KHR( |
| 7040 | VkPhysicalDevice physicalDevice, |
| 7041 | VkPhysicalDeviceProperties2* pProperties) |
| 7042 | { |
| 7043 | auto stream = mImpl->stream(); |
| 7044 | auto countingStream = mImpl->countingStream(); |
| 7045 | countingStream->rewind(); |
| 7046 | { |
| 7047 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7048 | marshal_VkPhysicalDeviceProperties2(countingStream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7049 | } |
| 7050 | uint32_t packetSize_vkGetPhysicalDeviceProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7051 | countingStream->rewind(); |
| 7052 | uint32_t opcode_vkGetPhysicalDeviceProperties2KHR = OP_vkGetPhysicalDeviceProperties2KHR; |
| 7053 | stream->write(&opcode_vkGetPhysicalDeviceProperties2KHR, sizeof(uint32_t)); |
| 7054 | stream->write(&packetSize_vkGetPhysicalDeviceProperties2KHR, sizeof(uint32_t)); |
| 7055 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7056 | marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7057 | unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7058 | } |
| 7059 | |
| 7060 | void VkEncoder::vkGetPhysicalDeviceFormatProperties2KHR( |
| 7061 | VkPhysicalDevice physicalDevice, |
| 7062 | VkFormat format, |
| 7063 | VkFormatProperties2* pFormatProperties) |
| 7064 | { |
| 7065 | auto stream = mImpl->stream(); |
| 7066 | auto countingStream = mImpl->countingStream(); |
| 7067 | countingStream->rewind(); |
| 7068 | { |
| 7069 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7070 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 7071 | marshal_VkFormatProperties2(countingStream, (VkFormatProperties2*)(pFormatProperties)); |
| 7072 | } |
| 7073 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7074 | countingStream->rewind(); |
| 7075 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties2KHR = OP_vkGetPhysicalDeviceFormatProperties2KHR; |
| 7076 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties2KHR, sizeof(uint32_t)); |
| 7077 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties2KHR, sizeof(uint32_t)); |
| 7078 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7079 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 7080 | marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 7081 | unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 7082 | } |
| 7083 | |
| 7084 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 7085 | VkPhysicalDevice physicalDevice, |
| 7086 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 7087 | VkImageFormatProperties2* pImageFormatProperties) |
| 7088 | { |
| 7089 | auto stream = mImpl->stream(); |
| 7090 | auto countingStream = mImpl->countingStream(); |
| 7091 | countingStream->rewind(); |
| 7092 | { |
| 7093 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7094 | marshal_VkPhysicalDeviceImageFormatInfo2(countingStream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 7095 | marshal_VkImageFormatProperties2(countingStream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7096 | } |
| 7097 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7098 | countingStream->rewind(); |
| 7099 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties2KHR = OP_vkGetPhysicalDeviceImageFormatProperties2KHR; |
| 7100 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7101 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7102 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7103 | marshal_VkPhysicalDeviceImageFormatInfo2(stream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 7104 | marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7105 | unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7106 | VkResult vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return = (VkResult)0; |
| 7107 | stream->read(&vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 7108 | return vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return; |
| 7109 | } |
| 7110 | |
| 7111 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 7112 | VkPhysicalDevice physicalDevice, |
| 7113 | uint32_t* pQueueFamilyPropertyCount, |
| 7114 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 7115 | { |
| 7116 | auto stream = mImpl->stream(); |
| 7117 | auto countingStream = mImpl->countingStream(); |
| 7118 | countingStream->rewind(); |
| 7119 | { |
| 7120 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7121 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7122 | if (pQueueFamilyPropertyCount) |
| 7123 | { |
| 7124 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7125 | } |
| 7126 | countingStream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7127 | if (pQueueFamilyProperties) |
| 7128 | { |
| 7129 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7130 | { |
| 7131 | marshal_VkQueueFamilyProperties2(countingStream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7132 | } |
| 7133 | } |
| 7134 | } |
| 7135 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7136 | countingStream->rewind(); |
| 7137 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties2KHR = OP_vkGetPhysicalDeviceQueueFamilyProperties2KHR; |
| 7138 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties2KHR, sizeof(uint32_t)); |
| 7139 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties2KHR, sizeof(uint32_t)); |
| 7140 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7141 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7142 | if (pQueueFamilyPropertyCount) |
| 7143 | { |
| 7144 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7145 | } |
| 7146 | stream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7147 | if (pQueueFamilyProperties) |
| 7148 | { |
| 7149 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7150 | { |
| 7151 | marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7152 | } |
| 7153 | } |
| 7154 | uint32_t* check_pQueueFamilyPropertyCount; |
| 7155 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7156 | if (pQueueFamilyPropertyCount) |
| 7157 | { |
| 7158 | if (!(check_pQueueFamilyPropertyCount)) |
| 7159 | { |
| 7160 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 7161 | } |
| 7162 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7163 | } |
| 7164 | VkQueueFamilyProperties2* check_pQueueFamilyProperties; |
| 7165 | stream->read((VkQueueFamilyProperties2**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7166 | if (pQueueFamilyProperties) |
| 7167 | { |
| 7168 | if (!(check_pQueueFamilyProperties)) |
| 7169 | { |
| 7170 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 7171 | } |
| 7172 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7173 | { |
| 7174 | unmarshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7175 | } |
| 7176 | } |
| 7177 | } |
| 7178 | |
| 7179 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties2KHR( |
| 7180 | VkPhysicalDevice physicalDevice, |
| 7181 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 7182 | { |
| 7183 | auto stream = mImpl->stream(); |
| 7184 | auto countingStream = mImpl->countingStream(); |
| 7185 | countingStream->rewind(); |
| 7186 | { |
| 7187 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7188 | marshal_VkPhysicalDeviceMemoryProperties2(countingStream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7189 | } |
| 7190 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7191 | countingStream->rewind(); |
| 7192 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties2KHR = OP_vkGetPhysicalDeviceMemoryProperties2KHR; |
| 7193 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties2KHR, sizeof(uint32_t)); |
| 7194 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties2KHR, sizeof(uint32_t)); |
| 7195 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7196 | marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7197 | unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7198 | } |
| 7199 | |
| 7200 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 7201 | VkPhysicalDevice physicalDevice, |
| 7202 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 7203 | uint32_t* pPropertyCount, |
| 7204 | VkSparseImageFormatProperties2* pProperties) |
| 7205 | { |
| 7206 | auto stream = mImpl->stream(); |
| 7207 | auto countingStream = mImpl->countingStream(); |
| 7208 | countingStream->rewind(); |
| 7209 | { |
| 7210 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7211 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(countingStream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 7212 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 7213 | if (pPropertyCount) |
| 7214 | { |
| 7215 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7216 | } |
| 7217 | countingStream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7218 | if (pProperties) |
| 7219 | { |
| 7220 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7221 | { |
| 7222 | marshal_VkSparseImageFormatProperties2(countingStream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7223 | } |
| 7224 | } |
| 7225 | } |
| 7226 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7227 | countingStream->rewind(); |
| 7228 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = OP_vkGetPhysicalDeviceSparseImageFormatProperties2KHR; |
| 7229 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7230 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7231 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7232 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(stream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 7233 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 7234 | if (pPropertyCount) |
| 7235 | { |
| 7236 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7237 | } |
| 7238 | stream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7239 | if (pProperties) |
| 7240 | { |
| 7241 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7242 | { |
| 7243 | marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7244 | } |
| 7245 | } |
| 7246 | uint32_t* check_pPropertyCount; |
| 7247 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 7248 | if (pPropertyCount) |
| 7249 | { |
| 7250 | if (!(check_pPropertyCount)) |
| 7251 | { |
| 7252 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 7253 | } |
| 7254 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7255 | } |
| 7256 | VkSparseImageFormatProperties2* check_pProperties; |
| 7257 | stream->read((VkSparseImageFormatProperties2**)&check_pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7258 | if (pProperties) |
| 7259 | { |
| 7260 | if (!(check_pProperties)) |
| 7261 | { |
| 7262 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 7263 | } |
| 7264 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7265 | { |
| 7266 | unmarshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7267 | } |
| 7268 | } |
| 7269 | } |
| 7270 | |
| 7271 | #endif |
| 7272 | #ifdef VK_KHR_device_group |
| 7273 | void VkEncoder::vkGetDeviceGroupPeerMemoryFeaturesKHR( |
| 7274 | VkDevice device, |
| 7275 | uint32_t heapIndex, |
| 7276 | uint32_t localDeviceIndex, |
| 7277 | uint32_t remoteDeviceIndex, |
| 7278 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 7279 | { |
| 7280 | auto stream = mImpl->stream(); |
| 7281 | auto countingStream = mImpl->countingStream(); |
| 7282 | countingStream->rewind(); |
| 7283 | { |
| 7284 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7285 | countingStream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 7286 | countingStream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 7287 | countingStream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 7288 | countingStream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7289 | } |
| 7290 | uint32_t packetSize_vkGetDeviceGroupPeerMemoryFeaturesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7291 | countingStream->rewind(); |
| 7292 | uint32_t opcode_vkGetDeviceGroupPeerMemoryFeaturesKHR = OP_vkGetDeviceGroupPeerMemoryFeaturesKHR; |
| 7293 | stream->write(&opcode_vkGetDeviceGroupPeerMemoryFeaturesKHR, sizeof(uint32_t)); |
| 7294 | stream->write(&packetSize_vkGetDeviceGroupPeerMemoryFeaturesKHR, sizeof(uint32_t)); |
| 7295 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7296 | stream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 7297 | stream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 7298 | stream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 7299 | stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7300 | stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7301 | } |
| 7302 | |
| 7303 | void VkEncoder::vkCmdSetDeviceMaskKHR( |
| 7304 | VkCommandBuffer commandBuffer, |
| 7305 | uint32_t deviceMask) |
| 7306 | { |
| 7307 | auto stream = mImpl->stream(); |
| 7308 | auto countingStream = mImpl->countingStream(); |
| 7309 | countingStream->rewind(); |
| 7310 | { |
| 7311 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7312 | countingStream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 7313 | } |
| 7314 | uint32_t packetSize_vkCmdSetDeviceMaskKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7315 | countingStream->rewind(); |
| 7316 | uint32_t opcode_vkCmdSetDeviceMaskKHR = OP_vkCmdSetDeviceMaskKHR; |
| 7317 | stream->write(&opcode_vkCmdSetDeviceMaskKHR, sizeof(uint32_t)); |
| 7318 | stream->write(&packetSize_vkCmdSetDeviceMaskKHR, sizeof(uint32_t)); |
| 7319 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7320 | stream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 7321 | } |
| 7322 | |
| 7323 | void VkEncoder::vkCmdDispatchBaseKHR( |
| 7324 | VkCommandBuffer commandBuffer, |
| 7325 | uint32_t baseGroupX, |
| 7326 | uint32_t baseGroupY, |
| 7327 | uint32_t baseGroupZ, |
| 7328 | uint32_t groupCountX, |
| 7329 | uint32_t groupCountY, |
| 7330 | uint32_t groupCountZ) |
| 7331 | { |
| 7332 | auto stream = mImpl->stream(); |
| 7333 | auto countingStream = mImpl->countingStream(); |
| 7334 | countingStream->rewind(); |
| 7335 | { |
| 7336 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7337 | countingStream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 7338 | countingStream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 7339 | countingStream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 7340 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 7341 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 7342 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 7343 | } |
| 7344 | uint32_t packetSize_vkCmdDispatchBaseKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7345 | countingStream->rewind(); |
| 7346 | uint32_t opcode_vkCmdDispatchBaseKHR = OP_vkCmdDispatchBaseKHR; |
| 7347 | stream->write(&opcode_vkCmdDispatchBaseKHR, sizeof(uint32_t)); |
| 7348 | stream->write(&packetSize_vkCmdDispatchBaseKHR, sizeof(uint32_t)); |
| 7349 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7350 | stream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 7351 | stream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 7352 | stream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 7353 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 7354 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 7355 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 7356 | } |
| 7357 | |
| 7358 | #endif |
| 7359 | #ifdef VK_KHR_shader_draw_parameters |
| 7360 | #endif |
| 7361 | #ifdef VK_KHR_maintenance1 |
| 7362 | void VkEncoder::vkTrimCommandPoolKHR( |
| 7363 | VkDevice device, |
| 7364 | VkCommandPool commandPool, |
| 7365 | VkCommandPoolTrimFlags flags) |
| 7366 | { |
| 7367 | auto stream = mImpl->stream(); |
| 7368 | auto countingStream = mImpl->countingStream(); |
| 7369 | countingStream->rewind(); |
| 7370 | { |
| 7371 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7372 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 7373 | countingStream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 7374 | } |
| 7375 | uint32_t packetSize_vkTrimCommandPoolKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7376 | countingStream->rewind(); |
| 7377 | uint32_t opcode_vkTrimCommandPoolKHR = OP_vkTrimCommandPoolKHR; |
| 7378 | stream->write(&opcode_vkTrimCommandPoolKHR, sizeof(uint32_t)); |
| 7379 | stream->write(&packetSize_vkTrimCommandPoolKHR, sizeof(uint32_t)); |
| 7380 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7381 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 7382 | stream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 7383 | } |
| 7384 | |
| 7385 | #endif |
| 7386 | #ifdef VK_KHR_device_group_creation |
| 7387 | VkResult VkEncoder::vkEnumeratePhysicalDeviceGroupsKHR( |
| 7388 | VkInstance instance, |
| 7389 | uint32_t* pPhysicalDeviceGroupCount, |
| 7390 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 7391 | { |
| 7392 | auto stream = mImpl->stream(); |
| 7393 | auto countingStream = mImpl->countingStream(); |
| 7394 | countingStream->rewind(); |
| 7395 | { |
| 7396 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 7397 | countingStream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7398 | if (pPhysicalDeviceGroupCount) |
| 7399 | { |
| 7400 | countingStream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7401 | } |
| 7402 | countingStream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7403 | if (pPhysicalDeviceGroupProperties) |
| 7404 | { |
| 7405 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7406 | { |
| 7407 | marshal_VkPhysicalDeviceGroupProperties(countingStream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7408 | } |
| 7409 | } |
| 7410 | } |
| 7411 | uint32_t packetSize_vkEnumeratePhysicalDeviceGroupsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7412 | countingStream->rewind(); |
| 7413 | uint32_t opcode_vkEnumeratePhysicalDeviceGroupsKHR = OP_vkEnumeratePhysicalDeviceGroupsKHR; |
| 7414 | stream->write(&opcode_vkEnumeratePhysicalDeviceGroupsKHR, sizeof(uint32_t)); |
| 7415 | stream->write(&packetSize_vkEnumeratePhysicalDeviceGroupsKHR, sizeof(uint32_t)); |
| 7416 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 7417 | stream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7418 | if (pPhysicalDeviceGroupCount) |
| 7419 | { |
| 7420 | stream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7421 | } |
| 7422 | stream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7423 | if (pPhysicalDeviceGroupProperties) |
| 7424 | { |
| 7425 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7426 | { |
| 7427 | marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7428 | } |
| 7429 | } |
| 7430 | uint32_t* check_pPhysicalDeviceGroupCount; |
| 7431 | stream->read((uint32_t**)&check_pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7432 | if (pPhysicalDeviceGroupCount) |
| 7433 | { |
| 7434 | if (!(check_pPhysicalDeviceGroupCount)) |
| 7435 | { |
| 7436 | fprintf(stderr, "fatal: pPhysicalDeviceGroupCount inconsistent between guest and host\n"); |
| 7437 | } |
| 7438 | stream->read((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7439 | } |
| 7440 | VkPhysicalDeviceGroupProperties* check_pPhysicalDeviceGroupProperties; |
| 7441 | stream->read((VkPhysicalDeviceGroupProperties**)&check_pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7442 | if (pPhysicalDeviceGroupProperties) |
| 7443 | { |
| 7444 | if (!(check_pPhysicalDeviceGroupProperties)) |
| 7445 | { |
| 7446 | fprintf(stderr, "fatal: pPhysicalDeviceGroupProperties inconsistent between guest and host\n"); |
| 7447 | } |
| 7448 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7449 | { |
| 7450 | unmarshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7451 | } |
| 7452 | } |
| 7453 | VkResult vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return = (VkResult)0; |
| 7454 | stream->read(&vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return, sizeof(VkResult)); |
| 7455 | return vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return; |
| 7456 | } |
| 7457 | |
| 7458 | #endif |
| 7459 | #ifdef VK_KHR_external_memory_capabilities |
| 7460 | void VkEncoder::vkGetPhysicalDeviceExternalBufferPropertiesKHR( |
| 7461 | VkPhysicalDevice physicalDevice, |
| 7462 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 7463 | VkExternalBufferProperties* pExternalBufferProperties) |
| 7464 | { |
| 7465 | auto stream = mImpl->stream(); |
| 7466 | auto countingStream = mImpl->countingStream(); |
| 7467 | countingStream->rewind(); |
| 7468 | { |
| 7469 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7470 | marshal_VkPhysicalDeviceExternalBufferInfo(countingStream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 7471 | marshal_VkExternalBufferProperties(countingStream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7472 | } |
| 7473 | uint32_t packetSize_vkGetPhysicalDeviceExternalBufferPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7474 | countingStream->rewind(); |
| 7475 | uint32_t opcode_vkGetPhysicalDeviceExternalBufferPropertiesKHR = OP_vkGetPhysicalDeviceExternalBufferPropertiesKHR; |
| 7476 | stream->write(&opcode_vkGetPhysicalDeviceExternalBufferPropertiesKHR, sizeof(uint32_t)); |
| 7477 | stream->write(&packetSize_vkGetPhysicalDeviceExternalBufferPropertiesKHR, sizeof(uint32_t)); |
| 7478 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7479 | marshal_VkPhysicalDeviceExternalBufferInfo(stream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 7480 | marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7481 | unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7482 | } |
| 7483 | |
| 7484 | #endif |
| 7485 | #ifdef VK_KHR_external_memory |
| 7486 | #endif |
| 7487 | #ifdef VK_KHR_external_memory_win32 |
| 7488 | VkResult VkEncoder::vkGetMemoryWin32HandleKHR( |
| 7489 | VkDevice device, |
| 7490 | const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 7491 | HANDLE* pHandle) |
| 7492 | { |
| 7493 | auto stream = mImpl->stream(); |
| 7494 | auto countingStream = mImpl->countingStream(); |
| 7495 | countingStream->rewind(); |
| 7496 | { |
| 7497 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7498 | marshal_VkMemoryGetWin32HandleInfoKHR(countingStream, (const VkMemoryGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7499 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7500 | } |
| 7501 | uint32_t packetSize_vkGetMemoryWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7502 | countingStream->rewind(); |
| 7503 | uint32_t opcode_vkGetMemoryWin32HandleKHR = OP_vkGetMemoryWin32HandleKHR; |
| 7504 | stream->write(&opcode_vkGetMemoryWin32HandleKHR, sizeof(uint32_t)); |
| 7505 | stream->write(&packetSize_vkGetMemoryWin32HandleKHR, sizeof(uint32_t)); |
| 7506 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7507 | marshal_VkMemoryGetWin32HandleInfoKHR(stream, (const VkMemoryGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7508 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7509 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7510 | VkResult vkGetMemoryWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7511 | stream->read(&vkGetMemoryWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7512 | return vkGetMemoryWin32HandleKHR_VkResult_return; |
| 7513 | } |
| 7514 | |
| 7515 | VkResult VkEncoder::vkGetMemoryWin32HandlePropertiesKHR( |
| 7516 | VkDevice device, |
| 7517 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 7518 | HANDLE handle, |
| 7519 | VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) |
| 7520 | { |
| 7521 | auto stream = mImpl->stream(); |
| 7522 | auto countingStream = mImpl->countingStream(); |
| 7523 | countingStream->rewind(); |
| 7524 | { |
| 7525 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7526 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7527 | countingStream->write((HANDLE*)&handle, sizeof(HANDLE)); |
| 7528 | marshal_VkMemoryWin32HandlePropertiesKHR(countingStream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7529 | } |
| 7530 | uint32_t packetSize_vkGetMemoryWin32HandlePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7531 | countingStream->rewind(); |
| 7532 | uint32_t opcode_vkGetMemoryWin32HandlePropertiesKHR = OP_vkGetMemoryWin32HandlePropertiesKHR; |
| 7533 | stream->write(&opcode_vkGetMemoryWin32HandlePropertiesKHR, sizeof(uint32_t)); |
| 7534 | stream->write(&packetSize_vkGetMemoryWin32HandlePropertiesKHR, sizeof(uint32_t)); |
| 7535 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7536 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7537 | stream->write((HANDLE*)&handle, sizeof(HANDLE)); |
| 7538 | marshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7539 | unmarshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7540 | VkResult vkGetMemoryWin32HandlePropertiesKHR_VkResult_return = (VkResult)0; |
| 7541 | stream->read(&vkGetMemoryWin32HandlePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 7542 | return vkGetMemoryWin32HandlePropertiesKHR_VkResult_return; |
| 7543 | } |
| 7544 | |
| 7545 | #endif |
| 7546 | #ifdef VK_KHR_external_memory_fd |
| 7547 | VkResult VkEncoder::vkGetMemoryFdKHR( |
| 7548 | VkDevice device, |
| 7549 | const VkMemoryGetFdInfoKHR* pGetFdInfo, |
| 7550 | int* pFd) |
| 7551 | { |
| 7552 | auto stream = mImpl->stream(); |
| 7553 | auto countingStream = mImpl->countingStream(); |
| 7554 | countingStream->rewind(); |
| 7555 | { |
| 7556 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7557 | marshal_VkMemoryGetFdInfoKHR(countingStream, (const VkMemoryGetFdInfoKHR*)(pGetFdInfo)); |
| 7558 | countingStream->write((int*)pFd, sizeof(int)); |
| 7559 | } |
| 7560 | uint32_t packetSize_vkGetMemoryFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7561 | countingStream->rewind(); |
| 7562 | uint32_t opcode_vkGetMemoryFdKHR = OP_vkGetMemoryFdKHR; |
| 7563 | stream->write(&opcode_vkGetMemoryFdKHR, sizeof(uint32_t)); |
| 7564 | stream->write(&packetSize_vkGetMemoryFdKHR, sizeof(uint32_t)); |
| 7565 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7566 | marshal_VkMemoryGetFdInfoKHR(stream, (const VkMemoryGetFdInfoKHR*)(pGetFdInfo)); |
| 7567 | stream->write((int*)pFd, sizeof(int)); |
| 7568 | stream->read((int*)pFd, sizeof(int)); |
| 7569 | VkResult vkGetMemoryFdKHR_VkResult_return = (VkResult)0; |
| 7570 | stream->read(&vkGetMemoryFdKHR_VkResult_return, sizeof(VkResult)); |
| 7571 | return vkGetMemoryFdKHR_VkResult_return; |
| 7572 | } |
| 7573 | |
| 7574 | VkResult VkEncoder::vkGetMemoryFdPropertiesKHR( |
| 7575 | VkDevice device, |
| 7576 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 7577 | int fd, |
| 7578 | VkMemoryFdPropertiesKHR* pMemoryFdProperties) |
| 7579 | { |
| 7580 | auto stream = mImpl->stream(); |
| 7581 | auto countingStream = mImpl->countingStream(); |
| 7582 | countingStream->rewind(); |
| 7583 | { |
| 7584 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7585 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7586 | countingStream->write((int*)&fd, sizeof(int)); |
| 7587 | marshal_VkMemoryFdPropertiesKHR(countingStream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7588 | } |
| 7589 | uint32_t packetSize_vkGetMemoryFdPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7590 | countingStream->rewind(); |
| 7591 | uint32_t opcode_vkGetMemoryFdPropertiesKHR = OP_vkGetMemoryFdPropertiesKHR; |
| 7592 | stream->write(&opcode_vkGetMemoryFdPropertiesKHR, sizeof(uint32_t)); |
| 7593 | stream->write(&packetSize_vkGetMemoryFdPropertiesKHR, sizeof(uint32_t)); |
| 7594 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7595 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7596 | stream->write((int*)&fd, sizeof(int)); |
| 7597 | marshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7598 | unmarshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7599 | VkResult vkGetMemoryFdPropertiesKHR_VkResult_return = (VkResult)0; |
| 7600 | stream->read(&vkGetMemoryFdPropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 7601 | return vkGetMemoryFdPropertiesKHR_VkResult_return; |
| 7602 | } |
| 7603 | |
| 7604 | #endif |
| 7605 | #ifdef VK_KHR_win32_keyed_mutex |
| 7606 | #endif |
| 7607 | #ifdef VK_KHR_external_semaphore_capabilities |
| 7608 | void VkEncoder::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( |
| 7609 | VkPhysicalDevice physicalDevice, |
| 7610 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 7611 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 7612 | { |
| 7613 | auto stream = mImpl->stream(); |
| 7614 | auto countingStream = mImpl->countingStream(); |
| 7615 | countingStream->rewind(); |
| 7616 | { |
| 7617 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7618 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(countingStream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 7619 | marshal_VkExternalSemaphoreProperties(countingStream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7620 | } |
| 7621 | uint32_t packetSize_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7622 | countingStream->rewind(); |
| 7623 | uint32_t opcode_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = OP_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; |
| 7624 | stream->write(&opcode_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, sizeof(uint32_t)); |
| 7625 | stream->write(&packetSize_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, sizeof(uint32_t)); |
| 7626 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7627 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 7628 | marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7629 | unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7630 | } |
| 7631 | |
| 7632 | #endif |
| 7633 | #ifdef VK_KHR_external_semaphore |
| 7634 | #endif |
| 7635 | #ifdef VK_KHR_external_semaphore_win32 |
| 7636 | VkResult VkEncoder::vkImportSemaphoreWin32HandleKHR( |
| 7637 | VkDevice device, |
| 7638 | const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) |
| 7639 | { |
| 7640 | auto stream = mImpl->stream(); |
| 7641 | auto countingStream = mImpl->countingStream(); |
| 7642 | countingStream->rewind(); |
| 7643 | { |
| 7644 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7645 | marshal_VkImportSemaphoreWin32HandleInfoKHR(countingStream, (const VkImportSemaphoreWin32HandleInfoKHR*)(pImportSemaphoreWin32HandleInfo)); |
| 7646 | } |
| 7647 | uint32_t packetSize_vkImportSemaphoreWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7648 | countingStream->rewind(); |
| 7649 | uint32_t opcode_vkImportSemaphoreWin32HandleKHR = OP_vkImportSemaphoreWin32HandleKHR; |
| 7650 | stream->write(&opcode_vkImportSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7651 | stream->write(&packetSize_vkImportSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7652 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7653 | marshal_VkImportSemaphoreWin32HandleInfoKHR(stream, (const VkImportSemaphoreWin32HandleInfoKHR*)(pImportSemaphoreWin32HandleInfo)); |
| 7654 | VkResult vkImportSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7655 | stream->read(&vkImportSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7656 | return vkImportSemaphoreWin32HandleKHR_VkResult_return; |
| 7657 | } |
| 7658 | |
| 7659 | VkResult VkEncoder::vkGetSemaphoreWin32HandleKHR( |
| 7660 | VkDevice device, |
| 7661 | const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 7662 | HANDLE* pHandle) |
| 7663 | { |
| 7664 | auto stream = mImpl->stream(); |
| 7665 | auto countingStream = mImpl->countingStream(); |
| 7666 | countingStream->rewind(); |
| 7667 | { |
| 7668 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7669 | marshal_VkSemaphoreGetWin32HandleInfoKHR(countingStream, (const VkSemaphoreGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7670 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7671 | } |
| 7672 | uint32_t packetSize_vkGetSemaphoreWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7673 | countingStream->rewind(); |
| 7674 | uint32_t opcode_vkGetSemaphoreWin32HandleKHR = OP_vkGetSemaphoreWin32HandleKHR; |
| 7675 | stream->write(&opcode_vkGetSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7676 | stream->write(&packetSize_vkGetSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7677 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7678 | marshal_VkSemaphoreGetWin32HandleInfoKHR(stream, (const VkSemaphoreGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7679 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7680 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7681 | VkResult vkGetSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7682 | stream->read(&vkGetSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7683 | return vkGetSemaphoreWin32HandleKHR_VkResult_return; |
| 7684 | } |
| 7685 | |
| 7686 | #endif |
| 7687 | #ifdef VK_KHR_external_semaphore_fd |
| 7688 | VkResult VkEncoder::vkImportSemaphoreFdKHR( |
| 7689 | VkDevice device, |
| 7690 | const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) |
| 7691 | { |
| 7692 | auto stream = mImpl->stream(); |
| 7693 | auto countingStream = mImpl->countingStream(); |
| 7694 | countingStream->rewind(); |
| 7695 | { |
| 7696 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7697 | marshal_VkImportSemaphoreFdInfoKHR(countingStream, (const VkImportSemaphoreFdInfoKHR*)(pImportSemaphoreFdInfo)); |
| 7698 | } |
| 7699 | uint32_t packetSize_vkImportSemaphoreFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7700 | countingStream->rewind(); |
| 7701 | uint32_t opcode_vkImportSemaphoreFdKHR = OP_vkImportSemaphoreFdKHR; |
| 7702 | stream->write(&opcode_vkImportSemaphoreFdKHR, sizeof(uint32_t)); |
| 7703 | stream->write(&packetSize_vkImportSemaphoreFdKHR, sizeof(uint32_t)); |
| 7704 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7705 | marshal_VkImportSemaphoreFdInfoKHR(stream, (const VkImportSemaphoreFdInfoKHR*)(pImportSemaphoreFdInfo)); |
| 7706 | VkResult vkImportSemaphoreFdKHR_VkResult_return = (VkResult)0; |
| 7707 | stream->read(&vkImportSemaphoreFdKHR_VkResult_return, sizeof(VkResult)); |
| 7708 | return vkImportSemaphoreFdKHR_VkResult_return; |
| 7709 | } |
| 7710 | |
| 7711 | VkResult VkEncoder::vkGetSemaphoreFdKHR( |
| 7712 | VkDevice device, |
| 7713 | const VkSemaphoreGetFdInfoKHR* pGetFdInfo, |
| 7714 | int* pFd) |
| 7715 | { |
| 7716 | auto stream = mImpl->stream(); |
| 7717 | auto countingStream = mImpl->countingStream(); |
| 7718 | countingStream->rewind(); |
| 7719 | { |
| 7720 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7721 | marshal_VkSemaphoreGetFdInfoKHR(countingStream, (const VkSemaphoreGetFdInfoKHR*)(pGetFdInfo)); |
| 7722 | countingStream->write((int*)pFd, sizeof(int)); |
| 7723 | } |
| 7724 | uint32_t packetSize_vkGetSemaphoreFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7725 | countingStream->rewind(); |
| 7726 | uint32_t opcode_vkGetSemaphoreFdKHR = OP_vkGetSemaphoreFdKHR; |
| 7727 | stream->write(&opcode_vkGetSemaphoreFdKHR, sizeof(uint32_t)); |
| 7728 | stream->write(&packetSize_vkGetSemaphoreFdKHR, sizeof(uint32_t)); |
| 7729 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7730 | marshal_VkSemaphoreGetFdInfoKHR(stream, (const VkSemaphoreGetFdInfoKHR*)(pGetFdInfo)); |
| 7731 | stream->write((int*)pFd, sizeof(int)); |
| 7732 | stream->read((int*)pFd, sizeof(int)); |
| 7733 | VkResult vkGetSemaphoreFdKHR_VkResult_return = (VkResult)0; |
| 7734 | stream->read(&vkGetSemaphoreFdKHR_VkResult_return, sizeof(VkResult)); |
| 7735 | return vkGetSemaphoreFdKHR_VkResult_return; |
| 7736 | } |
| 7737 | |
| 7738 | #endif |
| 7739 | #ifdef VK_KHR_push_descriptor |
| 7740 | void VkEncoder::vkCmdPushDescriptorSetKHR( |
| 7741 | VkCommandBuffer commandBuffer, |
| 7742 | VkPipelineBindPoint pipelineBindPoint, |
| 7743 | VkPipelineLayout layout, |
| 7744 | uint32_t set, |
| 7745 | uint32_t descriptorWriteCount, |
| 7746 | const VkWriteDescriptorSet* pDescriptorWrites) |
| 7747 | { |
| 7748 | auto stream = mImpl->stream(); |
| 7749 | auto countingStream = mImpl->countingStream(); |
| 7750 | countingStream->rewind(); |
| 7751 | { |
| 7752 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7753 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 7754 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7755 | countingStream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7756 | countingStream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 7757 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 7758 | { |
| 7759 | marshal_VkWriteDescriptorSet(countingStream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 7760 | } |
| 7761 | } |
| 7762 | uint32_t packetSize_vkCmdPushDescriptorSetKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7763 | countingStream->rewind(); |
| 7764 | uint32_t opcode_vkCmdPushDescriptorSetKHR = OP_vkCmdPushDescriptorSetKHR; |
| 7765 | stream->write(&opcode_vkCmdPushDescriptorSetKHR, sizeof(uint32_t)); |
| 7766 | stream->write(&packetSize_vkCmdPushDescriptorSetKHR, sizeof(uint32_t)); |
| 7767 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7768 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 7769 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7770 | stream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7771 | stream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 7772 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 7773 | { |
| 7774 | marshal_VkWriteDescriptorSet(stream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 7775 | } |
| 7776 | } |
| 7777 | |
| 7778 | void VkEncoder::vkCmdPushDescriptorSetWithTemplateKHR( |
| 7779 | VkCommandBuffer commandBuffer, |
| 7780 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7781 | VkPipelineLayout layout, |
| 7782 | uint32_t set, |
| 7783 | const void* pData) |
| 7784 | { |
| 7785 | auto stream = mImpl->stream(); |
| 7786 | auto countingStream = mImpl->countingStream(); |
| 7787 | countingStream->rewind(); |
| 7788 | { |
| 7789 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7790 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7791 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7792 | countingStream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7793 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 7794 | if (pData) |
| 7795 | { |
| 7796 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 7797 | } |
| 7798 | } |
| 7799 | uint32_t packetSize_vkCmdPushDescriptorSetWithTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7800 | countingStream->rewind(); |
| 7801 | uint32_t opcode_vkCmdPushDescriptorSetWithTemplateKHR = OP_vkCmdPushDescriptorSetWithTemplateKHR; |
| 7802 | stream->write(&opcode_vkCmdPushDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7803 | stream->write(&packetSize_vkCmdPushDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7804 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7805 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7806 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7807 | stream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7808 | stream->write((const void**)&pData, sizeof(const void*)); |
| 7809 | if (pData) |
| 7810 | { |
| 7811 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 7812 | } |
| 7813 | } |
| 7814 | |
| 7815 | #endif |
| 7816 | #ifdef VK_KHR_16bit_storage |
| 7817 | #endif |
| 7818 | #ifdef VK_KHR_incremental_present |
| 7819 | #endif |
| 7820 | #ifdef VK_KHR_descriptor_update_template |
| 7821 | VkResult VkEncoder::vkCreateDescriptorUpdateTemplateKHR( |
| 7822 | VkDevice device, |
| 7823 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 7824 | const VkAllocationCallbacks* pAllocator, |
| 7825 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 7826 | { |
| 7827 | auto stream = mImpl->stream(); |
| 7828 | auto countingStream = mImpl->countingStream(); |
| 7829 | countingStream->rewind(); |
| 7830 | { |
| 7831 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7832 | marshal_VkDescriptorUpdateTemplateCreateInfo(countingStream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 7833 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7834 | if (pAllocator) |
| 7835 | { |
| 7836 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7837 | } |
| 7838 | countingStream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7839 | } |
| 7840 | uint32_t packetSize_vkCreateDescriptorUpdateTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7841 | countingStream->rewind(); |
| 7842 | uint32_t opcode_vkCreateDescriptorUpdateTemplateKHR = OP_vkCreateDescriptorUpdateTemplateKHR; |
| 7843 | stream->write(&opcode_vkCreateDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7844 | stream->write(&packetSize_vkCreateDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7845 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7846 | marshal_VkDescriptorUpdateTemplateCreateInfo(stream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 7847 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7848 | if (pAllocator) |
| 7849 | { |
| 7850 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7851 | } |
| 7852 | stream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7853 | stream->read((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7854 | VkResult vkCreateDescriptorUpdateTemplateKHR_VkResult_return = (VkResult)0; |
| 7855 | stream->read(&vkCreateDescriptorUpdateTemplateKHR_VkResult_return, sizeof(VkResult)); |
| 7856 | return vkCreateDescriptorUpdateTemplateKHR_VkResult_return; |
| 7857 | } |
| 7858 | |
| 7859 | void VkEncoder::vkDestroyDescriptorUpdateTemplateKHR( |
| 7860 | VkDevice device, |
| 7861 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7862 | const VkAllocationCallbacks* pAllocator) |
| 7863 | { |
| 7864 | auto stream = mImpl->stream(); |
| 7865 | auto countingStream = mImpl->countingStream(); |
| 7866 | countingStream->rewind(); |
| 7867 | { |
| 7868 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7869 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7870 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7871 | if (pAllocator) |
| 7872 | { |
| 7873 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7874 | } |
| 7875 | } |
| 7876 | uint32_t packetSize_vkDestroyDescriptorUpdateTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7877 | countingStream->rewind(); |
| 7878 | uint32_t opcode_vkDestroyDescriptorUpdateTemplateKHR = OP_vkDestroyDescriptorUpdateTemplateKHR; |
| 7879 | stream->write(&opcode_vkDestroyDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7880 | stream->write(&packetSize_vkDestroyDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7881 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7882 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7883 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7884 | if (pAllocator) |
| 7885 | { |
| 7886 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7887 | } |
| 7888 | } |
| 7889 | |
| 7890 | void VkEncoder::vkUpdateDescriptorSetWithTemplateKHR( |
| 7891 | VkDevice device, |
| 7892 | VkDescriptorSet descriptorSet, |
| 7893 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7894 | const void* pData) |
| 7895 | { |
| 7896 | auto stream = mImpl->stream(); |
| 7897 | auto countingStream = mImpl->countingStream(); |
| 7898 | countingStream->rewind(); |
| 7899 | { |
| 7900 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7901 | countingStream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 7902 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7903 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 7904 | if (pData) |
| 7905 | { |
| 7906 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 7907 | } |
| 7908 | } |
| 7909 | uint32_t packetSize_vkUpdateDescriptorSetWithTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7910 | countingStream->rewind(); |
| 7911 | uint32_t opcode_vkUpdateDescriptorSetWithTemplateKHR = OP_vkUpdateDescriptorSetWithTemplateKHR; |
| 7912 | stream->write(&opcode_vkUpdateDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7913 | stream->write(&packetSize_vkUpdateDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7914 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7915 | stream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 7916 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7917 | stream->write((const void**)&pData, sizeof(const void*)); |
| 7918 | if (pData) |
| 7919 | { |
| 7920 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 7921 | } |
| 7922 | } |
| 7923 | |
| 7924 | #endif |
| 7925 | #ifdef VK_KHR_create_renderpass2 |
| 7926 | VkResult VkEncoder::vkCreateRenderPass2KHR( |
| 7927 | VkDevice device, |
| 7928 | const VkRenderPassCreateInfo2KHR* pCreateInfo, |
| 7929 | const VkAllocationCallbacks* pAllocator, |
| 7930 | VkRenderPass* pRenderPass) |
| 7931 | { |
| 7932 | auto stream = mImpl->stream(); |
| 7933 | auto countingStream = mImpl->countingStream(); |
| 7934 | countingStream->rewind(); |
| 7935 | { |
| 7936 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7937 | marshal_VkRenderPassCreateInfo2KHR(countingStream, (const VkRenderPassCreateInfo2KHR*)(pCreateInfo)); |
| 7938 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7939 | if (pAllocator) |
| 7940 | { |
| 7941 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7942 | } |
| 7943 | countingStream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7944 | } |
| 7945 | uint32_t packetSize_vkCreateRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7946 | countingStream->rewind(); |
| 7947 | uint32_t opcode_vkCreateRenderPass2KHR = OP_vkCreateRenderPass2KHR; |
| 7948 | stream->write(&opcode_vkCreateRenderPass2KHR, sizeof(uint32_t)); |
| 7949 | stream->write(&packetSize_vkCreateRenderPass2KHR, sizeof(uint32_t)); |
| 7950 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7951 | marshal_VkRenderPassCreateInfo2KHR(stream, (const VkRenderPassCreateInfo2KHR*)(pCreateInfo)); |
| 7952 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7953 | if (pAllocator) |
| 7954 | { |
| 7955 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7956 | } |
| 7957 | stream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7958 | stream->read((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7959 | VkResult vkCreateRenderPass2KHR_VkResult_return = (VkResult)0; |
| 7960 | stream->read(&vkCreateRenderPass2KHR_VkResult_return, sizeof(VkResult)); |
| 7961 | return vkCreateRenderPass2KHR_VkResult_return; |
| 7962 | } |
| 7963 | |
| 7964 | void VkEncoder::vkCmdBeginRenderPass2KHR( |
| 7965 | VkCommandBuffer commandBuffer, |
| 7966 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 7967 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo) |
| 7968 | { |
| 7969 | auto stream = mImpl->stream(); |
| 7970 | auto countingStream = mImpl->countingStream(); |
| 7971 | countingStream->rewind(); |
| 7972 | { |
| 7973 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7974 | marshal_VkRenderPassBeginInfo(countingStream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 7975 | marshal_VkSubpassBeginInfoKHR(countingStream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7976 | } |
| 7977 | uint32_t packetSize_vkCmdBeginRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7978 | countingStream->rewind(); |
| 7979 | uint32_t opcode_vkCmdBeginRenderPass2KHR = OP_vkCmdBeginRenderPass2KHR; |
| 7980 | stream->write(&opcode_vkCmdBeginRenderPass2KHR, sizeof(uint32_t)); |
| 7981 | stream->write(&packetSize_vkCmdBeginRenderPass2KHR, sizeof(uint32_t)); |
| 7982 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7983 | marshal_VkRenderPassBeginInfo(stream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 7984 | marshal_VkSubpassBeginInfoKHR(stream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7985 | } |
| 7986 | |
| 7987 | void VkEncoder::vkCmdNextSubpass2KHR( |
| 7988 | VkCommandBuffer commandBuffer, |
| 7989 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo, |
| 7990 | const VkSubpassEndInfoKHR* pSubpassEndInfo) |
| 7991 | { |
| 7992 | auto stream = mImpl->stream(); |
| 7993 | auto countingStream = mImpl->countingStream(); |
| 7994 | countingStream->rewind(); |
| 7995 | { |
| 7996 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7997 | marshal_VkSubpassBeginInfoKHR(countingStream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7998 | marshal_VkSubpassEndInfoKHR(countingStream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 7999 | } |
| 8000 | uint32_t packetSize_vkCmdNextSubpass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8001 | countingStream->rewind(); |
| 8002 | uint32_t opcode_vkCmdNextSubpass2KHR = OP_vkCmdNextSubpass2KHR; |
| 8003 | stream->write(&opcode_vkCmdNextSubpass2KHR, sizeof(uint32_t)); |
| 8004 | stream->write(&packetSize_vkCmdNextSubpass2KHR, sizeof(uint32_t)); |
| 8005 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8006 | marshal_VkSubpassBeginInfoKHR(stream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 8007 | marshal_VkSubpassEndInfoKHR(stream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8008 | } |
| 8009 | |
| 8010 | void VkEncoder::vkCmdEndRenderPass2KHR( |
| 8011 | VkCommandBuffer commandBuffer, |
| 8012 | const VkSubpassEndInfoKHR* pSubpassEndInfo) |
| 8013 | { |
| 8014 | auto stream = mImpl->stream(); |
| 8015 | auto countingStream = mImpl->countingStream(); |
| 8016 | countingStream->rewind(); |
| 8017 | { |
| 8018 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8019 | marshal_VkSubpassEndInfoKHR(countingStream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8020 | } |
| 8021 | uint32_t packetSize_vkCmdEndRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8022 | countingStream->rewind(); |
| 8023 | uint32_t opcode_vkCmdEndRenderPass2KHR = OP_vkCmdEndRenderPass2KHR; |
| 8024 | stream->write(&opcode_vkCmdEndRenderPass2KHR, sizeof(uint32_t)); |
| 8025 | stream->write(&packetSize_vkCmdEndRenderPass2KHR, sizeof(uint32_t)); |
| 8026 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8027 | marshal_VkSubpassEndInfoKHR(stream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8028 | } |
| 8029 | |
| 8030 | #endif |
| 8031 | #ifdef VK_KHR_shared_presentable_image |
| 8032 | VkResult VkEncoder::vkGetSwapchainStatusKHR( |
| 8033 | VkDevice device, |
| 8034 | VkSwapchainKHR swapchain) |
| 8035 | { |
| 8036 | auto stream = mImpl->stream(); |
| 8037 | auto countingStream = mImpl->countingStream(); |
| 8038 | countingStream->rewind(); |
| 8039 | { |
| 8040 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8041 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 8042 | } |
| 8043 | uint32_t packetSize_vkGetSwapchainStatusKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8044 | countingStream->rewind(); |
| 8045 | uint32_t opcode_vkGetSwapchainStatusKHR = OP_vkGetSwapchainStatusKHR; |
| 8046 | stream->write(&opcode_vkGetSwapchainStatusKHR, sizeof(uint32_t)); |
| 8047 | stream->write(&packetSize_vkGetSwapchainStatusKHR, sizeof(uint32_t)); |
| 8048 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8049 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 8050 | VkResult vkGetSwapchainStatusKHR_VkResult_return = (VkResult)0; |
| 8051 | stream->read(&vkGetSwapchainStatusKHR_VkResult_return, sizeof(VkResult)); |
| 8052 | return vkGetSwapchainStatusKHR_VkResult_return; |
| 8053 | } |
| 8054 | |
| 8055 | #endif |
| 8056 | #ifdef VK_KHR_external_fence_capabilities |
| 8057 | void VkEncoder::vkGetPhysicalDeviceExternalFencePropertiesKHR( |
| 8058 | VkPhysicalDevice physicalDevice, |
| 8059 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 8060 | VkExternalFenceProperties* pExternalFenceProperties) |
| 8061 | { |
| 8062 | auto stream = mImpl->stream(); |
| 8063 | auto countingStream = mImpl->countingStream(); |
| 8064 | countingStream->rewind(); |
| 8065 | { |
| 8066 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8067 | marshal_VkPhysicalDeviceExternalFenceInfo(countingStream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 8068 | marshal_VkExternalFenceProperties(countingStream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8069 | } |
| 8070 | uint32_t packetSize_vkGetPhysicalDeviceExternalFencePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8071 | countingStream->rewind(); |
| 8072 | uint32_t opcode_vkGetPhysicalDeviceExternalFencePropertiesKHR = OP_vkGetPhysicalDeviceExternalFencePropertiesKHR; |
| 8073 | stream->write(&opcode_vkGetPhysicalDeviceExternalFencePropertiesKHR, sizeof(uint32_t)); |
| 8074 | stream->write(&packetSize_vkGetPhysicalDeviceExternalFencePropertiesKHR, sizeof(uint32_t)); |
| 8075 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8076 | marshal_VkPhysicalDeviceExternalFenceInfo(stream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 8077 | marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8078 | unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8079 | } |
| 8080 | |
| 8081 | #endif |
| 8082 | #ifdef VK_KHR_external_fence |
| 8083 | #endif |
| 8084 | #ifdef VK_KHR_external_fence_win32 |
| 8085 | VkResult VkEncoder::vkImportFenceWin32HandleKHR( |
| 8086 | VkDevice device, |
| 8087 | const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) |
| 8088 | { |
| 8089 | auto stream = mImpl->stream(); |
| 8090 | auto countingStream = mImpl->countingStream(); |
| 8091 | countingStream->rewind(); |
| 8092 | { |
| 8093 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8094 | marshal_VkImportFenceWin32HandleInfoKHR(countingStream, (const VkImportFenceWin32HandleInfoKHR*)(pImportFenceWin32HandleInfo)); |
| 8095 | } |
| 8096 | uint32_t packetSize_vkImportFenceWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8097 | countingStream->rewind(); |
| 8098 | uint32_t opcode_vkImportFenceWin32HandleKHR = OP_vkImportFenceWin32HandleKHR; |
| 8099 | stream->write(&opcode_vkImportFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8100 | stream->write(&packetSize_vkImportFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8101 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8102 | marshal_VkImportFenceWin32HandleInfoKHR(stream, (const VkImportFenceWin32HandleInfoKHR*)(pImportFenceWin32HandleInfo)); |
| 8103 | VkResult vkImportFenceWin32HandleKHR_VkResult_return = (VkResult)0; |
| 8104 | stream->read(&vkImportFenceWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 8105 | return vkImportFenceWin32HandleKHR_VkResult_return; |
| 8106 | } |
| 8107 | |
| 8108 | VkResult VkEncoder::vkGetFenceWin32HandleKHR( |
| 8109 | VkDevice device, |
| 8110 | const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 8111 | HANDLE* pHandle) |
| 8112 | { |
| 8113 | auto stream = mImpl->stream(); |
| 8114 | auto countingStream = mImpl->countingStream(); |
| 8115 | countingStream->rewind(); |
| 8116 | { |
| 8117 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8118 | marshal_VkFenceGetWin32HandleInfoKHR(countingStream, (const VkFenceGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 8119 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8120 | } |
| 8121 | uint32_t packetSize_vkGetFenceWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8122 | countingStream->rewind(); |
| 8123 | uint32_t opcode_vkGetFenceWin32HandleKHR = OP_vkGetFenceWin32HandleKHR; |
| 8124 | stream->write(&opcode_vkGetFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8125 | stream->write(&packetSize_vkGetFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8126 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8127 | marshal_VkFenceGetWin32HandleInfoKHR(stream, (const VkFenceGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 8128 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8129 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8130 | VkResult vkGetFenceWin32HandleKHR_VkResult_return = (VkResult)0; |
| 8131 | stream->read(&vkGetFenceWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 8132 | return vkGetFenceWin32HandleKHR_VkResult_return; |
| 8133 | } |
| 8134 | |
| 8135 | #endif |
| 8136 | #ifdef VK_KHR_external_fence_fd |
| 8137 | VkResult VkEncoder::vkImportFenceFdKHR( |
| 8138 | VkDevice device, |
| 8139 | const VkImportFenceFdInfoKHR* pImportFenceFdInfo) |
| 8140 | { |
| 8141 | auto stream = mImpl->stream(); |
| 8142 | auto countingStream = mImpl->countingStream(); |
| 8143 | countingStream->rewind(); |
| 8144 | { |
| 8145 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8146 | marshal_VkImportFenceFdInfoKHR(countingStream, (const VkImportFenceFdInfoKHR*)(pImportFenceFdInfo)); |
| 8147 | } |
| 8148 | uint32_t packetSize_vkImportFenceFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8149 | countingStream->rewind(); |
| 8150 | uint32_t opcode_vkImportFenceFdKHR = OP_vkImportFenceFdKHR; |
| 8151 | stream->write(&opcode_vkImportFenceFdKHR, sizeof(uint32_t)); |
| 8152 | stream->write(&packetSize_vkImportFenceFdKHR, sizeof(uint32_t)); |
| 8153 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8154 | marshal_VkImportFenceFdInfoKHR(stream, (const VkImportFenceFdInfoKHR*)(pImportFenceFdInfo)); |
| 8155 | VkResult vkImportFenceFdKHR_VkResult_return = (VkResult)0; |
| 8156 | stream->read(&vkImportFenceFdKHR_VkResult_return, sizeof(VkResult)); |
| 8157 | return vkImportFenceFdKHR_VkResult_return; |
| 8158 | } |
| 8159 | |
| 8160 | VkResult VkEncoder::vkGetFenceFdKHR( |
| 8161 | VkDevice device, |
| 8162 | const VkFenceGetFdInfoKHR* pGetFdInfo, |
| 8163 | int* pFd) |
| 8164 | { |
| 8165 | auto stream = mImpl->stream(); |
| 8166 | auto countingStream = mImpl->countingStream(); |
| 8167 | countingStream->rewind(); |
| 8168 | { |
| 8169 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8170 | marshal_VkFenceGetFdInfoKHR(countingStream, (const VkFenceGetFdInfoKHR*)(pGetFdInfo)); |
| 8171 | countingStream->write((int*)pFd, sizeof(int)); |
| 8172 | } |
| 8173 | uint32_t packetSize_vkGetFenceFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8174 | countingStream->rewind(); |
| 8175 | uint32_t opcode_vkGetFenceFdKHR = OP_vkGetFenceFdKHR; |
| 8176 | stream->write(&opcode_vkGetFenceFdKHR, sizeof(uint32_t)); |
| 8177 | stream->write(&packetSize_vkGetFenceFdKHR, sizeof(uint32_t)); |
| 8178 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8179 | marshal_VkFenceGetFdInfoKHR(stream, (const VkFenceGetFdInfoKHR*)(pGetFdInfo)); |
| 8180 | stream->write((int*)pFd, sizeof(int)); |
| 8181 | stream->read((int*)pFd, sizeof(int)); |
| 8182 | VkResult vkGetFenceFdKHR_VkResult_return = (VkResult)0; |
| 8183 | stream->read(&vkGetFenceFdKHR_VkResult_return, sizeof(VkResult)); |
| 8184 | return vkGetFenceFdKHR_VkResult_return; |
| 8185 | } |
| 8186 | |
| 8187 | #endif |
| 8188 | #ifdef VK_KHR_maintenance2 |
| 8189 | #endif |
| 8190 | #ifdef VK_KHR_get_surface_capabilities2 |
| 8191 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilities2KHR( |
| 8192 | VkPhysicalDevice physicalDevice, |
| 8193 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 8194 | VkSurfaceCapabilities2KHR* pSurfaceCapabilities) |
| 8195 | { |
| 8196 | auto stream = mImpl->stream(); |
| 8197 | auto countingStream = mImpl->countingStream(); |
| 8198 | countingStream->rewind(); |
| 8199 | { |
| 8200 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8201 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(countingStream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8202 | marshal_VkSurfaceCapabilities2KHR(countingStream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8203 | } |
| 8204 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilities2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8205 | countingStream->rewind(); |
| 8206 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilities2KHR = OP_vkGetPhysicalDeviceSurfaceCapabilities2KHR; |
| 8207 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilities2KHR, sizeof(uint32_t)); |
| 8208 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilities2KHR, sizeof(uint32_t)); |
| 8209 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8210 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(stream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8211 | marshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8212 | unmarshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8213 | VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return = (VkResult)0; |
| 8214 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return, sizeof(VkResult)); |
| 8215 | return vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return; |
| 8216 | } |
| 8217 | |
| 8218 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceFormats2KHR( |
| 8219 | VkPhysicalDevice physicalDevice, |
| 8220 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 8221 | uint32_t* pSurfaceFormatCount, |
| 8222 | VkSurfaceFormat2KHR* pSurfaceFormats) |
| 8223 | { |
| 8224 | auto stream = mImpl->stream(); |
| 8225 | auto countingStream = mImpl->countingStream(); |
| 8226 | countingStream->rewind(); |
| 8227 | { |
| 8228 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8229 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(countingStream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8230 | countingStream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8231 | if (pSurfaceFormatCount) |
| 8232 | { |
| 8233 | countingStream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8234 | } |
| 8235 | countingStream->write((VkSurfaceFormat2KHR**)&pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8236 | if (pSurfaceFormats) |
| 8237 | { |
| 8238 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8239 | { |
| 8240 | marshal_VkSurfaceFormat2KHR(countingStream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8241 | } |
| 8242 | } |
| 8243 | } |
| 8244 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceFormats2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8245 | countingStream->rewind(); |
| 8246 | uint32_t opcode_vkGetPhysicalDeviceSurfaceFormats2KHR = OP_vkGetPhysicalDeviceSurfaceFormats2KHR; |
| 8247 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceFormats2KHR, sizeof(uint32_t)); |
| 8248 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceFormats2KHR, sizeof(uint32_t)); |
| 8249 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8250 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(stream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8251 | stream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8252 | if (pSurfaceFormatCount) |
| 8253 | { |
| 8254 | stream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8255 | } |
| 8256 | stream->write((VkSurfaceFormat2KHR**)&pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8257 | if (pSurfaceFormats) |
| 8258 | { |
| 8259 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8260 | { |
| 8261 | marshal_VkSurfaceFormat2KHR(stream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8262 | } |
| 8263 | } |
| 8264 | uint32_t* check_pSurfaceFormatCount; |
| 8265 | stream->read((uint32_t**)&check_pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8266 | if (pSurfaceFormatCount) |
| 8267 | { |
| 8268 | if (!(check_pSurfaceFormatCount)) |
| 8269 | { |
| 8270 | fprintf(stderr, "fatal: pSurfaceFormatCount inconsistent between guest and host\n"); |
| 8271 | } |
| 8272 | stream->read((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8273 | } |
| 8274 | VkSurfaceFormat2KHR* check_pSurfaceFormats; |
| 8275 | stream->read((VkSurfaceFormat2KHR**)&check_pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8276 | if (pSurfaceFormats) |
| 8277 | { |
| 8278 | if (!(check_pSurfaceFormats)) |
| 8279 | { |
| 8280 | fprintf(stderr, "fatal: pSurfaceFormats inconsistent between guest and host\n"); |
| 8281 | } |
| 8282 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8283 | { |
| 8284 | unmarshal_VkSurfaceFormat2KHR(stream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8285 | } |
| 8286 | } |
| 8287 | VkResult vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return = (VkResult)0; |
| 8288 | stream->read(&vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return, sizeof(VkResult)); |
| 8289 | return vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return; |
| 8290 | } |
| 8291 | |
| 8292 | #endif |
| 8293 | #ifdef VK_KHR_variable_pointers |
| 8294 | #endif |
| 8295 | #ifdef VK_KHR_get_display_properties2 |
| 8296 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayProperties2KHR( |
| 8297 | VkPhysicalDevice physicalDevice, |
| 8298 | uint32_t* pPropertyCount, |
| 8299 | VkDisplayProperties2KHR* pProperties) |
| 8300 | { |
| 8301 | auto stream = mImpl->stream(); |
| 8302 | auto countingStream = mImpl->countingStream(); |
| 8303 | countingStream->rewind(); |
| 8304 | { |
| 8305 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8306 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8307 | if (pPropertyCount) |
| 8308 | { |
| 8309 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8310 | } |
| 8311 | countingStream->write((VkDisplayProperties2KHR**)&pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8312 | if (pProperties) |
| 8313 | { |
| 8314 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8315 | { |
| 8316 | marshal_VkDisplayProperties2KHR(countingStream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8317 | } |
| 8318 | } |
| 8319 | } |
| 8320 | uint32_t packetSize_vkGetPhysicalDeviceDisplayProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8321 | countingStream->rewind(); |
| 8322 | uint32_t opcode_vkGetPhysicalDeviceDisplayProperties2KHR = OP_vkGetPhysicalDeviceDisplayProperties2KHR; |
| 8323 | stream->write(&opcode_vkGetPhysicalDeviceDisplayProperties2KHR, sizeof(uint32_t)); |
| 8324 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayProperties2KHR, sizeof(uint32_t)); |
| 8325 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8326 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8327 | if (pPropertyCount) |
| 8328 | { |
| 8329 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8330 | } |
| 8331 | stream->write((VkDisplayProperties2KHR**)&pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8332 | if (pProperties) |
| 8333 | { |
| 8334 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8335 | { |
| 8336 | marshal_VkDisplayProperties2KHR(stream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8337 | } |
| 8338 | } |
| 8339 | uint32_t* check_pPropertyCount; |
| 8340 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8341 | if (pPropertyCount) |
| 8342 | { |
| 8343 | if (!(check_pPropertyCount)) |
| 8344 | { |
| 8345 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8346 | } |
| 8347 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8348 | } |
| 8349 | VkDisplayProperties2KHR* check_pProperties; |
| 8350 | stream->read((VkDisplayProperties2KHR**)&check_pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8351 | if (pProperties) |
| 8352 | { |
| 8353 | if (!(check_pProperties)) |
| 8354 | { |
| 8355 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8356 | } |
| 8357 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8358 | { |
| 8359 | unmarshal_VkDisplayProperties2KHR(stream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8360 | } |
| 8361 | } |
| 8362 | VkResult vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return = (VkResult)0; |
| 8363 | stream->read(&vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8364 | return vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return; |
| 8365 | } |
| 8366 | |
| 8367 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPlaneProperties2KHR( |
| 8368 | VkPhysicalDevice physicalDevice, |
| 8369 | uint32_t* pPropertyCount, |
| 8370 | VkDisplayPlaneProperties2KHR* pProperties) |
| 8371 | { |
| 8372 | auto stream = mImpl->stream(); |
| 8373 | auto countingStream = mImpl->countingStream(); |
| 8374 | countingStream->rewind(); |
| 8375 | { |
| 8376 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8377 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8378 | if (pPropertyCount) |
| 8379 | { |
| 8380 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8381 | } |
| 8382 | countingStream->write((VkDisplayPlaneProperties2KHR**)&pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8383 | if (pProperties) |
| 8384 | { |
| 8385 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8386 | { |
| 8387 | marshal_VkDisplayPlaneProperties2KHR(countingStream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8388 | } |
| 8389 | } |
| 8390 | } |
| 8391 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8392 | countingStream->rewind(); |
| 8393 | uint32_t opcode_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = OP_vkGetPhysicalDeviceDisplayPlaneProperties2KHR; |
| 8394 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, sizeof(uint32_t)); |
| 8395 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, sizeof(uint32_t)); |
| 8396 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8397 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8398 | if (pPropertyCount) |
| 8399 | { |
| 8400 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8401 | } |
| 8402 | stream->write((VkDisplayPlaneProperties2KHR**)&pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8403 | if (pProperties) |
| 8404 | { |
| 8405 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8406 | { |
| 8407 | marshal_VkDisplayPlaneProperties2KHR(stream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8408 | } |
| 8409 | } |
| 8410 | uint32_t* check_pPropertyCount; |
| 8411 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8412 | if (pPropertyCount) |
| 8413 | { |
| 8414 | if (!(check_pPropertyCount)) |
| 8415 | { |
| 8416 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8417 | } |
| 8418 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8419 | } |
| 8420 | VkDisplayPlaneProperties2KHR* check_pProperties; |
| 8421 | stream->read((VkDisplayPlaneProperties2KHR**)&check_pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8422 | if (pProperties) |
| 8423 | { |
| 8424 | if (!(check_pProperties)) |
| 8425 | { |
| 8426 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8427 | } |
| 8428 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8429 | { |
| 8430 | unmarshal_VkDisplayPlaneProperties2KHR(stream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8431 | } |
| 8432 | } |
| 8433 | VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return = (VkResult)0; |
| 8434 | stream->read(&vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8435 | return vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return; |
| 8436 | } |
| 8437 | |
| 8438 | VkResult VkEncoder::vkGetDisplayModeProperties2KHR( |
| 8439 | VkPhysicalDevice physicalDevice, |
| 8440 | VkDisplayKHR display, |
| 8441 | uint32_t* pPropertyCount, |
| 8442 | VkDisplayModeProperties2KHR* pProperties) |
| 8443 | { |
| 8444 | auto stream = mImpl->stream(); |
| 8445 | auto countingStream = mImpl->countingStream(); |
| 8446 | countingStream->rewind(); |
| 8447 | { |
| 8448 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8449 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 8450 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8451 | if (pPropertyCount) |
| 8452 | { |
| 8453 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8454 | } |
| 8455 | countingStream->write((VkDisplayModeProperties2KHR**)&pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8456 | if (pProperties) |
| 8457 | { |
| 8458 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8459 | { |
| 8460 | marshal_VkDisplayModeProperties2KHR(countingStream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8461 | } |
| 8462 | } |
| 8463 | } |
| 8464 | uint32_t packetSize_vkGetDisplayModeProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8465 | countingStream->rewind(); |
| 8466 | uint32_t opcode_vkGetDisplayModeProperties2KHR = OP_vkGetDisplayModeProperties2KHR; |
| 8467 | stream->write(&opcode_vkGetDisplayModeProperties2KHR, sizeof(uint32_t)); |
| 8468 | stream->write(&packetSize_vkGetDisplayModeProperties2KHR, sizeof(uint32_t)); |
| 8469 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8470 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 8471 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8472 | if (pPropertyCount) |
| 8473 | { |
| 8474 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8475 | } |
| 8476 | stream->write((VkDisplayModeProperties2KHR**)&pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8477 | if (pProperties) |
| 8478 | { |
| 8479 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8480 | { |
| 8481 | marshal_VkDisplayModeProperties2KHR(stream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8482 | } |
| 8483 | } |
| 8484 | uint32_t* check_pPropertyCount; |
| 8485 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8486 | if (pPropertyCount) |
| 8487 | { |
| 8488 | if (!(check_pPropertyCount)) |
| 8489 | { |
| 8490 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8491 | } |
| 8492 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8493 | } |
| 8494 | VkDisplayModeProperties2KHR* check_pProperties; |
| 8495 | stream->read((VkDisplayModeProperties2KHR**)&check_pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8496 | if (pProperties) |
| 8497 | { |
| 8498 | if (!(check_pProperties)) |
| 8499 | { |
| 8500 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8501 | } |
| 8502 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8503 | { |
| 8504 | unmarshal_VkDisplayModeProperties2KHR(stream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8505 | } |
| 8506 | } |
| 8507 | VkResult vkGetDisplayModeProperties2KHR_VkResult_return = (VkResult)0; |
| 8508 | stream->read(&vkGetDisplayModeProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8509 | return vkGetDisplayModeProperties2KHR_VkResult_return; |
| 8510 | } |
| 8511 | |
| 8512 | VkResult VkEncoder::vkGetDisplayPlaneCapabilities2KHR( |
| 8513 | VkPhysicalDevice physicalDevice, |
| 8514 | const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, |
| 8515 | VkDisplayPlaneCapabilities2KHR* pCapabilities) |
| 8516 | { |
| 8517 | auto stream = mImpl->stream(); |
| 8518 | auto countingStream = mImpl->countingStream(); |
| 8519 | countingStream->rewind(); |
| 8520 | { |
| 8521 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8522 | marshal_VkDisplayPlaneInfo2KHR(countingStream, (const VkDisplayPlaneInfo2KHR*)(pDisplayPlaneInfo)); |
| 8523 | marshal_VkDisplayPlaneCapabilities2KHR(countingStream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8524 | } |
| 8525 | uint32_t packetSize_vkGetDisplayPlaneCapabilities2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8526 | countingStream->rewind(); |
| 8527 | uint32_t opcode_vkGetDisplayPlaneCapabilities2KHR = OP_vkGetDisplayPlaneCapabilities2KHR; |
| 8528 | stream->write(&opcode_vkGetDisplayPlaneCapabilities2KHR, sizeof(uint32_t)); |
| 8529 | stream->write(&packetSize_vkGetDisplayPlaneCapabilities2KHR, sizeof(uint32_t)); |
| 8530 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8531 | marshal_VkDisplayPlaneInfo2KHR(stream, (const VkDisplayPlaneInfo2KHR*)(pDisplayPlaneInfo)); |
| 8532 | marshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8533 | unmarshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8534 | VkResult vkGetDisplayPlaneCapabilities2KHR_VkResult_return = (VkResult)0; |
| 8535 | stream->read(&vkGetDisplayPlaneCapabilities2KHR_VkResult_return, sizeof(VkResult)); |
| 8536 | return vkGetDisplayPlaneCapabilities2KHR_VkResult_return; |
| 8537 | } |
| 8538 | |
| 8539 | #endif |
| 8540 | #ifdef VK_KHR_dedicated_allocation |
| 8541 | #endif |
| 8542 | #ifdef VK_KHR_storage_buffer_storage_class |
| 8543 | #endif |
| 8544 | #ifdef VK_KHR_relaxed_block_layout |
| 8545 | #endif |
| 8546 | #ifdef VK_KHR_get_memory_requirements2 |
| 8547 | void VkEncoder::vkGetImageMemoryRequirements2KHR( |
| 8548 | VkDevice device, |
| 8549 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 8550 | VkMemoryRequirements2* pMemoryRequirements) |
| 8551 | { |
| 8552 | auto stream = mImpl->stream(); |
| 8553 | auto countingStream = mImpl->countingStream(); |
| 8554 | countingStream->rewind(); |
| 8555 | { |
| 8556 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8557 | marshal_VkImageMemoryRequirementsInfo2(countingStream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 8558 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8559 | } |
| 8560 | uint32_t packetSize_vkGetImageMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8561 | countingStream->rewind(); |
| 8562 | uint32_t opcode_vkGetImageMemoryRequirements2KHR = OP_vkGetImageMemoryRequirements2KHR; |
| 8563 | stream->write(&opcode_vkGetImageMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8564 | stream->write(&packetSize_vkGetImageMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8565 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8566 | marshal_VkImageMemoryRequirementsInfo2(stream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 8567 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8568 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8569 | } |
| 8570 | |
| 8571 | void VkEncoder::vkGetBufferMemoryRequirements2KHR( |
| 8572 | VkDevice device, |
| 8573 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 8574 | VkMemoryRequirements2* pMemoryRequirements) |
| 8575 | { |
| 8576 | auto stream = mImpl->stream(); |
| 8577 | auto countingStream = mImpl->countingStream(); |
| 8578 | countingStream->rewind(); |
| 8579 | { |
| 8580 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8581 | marshal_VkBufferMemoryRequirementsInfo2(countingStream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 8582 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8583 | } |
| 8584 | uint32_t packetSize_vkGetBufferMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8585 | countingStream->rewind(); |
| 8586 | uint32_t opcode_vkGetBufferMemoryRequirements2KHR = OP_vkGetBufferMemoryRequirements2KHR; |
| 8587 | stream->write(&opcode_vkGetBufferMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8588 | stream->write(&packetSize_vkGetBufferMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8589 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8590 | marshal_VkBufferMemoryRequirementsInfo2(stream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 8591 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8592 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8593 | } |
| 8594 | |
| 8595 | void VkEncoder::vkGetImageSparseMemoryRequirements2KHR( |
| 8596 | VkDevice device, |
| 8597 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 8598 | uint32_t* pSparseMemoryRequirementCount, |
| 8599 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 8600 | { |
| 8601 | auto stream = mImpl->stream(); |
| 8602 | auto countingStream = mImpl->countingStream(); |
| 8603 | countingStream->rewind(); |
| 8604 | { |
| 8605 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8606 | marshal_VkImageSparseMemoryRequirementsInfo2(countingStream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 8607 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8608 | if (pSparseMemoryRequirementCount) |
| 8609 | { |
| 8610 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8611 | } |
| 8612 | countingStream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8613 | if (pSparseMemoryRequirements) |
| 8614 | { |
| 8615 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8616 | { |
| 8617 | marshal_VkSparseImageMemoryRequirements2(countingStream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8618 | } |
| 8619 | } |
| 8620 | } |
| 8621 | uint32_t packetSize_vkGetImageSparseMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8622 | countingStream->rewind(); |
| 8623 | uint32_t opcode_vkGetImageSparseMemoryRequirements2KHR = OP_vkGetImageSparseMemoryRequirements2KHR; |
| 8624 | stream->write(&opcode_vkGetImageSparseMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8625 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8626 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8627 | marshal_VkImageSparseMemoryRequirementsInfo2(stream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 8628 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8629 | if (pSparseMemoryRequirementCount) |
| 8630 | { |
| 8631 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8632 | } |
| 8633 | stream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8634 | if (pSparseMemoryRequirements) |
| 8635 | { |
| 8636 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8637 | { |
| 8638 | marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8639 | } |
| 8640 | } |
| 8641 | uint32_t* check_pSparseMemoryRequirementCount; |
| 8642 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8643 | if (pSparseMemoryRequirementCount) |
| 8644 | { |
| 8645 | if (!(check_pSparseMemoryRequirementCount)) |
| 8646 | { |
| 8647 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 8648 | } |
| 8649 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8650 | } |
| 8651 | VkSparseImageMemoryRequirements2* check_pSparseMemoryRequirements; |
| 8652 | stream->read((VkSparseImageMemoryRequirements2**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8653 | if (pSparseMemoryRequirements) |
| 8654 | { |
| 8655 | if (!(check_pSparseMemoryRequirements)) |
| 8656 | { |
| 8657 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 8658 | } |
| 8659 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8660 | { |
| 8661 | unmarshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8662 | } |
| 8663 | } |
| 8664 | } |
| 8665 | |
| 8666 | #endif |
| 8667 | #ifdef VK_KHR_image_format_list |
| 8668 | #endif |
| 8669 | #ifdef VK_KHR_sampler_ycbcr_conversion |
| 8670 | VkResult VkEncoder::vkCreateSamplerYcbcrConversionKHR( |
| 8671 | VkDevice device, |
| 8672 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 8673 | const VkAllocationCallbacks* pAllocator, |
| 8674 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 8675 | { |
| 8676 | auto stream = mImpl->stream(); |
| 8677 | auto countingStream = mImpl->countingStream(); |
| 8678 | countingStream->rewind(); |
| 8679 | { |
| 8680 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8681 | marshal_VkSamplerYcbcrConversionCreateInfo(countingStream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 8682 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8683 | if (pAllocator) |
| 8684 | { |
| 8685 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8686 | } |
| 8687 | countingStream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8688 | } |
| 8689 | uint32_t packetSize_vkCreateSamplerYcbcrConversionKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8690 | countingStream->rewind(); |
| 8691 | uint32_t opcode_vkCreateSamplerYcbcrConversionKHR = OP_vkCreateSamplerYcbcrConversionKHR; |
| 8692 | stream->write(&opcode_vkCreateSamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8693 | stream->write(&packetSize_vkCreateSamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8694 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8695 | marshal_VkSamplerYcbcrConversionCreateInfo(stream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 8696 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8697 | if (pAllocator) |
| 8698 | { |
| 8699 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8700 | } |
| 8701 | stream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8702 | stream->read((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8703 | VkResult vkCreateSamplerYcbcrConversionKHR_VkResult_return = (VkResult)0; |
| 8704 | stream->read(&vkCreateSamplerYcbcrConversionKHR_VkResult_return, sizeof(VkResult)); |
| 8705 | return vkCreateSamplerYcbcrConversionKHR_VkResult_return; |
| 8706 | } |
| 8707 | |
| 8708 | void VkEncoder::vkDestroySamplerYcbcrConversionKHR( |
| 8709 | VkDevice device, |
| 8710 | VkSamplerYcbcrConversion ycbcrConversion, |
| 8711 | const VkAllocationCallbacks* pAllocator) |
| 8712 | { |
| 8713 | auto stream = mImpl->stream(); |
| 8714 | auto countingStream = mImpl->countingStream(); |
| 8715 | countingStream->rewind(); |
| 8716 | { |
| 8717 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8718 | countingStream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8719 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8720 | if (pAllocator) |
| 8721 | { |
| 8722 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8723 | } |
| 8724 | } |
| 8725 | uint32_t packetSize_vkDestroySamplerYcbcrConversionKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8726 | countingStream->rewind(); |
| 8727 | uint32_t opcode_vkDestroySamplerYcbcrConversionKHR = OP_vkDestroySamplerYcbcrConversionKHR; |
| 8728 | stream->write(&opcode_vkDestroySamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8729 | stream->write(&packetSize_vkDestroySamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8730 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8731 | stream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8732 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8733 | if (pAllocator) |
| 8734 | { |
| 8735 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8736 | } |
| 8737 | } |
| 8738 | |
| 8739 | #endif |
| 8740 | #ifdef VK_KHR_bind_memory2 |
| 8741 | VkResult VkEncoder::vkBindBufferMemory2KHR( |
| 8742 | VkDevice device, |
| 8743 | uint32_t bindInfoCount, |
| 8744 | const VkBindBufferMemoryInfo* pBindInfos) |
| 8745 | { |
| 8746 | auto stream = mImpl->stream(); |
| 8747 | auto countingStream = mImpl->countingStream(); |
| 8748 | countingStream->rewind(); |
| 8749 | { |
| 8750 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8751 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8752 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8753 | { |
| 8754 | marshal_VkBindBufferMemoryInfo(countingStream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 8755 | } |
| 8756 | } |
| 8757 | uint32_t packetSize_vkBindBufferMemory2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8758 | countingStream->rewind(); |
| 8759 | uint32_t opcode_vkBindBufferMemory2KHR = OP_vkBindBufferMemory2KHR; |
| 8760 | stream->write(&opcode_vkBindBufferMemory2KHR, sizeof(uint32_t)); |
| 8761 | stream->write(&packetSize_vkBindBufferMemory2KHR, sizeof(uint32_t)); |
| 8762 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8763 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8764 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8765 | { |
| 8766 | marshal_VkBindBufferMemoryInfo(stream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 8767 | } |
| 8768 | VkResult vkBindBufferMemory2KHR_VkResult_return = (VkResult)0; |
| 8769 | stream->read(&vkBindBufferMemory2KHR_VkResult_return, sizeof(VkResult)); |
| 8770 | return vkBindBufferMemory2KHR_VkResult_return; |
| 8771 | } |
| 8772 | |
| 8773 | VkResult VkEncoder::vkBindImageMemory2KHR( |
| 8774 | VkDevice device, |
| 8775 | uint32_t bindInfoCount, |
| 8776 | const VkBindImageMemoryInfo* pBindInfos) |
| 8777 | { |
| 8778 | auto stream = mImpl->stream(); |
| 8779 | auto countingStream = mImpl->countingStream(); |
| 8780 | countingStream->rewind(); |
| 8781 | { |
| 8782 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8783 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8784 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8785 | { |
| 8786 | marshal_VkBindImageMemoryInfo(countingStream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 8787 | } |
| 8788 | } |
| 8789 | uint32_t packetSize_vkBindImageMemory2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8790 | countingStream->rewind(); |
| 8791 | uint32_t opcode_vkBindImageMemory2KHR = OP_vkBindImageMemory2KHR; |
| 8792 | stream->write(&opcode_vkBindImageMemory2KHR, sizeof(uint32_t)); |
| 8793 | stream->write(&packetSize_vkBindImageMemory2KHR, sizeof(uint32_t)); |
| 8794 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8795 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8796 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8797 | { |
| 8798 | marshal_VkBindImageMemoryInfo(stream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 8799 | } |
| 8800 | VkResult vkBindImageMemory2KHR_VkResult_return = (VkResult)0; |
| 8801 | stream->read(&vkBindImageMemory2KHR_VkResult_return, sizeof(VkResult)); |
| 8802 | return vkBindImageMemory2KHR_VkResult_return; |
| 8803 | } |
| 8804 | |
| 8805 | #endif |
| 8806 | #ifdef VK_KHR_maintenance3 |
| 8807 | void VkEncoder::vkGetDescriptorSetLayoutSupportKHR( |
| 8808 | VkDevice device, |
| 8809 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 8810 | VkDescriptorSetLayoutSupport* pSupport) |
| 8811 | { |
| 8812 | auto stream = mImpl->stream(); |
| 8813 | auto countingStream = mImpl->countingStream(); |
| 8814 | countingStream->rewind(); |
| 8815 | { |
| 8816 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8817 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 8818 | marshal_VkDescriptorSetLayoutSupport(countingStream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8819 | } |
| 8820 | uint32_t packetSize_vkGetDescriptorSetLayoutSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8821 | countingStream->rewind(); |
| 8822 | uint32_t opcode_vkGetDescriptorSetLayoutSupportKHR = OP_vkGetDescriptorSetLayoutSupportKHR; |
| 8823 | stream->write(&opcode_vkGetDescriptorSetLayoutSupportKHR, sizeof(uint32_t)); |
| 8824 | stream->write(&packetSize_vkGetDescriptorSetLayoutSupportKHR, sizeof(uint32_t)); |
| 8825 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8826 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 8827 | marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8828 | unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8829 | } |
| 8830 | |
| 8831 | #endif |
| 8832 | #ifdef VK_KHR_draw_indirect_count |
| 8833 | void VkEncoder::vkCmdDrawIndirectCountKHR( |
| 8834 | VkCommandBuffer commandBuffer, |
| 8835 | VkBuffer buffer, |
| 8836 | VkDeviceSize offset, |
| 8837 | VkBuffer countBuffer, |
| 8838 | VkDeviceSize countBufferOffset, |
| 8839 | uint32_t maxDrawCount, |
| 8840 | uint32_t stride) |
| 8841 | { |
| 8842 | auto stream = mImpl->stream(); |
| 8843 | auto countingStream = mImpl->countingStream(); |
| 8844 | countingStream->rewind(); |
| 8845 | { |
| 8846 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8847 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8848 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8849 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8850 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8851 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8852 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8853 | } |
| 8854 | uint32_t packetSize_vkCmdDrawIndirectCountKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8855 | countingStream->rewind(); |
| 8856 | uint32_t opcode_vkCmdDrawIndirectCountKHR = OP_vkCmdDrawIndirectCountKHR; |
| 8857 | stream->write(&opcode_vkCmdDrawIndirectCountKHR, sizeof(uint32_t)); |
| 8858 | stream->write(&packetSize_vkCmdDrawIndirectCountKHR, sizeof(uint32_t)); |
| 8859 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8860 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8861 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8862 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8863 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8864 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8865 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8866 | } |
| 8867 | |
| 8868 | void VkEncoder::vkCmdDrawIndexedIndirectCountKHR( |
| 8869 | VkCommandBuffer commandBuffer, |
| 8870 | VkBuffer buffer, |
| 8871 | VkDeviceSize offset, |
| 8872 | VkBuffer countBuffer, |
| 8873 | VkDeviceSize countBufferOffset, |
| 8874 | uint32_t maxDrawCount, |
| 8875 | uint32_t stride) |
| 8876 | { |
| 8877 | auto stream = mImpl->stream(); |
| 8878 | auto countingStream = mImpl->countingStream(); |
| 8879 | countingStream->rewind(); |
| 8880 | { |
| 8881 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8882 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8883 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8884 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8885 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8886 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8887 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8888 | } |
| 8889 | uint32_t packetSize_vkCmdDrawIndexedIndirectCountKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8890 | countingStream->rewind(); |
| 8891 | uint32_t opcode_vkCmdDrawIndexedIndirectCountKHR = OP_vkCmdDrawIndexedIndirectCountKHR; |
| 8892 | stream->write(&opcode_vkCmdDrawIndexedIndirectCountKHR, sizeof(uint32_t)); |
| 8893 | stream->write(&packetSize_vkCmdDrawIndexedIndirectCountKHR, sizeof(uint32_t)); |
| 8894 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8895 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8896 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8897 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8898 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8899 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8900 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8901 | } |
| 8902 | |
| 8903 | #endif |
| 8904 | #ifdef VK_KHR_8bit_storage |
| 8905 | #endif |
| 8906 | #ifdef VK_EXT_debug_report |
| 8907 | VkResult VkEncoder::vkCreateDebugReportCallbackEXT( |
| 8908 | VkInstance instance, |
| 8909 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 8910 | const VkAllocationCallbacks* pAllocator, |
| 8911 | VkDebugReportCallbackEXT* pCallback) |
| 8912 | { |
| 8913 | auto stream = mImpl->stream(); |
| 8914 | auto countingStream = mImpl->countingStream(); |
| 8915 | countingStream->rewind(); |
| 8916 | { |
| 8917 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8918 | marshal_VkDebugReportCallbackCreateInfoEXT(countingStream, (const VkDebugReportCallbackCreateInfoEXT*)(pCreateInfo)); |
| 8919 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8920 | if (pAllocator) |
| 8921 | { |
| 8922 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8923 | } |
| 8924 | countingStream->write((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8925 | } |
| 8926 | uint32_t packetSize_vkCreateDebugReportCallbackEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8927 | countingStream->rewind(); |
| 8928 | uint32_t opcode_vkCreateDebugReportCallbackEXT = OP_vkCreateDebugReportCallbackEXT; |
| 8929 | stream->write(&opcode_vkCreateDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8930 | stream->write(&packetSize_vkCreateDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8931 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8932 | marshal_VkDebugReportCallbackCreateInfoEXT(stream, (const VkDebugReportCallbackCreateInfoEXT*)(pCreateInfo)); |
| 8933 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8934 | if (pAllocator) |
| 8935 | { |
| 8936 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8937 | } |
| 8938 | stream->write((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8939 | stream->read((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8940 | VkResult vkCreateDebugReportCallbackEXT_VkResult_return = (VkResult)0; |
| 8941 | stream->read(&vkCreateDebugReportCallbackEXT_VkResult_return, sizeof(VkResult)); |
| 8942 | return vkCreateDebugReportCallbackEXT_VkResult_return; |
| 8943 | } |
| 8944 | |
| 8945 | void VkEncoder::vkDestroyDebugReportCallbackEXT( |
| 8946 | VkInstance instance, |
| 8947 | VkDebugReportCallbackEXT callback, |
| 8948 | const VkAllocationCallbacks* pAllocator) |
| 8949 | { |
| 8950 | auto stream = mImpl->stream(); |
| 8951 | auto countingStream = mImpl->countingStream(); |
| 8952 | countingStream->rewind(); |
| 8953 | { |
| 8954 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8955 | countingStream->write((VkDebugReportCallbackEXT*)&callback, sizeof(VkDebugReportCallbackEXT)); |
| 8956 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8957 | if (pAllocator) |
| 8958 | { |
| 8959 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8960 | } |
| 8961 | } |
| 8962 | uint32_t packetSize_vkDestroyDebugReportCallbackEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8963 | countingStream->rewind(); |
| 8964 | uint32_t opcode_vkDestroyDebugReportCallbackEXT = OP_vkDestroyDebugReportCallbackEXT; |
| 8965 | stream->write(&opcode_vkDestroyDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8966 | stream->write(&packetSize_vkDestroyDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8967 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8968 | stream->write((VkDebugReportCallbackEXT*)&callback, sizeof(VkDebugReportCallbackEXT)); |
| 8969 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8970 | if (pAllocator) |
| 8971 | { |
| 8972 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8973 | } |
| 8974 | } |
| 8975 | |
| 8976 | void VkEncoder::vkDebugReportMessageEXT( |
| 8977 | VkInstance instance, |
| 8978 | VkDebugReportFlagsEXT flags, |
| 8979 | VkDebugReportObjectTypeEXT objectType, |
| 8980 | uint64_t object, |
| 8981 | size_t location, |
| 8982 | int32_t messageCode, |
| 8983 | const char* pLayerPrefix, |
| 8984 | const char* pMessage) |
| 8985 | { |
| 8986 | auto stream = mImpl->stream(); |
| 8987 | auto countingStream = mImpl->countingStream(); |
| 8988 | countingStream->rewind(); |
| 8989 | { |
| 8990 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8991 | countingStream->write((VkDebugReportFlagsEXT*)&flags, sizeof(VkDebugReportFlagsEXT)); |
| 8992 | countingStream->write((VkDebugReportObjectTypeEXT*)&objectType, sizeof(VkDebugReportObjectTypeEXT)); |
| 8993 | countingStream->write((uint64_t*)&object, sizeof(uint64_t)); |
| 8994 | countingStream->write((size_t*)&location, sizeof(size_t)); |
| 8995 | countingStream->write((int32_t*)&messageCode, sizeof(int32_t)); |
| 8996 | countingStream->putString(pLayerPrefix); |
| 8997 | countingStream->putString(pMessage); |
| 8998 | } |
| 8999 | uint32_t packetSize_vkDebugReportMessageEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9000 | countingStream->rewind(); |
| 9001 | uint32_t opcode_vkDebugReportMessageEXT = OP_vkDebugReportMessageEXT; |
| 9002 | stream->write(&opcode_vkDebugReportMessageEXT, sizeof(uint32_t)); |
| 9003 | stream->write(&packetSize_vkDebugReportMessageEXT, sizeof(uint32_t)); |
| 9004 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9005 | stream->write((VkDebugReportFlagsEXT*)&flags, sizeof(VkDebugReportFlagsEXT)); |
| 9006 | stream->write((VkDebugReportObjectTypeEXT*)&objectType, sizeof(VkDebugReportObjectTypeEXT)); |
| 9007 | stream->write((uint64_t*)&object, sizeof(uint64_t)); |
| 9008 | stream->write((size_t*)&location, sizeof(size_t)); |
| 9009 | stream->write((int32_t*)&messageCode, sizeof(int32_t)); |
| 9010 | stream->putString(pLayerPrefix); |
| 9011 | stream->putString(pMessage); |
| 9012 | } |
| 9013 | |
| 9014 | #endif |
| 9015 | #ifdef VK_NV_glsl_shader |
| 9016 | #endif |
| 9017 | #ifdef VK_EXT_depth_range_unrestricted |
| 9018 | #endif |
| 9019 | #ifdef VK_IMG_filter_cubic |
| 9020 | #endif |
| 9021 | #ifdef VK_AMD_rasterization_order |
| 9022 | #endif |
| 9023 | #ifdef VK_AMD_shader_trinary_minmax |
| 9024 | #endif |
| 9025 | #ifdef VK_AMD_shader_explicit_vertex_parameter |
| 9026 | #endif |
| 9027 | #ifdef VK_EXT_debug_marker |
| 9028 | VkResult VkEncoder::vkDebugMarkerSetObjectTagEXT( |
| 9029 | VkDevice device, |
| 9030 | const VkDebugMarkerObjectTagInfoEXT* pTagInfo) |
| 9031 | { |
| 9032 | auto stream = mImpl->stream(); |
| 9033 | auto countingStream = mImpl->countingStream(); |
| 9034 | countingStream->rewind(); |
| 9035 | { |
| 9036 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9037 | marshal_VkDebugMarkerObjectTagInfoEXT(countingStream, (const VkDebugMarkerObjectTagInfoEXT*)(pTagInfo)); |
| 9038 | } |
| 9039 | uint32_t packetSize_vkDebugMarkerSetObjectTagEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9040 | countingStream->rewind(); |
| 9041 | uint32_t opcode_vkDebugMarkerSetObjectTagEXT = OP_vkDebugMarkerSetObjectTagEXT; |
| 9042 | stream->write(&opcode_vkDebugMarkerSetObjectTagEXT, sizeof(uint32_t)); |
| 9043 | stream->write(&packetSize_vkDebugMarkerSetObjectTagEXT, sizeof(uint32_t)); |
| 9044 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9045 | marshal_VkDebugMarkerObjectTagInfoEXT(stream, (const VkDebugMarkerObjectTagInfoEXT*)(pTagInfo)); |
| 9046 | VkResult vkDebugMarkerSetObjectTagEXT_VkResult_return = (VkResult)0; |
| 9047 | stream->read(&vkDebugMarkerSetObjectTagEXT_VkResult_return, sizeof(VkResult)); |
| 9048 | return vkDebugMarkerSetObjectTagEXT_VkResult_return; |
| 9049 | } |
| 9050 | |
| 9051 | VkResult VkEncoder::vkDebugMarkerSetObjectNameEXT( |
| 9052 | VkDevice device, |
| 9053 | const VkDebugMarkerObjectNameInfoEXT* pNameInfo) |
| 9054 | { |
| 9055 | auto stream = mImpl->stream(); |
| 9056 | auto countingStream = mImpl->countingStream(); |
| 9057 | countingStream->rewind(); |
| 9058 | { |
| 9059 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9060 | marshal_VkDebugMarkerObjectNameInfoEXT(countingStream, (const VkDebugMarkerObjectNameInfoEXT*)(pNameInfo)); |
| 9061 | } |
| 9062 | uint32_t packetSize_vkDebugMarkerSetObjectNameEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9063 | countingStream->rewind(); |
| 9064 | uint32_t opcode_vkDebugMarkerSetObjectNameEXT = OP_vkDebugMarkerSetObjectNameEXT; |
| 9065 | stream->write(&opcode_vkDebugMarkerSetObjectNameEXT, sizeof(uint32_t)); |
| 9066 | stream->write(&packetSize_vkDebugMarkerSetObjectNameEXT, sizeof(uint32_t)); |
| 9067 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9068 | marshal_VkDebugMarkerObjectNameInfoEXT(stream, (const VkDebugMarkerObjectNameInfoEXT*)(pNameInfo)); |
| 9069 | VkResult vkDebugMarkerSetObjectNameEXT_VkResult_return = (VkResult)0; |
| 9070 | stream->read(&vkDebugMarkerSetObjectNameEXT_VkResult_return, sizeof(VkResult)); |
| 9071 | return vkDebugMarkerSetObjectNameEXT_VkResult_return; |
| 9072 | } |
| 9073 | |
| 9074 | void VkEncoder::vkCmdDebugMarkerBeginEXT( |
| 9075 | VkCommandBuffer commandBuffer, |
| 9076 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 9077 | { |
| 9078 | auto stream = mImpl->stream(); |
| 9079 | auto countingStream = mImpl->countingStream(); |
| 9080 | countingStream->rewind(); |
| 9081 | { |
| 9082 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9083 | marshal_VkDebugMarkerMarkerInfoEXT(countingStream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9084 | } |
| 9085 | uint32_t packetSize_vkCmdDebugMarkerBeginEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9086 | countingStream->rewind(); |
| 9087 | uint32_t opcode_vkCmdDebugMarkerBeginEXT = OP_vkCmdDebugMarkerBeginEXT; |
| 9088 | stream->write(&opcode_vkCmdDebugMarkerBeginEXT, sizeof(uint32_t)); |
| 9089 | stream->write(&packetSize_vkCmdDebugMarkerBeginEXT, sizeof(uint32_t)); |
| 9090 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9091 | marshal_VkDebugMarkerMarkerInfoEXT(stream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9092 | } |
| 9093 | |
| 9094 | void VkEncoder::vkCmdDebugMarkerEndEXT( |
| 9095 | VkCommandBuffer commandBuffer) |
| 9096 | { |
| 9097 | auto stream = mImpl->stream(); |
| 9098 | auto countingStream = mImpl->countingStream(); |
| 9099 | countingStream->rewind(); |
| 9100 | { |
| 9101 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9102 | } |
| 9103 | uint32_t packetSize_vkCmdDebugMarkerEndEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9104 | countingStream->rewind(); |
| 9105 | uint32_t opcode_vkCmdDebugMarkerEndEXT = OP_vkCmdDebugMarkerEndEXT; |
| 9106 | stream->write(&opcode_vkCmdDebugMarkerEndEXT, sizeof(uint32_t)); |
| 9107 | stream->write(&packetSize_vkCmdDebugMarkerEndEXT, sizeof(uint32_t)); |
| 9108 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9109 | } |
| 9110 | |
| 9111 | void VkEncoder::vkCmdDebugMarkerInsertEXT( |
| 9112 | VkCommandBuffer commandBuffer, |
| 9113 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 9114 | { |
| 9115 | auto stream = mImpl->stream(); |
| 9116 | auto countingStream = mImpl->countingStream(); |
| 9117 | countingStream->rewind(); |
| 9118 | { |
| 9119 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9120 | marshal_VkDebugMarkerMarkerInfoEXT(countingStream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9121 | } |
| 9122 | uint32_t packetSize_vkCmdDebugMarkerInsertEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9123 | countingStream->rewind(); |
| 9124 | uint32_t opcode_vkCmdDebugMarkerInsertEXT = OP_vkCmdDebugMarkerInsertEXT; |
| 9125 | stream->write(&opcode_vkCmdDebugMarkerInsertEXT, sizeof(uint32_t)); |
| 9126 | stream->write(&packetSize_vkCmdDebugMarkerInsertEXT, sizeof(uint32_t)); |
| 9127 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9128 | marshal_VkDebugMarkerMarkerInfoEXT(stream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9129 | } |
| 9130 | |
| 9131 | #endif |
| 9132 | #ifdef VK_AMD_gcn_shader |
| 9133 | #endif |
| 9134 | #ifdef VK_NV_dedicated_allocation |
| 9135 | #endif |
| 9136 | #ifdef VK_AMD_draw_indirect_count |
| 9137 | void VkEncoder::vkCmdDrawIndirectCountAMD( |
| 9138 | VkCommandBuffer commandBuffer, |
| 9139 | VkBuffer buffer, |
| 9140 | VkDeviceSize offset, |
| 9141 | VkBuffer countBuffer, |
| 9142 | VkDeviceSize countBufferOffset, |
| 9143 | uint32_t maxDrawCount, |
| 9144 | uint32_t stride) |
| 9145 | { |
| 9146 | auto stream = mImpl->stream(); |
| 9147 | auto countingStream = mImpl->countingStream(); |
| 9148 | countingStream->rewind(); |
| 9149 | { |
| 9150 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9151 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9152 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9153 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9154 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9155 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9156 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9157 | } |
| 9158 | uint32_t packetSize_vkCmdDrawIndirectCountAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9159 | countingStream->rewind(); |
| 9160 | uint32_t opcode_vkCmdDrawIndirectCountAMD = OP_vkCmdDrawIndirectCountAMD; |
| 9161 | stream->write(&opcode_vkCmdDrawIndirectCountAMD, sizeof(uint32_t)); |
| 9162 | stream->write(&packetSize_vkCmdDrawIndirectCountAMD, sizeof(uint32_t)); |
| 9163 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9164 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9165 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9166 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9167 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9168 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9169 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9170 | } |
| 9171 | |
| 9172 | void VkEncoder::vkCmdDrawIndexedIndirectCountAMD( |
| 9173 | VkCommandBuffer commandBuffer, |
| 9174 | VkBuffer buffer, |
| 9175 | VkDeviceSize offset, |
| 9176 | VkBuffer countBuffer, |
| 9177 | VkDeviceSize countBufferOffset, |
| 9178 | uint32_t maxDrawCount, |
| 9179 | uint32_t stride) |
| 9180 | { |
| 9181 | auto stream = mImpl->stream(); |
| 9182 | auto countingStream = mImpl->countingStream(); |
| 9183 | countingStream->rewind(); |
| 9184 | { |
| 9185 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9186 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9187 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9188 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9189 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9190 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9191 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9192 | } |
| 9193 | uint32_t packetSize_vkCmdDrawIndexedIndirectCountAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9194 | countingStream->rewind(); |
| 9195 | uint32_t opcode_vkCmdDrawIndexedIndirectCountAMD = OP_vkCmdDrawIndexedIndirectCountAMD; |
| 9196 | stream->write(&opcode_vkCmdDrawIndexedIndirectCountAMD, sizeof(uint32_t)); |
| 9197 | stream->write(&packetSize_vkCmdDrawIndexedIndirectCountAMD, sizeof(uint32_t)); |
| 9198 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9199 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9200 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9201 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9202 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9203 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9204 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9205 | } |
| 9206 | |
| 9207 | #endif |
| 9208 | #ifdef VK_AMD_negative_viewport_height |
| 9209 | #endif |
| 9210 | #ifdef VK_AMD_gpu_shader_half_float |
| 9211 | #endif |
| 9212 | #ifdef VK_AMD_shader_ballot |
| 9213 | #endif |
| 9214 | #ifdef VK_AMD_texture_gather_bias_lod |
| 9215 | #endif |
| 9216 | #ifdef VK_AMD_shader_info |
| 9217 | VkResult VkEncoder::vkGetShaderInfoAMD( |
| 9218 | VkDevice device, |
| 9219 | VkPipeline pipeline, |
| 9220 | VkShaderStageFlagBits shaderStage, |
| 9221 | VkShaderInfoTypeAMD infoType, |
| 9222 | size_t* pInfoSize, |
| 9223 | void* pInfo) |
| 9224 | { |
| 9225 | auto stream = mImpl->stream(); |
| 9226 | auto countingStream = mImpl->countingStream(); |
| 9227 | countingStream->rewind(); |
| 9228 | { |
| 9229 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9230 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 9231 | countingStream->write((VkShaderStageFlagBits*)&shaderStage, sizeof(VkShaderStageFlagBits)); |
| 9232 | countingStream->write((VkShaderInfoTypeAMD*)&infoType, sizeof(VkShaderInfoTypeAMD)); |
| 9233 | countingStream->write((size_t**)&pInfoSize, sizeof(size_t*)); |
| 9234 | if (pInfoSize) |
| 9235 | { |
| 9236 | countingStream->write((size_t*)pInfoSize, sizeof(size_t)); |
| 9237 | } |
| 9238 | countingStream->write((void**)&pInfo, sizeof(void*)); |
| 9239 | if (pInfo) |
| 9240 | { |
| 9241 | countingStream->write((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9242 | } |
| 9243 | } |
| 9244 | uint32_t packetSize_vkGetShaderInfoAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9245 | countingStream->rewind(); |
| 9246 | uint32_t opcode_vkGetShaderInfoAMD = OP_vkGetShaderInfoAMD; |
| 9247 | stream->write(&opcode_vkGetShaderInfoAMD, sizeof(uint32_t)); |
| 9248 | stream->write(&packetSize_vkGetShaderInfoAMD, sizeof(uint32_t)); |
| 9249 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9250 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 9251 | stream->write((VkShaderStageFlagBits*)&shaderStage, sizeof(VkShaderStageFlagBits)); |
| 9252 | stream->write((VkShaderInfoTypeAMD*)&infoType, sizeof(VkShaderInfoTypeAMD)); |
| 9253 | stream->write((size_t**)&pInfoSize, sizeof(size_t*)); |
| 9254 | if (pInfoSize) |
| 9255 | { |
| 9256 | stream->write((size_t*)pInfoSize, sizeof(size_t)); |
| 9257 | } |
| 9258 | stream->write((void**)&pInfo, sizeof(void*)); |
| 9259 | if (pInfo) |
| 9260 | { |
| 9261 | stream->write((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9262 | } |
| 9263 | size_t* check_pInfoSize; |
| 9264 | stream->read((size_t**)&check_pInfoSize, sizeof(size_t*)); |
| 9265 | if (pInfoSize) |
| 9266 | { |
| 9267 | if (!(check_pInfoSize)) |
| 9268 | { |
| 9269 | fprintf(stderr, "fatal: pInfoSize inconsistent between guest and host\n"); |
| 9270 | } |
| 9271 | stream->read((size_t*)pInfoSize, sizeof(size_t)); |
| 9272 | } |
| 9273 | void* check_pInfo; |
| 9274 | stream->read((void**)&check_pInfo, sizeof(void*)); |
| 9275 | if (pInfo) |
| 9276 | { |
| 9277 | if (!(check_pInfo)) |
| 9278 | { |
| 9279 | fprintf(stderr, "fatal: pInfo inconsistent between guest and host\n"); |
| 9280 | } |
| 9281 | stream->read((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9282 | } |
| 9283 | VkResult vkGetShaderInfoAMD_VkResult_return = (VkResult)0; |
| 9284 | stream->read(&vkGetShaderInfoAMD_VkResult_return, sizeof(VkResult)); |
| 9285 | return vkGetShaderInfoAMD_VkResult_return; |
| 9286 | } |
| 9287 | |
| 9288 | #endif |
| 9289 | #ifdef VK_AMD_shader_image_load_store_lod |
| 9290 | #endif |
| 9291 | #ifdef VK_IMG_format_pvrtc |
| 9292 | #endif |
| 9293 | #ifdef VK_NV_external_memory_capabilities |
| 9294 | VkResult VkEncoder::vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 9295 | VkPhysicalDevice physicalDevice, |
| 9296 | VkFormat format, |
| 9297 | VkImageType type, |
| 9298 | VkImageTiling tiling, |
| 9299 | VkImageUsageFlags usage, |
| 9300 | VkImageCreateFlags flags, |
| 9301 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 9302 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) |
| 9303 | { |
| 9304 | auto stream = mImpl->stream(); |
| 9305 | auto countingStream = mImpl->countingStream(); |
| 9306 | countingStream->rewind(); |
| 9307 | { |
| 9308 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9309 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 9310 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 9311 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 9312 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 9313 | countingStream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 9314 | countingStream->write((VkExternalMemoryHandleTypeFlagsNV*)&externalHandleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9315 | marshal_VkExternalImageFormatPropertiesNV(countingStream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9316 | } |
| 9317 | uint32_t packetSize_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9318 | countingStream->rewind(); |
| 9319 | uint32_t opcode_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = OP_vkGetPhysicalDeviceExternalImageFormatPropertiesNV; |
| 9320 | stream->write(&opcode_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, sizeof(uint32_t)); |
| 9321 | stream->write(&packetSize_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, sizeof(uint32_t)); |
| 9322 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9323 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 9324 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 9325 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 9326 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 9327 | stream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 9328 | stream->write((VkExternalMemoryHandleTypeFlagsNV*)&externalHandleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9329 | marshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9330 | unmarshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9331 | VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return = (VkResult)0; |
| 9332 | stream->read(&vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return, sizeof(VkResult)); |
| 9333 | return vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return; |
| 9334 | } |
| 9335 | |
| 9336 | #endif |
| 9337 | #ifdef VK_NV_external_memory |
| 9338 | #endif |
| 9339 | #ifdef VK_NV_external_memory_win32 |
| 9340 | VkResult VkEncoder::vkGetMemoryWin32HandleNV( |
| 9341 | VkDevice device, |
| 9342 | VkDeviceMemory memory, |
| 9343 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 9344 | HANDLE* pHandle) |
| 9345 | { |
| 9346 | auto stream = mImpl->stream(); |
| 9347 | auto countingStream = mImpl->countingStream(); |
| 9348 | countingStream->rewind(); |
| 9349 | { |
| 9350 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9351 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 9352 | countingStream->write((VkExternalMemoryHandleTypeFlagsNV*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9353 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9354 | } |
| 9355 | uint32_t packetSize_vkGetMemoryWin32HandleNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9356 | countingStream->rewind(); |
| 9357 | uint32_t opcode_vkGetMemoryWin32HandleNV = OP_vkGetMemoryWin32HandleNV; |
| 9358 | stream->write(&opcode_vkGetMemoryWin32HandleNV, sizeof(uint32_t)); |
| 9359 | stream->write(&packetSize_vkGetMemoryWin32HandleNV, sizeof(uint32_t)); |
| 9360 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9361 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 9362 | stream->write((VkExternalMemoryHandleTypeFlagsNV*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9363 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9364 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9365 | VkResult vkGetMemoryWin32HandleNV_VkResult_return = (VkResult)0; |
| 9366 | stream->read(&vkGetMemoryWin32HandleNV_VkResult_return, sizeof(VkResult)); |
| 9367 | return vkGetMemoryWin32HandleNV_VkResult_return; |
| 9368 | } |
| 9369 | |
| 9370 | #endif |
| 9371 | #ifdef VK_NV_win32_keyed_mutex |
| 9372 | #endif |
| 9373 | #ifdef VK_EXT_validation_flags |
| 9374 | #endif |
| 9375 | #ifdef VK_NN_vi_surface |
| 9376 | VkResult VkEncoder::vkCreateViSurfaceNN( |
| 9377 | VkInstance instance, |
| 9378 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 9379 | const VkAllocationCallbacks* pAllocator, |
| 9380 | VkSurfaceKHR* pSurface) |
| 9381 | { |
| 9382 | auto stream = mImpl->stream(); |
| 9383 | auto countingStream = mImpl->countingStream(); |
| 9384 | countingStream->rewind(); |
| 9385 | { |
| 9386 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9387 | marshal_VkViSurfaceCreateInfoNN(countingStream, (const VkViSurfaceCreateInfoNN*)(pCreateInfo)); |
| 9388 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9389 | if (pAllocator) |
| 9390 | { |
| 9391 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9392 | } |
| 9393 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9394 | } |
| 9395 | uint32_t packetSize_vkCreateViSurfaceNN = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9396 | countingStream->rewind(); |
| 9397 | uint32_t opcode_vkCreateViSurfaceNN = OP_vkCreateViSurfaceNN; |
| 9398 | stream->write(&opcode_vkCreateViSurfaceNN, sizeof(uint32_t)); |
| 9399 | stream->write(&packetSize_vkCreateViSurfaceNN, sizeof(uint32_t)); |
| 9400 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9401 | marshal_VkViSurfaceCreateInfoNN(stream, (const VkViSurfaceCreateInfoNN*)(pCreateInfo)); |
| 9402 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9403 | if (pAllocator) |
| 9404 | { |
| 9405 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9406 | } |
| 9407 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9408 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9409 | VkResult vkCreateViSurfaceNN_VkResult_return = (VkResult)0; |
| 9410 | stream->read(&vkCreateViSurfaceNN_VkResult_return, sizeof(VkResult)); |
| 9411 | return vkCreateViSurfaceNN_VkResult_return; |
| 9412 | } |
| 9413 | |
| 9414 | #endif |
| 9415 | #ifdef VK_EXT_shader_subgroup_ballot |
| 9416 | #endif |
| 9417 | #ifdef VK_EXT_shader_subgroup_vote |
| 9418 | #endif |
| 9419 | #ifdef VK_EXT_conditional_rendering |
| 9420 | void VkEncoder::vkCmdBeginConditionalRenderingEXT( |
| 9421 | VkCommandBuffer commandBuffer, |
| 9422 | const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) |
| 9423 | { |
| 9424 | auto stream = mImpl->stream(); |
| 9425 | auto countingStream = mImpl->countingStream(); |
| 9426 | countingStream->rewind(); |
| 9427 | { |
| 9428 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9429 | marshal_VkConditionalRenderingBeginInfoEXT(countingStream, (const VkConditionalRenderingBeginInfoEXT*)(pConditionalRenderingBegin)); |
| 9430 | } |
| 9431 | uint32_t packetSize_vkCmdBeginConditionalRenderingEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9432 | countingStream->rewind(); |
| 9433 | uint32_t opcode_vkCmdBeginConditionalRenderingEXT = OP_vkCmdBeginConditionalRenderingEXT; |
| 9434 | stream->write(&opcode_vkCmdBeginConditionalRenderingEXT, sizeof(uint32_t)); |
| 9435 | stream->write(&packetSize_vkCmdBeginConditionalRenderingEXT, sizeof(uint32_t)); |
| 9436 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9437 | marshal_VkConditionalRenderingBeginInfoEXT(stream, (const VkConditionalRenderingBeginInfoEXT*)(pConditionalRenderingBegin)); |
| 9438 | } |
| 9439 | |
| 9440 | void VkEncoder::vkCmdEndConditionalRenderingEXT( |
| 9441 | VkCommandBuffer commandBuffer) |
| 9442 | { |
| 9443 | auto stream = mImpl->stream(); |
| 9444 | auto countingStream = mImpl->countingStream(); |
| 9445 | countingStream->rewind(); |
| 9446 | { |
| 9447 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9448 | } |
| 9449 | uint32_t packetSize_vkCmdEndConditionalRenderingEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9450 | countingStream->rewind(); |
| 9451 | uint32_t opcode_vkCmdEndConditionalRenderingEXT = OP_vkCmdEndConditionalRenderingEXT; |
| 9452 | stream->write(&opcode_vkCmdEndConditionalRenderingEXT, sizeof(uint32_t)); |
| 9453 | stream->write(&packetSize_vkCmdEndConditionalRenderingEXT, sizeof(uint32_t)); |
| 9454 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9455 | } |
| 9456 | |
| 9457 | #endif |
| 9458 | #ifdef VK_NVX_device_generated_commands |
| 9459 | void VkEncoder::vkCmdProcessCommandsNVX( |
| 9460 | VkCommandBuffer commandBuffer, |
| 9461 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) |
| 9462 | { |
| 9463 | auto stream = mImpl->stream(); |
| 9464 | auto countingStream = mImpl->countingStream(); |
| 9465 | countingStream->rewind(); |
| 9466 | { |
| 9467 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9468 | marshal_VkCmdProcessCommandsInfoNVX(countingStream, (const VkCmdProcessCommandsInfoNVX*)(pProcessCommandsInfo)); |
| 9469 | } |
| 9470 | uint32_t packetSize_vkCmdProcessCommandsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9471 | countingStream->rewind(); |
| 9472 | uint32_t opcode_vkCmdProcessCommandsNVX = OP_vkCmdProcessCommandsNVX; |
| 9473 | stream->write(&opcode_vkCmdProcessCommandsNVX, sizeof(uint32_t)); |
| 9474 | stream->write(&packetSize_vkCmdProcessCommandsNVX, sizeof(uint32_t)); |
| 9475 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9476 | marshal_VkCmdProcessCommandsInfoNVX(stream, (const VkCmdProcessCommandsInfoNVX*)(pProcessCommandsInfo)); |
| 9477 | } |
| 9478 | |
| 9479 | void VkEncoder::vkCmdReserveSpaceForCommandsNVX( |
| 9480 | VkCommandBuffer commandBuffer, |
| 9481 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) |
| 9482 | { |
| 9483 | auto stream = mImpl->stream(); |
| 9484 | auto countingStream = mImpl->countingStream(); |
| 9485 | countingStream->rewind(); |
| 9486 | { |
| 9487 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9488 | marshal_VkCmdReserveSpaceForCommandsInfoNVX(countingStream, (const VkCmdReserveSpaceForCommandsInfoNVX*)(pReserveSpaceInfo)); |
| 9489 | } |
| 9490 | uint32_t packetSize_vkCmdReserveSpaceForCommandsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9491 | countingStream->rewind(); |
| 9492 | uint32_t opcode_vkCmdReserveSpaceForCommandsNVX = OP_vkCmdReserveSpaceForCommandsNVX; |
| 9493 | stream->write(&opcode_vkCmdReserveSpaceForCommandsNVX, sizeof(uint32_t)); |
| 9494 | stream->write(&packetSize_vkCmdReserveSpaceForCommandsNVX, sizeof(uint32_t)); |
| 9495 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9496 | marshal_VkCmdReserveSpaceForCommandsInfoNVX(stream, (const VkCmdReserveSpaceForCommandsInfoNVX*)(pReserveSpaceInfo)); |
| 9497 | } |
| 9498 | |
| 9499 | VkResult VkEncoder::vkCreateIndirectCommandsLayoutNVX( |
| 9500 | VkDevice device, |
| 9501 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 9502 | const VkAllocationCallbacks* pAllocator, |
| 9503 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) |
| 9504 | { |
| 9505 | auto stream = mImpl->stream(); |
| 9506 | auto countingStream = mImpl->countingStream(); |
| 9507 | countingStream->rewind(); |
| 9508 | { |
| 9509 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9510 | marshal_VkIndirectCommandsLayoutCreateInfoNVX(countingStream, (const VkIndirectCommandsLayoutCreateInfoNVX*)(pCreateInfo)); |
| 9511 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9512 | if (pAllocator) |
| 9513 | { |
| 9514 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9515 | } |
| 9516 | countingStream->write((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9517 | } |
| 9518 | uint32_t packetSize_vkCreateIndirectCommandsLayoutNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9519 | countingStream->rewind(); |
| 9520 | uint32_t opcode_vkCreateIndirectCommandsLayoutNVX = OP_vkCreateIndirectCommandsLayoutNVX; |
| 9521 | stream->write(&opcode_vkCreateIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9522 | stream->write(&packetSize_vkCreateIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9523 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9524 | marshal_VkIndirectCommandsLayoutCreateInfoNVX(stream, (const VkIndirectCommandsLayoutCreateInfoNVX*)(pCreateInfo)); |
| 9525 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9526 | if (pAllocator) |
| 9527 | { |
| 9528 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9529 | } |
| 9530 | stream->write((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9531 | stream->read((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9532 | VkResult vkCreateIndirectCommandsLayoutNVX_VkResult_return = (VkResult)0; |
| 9533 | stream->read(&vkCreateIndirectCommandsLayoutNVX_VkResult_return, sizeof(VkResult)); |
| 9534 | return vkCreateIndirectCommandsLayoutNVX_VkResult_return; |
| 9535 | } |
| 9536 | |
| 9537 | void VkEncoder::vkDestroyIndirectCommandsLayoutNVX( |
| 9538 | VkDevice device, |
| 9539 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 9540 | const VkAllocationCallbacks* pAllocator) |
| 9541 | { |
| 9542 | auto stream = mImpl->stream(); |
| 9543 | auto countingStream = mImpl->countingStream(); |
| 9544 | countingStream->rewind(); |
| 9545 | { |
| 9546 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9547 | countingStream->write((VkIndirectCommandsLayoutNVX*)&indirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9548 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9549 | if (pAllocator) |
| 9550 | { |
| 9551 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9552 | } |
| 9553 | } |
| 9554 | uint32_t packetSize_vkDestroyIndirectCommandsLayoutNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9555 | countingStream->rewind(); |
| 9556 | uint32_t opcode_vkDestroyIndirectCommandsLayoutNVX = OP_vkDestroyIndirectCommandsLayoutNVX; |
| 9557 | stream->write(&opcode_vkDestroyIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9558 | stream->write(&packetSize_vkDestroyIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9559 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9560 | stream->write((VkIndirectCommandsLayoutNVX*)&indirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9561 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9562 | if (pAllocator) |
| 9563 | { |
| 9564 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9565 | } |
| 9566 | } |
| 9567 | |
| 9568 | VkResult VkEncoder::vkCreateObjectTableNVX( |
| 9569 | VkDevice device, |
| 9570 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 9571 | const VkAllocationCallbacks* pAllocator, |
| 9572 | VkObjectTableNVX* pObjectTable) |
| 9573 | { |
| 9574 | auto stream = mImpl->stream(); |
| 9575 | auto countingStream = mImpl->countingStream(); |
| 9576 | countingStream->rewind(); |
| 9577 | { |
| 9578 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9579 | marshal_VkObjectTableCreateInfoNVX(countingStream, (const VkObjectTableCreateInfoNVX*)(pCreateInfo)); |
| 9580 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9581 | if (pAllocator) |
| 9582 | { |
| 9583 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9584 | } |
| 9585 | countingStream->write((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9586 | } |
| 9587 | uint32_t packetSize_vkCreateObjectTableNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9588 | countingStream->rewind(); |
| 9589 | uint32_t opcode_vkCreateObjectTableNVX = OP_vkCreateObjectTableNVX; |
| 9590 | stream->write(&opcode_vkCreateObjectTableNVX, sizeof(uint32_t)); |
| 9591 | stream->write(&packetSize_vkCreateObjectTableNVX, sizeof(uint32_t)); |
| 9592 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9593 | marshal_VkObjectTableCreateInfoNVX(stream, (const VkObjectTableCreateInfoNVX*)(pCreateInfo)); |
| 9594 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9595 | if (pAllocator) |
| 9596 | { |
| 9597 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9598 | } |
| 9599 | stream->write((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9600 | stream->read((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9601 | VkResult vkCreateObjectTableNVX_VkResult_return = (VkResult)0; |
| 9602 | stream->read(&vkCreateObjectTableNVX_VkResult_return, sizeof(VkResult)); |
| 9603 | return vkCreateObjectTableNVX_VkResult_return; |
| 9604 | } |
| 9605 | |
| 9606 | void VkEncoder::vkDestroyObjectTableNVX( |
| 9607 | VkDevice device, |
| 9608 | VkObjectTableNVX objectTable, |
| 9609 | const VkAllocationCallbacks* pAllocator) |
| 9610 | { |
| 9611 | auto stream = mImpl->stream(); |
| 9612 | auto countingStream = mImpl->countingStream(); |
| 9613 | countingStream->rewind(); |
| 9614 | { |
| 9615 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9616 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9617 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9618 | if (pAllocator) |
| 9619 | { |
| 9620 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9621 | } |
| 9622 | } |
| 9623 | uint32_t packetSize_vkDestroyObjectTableNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9624 | countingStream->rewind(); |
| 9625 | uint32_t opcode_vkDestroyObjectTableNVX = OP_vkDestroyObjectTableNVX; |
| 9626 | stream->write(&opcode_vkDestroyObjectTableNVX, sizeof(uint32_t)); |
| 9627 | stream->write(&packetSize_vkDestroyObjectTableNVX, sizeof(uint32_t)); |
| 9628 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9629 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9630 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9631 | if (pAllocator) |
| 9632 | { |
| 9633 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9634 | } |
| 9635 | } |
| 9636 | |
| 9637 | VkResult VkEncoder::vkRegisterObjectsNVX( |
| 9638 | VkDevice device, |
| 9639 | VkObjectTableNVX objectTable, |
| 9640 | uint32_t objectCount, |
| 9641 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 9642 | const uint32_t* pObjectIndices) |
| 9643 | { |
| 9644 | auto stream = mImpl->stream(); |
| 9645 | auto countingStream = mImpl->countingStream(); |
| 9646 | countingStream->rewind(); |
| 9647 | { |
| 9648 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9649 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9650 | countingStream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9651 | countingStream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9652 | } |
| 9653 | uint32_t packetSize_vkRegisterObjectsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9654 | countingStream->rewind(); |
| 9655 | uint32_t opcode_vkRegisterObjectsNVX = OP_vkRegisterObjectsNVX; |
| 9656 | stream->write(&opcode_vkRegisterObjectsNVX, sizeof(uint32_t)); |
| 9657 | stream->write(&packetSize_vkRegisterObjectsNVX, sizeof(uint32_t)); |
| 9658 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9659 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9660 | stream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9661 | stream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9662 | VkResult vkRegisterObjectsNVX_VkResult_return = (VkResult)0; |
| 9663 | stream->read(&vkRegisterObjectsNVX_VkResult_return, sizeof(VkResult)); |
| 9664 | return vkRegisterObjectsNVX_VkResult_return; |
| 9665 | } |
| 9666 | |
| 9667 | VkResult VkEncoder::vkUnregisterObjectsNVX( |
| 9668 | VkDevice device, |
| 9669 | VkObjectTableNVX objectTable, |
| 9670 | uint32_t objectCount, |
| 9671 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 9672 | const uint32_t* pObjectIndices) |
| 9673 | { |
| 9674 | auto stream = mImpl->stream(); |
| 9675 | auto countingStream = mImpl->countingStream(); |
| 9676 | countingStream->rewind(); |
| 9677 | { |
| 9678 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9679 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9680 | countingStream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9681 | countingStream->write((const VkObjectEntryTypeNVX*)pObjectEntryTypes, ((objectCount)) * sizeof(const VkObjectEntryTypeNVX)); |
| 9682 | countingStream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9683 | } |
| 9684 | uint32_t packetSize_vkUnregisterObjectsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9685 | countingStream->rewind(); |
| 9686 | uint32_t opcode_vkUnregisterObjectsNVX = OP_vkUnregisterObjectsNVX; |
| 9687 | stream->write(&opcode_vkUnregisterObjectsNVX, sizeof(uint32_t)); |
| 9688 | stream->write(&packetSize_vkUnregisterObjectsNVX, sizeof(uint32_t)); |
| 9689 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9690 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9691 | stream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9692 | stream->write((const VkObjectEntryTypeNVX*)pObjectEntryTypes, ((objectCount)) * sizeof(const VkObjectEntryTypeNVX)); |
| 9693 | stream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9694 | VkResult vkUnregisterObjectsNVX_VkResult_return = (VkResult)0; |
| 9695 | stream->read(&vkUnregisterObjectsNVX_VkResult_return, sizeof(VkResult)); |
| 9696 | return vkUnregisterObjectsNVX_VkResult_return; |
| 9697 | } |
| 9698 | |
| 9699 | void VkEncoder::vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 9700 | VkPhysicalDevice physicalDevice, |
| 9701 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 9702 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) |
| 9703 | { |
| 9704 | auto stream = mImpl->stream(); |
| 9705 | auto countingStream = mImpl->countingStream(); |
| 9706 | countingStream->rewind(); |
| 9707 | { |
| 9708 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9709 | marshal_VkDeviceGeneratedCommandsFeaturesNVX(countingStream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9710 | marshal_VkDeviceGeneratedCommandsLimitsNVX(countingStream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9711 | } |
| 9712 | uint32_t packetSize_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9713 | countingStream->rewind(); |
| 9714 | uint32_t opcode_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = OP_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX; |
| 9715 | stream->write(&opcode_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, sizeof(uint32_t)); |
| 9716 | stream->write(&packetSize_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, sizeof(uint32_t)); |
| 9717 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9718 | marshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9719 | marshal_VkDeviceGeneratedCommandsLimitsNVX(stream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9720 | unmarshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9721 | unmarshal_VkDeviceGeneratedCommandsLimitsNVX(stream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9722 | } |
| 9723 | |
| 9724 | #endif |
| 9725 | #ifdef VK_NV_clip_space_w_scaling |
| 9726 | void VkEncoder::vkCmdSetViewportWScalingNV( |
| 9727 | VkCommandBuffer commandBuffer, |
| 9728 | uint32_t firstViewport, |
| 9729 | uint32_t viewportCount, |
| 9730 | const VkViewportWScalingNV* pViewportWScalings) |
| 9731 | { |
| 9732 | auto stream = mImpl->stream(); |
| 9733 | auto countingStream = mImpl->countingStream(); |
| 9734 | countingStream->rewind(); |
| 9735 | { |
| 9736 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9737 | countingStream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 9738 | countingStream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 9739 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 9740 | { |
| 9741 | marshal_VkViewportWScalingNV(countingStream, (const VkViewportWScalingNV*)(pViewportWScalings + i)); |
| 9742 | } |
| 9743 | } |
| 9744 | uint32_t packetSize_vkCmdSetViewportWScalingNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9745 | countingStream->rewind(); |
| 9746 | uint32_t opcode_vkCmdSetViewportWScalingNV = OP_vkCmdSetViewportWScalingNV; |
| 9747 | stream->write(&opcode_vkCmdSetViewportWScalingNV, sizeof(uint32_t)); |
| 9748 | stream->write(&packetSize_vkCmdSetViewportWScalingNV, sizeof(uint32_t)); |
| 9749 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9750 | stream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 9751 | stream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 9752 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 9753 | { |
| 9754 | marshal_VkViewportWScalingNV(stream, (const VkViewportWScalingNV*)(pViewportWScalings + i)); |
| 9755 | } |
| 9756 | } |
| 9757 | |
| 9758 | #endif |
| 9759 | #ifdef VK_EXT_direct_mode_display |
| 9760 | VkResult VkEncoder::vkReleaseDisplayEXT( |
| 9761 | VkPhysicalDevice physicalDevice, |
| 9762 | VkDisplayKHR display) |
| 9763 | { |
| 9764 | auto stream = mImpl->stream(); |
| 9765 | auto countingStream = mImpl->countingStream(); |
| 9766 | countingStream->rewind(); |
| 9767 | { |
| 9768 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9769 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9770 | } |
| 9771 | uint32_t packetSize_vkReleaseDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9772 | countingStream->rewind(); |
| 9773 | uint32_t opcode_vkReleaseDisplayEXT = OP_vkReleaseDisplayEXT; |
| 9774 | stream->write(&opcode_vkReleaseDisplayEXT, sizeof(uint32_t)); |
| 9775 | stream->write(&packetSize_vkReleaseDisplayEXT, sizeof(uint32_t)); |
| 9776 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9777 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9778 | VkResult vkReleaseDisplayEXT_VkResult_return = (VkResult)0; |
| 9779 | stream->read(&vkReleaseDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9780 | return vkReleaseDisplayEXT_VkResult_return; |
| 9781 | } |
| 9782 | |
| 9783 | #endif |
| 9784 | #ifdef VK_EXT_acquire_xlib_display |
| 9785 | VkResult VkEncoder::vkAcquireXlibDisplayEXT( |
| 9786 | VkPhysicalDevice physicalDevice, |
| 9787 | Display* dpy, |
| 9788 | VkDisplayKHR display) |
| 9789 | { |
| 9790 | auto stream = mImpl->stream(); |
| 9791 | auto countingStream = mImpl->countingStream(); |
| 9792 | countingStream->rewind(); |
| 9793 | { |
| 9794 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9795 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 9796 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9797 | } |
| 9798 | uint32_t packetSize_vkAcquireXlibDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9799 | countingStream->rewind(); |
| 9800 | uint32_t opcode_vkAcquireXlibDisplayEXT = OP_vkAcquireXlibDisplayEXT; |
| 9801 | stream->write(&opcode_vkAcquireXlibDisplayEXT, sizeof(uint32_t)); |
| 9802 | stream->write(&packetSize_vkAcquireXlibDisplayEXT, sizeof(uint32_t)); |
| 9803 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9804 | stream->write((Display*)dpy, sizeof(Display)); |
| 9805 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9806 | stream->read((Display*)dpy, sizeof(Display)); |
| 9807 | VkResult vkAcquireXlibDisplayEXT_VkResult_return = (VkResult)0; |
| 9808 | stream->read(&vkAcquireXlibDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9809 | return vkAcquireXlibDisplayEXT_VkResult_return; |
| 9810 | } |
| 9811 | |
| 9812 | VkResult VkEncoder::vkGetRandROutputDisplayEXT( |
| 9813 | VkPhysicalDevice physicalDevice, |
| 9814 | Display* dpy, |
| 9815 | RROutput rrOutput, |
| 9816 | VkDisplayKHR* pDisplay) |
| 9817 | { |
| 9818 | auto stream = mImpl->stream(); |
| 9819 | auto countingStream = mImpl->countingStream(); |
| 9820 | countingStream->rewind(); |
| 9821 | { |
| 9822 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9823 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 9824 | countingStream->write((RROutput*)&rrOutput, sizeof(RROutput)); |
| 9825 | countingStream->write((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9826 | } |
| 9827 | uint32_t packetSize_vkGetRandROutputDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9828 | countingStream->rewind(); |
| 9829 | uint32_t opcode_vkGetRandROutputDisplayEXT = OP_vkGetRandROutputDisplayEXT; |
| 9830 | stream->write(&opcode_vkGetRandROutputDisplayEXT, sizeof(uint32_t)); |
| 9831 | stream->write(&packetSize_vkGetRandROutputDisplayEXT, sizeof(uint32_t)); |
| 9832 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9833 | stream->write((Display*)dpy, sizeof(Display)); |
| 9834 | stream->write((RROutput*)&rrOutput, sizeof(RROutput)); |
| 9835 | stream->write((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9836 | stream->read((Display*)dpy, sizeof(Display)); |
| 9837 | stream->read((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9838 | VkResult vkGetRandROutputDisplayEXT_VkResult_return = (VkResult)0; |
| 9839 | stream->read(&vkGetRandROutputDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9840 | return vkGetRandROutputDisplayEXT_VkResult_return; |
| 9841 | } |
| 9842 | |
| 9843 | #endif |
| 9844 | #ifdef VK_EXT_display_surface_counter |
| 9845 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 9846 | VkPhysicalDevice physicalDevice, |
| 9847 | VkSurfaceKHR surface, |
| 9848 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) |
| 9849 | { |
| 9850 | auto stream = mImpl->stream(); |
| 9851 | auto countingStream = mImpl->countingStream(); |
| 9852 | countingStream->rewind(); |
| 9853 | { |
| 9854 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9855 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 9856 | marshal_VkSurfaceCapabilities2EXT(countingStream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9857 | } |
| 9858 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilities2EXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9859 | countingStream->rewind(); |
| 9860 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilities2EXT = OP_vkGetPhysicalDeviceSurfaceCapabilities2EXT; |
| 9861 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilities2EXT, sizeof(uint32_t)); |
| 9862 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilities2EXT, sizeof(uint32_t)); |
| 9863 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9864 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 9865 | marshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9866 | unmarshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9867 | VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return = (VkResult)0; |
| 9868 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return, sizeof(VkResult)); |
| 9869 | return vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return; |
| 9870 | } |
| 9871 | |
| 9872 | #endif |
| 9873 | #ifdef VK_EXT_display_control |
| 9874 | VkResult VkEncoder::vkDisplayPowerControlEXT( |
| 9875 | VkDevice device, |
| 9876 | VkDisplayKHR display, |
| 9877 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) |
| 9878 | { |
| 9879 | auto stream = mImpl->stream(); |
| 9880 | auto countingStream = mImpl->countingStream(); |
| 9881 | countingStream->rewind(); |
| 9882 | { |
| 9883 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9884 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9885 | marshal_VkDisplayPowerInfoEXT(countingStream, (const VkDisplayPowerInfoEXT*)(pDisplayPowerInfo)); |
| 9886 | } |
| 9887 | uint32_t packetSize_vkDisplayPowerControlEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9888 | countingStream->rewind(); |
| 9889 | uint32_t opcode_vkDisplayPowerControlEXT = OP_vkDisplayPowerControlEXT; |
| 9890 | stream->write(&opcode_vkDisplayPowerControlEXT, sizeof(uint32_t)); |
| 9891 | stream->write(&packetSize_vkDisplayPowerControlEXT, sizeof(uint32_t)); |
| 9892 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9893 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9894 | marshal_VkDisplayPowerInfoEXT(stream, (const VkDisplayPowerInfoEXT*)(pDisplayPowerInfo)); |
| 9895 | VkResult vkDisplayPowerControlEXT_VkResult_return = (VkResult)0; |
| 9896 | stream->read(&vkDisplayPowerControlEXT_VkResult_return, sizeof(VkResult)); |
| 9897 | return vkDisplayPowerControlEXT_VkResult_return; |
| 9898 | } |
| 9899 | |
| 9900 | VkResult VkEncoder::vkRegisterDeviceEventEXT( |
| 9901 | VkDevice device, |
| 9902 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 9903 | const VkAllocationCallbacks* pAllocator, |
| 9904 | VkFence* pFence) |
| 9905 | { |
| 9906 | auto stream = mImpl->stream(); |
| 9907 | auto countingStream = mImpl->countingStream(); |
| 9908 | countingStream->rewind(); |
| 9909 | { |
| 9910 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9911 | marshal_VkDeviceEventInfoEXT(countingStream, (const VkDeviceEventInfoEXT*)(pDeviceEventInfo)); |
| 9912 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9913 | if (pAllocator) |
| 9914 | { |
| 9915 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9916 | } |
| 9917 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9918 | } |
| 9919 | uint32_t packetSize_vkRegisterDeviceEventEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9920 | countingStream->rewind(); |
| 9921 | uint32_t opcode_vkRegisterDeviceEventEXT = OP_vkRegisterDeviceEventEXT; |
| 9922 | stream->write(&opcode_vkRegisterDeviceEventEXT, sizeof(uint32_t)); |
| 9923 | stream->write(&packetSize_vkRegisterDeviceEventEXT, sizeof(uint32_t)); |
| 9924 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9925 | marshal_VkDeviceEventInfoEXT(stream, (const VkDeviceEventInfoEXT*)(pDeviceEventInfo)); |
| 9926 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9927 | if (pAllocator) |
| 9928 | { |
| 9929 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9930 | } |
| 9931 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9932 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 9933 | VkResult vkRegisterDeviceEventEXT_VkResult_return = (VkResult)0; |
| 9934 | stream->read(&vkRegisterDeviceEventEXT_VkResult_return, sizeof(VkResult)); |
| 9935 | return vkRegisterDeviceEventEXT_VkResult_return; |
| 9936 | } |
| 9937 | |
| 9938 | VkResult VkEncoder::vkRegisterDisplayEventEXT( |
| 9939 | VkDevice device, |
| 9940 | VkDisplayKHR display, |
| 9941 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 9942 | const VkAllocationCallbacks* pAllocator, |
| 9943 | VkFence* pFence) |
| 9944 | { |
| 9945 | auto stream = mImpl->stream(); |
| 9946 | auto countingStream = mImpl->countingStream(); |
| 9947 | countingStream->rewind(); |
| 9948 | { |
| 9949 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9950 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9951 | marshal_VkDisplayEventInfoEXT(countingStream, (const VkDisplayEventInfoEXT*)(pDisplayEventInfo)); |
| 9952 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9953 | if (pAllocator) |
| 9954 | { |
| 9955 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9956 | } |
| 9957 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9958 | } |
| 9959 | uint32_t packetSize_vkRegisterDisplayEventEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9960 | countingStream->rewind(); |
| 9961 | uint32_t opcode_vkRegisterDisplayEventEXT = OP_vkRegisterDisplayEventEXT; |
| 9962 | stream->write(&opcode_vkRegisterDisplayEventEXT, sizeof(uint32_t)); |
| 9963 | stream->write(&packetSize_vkRegisterDisplayEventEXT, sizeof(uint32_t)); |
| 9964 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9965 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9966 | marshal_VkDisplayEventInfoEXT(stream, (const VkDisplayEventInfoEXT*)(pDisplayEventInfo)); |
| 9967 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9968 | if (pAllocator) |
| 9969 | { |
| 9970 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9971 | } |
| 9972 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9973 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 9974 | VkResult vkRegisterDisplayEventEXT_VkResult_return = (VkResult)0; |
| 9975 | stream->read(&vkRegisterDisplayEventEXT_VkResult_return, sizeof(VkResult)); |
| 9976 | return vkRegisterDisplayEventEXT_VkResult_return; |
| 9977 | } |
| 9978 | |
| 9979 | VkResult VkEncoder::vkGetSwapchainCounterEXT( |
| 9980 | VkDevice device, |
| 9981 | VkSwapchainKHR swapchain, |
| 9982 | VkSurfaceCounterFlagBitsEXT counter, |
| 9983 | uint64_t* pCounterValue) |
| 9984 | { |
| 9985 | auto stream = mImpl->stream(); |
| 9986 | auto countingStream = mImpl->countingStream(); |
| 9987 | countingStream->rewind(); |
| 9988 | { |
| 9989 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9990 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 9991 | countingStream->write((VkSurfaceCounterFlagBitsEXT*)&counter, sizeof(VkSurfaceCounterFlagBitsEXT)); |
| 9992 | countingStream->write((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 9993 | } |
| 9994 | uint32_t packetSize_vkGetSwapchainCounterEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9995 | countingStream->rewind(); |
| 9996 | uint32_t opcode_vkGetSwapchainCounterEXT = OP_vkGetSwapchainCounterEXT; |
| 9997 | stream->write(&opcode_vkGetSwapchainCounterEXT, sizeof(uint32_t)); |
| 9998 | stream->write(&packetSize_vkGetSwapchainCounterEXT, sizeof(uint32_t)); |
| 9999 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10000 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10001 | stream->write((VkSurfaceCounterFlagBitsEXT*)&counter, sizeof(VkSurfaceCounterFlagBitsEXT)); |
| 10002 | stream->write((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 10003 | stream->read((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 10004 | VkResult vkGetSwapchainCounterEXT_VkResult_return = (VkResult)0; |
| 10005 | stream->read(&vkGetSwapchainCounterEXT_VkResult_return, sizeof(VkResult)); |
| 10006 | return vkGetSwapchainCounterEXT_VkResult_return; |
| 10007 | } |
| 10008 | |
| 10009 | #endif |
| 10010 | #ifdef VK_GOOGLE_display_timing |
| 10011 | VkResult VkEncoder::vkGetRefreshCycleDurationGOOGLE( |
| 10012 | VkDevice device, |
| 10013 | VkSwapchainKHR swapchain, |
| 10014 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) |
| 10015 | { |
| 10016 | auto stream = mImpl->stream(); |
| 10017 | auto countingStream = mImpl->countingStream(); |
| 10018 | countingStream->rewind(); |
| 10019 | { |
| 10020 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10021 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10022 | marshal_VkRefreshCycleDurationGOOGLE(countingStream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10023 | } |
| 10024 | uint32_t packetSize_vkGetRefreshCycleDurationGOOGLE = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10025 | countingStream->rewind(); |
| 10026 | uint32_t opcode_vkGetRefreshCycleDurationGOOGLE = OP_vkGetRefreshCycleDurationGOOGLE; |
| 10027 | stream->write(&opcode_vkGetRefreshCycleDurationGOOGLE, sizeof(uint32_t)); |
| 10028 | stream->write(&packetSize_vkGetRefreshCycleDurationGOOGLE, sizeof(uint32_t)); |
| 10029 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10030 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10031 | marshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10032 | unmarshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10033 | VkResult vkGetRefreshCycleDurationGOOGLE_VkResult_return = (VkResult)0; |
| 10034 | stream->read(&vkGetRefreshCycleDurationGOOGLE_VkResult_return, sizeof(VkResult)); |
| 10035 | return vkGetRefreshCycleDurationGOOGLE_VkResult_return; |
| 10036 | } |
| 10037 | |
| 10038 | VkResult VkEncoder::vkGetPastPresentationTimingGOOGLE( |
| 10039 | VkDevice device, |
| 10040 | VkSwapchainKHR swapchain, |
| 10041 | uint32_t* pPresentationTimingCount, |
| 10042 | VkPastPresentationTimingGOOGLE* pPresentationTimings) |
| 10043 | { |
| 10044 | auto stream = mImpl->stream(); |
| 10045 | auto countingStream = mImpl->countingStream(); |
| 10046 | countingStream->rewind(); |
| 10047 | { |
| 10048 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10049 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10050 | countingStream->write((uint32_t**)&pPresentationTimingCount, sizeof(uint32_t*)); |
| 10051 | if (pPresentationTimingCount) |
| 10052 | { |
| 10053 | countingStream->write((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10054 | } |
| 10055 | countingStream->write((VkPastPresentationTimingGOOGLE**)&pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10056 | if (pPresentationTimings) |
| 10057 | { |
| 10058 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10059 | { |
| 10060 | marshal_VkPastPresentationTimingGOOGLE(countingStream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10061 | } |
| 10062 | } |
| 10063 | } |
| 10064 | uint32_t packetSize_vkGetPastPresentationTimingGOOGLE = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10065 | countingStream->rewind(); |
| 10066 | uint32_t opcode_vkGetPastPresentationTimingGOOGLE = OP_vkGetPastPresentationTimingGOOGLE; |
| 10067 | stream->write(&opcode_vkGetPastPresentationTimingGOOGLE, sizeof(uint32_t)); |
| 10068 | stream->write(&packetSize_vkGetPastPresentationTimingGOOGLE, sizeof(uint32_t)); |
| 10069 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10070 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10071 | stream->write((uint32_t**)&pPresentationTimingCount, sizeof(uint32_t*)); |
| 10072 | if (pPresentationTimingCount) |
| 10073 | { |
| 10074 | stream->write((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10075 | } |
| 10076 | stream->write((VkPastPresentationTimingGOOGLE**)&pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10077 | if (pPresentationTimings) |
| 10078 | { |
| 10079 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10080 | { |
| 10081 | marshal_VkPastPresentationTimingGOOGLE(stream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10082 | } |
| 10083 | } |
| 10084 | uint32_t* check_pPresentationTimingCount; |
| 10085 | stream->read((uint32_t**)&check_pPresentationTimingCount, sizeof(uint32_t*)); |
| 10086 | if (pPresentationTimingCount) |
| 10087 | { |
| 10088 | if (!(check_pPresentationTimingCount)) |
| 10089 | { |
| 10090 | fprintf(stderr, "fatal: pPresentationTimingCount inconsistent between guest and host\n"); |
| 10091 | } |
| 10092 | stream->read((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10093 | } |
| 10094 | VkPastPresentationTimingGOOGLE* check_pPresentationTimings; |
| 10095 | stream->read((VkPastPresentationTimingGOOGLE**)&check_pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10096 | if (pPresentationTimings) |
| 10097 | { |
| 10098 | if (!(check_pPresentationTimings)) |
| 10099 | { |
| 10100 | fprintf(stderr, "fatal: pPresentationTimings inconsistent between guest and host\n"); |
| 10101 | } |
| 10102 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10103 | { |
| 10104 | unmarshal_VkPastPresentationTimingGOOGLE(stream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10105 | } |
| 10106 | } |
| 10107 | VkResult vkGetPastPresentationTimingGOOGLE_VkResult_return = (VkResult)0; |
| 10108 | stream->read(&vkGetPastPresentationTimingGOOGLE_VkResult_return, sizeof(VkResult)); |
| 10109 | return vkGetPastPresentationTimingGOOGLE_VkResult_return; |
| 10110 | } |
| 10111 | |
| 10112 | #endif |
| 10113 | #ifdef VK_NV_sample_mask_override_coverage |
| 10114 | #endif |
| 10115 | #ifdef VK_NV_geometry_shader_passthrough |
| 10116 | #endif |
| 10117 | #ifdef VK_NV_viewport_array2 |
| 10118 | #endif |
| 10119 | #ifdef VK_NVX_multiview_per_view_attributes |
| 10120 | #endif |
| 10121 | #ifdef VK_NV_viewport_swizzle |
| 10122 | #endif |
| 10123 | #ifdef VK_EXT_discard_rectangles |
| 10124 | void VkEncoder::vkCmdSetDiscardRectangleEXT( |
| 10125 | VkCommandBuffer commandBuffer, |
| 10126 | uint32_t firstDiscardRectangle, |
| 10127 | uint32_t discardRectangleCount, |
| 10128 | const VkRect2D* pDiscardRectangles) |
| 10129 | { |
| 10130 | auto stream = mImpl->stream(); |
| 10131 | auto countingStream = mImpl->countingStream(); |
| 10132 | countingStream->rewind(); |
| 10133 | { |
| 10134 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10135 | countingStream->write((uint32_t*)&firstDiscardRectangle, sizeof(uint32_t)); |
| 10136 | countingStream->write((uint32_t*)&discardRectangleCount, sizeof(uint32_t)); |
| 10137 | for (uint32_t i = 0; i < (uint32_t)((discardRectangleCount)); ++i) |
| 10138 | { |
| 10139 | marshal_VkRect2D(countingStream, (const VkRect2D*)(pDiscardRectangles + i)); |
| 10140 | } |
| 10141 | } |
| 10142 | uint32_t packetSize_vkCmdSetDiscardRectangleEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10143 | countingStream->rewind(); |
| 10144 | uint32_t opcode_vkCmdSetDiscardRectangleEXT = OP_vkCmdSetDiscardRectangleEXT; |
| 10145 | stream->write(&opcode_vkCmdSetDiscardRectangleEXT, sizeof(uint32_t)); |
| 10146 | stream->write(&packetSize_vkCmdSetDiscardRectangleEXT, sizeof(uint32_t)); |
| 10147 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10148 | stream->write((uint32_t*)&firstDiscardRectangle, sizeof(uint32_t)); |
| 10149 | stream->write((uint32_t*)&discardRectangleCount, sizeof(uint32_t)); |
| 10150 | for (uint32_t i = 0; i < (uint32_t)((discardRectangleCount)); ++i) |
| 10151 | { |
| 10152 | marshal_VkRect2D(stream, (const VkRect2D*)(pDiscardRectangles + i)); |
| 10153 | } |
| 10154 | } |
| 10155 | |
| 10156 | #endif |
| 10157 | #ifdef VK_EXT_conservative_rasterization |
| 10158 | #endif |
| 10159 | #ifdef VK_EXT_swapchain_colorspace |
| 10160 | #endif |
| 10161 | #ifdef VK_EXT_hdr_metadata |
| 10162 | void VkEncoder::vkSetHdrMetadataEXT( |
| 10163 | VkDevice device, |
| 10164 | uint32_t swapchainCount, |
| 10165 | const VkSwapchainKHR* pSwapchains, |
| 10166 | const VkHdrMetadataEXT* pMetadata) |
| 10167 | { |
| 10168 | auto stream = mImpl->stream(); |
| 10169 | auto countingStream = mImpl->countingStream(); |
| 10170 | countingStream->rewind(); |
| 10171 | { |
| 10172 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10173 | countingStream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 10174 | countingStream->write((const VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(const VkSwapchainKHR)); |
| 10175 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 10176 | { |
| 10177 | marshal_VkHdrMetadataEXT(countingStream, (const VkHdrMetadataEXT*)(pMetadata + i)); |
| 10178 | } |
| 10179 | } |
| 10180 | uint32_t packetSize_vkSetHdrMetadataEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10181 | countingStream->rewind(); |
| 10182 | uint32_t opcode_vkSetHdrMetadataEXT = OP_vkSetHdrMetadataEXT; |
| 10183 | stream->write(&opcode_vkSetHdrMetadataEXT, sizeof(uint32_t)); |
| 10184 | stream->write(&packetSize_vkSetHdrMetadataEXT, sizeof(uint32_t)); |
| 10185 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10186 | stream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 10187 | stream->write((const VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(const VkSwapchainKHR)); |
| 10188 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 10189 | { |
| 10190 | marshal_VkHdrMetadataEXT(stream, (const VkHdrMetadataEXT*)(pMetadata + i)); |
| 10191 | } |
| 10192 | } |
| 10193 | |
| 10194 | #endif |
| 10195 | #ifdef VK_MVK_ios_surface |
| 10196 | VkResult VkEncoder::vkCreateIOSSurfaceMVK( |
| 10197 | VkInstance instance, |
| 10198 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 10199 | const VkAllocationCallbacks* pAllocator, |
| 10200 | VkSurfaceKHR* pSurface) |
| 10201 | { |
| 10202 | auto stream = mImpl->stream(); |
| 10203 | auto countingStream = mImpl->countingStream(); |
| 10204 | countingStream->rewind(); |
| 10205 | { |
| 10206 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10207 | marshal_VkIOSSurfaceCreateInfoMVK(countingStream, (const VkIOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10208 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10209 | if (pAllocator) |
| 10210 | { |
| 10211 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10212 | } |
| 10213 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10214 | } |
| 10215 | uint32_t packetSize_vkCreateIOSSurfaceMVK = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10216 | countingStream->rewind(); |
| 10217 | uint32_t opcode_vkCreateIOSSurfaceMVK = OP_vkCreateIOSSurfaceMVK; |
| 10218 | stream->write(&opcode_vkCreateIOSSurfaceMVK, sizeof(uint32_t)); |
| 10219 | stream->write(&packetSize_vkCreateIOSSurfaceMVK, sizeof(uint32_t)); |
| 10220 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10221 | marshal_VkIOSSurfaceCreateInfoMVK(stream, (const VkIOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10222 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10223 | if (pAllocator) |
| 10224 | { |
| 10225 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10226 | } |
| 10227 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10228 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10229 | VkResult vkCreateIOSSurfaceMVK_VkResult_return = (VkResult)0; |
| 10230 | stream->read(&vkCreateIOSSurfaceMVK_VkResult_return, sizeof(VkResult)); |
| 10231 | return vkCreateIOSSurfaceMVK_VkResult_return; |
| 10232 | } |
| 10233 | |
| 10234 | #endif |
| 10235 | #ifdef VK_MVK_macos_surface |
| 10236 | VkResult VkEncoder::vkCreateMacOSSurfaceMVK( |
| 10237 | VkInstance instance, |
| 10238 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 10239 | const VkAllocationCallbacks* pAllocator, |
| 10240 | VkSurfaceKHR* pSurface) |
| 10241 | { |
| 10242 | auto stream = mImpl->stream(); |
| 10243 | auto countingStream = mImpl->countingStream(); |
| 10244 | countingStream->rewind(); |
| 10245 | { |
| 10246 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10247 | marshal_VkMacOSSurfaceCreateInfoMVK(countingStream, (const VkMacOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10248 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10249 | if (pAllocator) |
| 10250 | { |
| 10251 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10252 | } |
| 10253 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10254 | } |
| 10255 | uint32_t packetSize_vkCreateMacOSSurfaceMVK = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10256 | countingStream->rewind(); |
| 10257 | uint32_t opcode_vkCreateMacOSSurfaceMVK = OP_vkCreateMacOSSurfaceMVK; |
| 10258 | stream->write(&opcode_vkCreateMacOSSurfaceMVK, sizeof(uint32_t)); |
| 10259 | stream->write(&packetSize_vkCreateMacOSSurfaceMVK, sizeof(uint32_t)); |
| 10260 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10261 | marshal_VkMacOSSurfaceCreateInfoMVK(stream, (const VkMacOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10262 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10263 | if (pAllocator) |
| 10264 | { |
| 10265 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10266 | } |
| 10267 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10268 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10269 | VkResult vkCreateMacOSSurfaceMVK_VkResult_return = (VkResult)0; |
| 10270 | stream->read(&vkCreateMacOSSurfaceMVK_VkResult_return, sizeof(VkResult)); |
| 10271 | return vkCreateMacOSSurfaceMVK_VkResult_return; |
| 10272 | } |
| 10273 | |
| 10274 | #endif |
| 10275 | #ifdef VK_EXT_external_memory_dma_buf |
| 10276 | #endif |
| 10277 | #ifdef VK_EXT_queue_family_foreign |
| 10278 | #endif |
| 10279 | #ifdef VK_EXT_debug_utils |
| 10280 | VkResult VkEncoder::vkSetDebugUtilsObjectNameEXT( |
| 10281 | VkDevice device, |
| 10282 | const VkDebugUtilsObjectNameInfoEXT* pNameInfo) |
| 10283 | { |
| 10284 | auto stream = mImpl->stream(); |
| 10285 | auto countingStream = mImpl->countingStream(); |
| 10286 | countingStream->rewind(); |
| 10287 | { |
| 10288 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10289 | marshal_VkDebugUtilsObjectNameInfoEXT(countingStream, (const VkDebugUtilsObjectNameInfoEXT*)(pNameInfo)); |
| 10290 | } |
| 10291 | uint32_t packetSize_vkSetDebugUtilsObjectNameEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10292 | countingStream->rewind(); |
| 10293 | uint32_t opcode_vkSetDebugUtilsObjectNameEXT = OP_vkSetDebugUtilsObjectNameEXT; |
| 10294 | stream->write(&opcode_vkSetDebugUtilsObjectNameEXT, sizeof(uint32_t)); |
| 10295 | stream->write(&packetSize_vkSetDebugUtilsObjectNameEXT, sizeof(uint32_t)); |
| 10296 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10297 | marshal_VkDebugUtilsObjectNameInfoEXT(stream, (const VkDebugUtilsObjectNameInfoEXT*)(pNameInfo)); |
| 10298 | VkResult vkSetDebugUtilsObjectNameEXT_VkResult_return = (VkResult)0; |
| 10299 | stream->read(&vkSetDebugUtilsObjectNameEXT_VkResult_return, sizeof(VkResult)); |
| 10300 | return vkSetDebugUtilsObjectNameEXT_VkResult_return; |
| 10301 | } |
| 10302 | |
| 10303 | VkResult VkEncoder::vkSetDebugUtilsObjectTagEXT( |
| 10304 | VkDevice device, |
| 10305 | const VkDebugUtilsObjectTagInfoEXT* pTagInfo) |
| 10306 | { |
| 10307 | auto stream = mImpl->stream(); |
| 10308 | auto countingStream = mImpl->countingStream(); |
| 10309 | countingStream->rewind(); |
| 10310 | { |
| 10311 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10312 | marshal_VkDebugUtilsObjectTagInfoEXT(countingStream, (const VkDebugUtilsObjectTagInfoEXT*)(pTagInfo)); |
| 10313 | } |
| 10314 | uint32_t packetSize_vkSetDebugUtilsObjectTagEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10315 | countingStream->rewind(); |
| 10316 | uint32_t opcode_vkSetDebugUtilsObjectTagEXT = OP_vkSetDebugUtilsObjectTagEXT; |
| 10317 | stream->write(&opcode_vkSetDebugUtilsObjectTagEXT, sizeof(uint32_t)); |
| 10318 | stream->write(&packetSize_vkSetDebugUtilsObjectTagEXT, sizeof(uint32_t)); |
| 10319 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10320 | marshal_VkDebugUtilsObjectTagInfoEXT(stream, (const VkDebugUtilsObjectTagInfoEXT*)(pTagInfo)); |
| 10321 | VkResult vkSetDebugUtilsObjectTagEXT_VkResult_return = (VkResult)0; |
| 10322 | stream->read(&vkSetDebugUtilsObjectTagEXT_VkResult_return, sizeof(VkResult)); |
| 10323 | return vkSetDebugUtilsObjectTagEXT_VkResult_return; |
| 10324 | } |
| 10325 | |
| 10326 | void VkEncoder::vkQueueBeginDebugUtilsLabelEXT( |
| 10327 | VkQueue queue, |
| 10328 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10329 | { |
| 10330 | auto stream = mImpl->stream(); |
| 10331 | auto countingStream = mImpl->countingStream(); |
| 10332 | countingStream->rewind(); |
| 10333 | { |
| 10334 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10335 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10336 | } |
| 10337 | uint32_t packetSize_vkQueueBeginDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10338 | countingStream->rewind(); |
| 10339 | uint32_t opcode_vkQueueBeginDebugUtilsLabelEXT = OP_vkQueueBeginDebugUtilsLabelEXT; |
| 10340 | stream->write(&opcode_vkQueueBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10341 | stream->write(&packetSize_vkQueueBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10342 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10343 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10344 | } |
| 10345 | |
| 10346 | void VkEncoder::vkQueueEndDebugUtilsLabelEXT( |
| 10347 | VkQueue queue) |
| 10348 | { |
| 10349 | auto stream = mImpl->stream(); |
| 10350 | auto countingStream = mImpl->countingStream(); |
| 10351 | countingStream->rewind(); |
| 10352 | { |
| 10353 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10354 | } |
| 10355 | uint32_t packetSize_vkQueueEndDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10356 | countingStream->rewind(); |
| 10357 | uint32_t opcode_vkQueueEndDebugUtilsLabelEXT = OP_vkQueueEndDebugUtilsLabelEXT; |
| 10358 | stream->write(&opcode_vkQueueEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10359 | stream->write(&packetSize_vkQueueEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10360 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10361 | } |
| 10362 | |
| 10363 | void VkEncoder::vkQueueInsertDebugUtilsLabelEXT( |
| 10364 | VkQueue queue, |
| 10365 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10366 | { |
| 10367 | auto stream = mImpl->stream(); |
| 10368 | auto countingStream = mImpl->countingStream(); |
| 10369 | countingStream->rewind(); |
| 10370 | { |
| 10371 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10372 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10373 | } |
| 10374 | uint32_t packetSize_vkQueueInsertDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10375 | countingStream->rewind(); |
| 10376 | uint32_t opcode_vkQueueInsertDebugUtilsLabelEXT = OP_vkQueueInsertDebugUtilsLabelEXT; |
| 10377 | stream->write(&opcode_vkQueueInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10378 | stream->write(&packetSize_vkQueueInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10379 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10380 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10381 | } |
| 10382 | |
| 10383 | void VkEncoder::vkCmdBeginDebugUtilsLabelEXT( |
| 10384 | VkCommandBuffer commandBuffer, |
| 10385 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10386 | { |
| 10387 | auto stream = mImpl->stream(); |
| 10388 | auto countingStream = mImpl->countingStream(); |
| 10389 | countingStream->rewind(); |
| 10390 | { |
| 10391 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10392 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10393 | } |
| 10394 | uint32_t packetSize_vkCmdBeginDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10395 | countingStream->rewind(); |
| 10396 | uint32_t opcode_vkCmdBeginDebugUtilsLabelEXT = OP_vkCmdBeginDebugUtilsLabelEXT; |
| 10397 | stream->write(&opcode_vkCmdBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10398 | stream->write(&packetSize_vkCmdBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10399 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10400 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10401 | } |
| 10402 | |
| 10403 | void VkEncoder::vkCmdEndDebugUtilsLabelEXT( |
| 10404 | VkCommandBuffer commandBuffer) |
| 10405 | { |
| 10406 | auto stream = mImpl->stream(); |
| 10407 | auto countingStream = mImpl->countingStream(); |
| 10408 | countingStream->rewind(); |
| 10409 | { |
| 10410 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10411 | } |
| 10412 | uint32_t packetSize_vkCmdEndDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10413 | countingStream->rewind(); |
| 10414 | uint32_t opcode_vkCmdEndDebugUtilsLabelEXT = OP_vkCmdEndDebugUtilsLabelEXT; |
| 10415 | stream->write(&opcode_vkCmdEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10416 | stream->write(&packetSize_vkCmdEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10417 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10418 | } |
| 10419 | |
| 10420 | void VkEncoder::vkCmdInsertDebugUtilsLabelEXT( |
| 10421 | VkCommandBuffer commandBuffer, |
| 10422 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10423 | { |
| 10424 | auto stream = mImpl->stream(); |
| 10425 | auto countingStream = mImpl->countingStream(); |
| 10426 | countingStream->rewind(); |
| 10427 | { |
| 10428 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10429 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10430 | } |
| 10431 | uint32_t packetSize_vkCmdInsertDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10432 | countingStream->rewind(); |
| 10433 | uint32_t opcode_vkCmdInsertDebugUtilsLabelEXT = OP_vkCmdInsertDebugUtilsLabelEXT; |
| 10434 | stream->write(&opcode_vkCmdInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10435 | stream->write(&packetSize_vkCmdInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10436 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10437 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10438 | } |
| 10439 | |
| 10440 | VkResult VkEncoder::vkCreateDebugUtilsMessengerEXT( |
| 10441 | VkInstance instance, |
| 10442 | const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, |
| 10443 | const VkAllocationCallbacks* pAllocator, |
| 10444 | VkDebugUtilsMessengerEXT* pMessenger) |
| 10445 | { |
| 10446 | auto stream = mImpl->stream(); |
| 10447 | auto countingStream = mImpl->countingStream(); |
| 10448 | countingStream->rewind(); |
| 10449 | { |
| 10450 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10451 | marshal_VkDebugUtilsMessengerCreateInfoEXT(countingStream, (const VkDebugUtilsMessengerCreateInfoEXT*)(pCreateInfo)); |
| 10452 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10453 | if (pAllocator) |
| 10454 | { |
| 10455 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10456 | } |
| 10457 | countingStream->write((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10458 | } |
| 10459 | uint32_t packetSize_vkCreateDebugUtilsMessengerEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10460 | countingStream->rewind(); |
| 10461 | uint32_t opcode_vkCreateDebugUtilsMessengerEXT = OP_vkCreateDebugUtilsMessengerEXT; |
| 10462 | stream->write(&opcode_vkCreateDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10463 | stream->write(&packetSize_vkCreateDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10464 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10465 | marshal_VkDebugUtilsMessengerCreateInfoEXT(stream, (const VkDebugUtilsMessengerCreateInfoEXT*)(pCreateInfo)); |
| 10466 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10467 | if (pAllocator) |
| 10468 | { |
| 10469 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10470 | } |
| 10471 | stream->write((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10472 | stream->read((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10473 | VkResult vkCreateDebugUtilsMessengerEXT_VkResult_return = (VkResult)0; |
| 10474 | stream->read(&vkCreateDebugUtilsMessengerEXT_VkResult_return, sizeof(VkResult)); |
| 10475 | return vkCreateDebugUtilsMessengerEXT_VkResult_return; |
| 10476 | } |
| 10477 | |
| 10478 | void VkEncoder::vkDestroyDebugUtilsMessengerEXT( |
| 10479 | VkInstance instance, |
| 10480 | VkDebugUtilsMessengerEXT messenger, |
| 10481 | const VkAllocationCallbacks* pAllocator) |
| 10482 | { |
| 10483 | auto stream = mImpl->stream(); |
| 10484 | auto countingStream = mImpl->countingStream(); |
| 10485 | countingStream->rewind(); |
| 10486 | { |
| 10487 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10488 | countingStream->write((VkDebugUtilsMessengerEXT*)&messenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10489 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10490 | if (pAllocator) |
| 10491 | { |
| 10492 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10493 | } |
| 10494 | } |
| 10495 | uint32_t packetSize_vkDestroyDebugUtilsMessengerEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10496 | countingStream->rewind(); |
| 10497 | uint32_t opcode_vkDestroyDebugUtilsMessengerEXT = OP_vkDestroyDebugUtilsMessengerEXT; |
| 10498 | stream->write(&opcode_vkDestroyDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10499 | stream->write(&packetSize_vkDestroyDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10500 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10501 | stream->write((VkDebugUtilsMessengerEXT*)&messenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10502 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10503 | if (pAllocator) |
| 10504 | { |
| 10505 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10506 | } |
| 10507 | } |
| 10508 | |
| 10509 | void VkEncoder::vkSubmitDebugUtilsMessageEXT( |
| 10510 | VkInstance instance, |
| 10511 | VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, |
| 10512 | VkDebugUtilsMessageTypeFlagsEXT messageTypes, |
| 10513 | const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) |
| 10514 | { |
| 10515 | auto stream = mImpl->stream(); |
| 10516 | auto countingStream = mImpl->countingStream(); |
| 10517 | countingStream->rewind(); |
| 10518 | { |
| 10519 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10520 | countingStream->write((VkDebugUtilsMessageSeverityFlagBitsEXT*)&messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagBitsEXT)); |
| 10521 | countingStream->write((VkDebugUtilsMessageTypeFlagsEXT*)&messageTypes, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); |
| 10522 | marshal_VkDebugUtilsMessengerCallbackDataEXT(countingStream, (const VkDebugUtilsMessengerCallbackDataEXT*)(pCallbackData)); |
| 10523 | } |
| 10524 | uint32_t packetSize_vkSubmitDebugUtilsMessageEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10525 | countingStream->rewind(); |
| 10526 | uint32_t opcode_vkSubmitDebugUtilsMessageEXT = OP_vkSubmitDebugUtilsMessageEXT; |
| 10527 | stream->write(&opcode_vkSubmitDebugUtilsMessageEXT, sizeof(uint32_t)); |
| 10528 | stream->write(&packetSize_vkSubmitDebugUtilsMessageEXT, sizeof(uint32_t)); |
| 10529 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10530 | stream->write((VkDebugUtilsMessageSeverityFlagBitsEXT*)&messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagBitsEXT)); |
| 10531 | stream->write((VkDebugUtilsMessageTypeFlagsEXT*)&messageTypes, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); |
| 10532 | marshal_VkDebugUtilsMessengerCallbackDataEXT(stream, (const VkDebugUtilsMessengerCallbackDataEXT*)(pCallbackData)); |
| 10533 | } |
| 10534 | |
| 10535 | #endif |
| 10536 | #ifdef VK_ANDROID_external_memory_android_hardware_buffer |
| 10537 | VkResult VkEncoder::vkGetAndroidHardwareBufferPropertiesANDROID( |
| 10538 | VkDevice device, |
| 10539 | const AHardwareBuffer* buffer, |
| 10540 | VkAndroidHardwareBufferPropertiesANDROID* pProperties) |
| 10541 | { |
| 10542 | auto stream = mImpl->stream(); |
| 10543 | auto countingStream = mImpl->countingStream(); |
| 10544 | countingStream->rewind(); |
| 10545 | { |
| 10546 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10547 | countingStream->write((const AHardwareBuffer*)buffer, sizeof(const AHardwareBuffer)); |
| 10548 | marshal_VkAndroidHardwareBufferPropertiesANDROID(countingStream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10549 | } |
| 10550 | uint32_t packetSize_vkGetAndroidHardwareBufferPropertiesANDROID = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10551 | countingStream->rewind(); |
| 10552 | uint32_t opcode_vkGetAndroidHardwareBufferPropertiesANDROID = OP_vkGetAndroidHardwareBufferPropertiesANDROID; |
| 10553 | stream->write(&opcode_vkGetAndroidHardwareBufferPropertiesANDROID, sizeof(uint32_t)); |
| 10554 | stream->write(&packetSize_vkGetAndroidHardwareBufferPropertiesANDROID, sizeof(uint32_t)); |
| 10555 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10556 | stream->write((const AHardwareBuffer*)buffer, sizeof(const AHardwareBuffer)); |
| 10557 | marshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10558 | unmarshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10559 | VkResult vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return = (VkResult)0; |
| 10560 | stream->read(&vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return, sizeof(VkResult)); |
| 10561 | return vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return; |
| 10562 | } |
| 10563 | |
| 10564 | VkResult VkEncoder::vkGetMemoryAndroidHardwareBufferANDROID( |
| 10565 | VkDevice device, |
| 10566 | const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, |
| 10567 | AHardwareBuffer** pBuffer) |
| 10568 | { |
| 10569 | auto stream = mImpl->stream(); |
| 10570 | auto countingStream = mImpl->countingStream(); |
| 10571 | countingStream->rewind(); |
| 10572 | { |
| 10573 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10574 | marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(countingStream, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)(pInfo)); |
| 10575 | countingStream->write((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10576 | } |
| 10577 | uint32_t packetSize_vkGetMemoryAndroidHardwareBufferANDROID = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10578 | countingStream->rewind(); |
| 10579 | uint32_t opcode_vkGetMemoryAndroidHardwareBufferANDROID = OP_vkGetMemoryAndroidHardwareBufferANDROID; |
| 10580 | stream->write(&opcode_vkGetMemoryAndroidHardwareBufferANDROID, sizeof(uint32_t)); |
| 10581 | stream->write(&packetSize_vkGetMemoryAndroidHardwareBufferANDROID, sizeof(uint32_t)); |
| 10582 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10583 | marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(stream, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)(pInfo)); |
| 10584 | stream->write((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10585 | stream->read((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10586 | VkResult vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return = (VkResult)0; |
| 10587 | stream->read(&vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return, sizeof(VkResult)); |
| 10588 | return vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return; |
| 10589 | } |
| 10590 | |
| 10591 | #endif |
| 10592 | #ifdef VK_EXT_sampler_filter_minmax |
| 10593 | #endif |
| 10594 | #ifdef VK_AMD_gpu_shader_int16 |
| 10595 | #endif |
| 10596 | #ifdef VK_AMD_mixed_attachment_samples |
| 10597 | #endif |
| 10598 | #ifdef VK_AMD_shader_fragment_mask |
| 10599 | #endif |
| 10600 | #ifdef VK_EXT_shader_stencil_export |
| 10601 | #endif |
| 10602 | #ifdef VK_EXT_sample_locations |
| 10603 | void VkEncoder::vkCmdSetSampleLocationsEXT( |
| 10604 | VkCommandBuffer commandBuffer, |
| 10605 | const VkSampleLocationsInfoEXT* pSampleLocationsInfo) |
| 10606 | { |
| 10607 | auto stream = mImpl->stream(); |
| 10608 | auto countingStream = mImpl->countingStream(); |
| 10609 | countingStream->rewind(); |
| 10610 | { |
| 10611 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10612 | marshal_VkSampleLocationsInfoEXT(countingStream, (const VkSampleLocationsInfoEXT*)(pSampleLocationsInfo)); |
| 10613 | } |
| 10614 | uint32_t packetSize_vkCmdSetSampleLocationsEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10615 | countingStream->rewind(); |
| 10616 | uint32_t opcode_vkCmdSetSampleLocationsEXT = OP_vkCmdSetSampleLocationsEXT; |
| 10617 | stream->write(&opcode_vkCmdSetSampleLocationsEXT, sizeof(uint32_t)); |
| 10618 | stream->write(&packetSize_vkCmdSetSampleLocationsEXT, sizeof(uint32_t)); |
| 10619 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10620 | marshal_VkSampleLocationsInfoEXT(stream, (const VkSampleLocationsInfoEXT*)(pSampleLocationsInfo)); |
| 10621 | } |
| 10622 | |
| 10623 | void VkEncoder::vkGetPhysicalDeviceMultisamplePropertiesEXT( |
| 10624 | VkPhysicalDevice physicalDevice, |
| 10625 | VkSampleCountFlagBits samples, |
| 10626 | VkMultisamplePropertiesEXT* pMultisampleProperties) |
| 10627 | { |
| 10628 | auto stream = mImpl->stream(); |
| 10629 | auto countingStream = mImpl->countingStream(); |
| 10630 | countingStream->rewind(); |
| 10631 | { |
| 10632 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 10633 | countingStream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 10634 | marshal_VkMultisamplePropertiesEXT(countingStream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10635 | } |
| 10636 | uint32_t packetSize_vkGetPhysicalDeviceMultisamplePropertiesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10637 | countingStream->rewind(); |
| 10638 | uint32_t opcode_vkGetPhysicalDeviceMultisamplePropertiesEXT = OP_vkGetPhysicalDeviceMultisamplePropertiesEXT; |
| 10639 | stream->write(&opcode_vkGetPhysicalDeviceMultisamplePropertiesEXT, sizeof(uint32_t)); |
| 10640 | stream->write(&packetSize_vkGetPhysicalDeviceMultisamplePropertiesEXT, sizeof(uint32_t)); |
| 10641 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 10642 | stream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 10643 | marshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10644 | unmarshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10645 | } |
| 10646 | |
| 10647 | #endif |
| 10648 | #ifdef VK_EXT_blend_operation_advanced |
| 10649 | #endif |
| 10650 | #ifdef VK_NV_fragment_coverage_to_color |
| 10651 | #endif |
| 10652 | #ifdef VK_NV_framebuffer_mixed_samples |
| 10653 | #endif |
| 10654 | #ifdef VK_NV_fill_rectangle |
| 10655 | #endif |
| 10656 | #ifdef VK_EXT_post_depth_coverage |
| 10657 | #endif |
| 10658 | #ifdef VK_EXT_validation_cache |
| 10659 | VkResult VkEncoder::vkCreateValidationCacheEXT( |
| 10660 | VkDevice device, |
| 10661 | const VkValidationCacheCreateInfoEXT* pCreateInfo, |
| 10662 | const VkAllocationCallbacks* pAllocator, |
| 10663 | VkValidationCacheEXT* pValidationCache) |
| 10664 | { |
| 10665 | auto stream = mImpl->stream(); |
| 10666 | auto countingStream = mImpl->countingStream(); |
| 10667 | countingStream->rewind(); |
| 10668 | { |
| 10669 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10670 | marshal_VkValidationCacheCreateInfoEXT(countingStream, (const VkValidationCacheCreateInfoEXT*)(pCreateInfo)); |
| 10671 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10672 | if (pAllocator) |
| 10673 | { |
| 10674 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10675 | } |
| 10676 | countingStream->write((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10677 | } |
| 10678 | uint32_t packetSize_vkCreateValidationCacheEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10679 | countingStream->rewind(); |
| 10680 | uint32_t opcode_vkCreateValidationCacheEXT = OP_vkCreateValidationCacheEXT; |
| 10681 | stream->write(&opcode_vkCreateValidationCacheEXT, sizeof(uint32_t)); |
| 10682 | stream->write(&packetSize_vkCreateValidationCacheEXT, sizeof(uint32_t)); |
| 10683 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10684 | marshal_VkValidationCacheCreateInfoEXT(stream, (const VkValidationCacheCreateInfoEXT*)(pCreateInfo)); |
| 10685 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10686 | if (pAllocator) |
| 10687 | { |
| 10688 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10689 | } |
| 10690 | stream->write((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10691 | stream->read((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10692 | VkResult vkCreateValidationCacheEXT_VkResult_return = (VkResult)0; |
| 10693 | stream->read(&vkCreateValidationCacheEXT_VkResult_return, sizeof(VkResult)); |
| 10694 | return vkCreateValidationCacheEXT_VkResult_return; |
| 10695 | } |
| 10696 | |
| 10697 | void VkEncoder::vkDestroyValidationCacheEXT( |
| 10698 | VkDevice device, |
| 10699 | VkValidationCacheEXT validationCache, |
| 10700 | const VkAllocationCallbacks* pAllocator) |
| 10701 | { |
| 10702 | auto stream = mImpl->stream(); |
| 10703 | auto countingStream = mImpl->countingStream(); |
| 10704 | countingStream->rewind(); |
| 10705 | { |
| 10706 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10707 | countingStream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10708 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10709 | if (pAllocator) |
| 10710 | { |
| 10711 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10712 | } |
| 10713 | } |
| 10714 | uint32_t packetSize_vkDestroyValidationCacheEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10715 | countingStream->rewind(); |
| 10716 | uint32_t opcode_vkDestroyValidationCacheEXT = OP_vkDestroyValidationCacheEXT; |
| 10717 | stream->write(&opcode_vkDestroyValidationCacheEXT, sizeof(uint32_t)); |
| 10718 | stream->write(&packetSize_vkDestroyValidationCacheEXT, sizeof(uint32_t)); |
| 10719 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10720 | stream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10721 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10722 | if (pAllocator) |
| 10723 | { |
| 10724 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10725 | } |
| 10726 | } |
| 10727 | |
| 10728 | VkResult VkEncoder::vkMergeValidationCachesEXT( |
| 10729 | VkDevice device, |
| 10730 | VkValidationCacheEXT dstCache, |
| 10731 | uint32_t srcCacheCount, |
| 10732 | const VkValidationCacheEXT* pSrcCaches) |
| 10733 | { |
| 10734 | auto stream = mImpl->stream(); |
| 10735 | auto countingStream = mImpl->countingStream(); |
| 10736 | countingStream->rewind(); |
| 10737 | { |
| 10738 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10739 | countingStream->write((VkValidationCacheEXT*)&dstCache, sizeof(VkValidationCacheEXT)); |
| 10740 | countingStream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 10741 | countingStream->write((const VkValidationCacheEXT*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkValidationCacheEXT)); |
| 10742 | } |
| 10743 | uint32_t packetSize_vkMergeValidationCachesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10744 | countingStream->rewind(); |
| 10745 | uint32_t opcode_vkMergeValidationCachesEXT = OP_vkMergeValidationCachesEXT; |
| 10746 | stream->write(&opcode_vkMergeValidationCachesEXT, sizeof(uint32_t)); |
| 10747 | stream->write(&packetSize_vkMergeValidationCachesEXT, sizeof(uint32_t)); |
| 10748 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10749 | stream->write((VkValidationCacheEXT*)&dstCache, sizeof(VkValidationCacheEXT)); |
| 10750 | stream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 10751 | stream->write((const VkValidationCacheEXT*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkValidationCacheEXT)); |
| 10752 | VkResult vkMergeValidationCachesEXT_VkResult_return = (VkResult)0; |
| 10753 | stream->read(&vkMergeValidationCachesEXT_VkResult_return, sizeof(VkResult)); |
| 10754 | return vkMergeValidationCachesEXT_VkResult_return; |
| 10755 | } |
| 10756 | |
| 10757 | VkResult VkEncoder::vkGetValidationCacheDataEXT( |
| 10758 | VkDevice device, |
| 10759 | VkValidationCacheEXT validationCache, |
| 10760 | size_t* pDataSize, |
| 10761 | void* pData) |
| 10762 | { |
| 10763 | auto stream = mImpl->stream(); |
| 10764 | auto countingStream = mImpl->countingStream(); |
| 10765 | countingStream->rewind(); |
| 10766 | { |
| 10767 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10768 | countingStream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10769 | countingStream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 10770 | if (pDataSize) |
| 10771 | { |
| 10772 | countingStream->write((size_t*)pDataSize, sizeof(size_t)); |
| 10773 | } |
| 10774 | countingStream->write((void**)&pData, sizeof(void*)); |
| 10775 | if (pData) |
| 10776 | { |
| 10777 | countingStream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10778 | } |
| 10779 | } |
| 10780 | uint32_t packetSize_vkGetValidationCacheDataEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10781 | countingStream->rewind(); |
| 10782 | uint32_t opcode_vkGetValidationCacheDataEXT = OP_vkGetValidationCacheDataEXT; |
| 10783 | stream->write(&opcode_vkGetValidationCacheDataEXT, sizeof(uint32_t)); |
| 10784 | stream->write(&packetSize_vkGetValidationCacheDataEXT, sizeof(uint32_t)); |
| 10785 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10786 | stream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10787 | stream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 10788 | if (pDataSize) |
| 10789 | { |
| 10790 | stream->write((size_t*)pDataSize, sizeof(size_t)); |
| 10791 | } |
| 10792 | stream->write((void**)&pData, sizeof(void*)); |
| 10793 | if (pData) |
| 10794 | { |
| 10795 | stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10796 | } |
| 10797 | size_t* check_pDataSize; |
| 10798 | stream->read((size_t**)&check_pDataSize, sizeof(size_t*)); |
| 10799 | if (pDataSize) |
| 10800 | { |
| 10801 | if (!(check_pDataSize)) |
| 10802 | { |
| 10803 | fprintf(stderr, "fatal: pDataSize inconsistent between guest and host\n"); |
| 10804 | } |
| 10805 | stream->read((size_t*)pDataSize, sizeof(size_t)); |
| 10806 | } |
| 10807 | void* check_pData; |
| 10808 | stream->read((void**)&check_pData, sizeof(void*)); |
| 10809 | if (pData) |
| 10810 | { |
| 10811 | if (!(check_pData)) |
| 10812 | { |
| 10813 | fprintf(stderr, "fatal: pData inconsistent between guest and host\n"); |
| 10814 | } |
| 10815 | stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10816 | } |
| 10817 | VkResult vkGetValidationCacheDataEXT_VkResult_return = (VkResult)0; |
| 10818 | stream->read(&vkGetValidationCacheDataEXT_VkResult_return, sizeof(VkResult)); |
| 10819 | return vkGetValidationCacheDataEXT_VkResult_return; |
| 10820 | } |
| 10821 | |
| 10822 | #endif |
| 10823 | #ifdef VK_EXT_descriptor_indexing |
| 10824 | #endif |
| 10825 | #ifdef VK_EXT_shader_viewport_index_layer |
| 10826 | #endif |
| 10827 | #ifdef VK_EXT_global_priority |
| 10828 | #endif |
| 10829 | #ifdef VK_EXT_external_memory_host |
| 10830 | VkResult VkEncoder::vkGetMemoryHostPointerPropertiesEXT( |
| 10831 | VkDevice device, |
| 10832 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 10833 | const void* pHostPointer, |
| 10834 | VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) |
| 10835 | { |
| 10836 | auto stream = mImpl->stream(); |
| 10837 | auto countingStream = mImpl->countingStream(); |
| 10838 | countingStream->rewind(); |
| 10839 | { |
| 10840 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10841 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 10842 | countingStream->write((const void**)&pHostPointer, sizeof(const void*)); |
| 10843 | if (pHostPointer) |
| 10844 | { |
| 10845 | countingStream->write((const void*)pHostPointer, sizeof(const uint8_t)); |
| 10846 | } |
| 10847 | marshal_VkMemoryHostPointerPropertiesEXT(countingStream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10848 | } |
| 10849 | uint32_t packetSize_vkGetMemoryHostPointerPropertiesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10850 | countingStream->rewind(); |
| 10851 | uint32_t opcode_vkGetMemoryHostPointerPropertiesEXT = OP_vkGetMemoryHostPointerPropertiesEXT; |
| 10852 | stream->write(&opcode_vkGetMemoryHostPointerPropertiesEXT, sizeof(uint32_t)); |
| 10853 | stream->write(&packetSize_vkGetMemoryHostPointerPropertiesEXT, sizeof(uint32_t)); |
| 10854 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10855 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 10856 | stream->write((const void**)&pHostPointer, sizeof(const void*)); |
| 10857 | if (pHostPointer) |
| 10858 | { |
| 10859 | stream->write((const void*)pHostPointer, sizeof(const uint8_t)); |
| 10860 | } |
| 10861 | marshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10862 | unmarshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10863 | VkResult vkGetMemoryHostPointerPropertiesEXT_VkResult_return = (VkResult)0; |
| 10864 | stream->read(&vkGetMemoryHostPointerPropertiesEXT_VkResult_return, sizeof(VkResult)); |
| 10865 | return vkGetMemoryHostPointerPropertiesEXT_VkResult_return; |
| 10866 | } |
| 10867 | |
| 10868 | #endif |
| 10869 | #ifdef VK_AMD_buffer_marker |
| 10870 | void VkEncoder::vkCmdWriteBufferMarkerAMD( |
| 10871 | VkCommandBuffer commandBuffer, |
| 10872 | VkPipelineStageFlagBits pipelineStage, |
| 10873 | VkBuffer dstBuffer, |
| 10874 | VkDeviceSize dstOffset, |
| 10875 | uint32_t marker) |
| 10876 | { |
| 10877 | auto stream = mImpl->stream(); |
| 10878 | auto countingStream = mImpl->countingStream(); |
| 10879 | countingStream->rewind(); |
| 10880 | { |
| 10881 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10882 | countingStream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 10883 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 10884 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 10885 | countingStream->write((uint32_t*)&marker, sizeof(uint32_t)); |
| 10886 | } |
| 10887 | uint32_t packetSize_vkCmdWriteBufferMarkerAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10888 | countingStream->rewind(); |
| 10889 | uint32_t opcode_vkCmdWriteBufferMarkerAMD = OP_vkCmdWriteBufferMarkerAMD; |
| 10890 | stream->write(&opcode_vkCmdWriteBufferMarkerAMD, sizeof(uint32_t)); |
| 10891 | stream->write(&packetSize_vkCmdWriteBufferMarkerAMD, sizeof(uint32_t)); |
| 10892 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10893 | stream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 10894 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 10895 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 10896 | stream->write((uint32_t*)&marker, sizeof(uint32_t)); |
| 10897 | } |
| 10898 | |
| 10899 | #endif |
| 10900 | #ifdef VK_AMD_shader_core_properties |
| 10901 | #endif |
| 10902 | #ifdef VK_EXT_vertex_attribute_divisor |
| 10903 | #endif |
| 10904 | #ifdef VK_NV_shader_subgroup_partitioned |
| 10905 | #endif |
| 10906 | #ifdef VK_NV_device_diagnostic_checkpoints |
| 10907 | void VkEncoder::vkCmdSetCheckpointNV( |
| 10908 | VkCommandBuffer commandBuffer, |
| 10909 | const void* pCheckpointMarker) |
| 10910 | { |
| 10911 | auto stream = mImpl->stream(); |
| 10912 | auto countingStream = mImpl->countingStream(); |
| 10913 | countingStream->rewind(); |
| 10914 | { |
| 10915 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10916 | countingStream->write((const void**)&pCheckpointMarker, sizeof(const void*)); |
| 10917 | if (pCheckpointMarker) |
| 10918 | { |
| 10919 | countingStream->write((const void*)pCheckpointMarker, sizeof(const uint8_t)); |
| 10920 | } |
| 10921 | } |
| 10922 | uint32_t packetSize_vkCmdSetCheckpointNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10923 | countingStream->rewind(); |
| 10924 | uint32_t opcode_vkCmdSetCheckpointNV = OP_vkCmdSetCheckpointNV; |
| 10925 | stream->write(&opcode_vkCmdSetCheckpointNV, sizeof(uint32_t)); |
| 10926 | stream->write(&packetSize_vkCmdSetCheckpointNV, sizeof(uint32_t)); |
| 10927 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10928 | stream->write((const void**)&pCheckpointMarker, sizeof(const void*)); |
| 10929 | if (pCheckpointMarker) |
| 10930 | { |
| 10931 | stream->write((const void*)pCheckpointMarker, sizeof(const uint8_t)); |
| 10932 | } |
| 10933 | } |
| 10934 | |
| 10935 | void VkEncoder::vkGetQueueCheckpointDataNV( |
| 10936 | VkQueue queue, |
| 10937 | uint32_t* pCheckpointDataCount, |
| 10938 | VkCheckpointDataNV* pCheckpointData) |
| 10939 | { |
| 10940 | auto stream = mImpl->stream(); |
| 10941 | auto countingStream = mImpl->countingStream(); |
| 10942 | countingStream->rewind(); |
| 10943 | { |
| 10944 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10945 | countingStream->write((uint32_t**)&pCheckpointDataCount, sizeof(uint32_t*)); |
| 10946 | if (pCheckpointDataCount) |
| 10947 | { |
| 10948 | countingStream->write((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10949 | } |
| 10950 | countingStream->write((VkCheckpointDataNV**)&pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10951 | if (pCheckpointData) |
| 10952 | { |
| 10953 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10954 | { |
| 10955 | marshal_VkCheckpointDataNV(countingStream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10956 | } |
| 10957 | } |
| 10958 | } |
| 10959 | uint32_t packetSize_vkGetQueueCheckpointDataNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10960 | countingStream->rewind(); |
| 10961 | uint32_t opcode_vkGetQueueCheckpointDataNV = OP_vkGetQueueCheckpointDataNV; |
| 10962 | stream->write(&opcode_vkGetQueueCheckpointDataNV, sizeof(uint32_t)); |
| 10963 | stream->write(&packetSize_vkGetQueueCheckpointDataNV, sizeof(uint32_t)); |
| 10964 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10965 | stream->write((uint32_t**)&pCheckpointDataCount, sizeof(uint32_t*)); |
| 10966 | if (pCheckpointDataCount) |
| 10967 | { |
| 10968 | stream->write((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10969 | } |
| 10970 | stream->write((VkCheckpointDataNV**)&pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10971 | if (pCheckpointData) |
| 10972 | { |
| 10973 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10974 | { |
| 10975 | marshal_VkCheckpointDataNV(stream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10976 | } |
| 10977 | } |
| 10978 | uint32_t* check_pCheckpointDataCount; |
| 10979 | stream->read((uint32_t**)&check_pCheckpointDataCount, sizeof(uint32_t*)); |
| 10980 | if (pCheckpointDataCount) |
| 10981 | { |
| 10982 | if (!(check_pCheckpointDataCount)) |
| 10983 | { |
| 10984 | fprintf(stderr, "fatal: pCheckpointDataCount inconsistent between guest and host\n"); |
| 10985 | } |
| 10986 | stream->read((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10987 | } |
| 10988 | VkCheckpointDataNV* check_pCheckpointData; |
| 10989 | stream->read((VkCheckpointDataNV**)&check_pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10990 | if (pCheckpointData) |
| 10991 | { |
| 10992 | if (!(check_pCheckpointData)) |
| 10993 | { |
| 10994 | fprintf(stderr, "fatal: pCheckpointData inconsistent between guest and host\n"); |
| 10995 | } |
| 10996 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10997 | { |
| 10998 | unmarshal_VkCheckpointDataNV(stream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10999 | } |
| 11000 | } |
| 11001 | } |
| 11002 | |
| 11003 | #endif |
| 11004 | |
| 11005 | |