| 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 | e71c642 | 2018-11-01 19:29:49 -0700 | [diff] [blame] | 31 | #include "goldfish_vk_marshaling_guest.h" |
| 32 | |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | using goldfish_vk::VulkanCountingStream; |
| 39 | using goldfish_vk::VulkanStream; |
| 40 | |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 41 | class VkEncoder::Impl { |
| 42 | public: |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 43 | Impl(IOStream* stream) : m_stream(stream) { } |
| 44 | VulkanCountingStream* countingStream() { return &m_countingStream; } |
| 45 | VulkanStream* stream() { return &m_stream; } |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 46 | private: |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 47 | VulkanCountingStream m_countingStream; |
| 48 | VulkanStream m_stream; |
| Lingfeng Yang | a126a8a | 2018-11-01 18:21:40 -0700 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | VkEncoder::VkEncoder(IOStream *stream) : |
| 52 | mImpl(new VkEncoder::Impl(stream)) { } |
| Lingfeng Yang | f4d77ef | 2018-11-02 23:21:37 -0700 | [diff] [blame] | 53 | #ifdef VK_VERSION_1_0 |
| 54 | VkResult VkEncoder::vkCreateInstance( |
| 55 | const VkInstanceCreateInfo* pCreateInfo, |
| 56 | const VkAllocationCallbacks* pAllocator, |
| 57 | VkInstance* pInstance) |
| 58 | { |
| 59 | auto stream = mImpl->stream(); |
| 60 | auto countingStream = mImpl->countingStream(); |
| 61 | countingStream->rewind(); |
| 62 | { |
| 63 | marshal_VkInstanceCreateInfo(countingStream, (const VkInstanceCreateInfo*)(pCreateInfo)); |
| 64 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 65 | if (pAllocator) |
| 66 | { |
| 67 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 68 | } |
| 69 | countingStream->write((VkInstance*)pInstance, sizeof(VkInstance)); |
| 70 | } |
| 71 | uint32_t packetSize_vkCreateInstance = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 72 | countingStream->rewind(); |
| 73 | uint32_t opcode_vkCreateInstance = OP_vkCreateInstance; |
| 74 | stream->write(&opcode_vkCreateInstance, sizeof(uint32_t)); |
| 75 | stream->write(&packetSize_vkCreateInstance, sizeof(uint32_t)); |
| 76 | marshal_VkInstanceCreateInfo(stream, (const VkInstanceCreateInfo*)(pCreateInfo)); |
| 77 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 78 | if (pAllocator) |
| 79 | { |
| 80 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 81 | } |
| 82 | stream->write((VkInstance*)pInstance, sizeof(VkInstance)); |
| 83 | stream->read((VkInstance*)pInstance, sizeof(VkInstance)); |
| 84 | VkResult vkCreateInstance_VkResult_return = (VkResult)0; |
| 85 | stream->read(&vkCreateInstance_VkResult_return, sizeof(VkResult)); |
| 86 | return vkCreateInstance_VkResult_return; |
| 87 | } |
| 88 | |
| 89 | void VkEncoder::vkDestroyInstance( |
| 90 | VkInstance instance, |
| 91 | const VkAllocationCallbacks* pAllocator) |
| 92 | { |
| 93 | auto stream = mImpl->stream(); |
| 94 | auto countingStream = mImpl->countingStream(); |
| 95 | countingStream->rewind(); |
| 96 | { |
| 97 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 98 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 99 | if (pAllocator) |
| 100 | { |
| 101 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 102 | } |
| 103 | } |
| 104 | uint32_t packetSize_vkDestroyInstance = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 105 | countingStream->rewind(); |
| 106 | uint32_t opcode_vkDestroyInstance = OP_vkDestroyInstance; |
| 107 | stream->write(&opcode_vkDestroyInstance, sizeof(uint32_t)); |
| 108 | stream->write(&packetSize_vkDestroyInstance, sizeof(uint32_t)); |
| 109 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 110 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 111 | if (pAllocator) |
| 112 | { |
| 113 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | VkResult VkEncoder::vkEnumeratePhysicalDevices( |
| 118 | VkInstance instance, |
| 119 | uint32_t* pPhysicalDeviceCount, |
| 120 | VkPhysicalDevice* pPhysicalDevices) |
| 121 | { |
| 122 | auto stream = mImpl->stream(); |
| 123 | auto countingStream = mImpl->countingStream(); |
| 124 | countingStream->rewind(); |
| 125 | { |
| 126 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 127 | countingStream->write((uint32_t**)&pPhysicalDeviceCount, sizeof(uint32_t*)); |
| 128 | if (pPhysicalDeviceCount) |
| 129 | { |
| 130 | countingStream->write((uint32_t*)pPhysicalDeviceCount, sizeof(uint32_t)); |
| 131 | } |
| 132 | countingStream->write((VkPhysicalDevice**)&pPhysicalDevices, sizeof(VkPhysicalDevice*)); |
| 133 | if (pPhysicalDevices) |
| 134 | { |
| 135 | countingStream->write((VkPhysicalDevice*)pPhysicalDevices, (*(pPhysicalDeviceCount)) * sizeof(VkPhysicalDevice)); |
| 136 | } |
| 137 | } |
| 138 | uint32_t packetSize_vkEnumeratePhysicalDevices = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 139 | countingStream->rewind(); |
| 140 | uint32_t opcode_vkEnumeratePhysicalDevices = OP_vkEnumeratePhysicalDevices; |
| 141 | stream->write(&opcode_vkEnumeratePhysicalDevices, sizeof(uint32_t)); |
| 142 | stream->write(&packetSize_vkEnumeratePhysicalDevices, sizeof(uint32_t)); |
| 143 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 144 | stream->write((uint32_t**)&pPhysicalDeviceCount, sizeof(uint32_t*)); |
| 145 | if (pPhysicalDeviceCount) |
| 146 | { |
| 147 | stream->write((uint32_t*)pPhysicalDeviceCount, sizeof(uint32_t)); |
| 148 | } |
| 149 | stream->write((VkPhysicalDevice**)&pPhysicalDevices, sizeof(VkPhysicalDevice*)); |
| 150 | if (pPhysicalDevices) |
| 151 | { |
| 152 | stream->write((VkPhysicalDevice*)pPhysicalDevices, (*(pPhysicalDeviceCount)) * sizeof(VkPhysicalDevice)); |
| 153 | } |
| 154 | uint32_t* check_pPhysicalDeviceCount; |
| 155 | stream->read((uint32_t**)&check_pPhysicalDeviceCount, sizeof(uint32_t*)); |
| 156 | if (pPhysicalDeviceCount) |
| 157 | { |
| 158 | if (!(check_pPhysicalDeviceCount)) |
| 159 | { |
| 160 | fprintf(stderr, "fatal: pPhysicalDeviceCount inconsistent between guest and host\n"); |
| 161 | } |
| 162 | stream->read((uint32_t*)pPhysicalDeviceCount, sizeof(uint32_t)); |
| 163 | } |
| 164 | VkPhysicalDevice* check_pPhysicalDevices; |
| 165 | stream->read((VkPhysicalDevice**)&check_pPhysicalDevices, sizeof(VkPhysicalDevice*)); |
| 166 | if (pPhysicalDevices) |
| 167 | { |
| 168 | if (!(check_pPhysicalDevices)) |
| 169 | { |
| 170 | fprintf(stderr, "fatal: pPhysicalDevices inconsistent between guest and host\n"); |
| 171 | } |
| 172 | stream->read((VkPhysicalDevice*)pPhysicalDevices, (*(pPhysicalDeviceCount)) * sizeof(VkPhysicalDevice)); |
| 173 | } |
| 174 | VkResult vkEnumeratePhysicalDevices_VkResult_return = (VkResult)0; |
| 175 | stream->read(&vkEnumeratePhysicalDevices_VkResult_return, sizeof(VkResult)); |
| 176 | return vkEnumeratePhysicalDevices_VkResult_return; |
| 177 | } |
| 178 | |
| 179 | void VkEncoder::vkGetPhysicalDeviceFeatures( |
| 180 | VkPhysicalDevice physicalDevice, |
| 181 | VkPhysicalDeviceFeatures* pFeatures) |
| 182 | { |
| 183 | auto stream = mImpl->stream(); |
| 184 | auto countingStream = mImpl->countingStream(); |
| 185 | countingStream->rewind(); |
| 186 | { |
| 187 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 188 | marshal_VkPhysicalDeviceFeatures(countingStream, (VkPhysicalDeviceFeatures*)(pFeatures)); |
| 189 | } |
| 190 | uint32_t packetSize_vkGetPhysicalDeviceFeatures = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 191 | countingStream->rewind(); |
| 192 | uint32_t opcode_vkGetPhysicalDeviceFeatures = OP_vkGetPhysicalDeviceFeatures; |
| 193 | stream->write(&opcode_vkGetPhysicalDeviceFeatures, sizeof(uint32_t)); |
| 194 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures, sizeof(uint32_t)); |
| 195 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 196 | marshal_VkPhysicalDeviceFeatures(stream, (VkPhysicalDeviceFeatures*)(pFeatures)); |
| 197 | unmarshal_VkPhysicalDeviceFeatures(stream, (VkPhysicalDeviceFeatures*)(pFeatures)); |
| 198 | } |
| 199 | |
| 200 | void VkEncoder::vkGetPhysicalDeviceFormatProperties( |
| 201 | VkPhysicalDevice physicalDevice, |
| 202 | VkFormat format, |
| 203 | VkFormatProperties* pFormatProperties) |
| 204 | { |
| 205 | auto stream = mImpl->stream(); |
| 206 | auto countingStream = mImpl->countingStream(); |
| 207 | countingStream->rewind(); |
| 208 | { |
| 209 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 210 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 211 | marshal_VkFormatProperties(countingStream, (VkFormatProperties*)(pFormatProperties)); |
| 212 | } |
| 213 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 214 | countingStream->rewind(); |
| 215 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties = OP_vkGetPhysicalDeviceFormatProperties; |
| 216 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties, sizeof(uint32_t)); |
| 217 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties, sizeof(uint32_t)); |
| 218 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 219 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 220 | marshal_VkFormatProperties(stream, (VkFormatProperties*)(pFormatProperties)); |
| 221 | unmarshal_VkFormatProperties(stream, (VkFormatProperties*)(pFormatProperties)); |
| 222 | } |
| 223 | |
| 224 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties( |
| 225 | VkPhysicalDevice physicalDevice, |
| 226 | VkFormat format, |
| 227 | VkImageType type, |
| 228 | VkImageTiling tiling, |
| 229 | VkImageUsageFlags usage, |
| 230 | VkImageCreateFlags flags, |
| 231 | VkImageFormatProperties* pImageFormatProperties) |
| 232 | { |
| 233 | auto stream = mImpl->stream(); |
| 234 | auto countingStream = mImpl->countingStream(); |
| 235 | countingStream->rewind(); |
| 236 | { |
| 237 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 238 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 239 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 240 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 241 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 242 | countingStream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 243 | marshal_VkImageFormatProperties(countingStream, (VkImageFormatProperties*)(pImageFormatProperties)); |
| 244 | } |
| 245 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 246 | countingStream->rewind(); |
| 247 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties = OP_vkGetPhysicalDeviceImageFormatProperties; |
| 248 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties, sizeof(uint32_t)); |
| 249 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties, sizeof(uint32_t)); |
| 250 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 251 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 252 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 253 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 254 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 255 | stream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 256 | marshal_VkImageFormatProperties(stream, (VkImageFormatProperties*)(pImageFormatProperties)); |
| 257 | unmarshal_VkImageFormatProperties(stream, (VkImageFormatProperties*)(pImageFormatProperties)); |
| 258 | VkResult vkGetPhysicalDeviceImageFormatProperties_VkResult_return = (VkResult)0; |
| 259 | stream->read(&vkGetPhysicalDeviceImageFormatProperties_VkResult_return, sizeof(VkResult)); |
| 260 | return vkGetPhysicalDeviceImageFormatProperties_VkResult_return; |
| 261 | } |
| 262 | |
| 263 | void VkEncoder::vkGetPhysicalDeviceProperties( |
| 264 | VkPhysicalDevice physicalDevice, |
| 265 | VkPhysicalDeviceProperties* pProperties) |
| 266 | { |
| 267 | auto stream = mImpl->stream(); |
| 268 | auto countingStream = mImpl->countingStream(); |
| 269 | countingStream->rewind(); |
| 270 | { |
| 271 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 272 | marshal_VkPhysicalDeviceProperties(countingStream, (VkPhysicalDeviceProperties*)(pProperties)); |
| 273 | } |
| 274 | uint32_t packetSize_vkGetPhysicalDeviceProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 275 | countingStream->rewind(); |
| 276 | uint32_t opcode_vkGetPhysicalDeviceProperties = OP_vkGetPhysicalDeviceProperties; |
| 277 | stream->write(&opcode_vkGetPhysicalDeviceProperties, sizeof(uint32_t)); |
| 278 | stream->write(&packetSize_vkGetPhysicalDeviceProperties, sizeof(uint32_t)); |
| 279 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 280 | marshal_VkPhysicalDeviceProperties(stream, (VkPhysicalDeviceProperties*)(pProperties)); |
| 281 | unmarshal_VkPhysicalDeviceProperties(stream, (VkPhysicalDeviceProperties*)(pProperties)); |
| 282 | } |
| 283 | |
| 284 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties( |
| 285 | VkPhysicalDevice physicalDevice, |
| 286 | uint32_t* pQueueFamilyPropertyCount, |
| 287 | VkQueueFamilyProperties* pQueueFamilyProperties) |
| 288 | { |
| 289 | auto stream = mImpl->stream(); |
| 290 | auto countingStream = mImpl->countingStream(); |
| 291 | countingStream->rewind(); |
| 292 | { |
| 293 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 294 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 295 | if (pQueueFamilyPropertyCount) |
| 296 | { |
| 297 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 298 | } |
| 299 | countingStream->write((VkQueueFamilyProperties**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties*)); |
| 300 | if (pQueueFamilyProperties) |
| 301 | { |
| 302 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 303 | { |
| 304 | marshal_VkQueueFamilyProperties(countingStream, (VkQueueFamilyProperties*)(pQueueFamilyProperties + i)); |
| 305 | } |
| 306 | } |
| 307 | } |
| 308 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 309 | countingStream->rewind(); |
| 310 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties = OP_vkGetPhysicalDeviceQueueFamilyProperties; |
| 311 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties, sizeof(uint32_t)); |
| 312 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties, sizeof(uint32_t)); |
| 313 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 314 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 315 | if (pQueueFamilyPropertyCount) |
| 316 | { |
| 317 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 318 | } |
| 319 | stream->write((VkQueueFamilyProperties**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties*)); |
| 320 | if (pQueueFamilyProperties) |
| 321 | { |
| 322 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 323 | { |
| 324 | marshal_VkQueueFamilyProperties(stream, (VkQueueFamilyProperties*)(pQueueFamilyProperties + i)); |
| 325 | } |
| 326 | } |
| 327 | uint32_t* check_pQueueFamilyPropertyCount; |
| 328 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 329 | if (pQueueFamilyPropertyCount) |
| 330 | { |
| 331 | if (!(check_pQueueFamilyPropertyCount)) |
| 332 | { |
| 333 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 334 | } |
| 335 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 336 | } |
| 337 | VkQueueFamilyProperties* check_pQueueFamilyProperties; |
| 338 | stream->read((VkQueueFamilyProperties**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties*)); |
| 339 | if (pQueueFamilyProperties) |
| 340 | { |
| 341 | if (!(check_pQueueFamilyProperties)) |
| 342 | { |
| 343 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 344 | } |
| 345 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 346 | { |
| 347 | unmarshal_VkQueueFamilyProperties(stream, (VkQueueFamilyProperties*)(pQueueFamilyProperties + i)); |
| 348 | } |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties( |
| 353 | VkPhysicalDevice physicalDevice, |
| 354 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) |
| 355 | { |
| 356 | auto stream = mImpl->stream(); |
| 357 | auto countingStream = mImpl->countingStream(); |
| 358 | countingStream->rewind(); |
| 359 | { |
| 360 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 361 | marshal_VkPhysicalDeviceMemoryProperties(countingStream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties)); |
| 362 | } |
| 363 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 364 | countingStream->rewind(); |
| 365 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties = OP_vkGetPhysicalDeviceMemoryProperties; |
| 366 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties, sizeof(uint32_t)); |
| 367 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties, sizeof(uint32_t)); |
| 368 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 369 | marshal_VkPhysicalDeviceMemoryProperties(stream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties)); |
| 370 | unmarshal_VkPhysicalDeviceMemoryProperties(stream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties)); |
| 371 | } |
| 372 | |
| 373 | PFN_vkVoidFunction VkEncoder::vkGetInstanceProcAddr( |
| 374 | VkInstance instance, |
| 375 | const char* pName) |
| 376 | { |
| 377 | auto stream = mImpl->stream(); |
| 378 | auto countingStream = mImpl->countingStream(); |
| 379 | countingStream->rewind(); |
| 380 | { |
| 381 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 382 | countingStream->putString(pName); |
| 383 | } |
| 384 | uint32_t packetSize_vkGetInstanceProcAddr = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 385 | countingStream->rewind(); |
| 386 | uint32_t opcode_vkGetInstanceProcAddr = OP_vkGetInstanceProcAddr; |
| 387 | stream->write(&opcode_vkGetInstanceProcAddr, sizeof(uint32_t)); |
| 388 | stream->write(&packetSize_vkGetInstanceProcAddr, sizeof(uint32_t)); |
| 389 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 390 | stream->putString(pName); |
| 391 | PFN_vkVoidFunction vkGetInstanceProcAddr_PFN_vkVoidFunction_return = (PFN_vkVoidFunction)0; |
| 392 | stream->read(&vkGetInstanceProcAddr_PFN_vkVoidFunction_return, sizeof(PFN_vkVoidFunction)); |
| 393 | return vkGetInstanceProcAddr_PFN_vkVoidFunction_return; |
| 394 | } |
| 395 | |
| 396 | PFN_vkVoidFunction VkEncoder::vkGetDeviceProcAddr( |
| 397 | VkDevice device, |
| 398 | const char* pName) |
| 399 | { |
| 400 | auto stream = mImpl->stream(); |
| 401 | auto countingStream = mImpl->countingStream(); |
| 402 | countingStream->rewind(); |
| 403 | { |
| 404 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 405 | countingStream->putString(pName); |
| 406 | } |
| 407 | uint32_t packetSize_vkGetDeviceProcAddr = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 408 | countingStream->rewind(); |
| 409 | uint32_t opcode_vkGetDeviceProcAddr = OP_vkGetDeviceProcAddr; |
| 410 | stream->write(&opcode_vkGetDeviceProcAddr, sizeof(uint32_t)); |
| 411 | stream->write(&packetSize_vkGetDeviceProcAddr, sizeof(uint32_t)); |
| 412 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 413 | stream->putString(pName); |
| 414 | PFN_vkVoidFunction vkGetDeviceProcAddr_PFN_vkVoidFunction_return = (PFN_vkVoidFunction)0; |
| 415 | stream->read(&vkGetDeviceProcAddr_PFN_vkVoidFunction_return, sizeof(PFN_vkVoidFunction)); |
| 416 | return vkGetDeviceProcAddr_PFN_vkVoidFunction_return; |
| 417 | } |
| 418 | |
| 419 | VkResult VkEncoder::vkCreateDevice( |
| 420 | VkPhysicalDevice physicalDevice, |
| 421 | const VkDeviceCreateInfo* pCreateInfo, |
| 422 | const VkAllocationCallbacks* pAllocator, |
| 423 | VkDevice* pDevice) |
| 424 | { |
| 425 | auto stream = mImpl->stream(); |
| 426 | auto countingStream = mImpl->countingStream(); |
| 427 | countingStream->rewind(); |
| 428 | { |
| 429 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 430 | marshal_VkDeviceCreateInfo(countingStream, (const VkDeviceCreateInfo*)(pCreateInfo)); |
| 431 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 432 | if (pAllocator) |
| 433 | { |
| 434 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 435 | } |
| 436 | countingStream->write((VkDevice*)pDevice, sizeof(VkDevice)); |
| 437 | } |
| 438 | uint32_t packetSize_vkCreateDevice = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 439 | countingStream->rewind(); |
| 440 | uint32_t opcode_vkCreateDevice = OP_vkCreateDevice; |
| 441 | stream->write(&opcode_vkCreateDevice, sizeof(uint32_t)); |
| 442 | stream->write(&packetSize_vkCreateDevice, sizeof(uint32_t)); |
| 443 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 444 | marshal_VkDeviceCreateInfo(stream, (const VkDeviceCreateInfo*)(pCreateInfo)); |
| 445 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 446 | if (pAllocator) |
| 447 | { |
| 448 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 449 | } |
| 450 | stream->write((VkDevice*)pDevice, sizeof(VkDevice)); |
| 451 | stream->read((VkDevice*)pDevice, sizeof(VkDevice)); |
| 452 | VkResult vkCreateDevice_VkResult_return = (VkResult)0; |
| 453 | stream->read(&vkCreateDevice_VkResult_return, sizeof(VkResult)); |
| 454 | return vkCreateDevice_VkResult_return; |
| 455 | } |
| 456 | |
| 457 | void VkEncoder::vkDestroyDevice( |
| 458 | VkDevice device, |
| 459 | const VkAllocationCallbacks* pAllocator) |
| 460 | { |
| 461 | auto stream = mImpl->stream(); |
| 462 | auto countingStream = mImpl->countingStream(); |
| 463 | countingStream->rewind(); |
| 464 | { |
| 465 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 466 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 467 | if (pAllocator) |
| 468 | { |
| 469 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 470 | } |
| 471 | } |
| 472 | uint32_t packetSize_vkDestroyDevice = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 473 | countingStream->rewind(); |
| 474 | uint32_t opcode_vkDestroyDevice = OP_vkDestroyDevice; |
| 475 | stream->write(&opcode_vkDestroyDevice, sizeof(uint32_t)); |
| 476 | stream->write(&packetSize_vkDestroyDevice, sizeof(uint32_t)); |
| 477 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 478 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 479 | if (pAllocator) |
| 480 | { |
| 481 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | VkResult VkEncoder::vkEnumerateInstanceExtensionProperties( |
| 486 | const char* pLayerName, |
| 487 | uint32_t* pPropertyCount, |
| 488 | VkExtensionProperties* pProperties) |
| 489 | { |
| 490 | auto stream = mImpl->stream(); |
| 491 | auto countingStream = mImpl->countingStream(); |
| 492 | countingStream->rewind(); |
| 493 | { |
| 494 | countingStream->putString(pLayerName); |
| 495 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 496 | if (pPropertyCount) |
| 497 | { |
| 498 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 499 | } |
| 500 | countingStream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 501 | if (pProperties) |
| 502 | { |
| 503 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 504 | { |
| 505 | marshal_VkExtensionProperties(countingStream, (VkExtensionProperties*)(pProperties + i)); |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | uint32_t packetSize_vkEnumerateInstanceExtensionProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 510 | countingStream->rewind(); |
| 511 | uint32_t opcode_vkEnumerateInstanceExtensionProperties = OP_vkEnumerateInstanceExtensionProperties; |
| 512 | stream->write(&opcode_vkEnumerateInstanceExtensionProperties, sizeof(uint32_t)); |
| 513 | stream->write(&packetSize_vkEnumerateInstanceExtensionProperties, sizeof(uint32_t)); |
| 514 | stream->putString(pLayerName); |
| 515 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 516 | if (pPropertyCount) |
| 517 | { |
| 518 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 519 | } |
| 520 | stream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 521 | if (pProperties) |
| 522 | { |
| 523 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 524 | { |
| 525 | marshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 526 | } |
| 527 | } |
| 528 | uint32_t* check_pPropertyCount; |
| 529 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 530 | if (pPropertyCount) |
| 531 | { |
| 532 | if (!(check_pPropertyCount)) |
| 533 | { |
| 534 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 535 | } |
| 536 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 537 | } |
| 538 | VkExtensionProperties* check_pProperties; |
| 539 | stream->read((VkExtensionProperties**)&check_pProperties, sizeof(VkExtensionProperties*)); |
| 540 | if (pProperties) |
| 541 | { |
| 542 | if (!(check_pProperties)) |
| 543 | { |
| 544 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 545 | } |
| 546 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 547 | { |
| 548 | unmarshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 549 | } |
| 550 | } |
| 551 | VkResult vkEnumerateInstanceExtensionProperties_VkResult_return = (VkResult)0; |
| 552 | stream->read(&vkEnumerateInstanceExtensionProperties_VkResult_return, sizeof(VkResult)); |
| 553 | return vkEnumerateInstanceExtensionProperties_VkResult_return; |
| 554 | } |
| 555 | |
| 556 | VkResult VkEncoder::vkEnumerateDeviceExtensionProperties( |
| 557 | VkPhysicalDevice physicalDevice, |
| 558 | const char* pLayerName, |
| 559 | uint32_t* pPropertyCount, |
| 560 | VkExtensionProperties* pProperties) |
| 561 | { |
| 562 | auto stream = mImpl->stream(); |
| 563 | auto countingStream = mImpl->countingStream(); |
| 564 | countingStream->rewind(); |
| 565 | { |
| 566 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 567 | countingStream->putString(pLayerName); |
| 568 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 569 | if (pPropertyCount) |
| 570 | { |
| 571 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 572 | } |
| 573 | countingStream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 574 | if (pProperties) |
| 575 | { |
| 576 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 577 | { |
| 578 | marshal_VkExtensionProperties(countingStream, (VkExtensionProperties*)(pProperties + i)); |
| 579 | } |
| 580 | } |
| 581 | } |
| 582 | uint32_t packetSize_vkEnumerateDeviceExtensionProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 583 | countingStream->rewind(); |
| 584 | uint32_t opcode_vkEnumerateDeviceExtensionProperties = OP_vkEnumerateDeviceExtensionProperties; |
| 585 | stream->write(&opcode_vkEnumerateDeviceExtensionProperties, sizeof(uint32_t)); |
| 586 | stream->write(&packetSize_vkEnumerateDeviceExtensionProperties, sizeof(uint32_t)); |
| 587 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 588 | stream->putString(pLayerName); |
| 589 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 590 | if (pPropertyCount) |
| 591 | { |
| 592 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 593 | } |
| 594 | stream->write((VkExtensionProperties**)&pProperties, sizeof(VkExtensionProperties*)); |
| 595 | if (pProperties) |
| 596 | { |
| 597 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 598 | { |
| 599 | marshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 600 | } |
| 601 | } |
| 602 | uint32_t* check_pPropertyCount; |
| 603 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 604 | if (pPropertyCount) |
| 605 | { |
| 606 | if (!(check_pPropertyCount)) |
| 607 | { |
| 608 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 609 | } |
| 610 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 611 | } |
| 612 | VkExtensionProperties* check_pProperties; |
| 613 | stream->read((VkExtensionProperties**)&check_pProperties, sizeof(VkExtensionProperties*)); |
| 614 | if (pProperties) |
| 615 | { |
| 616 | if (!(check_pProperties)) |
| 617 | { |
| 618 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 619 | } |
| 620 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 621 | { |
| 622 | unmarshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i)); |
| 623 | } |
| 624 | } |
| 625 | VkResult vkEnumerateDeviceExtensionProperties_VkResult_return = (VkResult)0; |
| 626 | stream->read(&vkEnumerateDeviceExtensionProperties_VkResult_return, sizeof(VkResult)); |
| 627 | return vkEnumerateDeviceExtensionProperties_VkResult_return; |
| 628 | } |
| 629 | |
| 630 | VkResult VkEncoder::vkEnumerateInstanceLayerProperties( |
| 631 | uint32_t* pPropertyCount, |
| 632 | VkLayerProperties* pProperties) |
| 633 | { |
| 634 | auto stream = mImpl->stream(); |
| 635 | auto countingStream = mImpl->countingStream(); |
| 636 | countingStream->rewind(); |
| 637 | { |
| 638 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 639 | if (pPropertyCount) |
| 640 | { |
| 641 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 642 | } |
| 643 | countingStream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 644 | if (pProperties) |
| 645 | { |
| 646 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 647 | { |
| 648 | marshal_VkLayerProperties(countingStream, (VkLayerProperties*)(pProperties + i)); |
| 649 | } |
| 650 | } |
| 651 | } |
| 652 | uint32_t packetSize_vkEnumerateInstanceLayerProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 653 | countingStream->rewind(); |
| 654 | uint32_t opcode_vkEnumerateInstanceLayerProperties = OP_vkEnumerateInstanceLayerProperties; |
| 655 | stream->write(&opcode_vkEnumerateInstanceLayerProperties, sizeof(uint32_t)); |
| 656 | stream->write(&packetSize_vkEnumerateInstanceLayerProperties, sizeof(uint32_t)); |
| 657 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 658 | if (pPropertyCount) |
| 659 | { |
| 660 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 661 | } |
| 662 | stream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 663 | if (pProperties) |
| 664 | { |
| 665 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 666 | { |
| 667 | marshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 668 | } |
| 669 | } |
| 670 | uint32_t* check_pPropertyCount; |
| 671 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 672 | if (pPropertyCount) |
| 673 | { |
| 674 | if (!(check_pPropertyCount)) |
| 675 | { |
| 676 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 677 | } |
| 678 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 679 | } |
| 680 | VkLayerProperties* check_pProperties; |
| 681 | stream->read((VkLayerProperties**)&check_pProperties, sizeof(VkLayerProperties*)); |
| 682 | if (pProperties) |
| 683 | { |
| 684 | if (!(check_pProperties)) |
| 685 | { |
| 686 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 687 | } |
| 688 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 689 | { |
| 690 | unmarshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 691 | } |
| 692 | } |
| 693 | VkResult vkEnumerateInstanceLayerProperties_VkResult_return = (VkResult)0; |
| 694 | stream->read(&vkEnumerateInstanceLayerProperties_VkResult_return, sizeof(VkResult)); |
| 695 | return vkEnumerateInstanceLayerProperties_VkResult_return; |
| 696 | } |
| 697 | |
| 698 | VkResult VkEncoder::vkEnumerateDeviceLayerProperties( |
| 699 | VkPhysicalDevice physicalDevice, |
| 700 | uint32_t* pPropertyCount, |
| 701 | VkLayerProperties* pProperties) |
| 702 | { |
| 703 | auto stream = mImpl->stream(); |
| 704 | auto countingStream = mImpl->countingStream(); |
| 705 | countingStream->rewind(); |
| 706 | { |
| 707 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 708 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 709 | if (pPropertyCount) |
| 710 | { |
| 711 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 712 | } |
| 713 | countingStream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 714 | if (pProperties) |
| 715 | { |
| 716 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 717 | { |
| 718 | marshal_VkLayerProperties(countingStream, (VkLayerProperties*)(pProperties + i)); |
| 719 | } |
| 720 | } |
| 721 | } |
| 722 | uint32_t packetSize_vkEnumerateDeviceLayerProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 723 | countingStream->rewind(); |
| 724 | uint32_t opcode_vkEnumerateDeviceLayerProperties = OP_vkEnumerateDeviceLayerProperties; |
| 725 | stream->write(&opcode_vkEnumerateDeviceLayerProperties, sizeof(uint32_t)); |
| 726 | stream->write(&packetSize_vkEnumerateDeviceLayerProperties, sizeof(uint32_t)); |
| 727 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 728 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 729 | if (pPropertyCount) |
| 730 | { |
| 731 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 732 | } |
| 733 | stream->write((VkLayerProperties**)&pProperties, sizeof(VkLayerProperties*)); |
| 734 | if (pProperties) |
| 735 | { |
| 736 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 737 | { |
| 738 | marshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 739 | } |
| 740 | } |
| 741 | uint32_t* check_pPropertyCount; |
| 742 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 743 | if (pPropertyCount) |
| 744 | { |
| 745 | if (!(check_pPropertyCount)) |
| 746 | { |
| 747 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 748 | } |
| 749 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 750 | } |
| 751 | VkLayerProperties* check_pProperties; |
| 752 | stream->read((VkLayerProperties**)&check_pProperties, sizeof(VkLayerProperties*)); |
| 753 | if (pProperties) |
| 754 | { |
| 755 | if (!(check_pProperties)) |
| 756 | { |
| 757 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 758 | } |
| 759 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 760 | { |
| 761 | unmarshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i)); |
| 762 | } |
| 763 | } |
| 764 | VkResult vkEnumerateDeviceLayerProperties_VkResult_return = (VkResult)0; |
| 765 | stream->read(&vkEnumerateDeviceLayerProperties_VkResult_return, sizeof(VkResult)); |
| 766 | return vkEnumerateDeviceLayerProperties_VkResult_return; |
| 767 | } |
| 768 | |
| 769 | void VkEncoder::vkGetDeviceQueue( |
| 770 | VkDevice device, |
| 771 | uint32_t queueFamilyIndex, |
| 772 | uint32_t queueIndex, |
| 773 | VkQueue* pQueue) |
| 774 | { |
| 775 | auto stream = mImpl->stream(); |
| 776 | auto countingStream = mImpl->countingStream(); |
| 777 | countingStream->rewind(); |
| 778 | { |
| 779 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 780 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 781 | countingStream->write((uint32_t*)&queueIndex, sizeof(uint32_t)); |
| 782 | countingStream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 783 | } |
| 784 | uint32_t packetSize_vkGetDeviceQueue = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 785 | countingStream->rewind(); |
| 786 | uint32_t opcode_vkGetDeviceQueue = OP_vkGetDeviceQueue; |
| 787 | stream->write(&opcode_vkGetDeviceQueue, sizeof(uint32_t)); |
| 788 | stream->write(&packetSize_vkGetDeviceQueue, sizeof(uint32_t)); |
| 789 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 790 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 791 | stream->write((uint32_t*)&queueIndex, sizeof(uint32_t)); |
| 792 | stream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 793 | stream->read((VkQueue*)pQueue, sizeof(VkQueue)); |
| 794 | } |
| 795 | |
| 796 | VkResult VkEncoder::vkQueueSubmit( |
| 797 | VkQueue queue, |
| 798 | uint32_t submitCount, |
| 799 | const VkSubmitInfo* pSubmits, |
| 800 | VkFence fence) |
| 801 | { |
| 802 | auto stream = mImpl->stream(); |
| 803 | auto countingStream = mImpl->countingStream(); |
| 804 | countingStream->rewind(); |
| 805 | { |
| 806 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 807 | countingStream->write((uint32_t*)&submitCount, sizeof(uint32_t)); |
| 808 | for (uint32_t i = 0; i < (uint32_t)((submitCount)); ++i) |
| 809 | { |
| 810 | marshal_VkSubmitInfo(countingStream, (const VkSubmitInfo*)(pSubmits + i)); |
| 811 | } |
| 812 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 813 | } |
| 814 | uint32_t packetSize_vkQueueSubmit = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 815 | countingStream->rewind(); |
| 816 | uint32_t opcode_vkQueueSubmit = OP_vkQueueSubmit; |
| 817 | stream->write(&opcode_vkQueueSubmit, sizeof(uint32_t)); |
| 818 | stream->write(&packetSize_vkQueueSubmit, sizeof(uint32_t)); |
| 819 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 820 | stream->write((uint32_t*)&submitCount, sizeof(uint32_t)); |
| 821 | for (uint32_t i = 0; i < (uint32_t)((submitCount)); ++i) |
| 822 | { |
| 823 | marshal_VkSubmitInfo(stream, (const VkSubmitInfo*)(pSubmits + i)); |
| 824 | } |
| 825 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 826 | VkResult vkQueueSubmit_VkResult_return = (VkResult)0; |
| 827 | stream->read(&vkQueueSubmit_VkResult_return, sizeof(VkResult)); |
| 828 | return vkQueueSubmit_VkResult_return; |
| 829 | } |
| 830 | |
| 831 | VkResult VkEncoder::vkQueueWaitIdle( |
| 832 | VkQueue queue) |
| 833 | { |
| 834 | auto stream = mImpl->stream(); |
| 835 | auto countingStream = mImpl->countingStream(); |
| 836 | countingStream->rewind(); |
| 837 | { |
| 838 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 839 | } |
| 840 | uint32_t packetSize_vkQueueWaitIdle = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 841 | countingStream->rewind(); |
| 842 | uint32_t opcode_vkQueueWaitIdle = OP_vkQueueWaitIdle; |
| 843 | stream->write(&opcode_vkQueueWaitIdle, sizeof(uint32_t)); |
| 844 | stream->write(&packetSize_vkQueueWaitIdle, sizeof(uint32_t)); |
| 845 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 846 | VkResult vkQueueWaitIdle_VkResult_return = (VkResult)0; |
| 847 | stream->read(&vkQueueWaitIdle_VkResult_return, sizeof(VkResult)); |
| 848 | return vkQueueWaitIdle_VkResult_return; |
| 849 | } |
| 850 | |
| 851 | VkResult VkEncoder::vkDeviceWaitIdle( |
| 852 | VkDevice device) |
| 853 | { |
| 854 | auto stream = mImpl->stream(); |
| 855 | auto countingStream = mImpl->countingStream(); |
| 856 | countingStream->rewind(); |
| 857 | { |
| 858 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 859 | } |
| 860 | uint32_t packetSize_vkDeviceWaitIdle = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 861 | countingStream->rewind(); |
| 862 | uint32_t opcode_vkDeviceWaitIdle = OP_vkDeviceWaitIdle; |
| 863 | stream->write(&opcode_vkDeviceWaitIdle, sizeof(uint32_t)); |
| 864 | stream->write(&packetSize_vkDeviceWaitIdle, sizeof(uint32_t)); |
| 865 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 866 | VkResult vkDeviceWaitIdle_VkResult_return = (VkResult)0; |
| 867 | stream->read(&vkDeviceWaitIdle_VkResult_return, sizeof(VkResult)); |
| 868 | return vkDeviceWaitIdle_VkResult_return; |
| 869 | } |
| 870 | |
| 871 | VkResult VkEncoder::vkAllocateMemory( |
| 872 | VkDevice device, |
| 873 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 874 | const VkAllocationCallbacks* pAllocator, |
| 875 | VkDeviceMemory* pMemory) |
| 876 | { |
| 877 | auto stream = mImpl->stream(); |
| 878 | auto countingStream = mImpl->countingStream(); |
| 879 | countingStream->rewind(); |
| 880 | { |
| 881 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 882 | marshal_VkMemoryAllocateInfo(countingStream, (const VkMemoryAllocateInfo*)(pAllocateInfo)); |
| 883 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 884 | if (pAllocator) |
| 885 | { |
| 886 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 887 | } |
| 888 | countingStream->write((VkDeviceMemory*)pMemory, sizeof(VkDeviceMemory)); |
| 889 | } |
| 890 | uint32_t packetSize_vkAllocateMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 891 | countingStream->rewind(); |
| 892 | uint32_t opcode_vkAllocateMemory = OP_vkAllocateMemory; |
| 893 | stream->write(&opcode_vkAllocateMemory, sizeof(uint32_t)); |
| 894 | stream->write(&packetSize_vkAllocateMemory, sizeof(uint32_t)); |
| 895 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 896 | marshal_VkMemoryAllocateInfo(stream, (const VkMemoryAllocateInfo*)(pAllocateInfo)); |
| 897 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 898 | if (pAllocator) |
| 899 | { |
| 900 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 901 | } |
| 902 | stream->write((VkDeviceMemory*)pMemory, sizeof(VkDeviceMemory)); |
| 903 | stream->read((VkDeviceMemory*)pMemory, sizeof(VkDeviceMemory)); |
| 904 | VkResult vkAllocateMemory_VkResult_return = (VkResult)0; |
| 905 | stream->read(&vkAllocateMemory_VkResult_return, sizeof(VkResult)); |
| 906 | return vkAllocateMemory_VkResult_return; |
| 907 | } |
| 908 | |
| 909 | void VkEncoder::vkFreeMemory( |
| 910 | VkDevice device, |
| 911 | VkDeviceMemory memory, |
| 912 | const VkAllocationCallbacks* pAllocator) |
| 913 | { |
| 914 | auto stream = mImpl->stream(); |
| 915 | auto countingStream = mImpl->countingStream(); |
| 916 | countingStream->rewind(); |
| 917 | { |
| 918 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 919 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 920 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 921 | if (pAllocator) |
| 922 | { |
| 923 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 924 | } |
| 925 | } |
| 926 | uint32_t packetSize_vkFreeMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 927 | countingStream->rewind(); |
| 928 | uint32_t opcode_vkFreeMemory = OP_vkFreeMemory; |
| 929 | stream->write(&opcode_vkFreeMemory, sizeof(uint32_t)); |
| 930 | stream->write(&packetSize_vkFreeMemory, sizeof(uint32_t)); |
| 931 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 932 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 933 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 934 | if (pAllocator) |
| 935 | { |
| 936 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 937 | } |
| 938 | } |
| 939 | |
| 940 | VkResult VkEncoder::vkMapMemory( |
| 941 | VkDevice device, |
| 942 | VkDeviceMemory memory, |
| 943 | VkDeviceSize offset, |
| 944 | VkDeviceSize size, |
| 945 | VkMemoryMapFlags flags, |
| 946 | void** ppData) |
| 947 | { |
| 948 | auto stream = mImpl->stream(); |
| 949 | auto countingStream = mImpl->countingStream(); |
| 950 | countingStream->rewind(); |
| 951 | { |
| 952 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 953 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 954 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 955 | countingStream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 956 | countingStream->write((VkMemoryMapFlags*)&flags, sizeof(VkMemoryMapFlags)); |
| 957 | countingStream->write((void***)&ppData, sizeof(void**)); |
| 958 | if (ppData) |
| 959 | { |
| 960 | countingStream->write((void**)ppData, sizeof(void*)); |
| 961 | } |
| 962 | } |
| 963 | uint32_t packetSize_vkMapMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 964 | countingStream->rewind(); |
| 965 | uint32_t opcode_vkMapMemory = OP_vkMapMemory; |
| 966 | stream->write(&opcode_vkMapMemory, sizeof(uint32_t)); |
| 967 | stream->write(&packetSize_vkMapMemory, sizeof(uint32_t)); |
| 968 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 969 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 970 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 971 | stream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 972 | stream->write((VkMemoryMapFlags*)&flags, sizeof(VkMemoryMapFlags)); |
| 973 | stream->write((void***)&ppData, sizeof(void**)); |
| 974 | if (ppData) |
| 975 | { |
| 976 | stream->write((void**)ppData, sizeof(void*)); |
| 977 | } |
| 978 | void** check_ppData; |
| 979 | stream->read((void***)&check_ppData, sizeof(void**)); |
| 980 | if (ppData) |
| 981 | { |
| 982 | if (!(check_ppData)) |
| 983 | { |
| 984 | fprintf(stderr, "fatal: ppData inconsistent between guest and host\n"); |
| 985 | } |
| 986 | stream->read((void**)ppData, sizeof(void*)); |
| 987 | } |
| 988 | VkResult vkMapMemory_VkResult_return = (VkResult)0; |
| 989 | stream->read(&vkMapMemory_VkResult_return, sizeof(VkResult)); |
| 990 | return vkMapMemory_VkResult_return; |
| 991 | } |
| 992 | |
| 993 | void VkEncoder::vkUnmapMemory( |
| 994 | VkDevice device, |
| 995 | VkDeviceMemory memory) |
| 996 | { |
| 997 | auto stream = mImpl->stream(); |
| 998 | auto countingStream = mImpl->countingStream(); |
| 999 | countingStream->rewind(); |
| 1000 | { |
| 1001 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1002 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1003 | } |
| 1004 | uint32_t packetSize_vkUnmapMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1005 | countingStream->rewind(); |
| 1006 | uint32_t opcode_vkUnmapMemory = OP_vkUnmapMemory; |
| 1007 | stream->write(&opcode_vkUnmapMemory, sizeof(uint32_t)); |
| 1008 | stream->write(&packetSize_vkUnmapMemory, sizeof(uint32_t)); |
| 1009 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1010 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1011 | } |
| 1012 | |
| 1013 | VkResult VkEncoder::vkFlushMappedMemoryRanges( |
| 1014 | VkDevice device, |
| 1015 | uint32_t memoryRangeCount, |
| 1016 | const VkMappedMemoryRange* pMemoryRanges) |
| 1017 | { |
| 1018 | auto stream = mImpl->stream(); |
| 1019 | auto countingStream = mImpl->countingStream(); |
| 1020 | countingStream->rewind(); |
| 1021 | { |
| 1022 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1023 | countingStream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1024 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1025 | { |
| 1026 | marshal_VkMappedMemoryRange(countingStream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1027 | } |
| 1028 | } |
| 1029 | uint32_t packetSize_vkFlushMappedMemoryRanges = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1030 | countingStream->rewind(); |
| 1031 | uint32_t opcode_vkFlushMappedMemoryRanges = OP_vkFlushMappedMemoryRanges; |
| 1032 | stream->write(&opcode_vkFlushMappedMemoryRanges, sizeof(uint32_t)); |
| 1033 | stream->write(&packetSize_vkFlushMappedMemoryRanges, sizeof(uint32_t)); |
| 1034 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1035 | stream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1036 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1037 | { |
| 1038 | marshal_VkMappedMemoryRange(stream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1039 | } |
| 1040 | VkResult vkFlushMappedMemoryRanges_VkResult_return = (VkResult)0; |
| 1041 | stream->read(&vkFlushMappedMemoryRanges_VkResult_return, sizeof(VkResult)); |
| 1042 | return vkFlushMappedMemoryRanges_VkResult_return; |
| 1043 | } |
| 1044 | |
| 1045 | VkResult VkEncoder::vkInvalidateMappedMemoryRanges( |
| 1046 | VkDevice device, |
| 1047 | uint32_t memoryRangeCount, |
| 1048 | const VkMappedMemoryRange* pMemoryRanges) |
| 1049 | { |
| 1050 | auto stream = mImpl->stream(); |
| 1051 | auto countingStream = mImpl->countingStream(); |
| 1052 | countingStream->rewind(); |
| 1053 | { |
| 1054 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1055 | countingStream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1056 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1057 | { |
| 1058 | marshal_VkMappedMemoryRange(countingStream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1059 | } |
| 1060 | } |
| 1061 | uint32_t packetSize_vkInvalidateMappedMemoryRanges = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1062 | countingStream->rewind(); |
| 1063 | uint32_t opcode_vkInvalidateMappedMemoryRanges = OP_vkInvalidateMappedMemoryRanges; |
| 1064 | stream->write(&opcode_vkInvalidateMappedMemoryRanges, sizeof(uint32_t)); |
| 1065 | stream->write(&packetSize_vkInvalidateMappedMemoryRanges, sizeof(uint32_t)); |
| 1066 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1067 | stream->write((uint32_t*)&memoryRangeCount, sizeof(uint32_t)); |
| 1068 | for (uint32_t i = 0; i < (uint32_t)((memoryRangeCount)); ++i) |
| 1069 | { |
| 1070 | marshal_VkMappedMemoryRange(stream, (const VkMappedMemoryRange*)(pMemoryRanges + i)); |
| 1071 | } |
| 1072 | VkResult vkInvalidateMappedMemoryRanges_VkResult_return = (VkResult)0; |
| 1073 | stream->read(&vkInvalidateMappedMemoryRanges_VkResult_return, sizeof(VkResult)); |
| 1074 | return vkInvalidateMappedMemoryRanges_VkResult_return; |
| 1075 | } |
| 1076 | |
| 1077 | void VkEncoder::vkGetDeviceMemoryCommitment( |
| 1078 | VkDevice device, |
| 1079 | VkDeviceMemory memory, |
| 1080 | VkDeviceSize* pCommittedMemoryInBytes) |
| 1081 | { |
| 1082 | auto stream = mImpl->stream(); |
| 1083 | auto countingStream = mImpl->countingStream(); |
| 1084 | countingStream->rewind(); |
| 1085 | { |
| 1086 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1087 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1088 | countingStream->write((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1089 | } |
| 1090 | uint32_t packetSize_vkGetDeviceMemoryCommitment = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1091 | countingStream->rewind(); |
| 1092 | uint32_t opcode_vkGetDeviceMemoryCommitment = OP_vkGetDeviceMemoryCommitment; |
| 1093 | stream->write(&opcode_vkGetDeviceMemoryCommitment, sizeof(uint32_t)); |
| 1094 | stream->write(&packetSize_vkGetDeviceMemoryCommitment, sizeof(uint32_t)); |
| 1095 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1096 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1097 | stream->write((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1098 | stream->read((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize)); |
| 1099 | } |
| 1100 | |
| 1101 | VkResult VkEncoder::vkBindBufferMemory( |
| 1102 | VkDevice device, |
| 1103 | VkBuffer buffer, |
| 1104 | VkDeviceMemory memory, |
| 1105 | VkDeviceSize memoryOffset) |
| 1106 | { |
| 1107 | auto stream = mImpl->stream(); |
| 1108 | auto countingStream = mImpl->countingStream(); |
| 1109 | countingStream->rewind(); |
| 1110 | { |
| 1111 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1112 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1113 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1114 | countingStream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1115 | } |
| 1116 | uint32_t packetSize_vkBindBufferMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1117 | countingStream->rewind(); |
| 1118 | uint32_t opcode_vkBindBufferMemory = OP_vkBindBufferMemory; |
| 1119 | stream->write(&opcode_vkBindBufferMemory, sizeof(uint32_t)); |
| 1120 | stream->write(&packetSize_vkBindBufferMemory, sizeof(uint32_t)); |
| 1121 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1122 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1123 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1124 | stream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1125 | VkResult vkBindBufferMemory_VkResult_return = (VkResult)0; |
| 1126 | stream->read(&vkBindBufferMemory_VkResult_return, sizeof(VkResult)); |
| 1127 | return vkBindBufferMemory_VkResult_return; |
| 1128 | } |
| 1129 | |
| 1130 | VkResult VkEncoder::vkBindImageMemory( |
| 1131 | VkDevice device, |
| 1132 | VkImage image, |
| 1133 | VkDeviceMemory memory, |
| 1134 | VkDeviceSize memoryOffset) |
| 1135 | { |
| 1136 | auto stream = mImpl->stream(); |
| 1137 | auto countingStream = mImpl->countingStream(); |
| 1138 | countingStream->rewind(); |
| 1139 | { |
| 1140 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1141 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1142 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1143 | countingStream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1144 | } |
| 1145 | uint32_t packetSize_vkBindImageMemory = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1146 | countingStream->rewind(); |
| 1147 | uint32_t opcode_vkBindImageMemory = OP_vkBindImageMemory; |
| 1148 | stream->write(&opcode_vkBindImageMemory, sizeof(uint32_t)); |
| 1149 | stream->write(&packetSize_vkBindImageMemory, sizeof(uint32_t)); |
| 1150 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1151 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1152 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 1153 | stream->write((VkDeviceSize*)&memoryOffset, sizeof(VkDeviceSize)); |
| 1154 | VkResult vkBindImageMemory_VkResult_return = (VkResult)0; |
| 1155 | stream->read(&vkBindImageMemory_VkResult_return, sizeof(VkResult)); |
| 1156 | return vkBindImageMemory_VkResult_return; |
| 1157 | } |
| 1158 | |
| 1159 | void VkEncoder::vkGetBufferMemoryRequirements( |
| 1160 | VkDevice device, |
| 1161 | VkBuffer buffer, |
| 1162 | VkMemoryRequirements* pMemoryRequirements) |
| 1163 | { |
| 1164 | auto stream = mImpl->stream(); |
| 1165 | auto countingStream = mImpl->countingStream(); |
| 1166 | countingStream->rewind(); |
| 1167 | { |
| 1168 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1169 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1170 | marshal_VkMemoryRequirements(countingStream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1171 | } |
| 1172 | uint32_t packetSize_vkGetBufferMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1173 | countingStream->rewind(); |
| 1174 | uint32_t opcode_vkGetBufferMemoryRequirements = OP_vkGetBufferMemoryRequirements; |
| 1175 | stream->write(&opcode_vkGetBufferMemoryRequirements, sizeof(uint32_t)); |
| 1176 | stream->write(&packetSize_vkGetBufferMemoryRequirements, sizeof(uint32_t)); |
| 1177 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1178 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1179 | marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1180 | unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1181 | } |
| 1182 | |
| 1183 | void VkEncoder::vkGetImageMemoryRequirements( |
| 1184 | VkDevice device, |
| 1185 | VkImage image, |
| 1186 | VkMemoryRequirements* pMemoryRequirements) |
| 1187 | { |
| 1188 | auto stream = mImpl->stream(); |
| 1189 | auto countingStream = mImpl->countingStream(); |
| 1190 | countingStream->rewind(); |
| 1191 | { |
| 1192 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1193 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1194 | marshal_VkMemoryRequirements(countingStream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1195 | } |
| 1196 | uint32_t packetSize_vkGetImageMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1197 | countingStream->rewind(); |
| 1198 | uint32_t opcode_vkGetImageMemoryRequirements = OP_vkGetImageMemoryRequirements; |
| 1199 | stream->write(&opcode_vkGetImageMemoryRequirements, sizeof(uint32_t)); |
| 1200 | stream->write(&packetSize_vkGetImageMemoryRequirements, sizeof(uint32_t)); |
| 1201 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1202 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1203 | marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1204 | unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements)); |
| 1205 | } |
| 1206 | |
| 1207 | void VkEncoder::vkGetImageSparseMemoryRequirements( |
| 1208 | VkDevice device, |
| 1209 | VkImage image, |
| 1210 | uint32_t* pSparseMemoryRequirementCount, |
| 1211 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) |
| 1212 | { |
| 1213 | auto stream = mImpl->stream(); |
| 1214 | auto countingStream = mImpl->countingStream(); |
| 1215 | countingStream->rewind(); |
| 1216 | { |
| 1217 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1218 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 1219 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1220 | if (pSparseMemoryRequirementCount) |
| 1221 | { |
| 1222 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1223 | } |
| 1224 | countingStream->write((VkSparseImageMemoryRequirements**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1225 | if (pSparseMemoryRequirements) |
| 1226 | { |
| 1227 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1228 | { |
| 1229 | marshal_VkSparseImageMemoryRequirements(countingStream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1230 | } |
| 1231 | } |
| 1232 | } |
| 1233 | uint32_t packetSize_vkGetImageSparseMemoryRequirements = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1234 | countingStream->rewind(); |
| 1235 | uint32_t opcode_vkGetImageSparseMemoryRequirements = OP_vkGetImageSparseMemoryRequirements; |
| 1236 | stream->write(&opcode_vkGetImageSparseMemoryRequirements, sizeof(uint32_t)); |
| 1237 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements, sizeof(uint32_t)); |
| 1238 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1239 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 1240 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1241 | if (pSparseMemoryRequirementCount) |
| 1242 | { |
| 1243 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1244 | } |
| 1245 | stream->write((VkSparseImageMemoryRequirements**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1246 | if (pSparseMemoryRequirements) |
| 1247 | { |
| 1248 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1249 | { |
| 1250 | marshal_VkSparseImageMemoryRequirements(stream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1251 | } |
| 1252 | } |
| 1253 | uint32_t* check_pSparseMemoryRequirementCount; |
| 1254 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 1255 | if (pSparseMemoryRequirementCount) |
| 1256 | { |
| 1257 | if (!(check_pSparseMemoryRequirementCount)) |
| 1258 | { |
| 1259 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 1260 | } |
| 1261 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 1262 | } |
| 1263 | VkSparseImageMemoryRequirements* check_pSparseMemoryRequirements; |
| 1264 | stream->read((VkSparseImageMemoryRequirements**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements*)); |
| 1265 | if (pSparseMemoryRequirements) |
| 1266 | { |
| 1267 | if (!(check_pSparseMemoryRequirements)) |
| 1268 | { |
| 1269 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 1270 | } |
| 1271 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 1272 | { |
| 1273 | unmarshal_VkSparseImageMemoryRequirements(stream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i)); |
| 1274 | } |
| 1275 | } |
| 1276 | } |
| 1277 | |
| 1278 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties( |
| 1279 | VkPhysicalDevice physicalDevice, |
| 1280 | VkFormat format, |
| 1281 | VkImageType type, |
| 1282 | VkSampleCountFlagBits samples, |
| 1283 | VkImageUsageFlags usage, |
| 1284 | VkImageTiling tiling, |
| 1285 | uint32_t* pPropertyCount, |
| 1286 | VkSparseImageFormatProperties* pProperties) |
| 1287 | { |
| 1288 | auto stream = mImpl->stream(); |
| 1289 | auto countingStream = mImpl->countingStream(); |
| 1290 | countingStream->rewind(); |
| 1291 | { |
| 1292 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 1293 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 1294 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 1295 | countingStream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 1296 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 1297 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 1298 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 1299 | if (pPropertyCount) |
| 1300 | { |
| 1301 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1302 | } |
| 1303 | countingStream->write((VkSparseImageFormatProperties**)&pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1304 | if (pProperties) |
| 1305 | { |
| 1306 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1307 | { |
| 1308 | marshal_VkSparseImageFormatProperties(countingStream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1309 | } |
| 1310 | } |
| 1311 | } |
| 1312 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1313 | countingStream->rewind(); |
| 1314 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties = OP_vkGetPhysicalDeviceSparseImageFormatProperties; |
| 1315 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties, sizeof(uint32_t)); |
| 1316 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties, sizeof(uint32_t)); |
| 1317 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 1318 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 1319 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 1320 | stream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 1321 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 1322 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 1323 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 1324 | if (pPropertyCount) |
| 1325 | { |
| 1326 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1327 | } |
| 1328 | stream->write((VkSparseImageFormatProperties**)&pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1329 | if (pProperties) |
| 1330 | { |
| 1331 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1332 | { |
| 1333 | marshal_VkSparseImageFormatProperties(stream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1334 | } |
| 1335 | } |
| 1336 | uint32_t* check_pPropertyCount; |
| 1337 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 1338 | if (pPropertyCount) |
| 1339 | { |
| 1340 | if (!(check_pPropertyCount)) |
| 1341 | { |
| 1342 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 1343 | } |
| 1344 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 1345 | } |
| 1346 | VkSparseImageFormatProperties* check_pProperties; |
| 1347 | stream->read((VkSparseImageFormatProperties**)&check_pProperties, sizeof(VkSparseImageFormatProperties*)); |
| 1348 | if (pProperties) |
| 1349 | { |
| 1350 | if (!(check_pProperties)) |
| 1351 | { |
| 1352 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 1353 | } |
| 1354 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 1355 | { |
| 1356 | unmarshal_VkSparseImageFormatProperties(stream, (VkSparseImageFormatProperties*)(pProperties + i)); |
| 1357 | } |
| 1358 | } |
| 1359 | } |
| 1360 | |
| 1361 | VkResult VkEncoder::vkQueueBindSparse( |
| 1362 | VkQueue queue, |
| 1363 | uint32_t bindInfoCount, |
| 1364 | const VkBindSparseInfo* pBindInfo, |
| 1365 | VkFence fence) |
| 1366 | { |
| 1367 | auto stream = mImpl->stream(); |
| 1368 | auto countingStream = mImpl->countingStream(); |
| 1369 | countingStream->rewind(); |
| 1370 | { |
| 1371 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 1372 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 1373 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 1374 | { |
| 1375 | marshal_VkBindSparseInfo(countingStream, (const VkBindSparseInfo*)(pBindInfo + i)); |
| 1376 | } |
| 1377 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1378 | } |
| 1379 | uint32_t packetSize_vkQueueBindSparse = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1380 | countingStream->rewind(); |
| 1381 | uint32_t opcode_vkQueueBindSparse = OP_vkQueueBindSparse; |
| 1382 | stream->write(&opcode_vkQueueBindSparse, sizeof(uint32_t)); |
| 1383 | stream->write(&packetSize_vkQueueBindSparse, sizeof(uint32_t)); |
| 1384 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 1385 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 1386 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 1387 | { |
| 1388 | marshal_VkBindSparseInfo(stream, (const VkBindSparseInfo*)(pBindInfo + i)); |
| 1389 | } |
| 1390 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1391 | VkResult vkQueueBindSparse_VkResult_return = (VkResult)0; |
| 1392 | stream->read(&vkQueueBindSparse_VkResult_return, sizeof(VkResult)); |
| 1393 | return vkQueueBindSparse_VkResult_return; |
| 1394 | } |
| 1395 | |
| 1396 | VkResult VkEncoder::vkCreateFence( |
| 1397 | VkDevice device, |
| 1398 | const VkFenceCreateInfo* pCreateInfo, |
| 1399 | const VkAllocationCallbacks* pAllocator, |
| 1400 | VkFence* pFence) |
| 1401 | { |
| 1402 | auto stream = mImpl->stream(); |
| 1403 | auto countingStream = mImpl->countingStream(); |
| 1404 | countingStream->rewind(); |
| 1405 | { |
| 1406 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1407 | marshal_VkFenceCreateInfo(countingStream, (const VkFenceCreateInfo*)(pCreateInfo)); |
| 1408 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1409 | if (pAllocator) |
| 1410 | { |
| 1411 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1412 | } |
| 1413 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 1414 | } |
| 1415 | uint32_t packetSize_vkCreateFence = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1416 | countingStream->rewind(); |
| 1417 | uint32_t opcode_vkCreateFence = OP_vkCreateFence; |
| 1418 | stream->write(&opcode_vkCreateFence, sizeof(uint32_t)); |
| 1419 | stream->write(&packetSize_vkCreateFence, sizeof(uint32_t)); |
| 1420 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1421 | marshal_VkFenceCreateInfo(stream, (const VkFenceCreateInfo*)(pCreateInfo)); |
| 1422 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1423 | if (pAllocator) |
| 1424 | { |
| 1425 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1426 | } |
| 1427 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 1428 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 1429 | VkResult vkCreateFence_VkResult_return = (VkResult)0; |
| 1430 | stream->read(&vkCreateFence_VkResult_return, sizeof(VkResult)); |
| 1431 | return vkCreateFence_VkResult_return; |
| 1432 | } |
| 1433 | |
| 1434 | void VkEncoder::vkDestroyFence( |
| 1435 | VkDevice device, |
| 1436 | VkFence fence, |
| 1437 | const VkAllocationCallbacks* pAllocator) |
| 1438 | { |
| 1439 | auto stream = mImpl->stream(); |
| 1440 | auto countingStream = mImpl->countingStream(); |
| 1441 | countingStream->rewind(); |
| 1442 | { |
| 1443 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1444 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1445 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1446 | if (pAllocator) |
| 1447 | { |
| 1448 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1449 | } |
| 1450 | } |
| 1451 | uint32_t packetSize_vkDestroyFence = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1452 | countingStream->rewind(); |
| 1453 | uint32_t opcode_vkDestroyFence = OP_vkDestroyFence; |
| 1454 | stream->write(&opcode_vkDestroyFence, sizeof(uint32_t)); |
| 1455 | stream->write(&packetSize_vkDestroyFence, sizeof(uint32_t)); |
| 1456 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1457 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1458 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1459 | if (pAllocator) |
| 1460 | { |
| 1461 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1462 | } |
| 1463 | } |
| 1464 | |
| 1465 | VkResult VkEncoder::vkResetFences( |
| 1466 | VkDevice device, |
| 1467 | uint32_t fenceCount, |
| 1468 | const VkFence* pFences) |
| 1469 | { |
| 1470 | auto stream = mImpl->stream(); |
| 1471 | auto countingStream = mImpl->countingStream(); |
| 1472 | countingStream->rewind(); |
| 1473 | { |
| 1474 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1475 | countingStream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1476 | countingStream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1477 | } |
| 1478 | uint32_t packetSize_vkResetFences = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1479 | countingStream->rewind(); |
| 1480 | uint32_t opcode_vkResetFences = OP_vkResetFences; |
| 1481 | stream->write(&opcode_vkResetFences, sizeof(uint32_t)); |
| 1482 | stream->write(&packetSize_vkResetFences, sizeof(uint32_t)); |
| 1483 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1484 | stream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1485 | stream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1486 | VkResult vkResetFences_VkResult_return = (VkResult)0; |
| 1487 | stream->read(&vkResetFences_VkResult_return, sizeof(VkResult)); |
| 1488 | return vkResetFences_VkResult_return; |
| 1489 | } |
| 1490 | |
| 1491 | VkResult VkEncoder::vkGetFenceStatus( |
| 1492 | VkDevice device, |
| 1493 | VkFence fence) |
| 1494 | { |
| 1495 | auto stream = mImpl->stream(); |
| 1496 | auto countingStream = mImpl->countingStream(); |
| 1497 | countingStream->rewind(); |
| 1498 | { |
| 1499 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1500 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1501 | } |
| 1502 | uint32_t packetSize_vkGetFenceStatus = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1503 | countingStream->rewind(); |
| 1504 | uint32_t opcode_vkGetFenceStatus = OP_vkGetFenceStatus; |
| 1505 | stream->write(&opcode_vkGetFenceStatus, sizeof(uint32_t)); |
| 1506 | stream->write(&packetSize_vkGetFenceStatus, sizeof(uint32_t)); |
| 1507 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1508 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 1509 | VkResult vkGetFenceStatus_VkResult_return = (VkResult)0; |
| 1510 | stream->read(&vkGetFenceStatus_VkResult_return, sizeof(VkResult)); |
| 1511 | return vkGetFenceStatus_VkResult_return; |
| 1512 | } |
| 1513 | |
| 1514 | VkResult VkEncoder::vkWaitForFences( |
| 1515 | VkDevice device, |
| 1516 | uint32_t fenceCount, |
| 1517 | const VkFence* pFences, |
| 1518 | VkBool32 waitAll, |
| 1519 | uint64_t timeout) |
| 1520 | { |
| 1521 | auto stream = mImpl->stream(); |
| 1522 | auto countingStream = mImpl->countingStream(); |
| 1523 | countingStream->rewind(); |
| 1524 | { |
| 1525 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1526 | countingStream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1527 | countingStream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1528 | countingStream->write((VkBool32*)&waitAll, sizeof(VkBool32)); |
| 1529 | countingStream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 1530 | } |
| 1531 | uint32_t packetSize_vkWaitForFences = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1532 | countingStream->rewind(); |
| 1533 | uint32_t opcode_vkWaitForFences = OP_vkWaitForFences; |
| 1534 | stream->write(&opcode_vkWaitForFences, sizeof(uint32_t)); |
| 1535 | stream->write(&packetSize_vkWaitForFences, sizeof(uint32_t)); |
| 1536 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1537 | stream->write((uint32_t*)&fenceCount, sizeof(uint32_t)); |
| 1538 | stream->write((const VkFence*)pFences, ((fenceCount)) * sizeof(const VkFence)); |
| 1539 | stream->write((VkBool32*)&waitAll, sizeof(VkBool32)); |
| 1540 | stream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 1541 | VkResult vkWaitForFences_VkResult_return = (VkResult)0; |
| 1542 | stream->read(&vkWaitForFences_VkResult_return, sizeof(VkResult)); |
| 1543 | return vkWaitForFences_VkResult_return; |
| 1544 | } |
| 1545 | |
| 1546 | VkResult VkEncoder::vkCreateSemaphore( |
| 1547 | VkDevice device, |
| 1548 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 1549 | const VkAllocationCallbacks* pAllocator, |
| 1550 | VkSemaphore* pSemaphore) |
| 1551 | { |
| 1552 | auto stream = mImpl->stream(); |
| 1553 | auto countingStream = mImpl->countingStream(); |
| 1554 | countingStream->rewind(); |
| 1555 | { |
| 1556 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1557 | marshal_VkSemaphoreCreateInfo(countingStream, (const VkSemaphoreCreateInfo*)(pCreateInfo)); |
| 1558 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1559 | if (pAllocator) |
| 1560 | { |
| 1561 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1562 | } |
| 1563 | countingStream->write((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1564 | } |
| 1565 | uint32_t packetSize_vkCreateSemaphore = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1566 | countingStream->rewind(); |
| 1567 | uint32_t opcode_vkCreateSemaphore = OP_vkCreateSemaphore; |
| 1568 | stream->write(&opcode_vkCreateSemaphore, sizeof(uint32_t)); |
| 1569 | stream->write(&packetSize_vkCreateSemaphore, sizeof(uint32_t)); |
| 1570 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1571 | marshal_VkSemaphoreCreateInfo(stream, (const VkSemaphoreCreateInfo*)(pCreateInfo)); |
| 1572 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1573 | if (pAllocator) |
| 1574 | { |
| 1575 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1576 | } |
| 1577 | stream->write((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1578 | stream->read((VkSemaphore*)pSemaphore, sizeof(VkSemaphore)); |
| 1579 | VkResult vkCreateSemaphore_VkResult_return = (VkResult)0; |
| 1580 | stream->read(&vkCreateSemaphore_VkResult_return, sizeof(VkResult)); |
| 1581 | return vkCreateSemaphore_VkResult_return; |
| 1582 | } |
| 1583 | |
| 1584 | void VkEncoder::vkDestroySemaphore( |
| 1585 | VkDevice device, |
| 1586 | VkSemaphore semaphore, |
| 1587 | const VkAllocationCallbacks* pAllocator) |
| 1588 | { |
| 1589 | auto stream = mImpl->stream(); |
| 1590 | auto countingStream = mImpl->countingStream(); |
| 1591 | countingStream->rewind(); |
| 1592 | { |
| 1593 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1594 | countingStream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 1595 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1596 | if (pAllocator) |
| 1597 | { |
| 1598 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1599 | } |
| 1600 | } |
| 1601 | uint32_t packetSize_vkDestroySemaphore = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1602 | countingStream->rewind(); |
| 1603 | uint32_t opcode_vkDestroySemaphore = OP_vkDestroySemaphore; |
| 1604 | stream->write(&opcode_vkDestroySemaphore, sizeof(uint32_t)); |
| 1605 | stream->write(&packetSize_vkDestroySemaphore, sizeof(uint32_t)); |
| 1606 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1607 | stream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 1608 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1609 | if (pAllocator) |
| 1610 | { |
| 1611 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1612 | } |
| 1613 | } |
| 1614 | |
| 1615 | VkResult VkEncoder::vkCreateEvent( |
| 1616 | VkDevice device, |
| 1617 | const VkEventCreateInfo* pCreateInfo, |
| 1618 | const VkAllocationCallbacks* pAllocator, |
| 1619 | VkEvent* pEvent) |
| 1620 | { |
| 1621 | auto stream = mImpl->stream(); |
| 1622 | auto countingStream = mImpl->countingStream(); |
| 1623 | countingStream->rewind(); |
| 1624 | { |
| 1625 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1626 | marshal_VkEventCreateInfo(countingStream, (const VkEventCreateInfo*)(pCreateInfo)); |
| 1627 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1628 | if (pAllocator) |
| 1629 | { |
| 1630 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1631 | } |
| 1632 | countingStream->write((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1633 | } |
| 1634 | uint32_t packetSize_vkCreateEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1635 | countingStream->rewind(); |
| 1636 | uint32_t opcode_vkCreateEvent = OP_vkCreateEvent; |
| 1637 | stream->write(&opcode_vkCreateEvent, sizeof(uint32_t)); |
| 1638 | stream->write(&packetSize_vkCreateEvent, sizeof(uint32_t)); |
| 1639 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1640 | marshal_VkEventCreateInfo(stream, (const VkEventCreateInfo*)(pCreateInfo)); |
| 1641 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1642 | if (pAllocator) |
| 1643 | { |
| 1644 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1645 | } |
| 1646 | stream->write((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1647 | stream->read((VkEvent*)pEvent, sizeof(VkEvent)); |
| 1648 | VkResult vkCreateEvent_VkResult_return = (VkResult)0; |
| 1649 | stream->read(&vkCreateEvent_VkResult_return, sizeof(VkResult)); |
| 1650 | return vkCreateEvent_VkResult_return; |
| 1651 | } |
| 1652 | |
| 1653 | void VkEncoder::vkDestroyEvent( |
| 1654 | VkDevice device, |
| 1655 | VkEvent event, |
| 1656 | const VkAllocationCallbacks* pAllocator) |
| 1657 | { |
| 1658 | auto stream = mImpl->stream(); |
| 1659 | auto countingStream = mImpl->countingStream(); |
| 1660 | countingStream->rewind(); |
| 1661 | { |
| 1662 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1663 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1664 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1665 | if (pAllocator) |
| 1666 | { |
| 1667 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1668 | } |
| 1669 | } |
| 1670 | uint32_t packetSize_vkDestroyEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1671 | countingStream->rewind(); |
| 1672 | uint32_t opcode_vkDestroyEvent = OP_vkDestroyEvent; |
| 1673 | stream->write(&opcode_vkDestroyEvent, sizeof(uint32_t)); |
| 1674 | stream->write(&packetSize_vkDestroyEvent, sizeof(uint32_t)); |
| 1675 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1676 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1677 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1678 | if (pAllocator) |
| 1679 | { |
| 1680 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1681 | } |
| 1682 | } |
| 1683 | |
| 1684 | VkResult VkEncoder::vkGetEventStatus( |
| 1685 | VkDevice device, |
| 1686 | VkEvent event) |
| 1687 | { |
| 1688 | auto stream = mImpl->stream(); |
| 1689 | auto countingStream = mImpl->countingStream(); |
| 1690 | countingStream->rewind(); |
| 1691 | { |
| 1692 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1693 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1694 | } |
| 1695 | uint32_t packetSize_vkGetEventStatus = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1696 | countingStream->rewind(); |
| 1697 | uint32_t opcode_vkGetEventStatus = OP_vkGetEventStatus; |
| 1698 | stream->write(&opcode_vkGetEventStatus, sizeof(uint32_t)); |
| 1699 | stream->write(&packetSize_vkGetEventStatus, sizeof(uint32_t)); |
| 1700 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1701 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1702 | VkResult vkGetEventStatus_VkResult_return = (VkResult)0; |
| 1703 | stream->read(&vkGetEventStatus_VkResult_return, sizeof(VkResult)); |
| 1704 | return vkGetEventStatus_VkResult_return; |
| 1705 | } |
| 1706 | |
| 1707 | VkResult VkEncoder::vkSetEvent( |
| 1708 | VkDevice device, |
| 1709 | VkEvent event) |
| 1710 | { |
| 1711 | auto stream = mImpl->stream(); |
| 1712 | auto countingStream = mImpl->countingStream(); |
| 1713 | countingStream->rewind(); |
| 1714 | { |
| 1715 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1716 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1717 | } |
| 1718 | uint32_t packetSize_vkSetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1719 | countingStream->rewind(); |
| 1720 | uint32_t opcode_vkSetEvent = OP_vkSetEvent; |
| 1721 | stream->write(&opcode_vkSetEvent, sizeof(uint32_t)); |
| 1722 | stream->write(&packetSize_vkSetEvent, sizeof(uint32_t)); |
| 1723 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1724 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1725 | VkResult vkSetEvent_VkResult_return = (VkResult)0; |
| 1726 | stream->read(&vkSetEvent_VkResult_return, sizeof(VkResult)); |
| 1727 | return vkSetEvent_VkResult_return; |
| 1728 | } |
| 1729 | |
| 1730 | VkResult VkEncoder::vkResetEvent( |
| 1731 | VkDevice device, |
| 1732 | VkEvent event) |
| 1733 | { |
| 1734 | auto stream = mImpl->stream(); |
| 1735 | auto countingStream = mImpl->countingStream(); |
| 1736 | countingStream->rewind(); |
| 1737 | { |
| 1738 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1739 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1740 | } |
| 1741 | uint32_t packetSize_vkResetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1742 | countingStream->rewind(); |
| 1743 | uint32_t opcode_vkResetEvent = OP_vkResetEvent; |
| 1744 | stream->write(&opcode_vkResetEvent, sizeof(uint32_t)); |
| 1745 | stream->write(&packetSize_vkResetEvent, sizeof(uint32_t)); |
| 1746 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1747 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 1748 | VkResult vkResetEvent_VkResult_return = (VkResult)0; |
| 1749 | stream->read(&vkResetEvent_VkResult_return, sizeof(VkResult)); |
| 1750 | return vkResetEvent_VkResult_return; |
| 1751 | } |
| 1752 | |
| 1753 | VkResult VkEncoder::vkCreateQueryPool( |
| 1754 | VkDevice device, |
| 1755 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 1756 | const VkAllocationCallbacks* pAllocator, |
| 1757 | VkQueryPool* pQueryPool) |
| 1758 | { |
| 1759 | auto stream = mImpl->stream(); |
| 1760 | auto countingStream = mImpl->countingStream(); |
| 1761 | countingStream->rewind(); |
| 1762 | { |
| 1763 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1764 | marshal_VkQueryPoolCreateInfo(countingStream, (const VkQueryPoolCreateInfo*)(pCreateInfo)); |
| 1765 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1766 | if (pAllocator) |
| 1767 | { |
| 1768 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1769 | } |
| 1770 | countingStream->write((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1771 | } |
| 1772 | uint32_t packetSize_vkCreateQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1773 | countingStream->rewind(); |
| 1774 | uint32_t opcode_vkCreateQueryPool = OP_vkCreateQueryPool; |
| 1775 | stream->write(&opcode_vkCreateQueryPool, sizeof(uint32_t)); |
| 1776 | stream->write(&packetSize_vkCreateQueryPool, sizeof(uint32_t)); |
| 1777 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1778 | marshal_VkQueryPoolCreateInfo(stream, (const VkQueryPoolCreateInfo*)(pCreateInfo)); |
| 1779 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1780 | if (pAllocator) |
| 1781 | { |
| 1782 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1783 | } |
| 1784 | stream->write((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1785 | stream->read((VkQueryPool*)pQueryPool, sizeof(VkQueryPool)); |
| 1786 | VkResult vkCreateQueryPool_VkResult_return = (VkResult)0; |
| 1787 | stream->read(&vkCreateQueryPool_VkResult_return, sizeof(VkResult)); |
| 1788 | return vkCreateQueryPool_VkResult_return; |
| 1789 | } |
| 1790 | |
| 1791 | void VkEncoder::vkDestroyQueryPool( |
| 1792 | VkDevice device, |
| 1793 | VkQueryPool queryPool, |
| 1794 | const VkAllocationCallbacks* pAllocator) |
| 1795 | { |
| 1796 | auto stream = mImpl->stream(); |
| 1797 | auto countingStream = mImpl->countingStream(); |
| 1798 | countingStream->rewind(); |
| 1799 | { |
| 1800 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1801 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1802 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1803 | if (pAllocator) |
| 1804 | { |
| 1805 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1806 | } |
| 1807 | } |
| 1808 | uint32_t packetSize_vkDestroyQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1809 | countingStream->rewind(); |
| 1810 | uint32_t opcode_vkDestroyQueryPool = OP_vkDestroyQueryPool; |
| 1811 | stream->write(&opcode_vkDestroyQueryPool, sizeof(uint32_t)); |
| 1812 | stream->write(&packetSize_vkDestroyQueryPool, sizeof(uint32_t)); |
| 1813 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1814 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1815 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1816 | if (pAllocator) |
| 1817 | { |
| 1818 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1819 | } |
| 1820 | } |
| 1821 | |
| 1822 | VkResult VkEncoder::vkGetQueryPoolResults( |
| 1823 | VkDevice device, |
| 1824 | VkQueryPool queryPool, |
| 1825 | uint32_t firstQuery, |
| 1826 | uint32_t queryCount, |
| 1827 | size_t dataSize, |
| 1828 | void* pData, |
| 1829 | VkDeviceSize stride, |
| 1830 | VkQueryResultFlags flags) |
| 1831 | { |
| 1832 | auto stream = mImpl->stream(); |
| 1833 | auto countingStream = mImpl->countingStream(); |
| 1834 | countingStream->rewind(); |
| 1835 | { |
| 1836 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1837 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1838 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 1839 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 1840 | countingStream->write((size_t*)&dataSize, sizeof(size_t)); |
| 1841 | countingStream->write((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1842 | countingStream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 1843 | countingStream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 1844 | } |
| 1845 | uint32_t packetSize_vkGetQueryPoolResults = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1846 | countingStream->rewind(); |
| 1847 | uint32_t opcode_vkGetQueryPoolResults = OP_vkGetQueryPoolResults; |
| 1848 | stream->write(&opcode_vkGetQueryPoolResults, sizeof(uint32_t)); |
| 1849 | stream->write(&packetSize_vkGetQueryPoolResults, sizeof(uint32_t)); |
| 1850 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1851 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 1852 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 1853 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 1854 | stream->write((size_t*)&dataSize, sizeof(size_t)); |
| 1855 | stream->write((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1856 | stream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 1857 | stream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 1858 | stream->read((void*)pData, ((dataSize)) * sizeof(uint8_t)); |
| 1859 | VkResult vkGetQueryPoolResults_VkResult_return = (VkResult)0; |
| 1860 | stream->read(&vkGetQueryPoolResults_VkResult_return, sizeof(VkResult)); |
| 1861 | return vkGetQueryPoolResults_VkResult_return; |
| 1862 | } |
| 1863 | |
| 1864 | VkResult VkEncoder::vkCreateBuffer( |
| 1865 | VkDevice device, |
| 1866 | const VkBufferCreateInfo* pCreateInfo, |
| 1867 | const VkAllocationCallbacks* pAllocator, |
| 1868 | VkBuffer* pBuffer) |
| 1869 | { |
| 1870 | auto stream = mImpl->stream(); |
| 1871 | auto countingStream = mImpl->countingStream(); |
| 1872 | countingStream->rewind(); |
| 1873 | { |
| 1874 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1875 | marshal_VkBufferCreateInfo(countingStream, (const VkBufferCreateInfo*)(pCreateInfo)); |
| 1876 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1877 | if (pAllocator) |
| 1878 | { |
| 1879 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1880 | } |
| 1881 | countingStream->write((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1882 | } |
| 1883 | uint32_t packetSize_vkCreateBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1884 | countingStream->rewind(); |
| 1885 | uint32_t opcode_vkCreateBuffer = OP_vkCreateBuffer; |
| 1886 | stream->write(&opcode_vkCreateBuffer, sizeof(uint32_t)); |
| 1887 | stream->write(&packetSize_vkCreateBuffer, sizeof(uint32_t)); |
| 1888 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1889 | marshal_VkBufferCreateInfo(stream, (const VkBufferCreateInfo*)(pCreateInfo)); |
| 1890 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1891 | if (pAllocator) |
| 1892 | { |
| 1893 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1894 | } |
| 1895 | stream->write((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1896 | stream->read((VkBuffer*)pBuffer, sizeof(VkBuffer)); |
| 1897 | VkResult vkCreateBuffer_VkResult_return = (VkResult)0; |
| 1898 | stream->read(&vkCreateBuffer_VkResult_return, sizeof(VkResult)); |
| 1899 | return vkCreateBuffer_VkResult_return; |
| 1900 | } |
| 1901 | |
| 1902 | void VkEncoder::vkDestroyBuffer( |
| 1903 | VkDevice device, |
| 1904 | VkBuffer buffer, |
| 1905 | const VkAllocationCallbacks* pAllocator) |
| 1906 | { |
| 1907 | auto stream = mImpl->stream(); |
| 1908 | auto countingStream = mImpl->countingStream(); |
| 1909 | countingStream->rewind(); |
| 1910 | { |
| 1911 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1912 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1913 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1914 | if (pAllocator) |
| 1915 | { |
| 1916 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1917 | } |
| 1918 | } |
| 1919 | uint32_t packetSize_vkDestroyBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1920 | countingStream->rewind(); |
| 1921 | uint32_t opcode_vkDestroyBuffer = OP_vkDestroyBuffer; |
| 1922 | stream->write(&opcode_vkDestroyBuffer, sizeof(uint32_t)); |
| 1923 | stream->write(&packetSize_vkDestroyBuffer, sizeof(uint32_t)); |
| 1924 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1925 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 1926 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1927 | if (pAllocator) |
| 1928 | { |
| 1929 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1930 | } |
| 1931 | } |
| 1932 | |
| 1933 | VkResult VkEncoder::vkCreateBufferView( |
| 1934 | VkDevice device, |
| 1935 | const VkBufferViewCreateInfo* pCreateInfo, |
| 1936 | const VkAllocationCallbacks* pAllocator, |
| 1937 | VkBufferView* pView) |
| 1938 | { |
| 1939 | auto stream = mImpl->stream(); |
| 1940 | auto countingStream = mImpl->countingStream(); |
| 1941 | countingStream->rewind(); |
| 1942 | { |
| 1943 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1944 | marshal_VkBufferViewCreateInfo(countingStream, (const VkBufferViewCreateInfo*)(pCreateInfo)); |
| 1945 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1946 | if (pAllocator) |
| 1947 | { |
| 1948 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1949 | } |
| 1950 | countingStream->write((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1951 | } |
| 1952 | uint32_t packetSize_vkCreateBufferView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1953 | countingStream->rewind(); |
| 1954 | uint32_t opcode_vkCreateBufferView = OP_vkCreateBufferView; |
| 1955 | stream->write(&opcode_vkCreateBufferView, sizeof(uint32_t)); |
| 1956 | stream->write(&packetSize_vkCreateBufferView, sizeof(uint32_t)); |
| 1957 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1958 | marshal_VkBufferViewCreateInfo(stream, (const VkBufferViewCreateInfo*)(pCreateInfo)); |
| 1959 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1960 | if (pAllocator) |
| 1961 | { |
| 1962 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1963 | } |
| 1964 | stream->write((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1965 | stream->read((VkBufferView*)pView, sizeof(VkBufferView)); |
| 1966 | VkResult vkCreateBufferView_VkResult_return = (VkResult)0; |
| 1967 | stream->read(&vkCreateBufferView_VkResult_return, sizeof(VkResult)); |
| 1968 | return vkCreateBufferView_VkResult_return; |
| 1969 | } |
| 1970 | |
| 1971 | void VkEncoder::vkDestroyBufferView( |
| 1972 | VkDevice device, |
| 1973 | VkBufferView bufferView, |
| 1974 | const VkAllocationCallbacks* pAllocator) |
| 1975 | { |
| 1976 | auto stream = mImpl->stream(); |
| 1977 | auto countingStream = mImpl->countingStream(); |
| 1978 | countingStream->rewind(); |
| 1979 | { |
| 1980 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1981 | countingStream->write((VkBufferView*)&bufferView, sizeof(VkBufferView)); |
| 1982 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1983 | if (pAllocator) |
| 1984 | { |
| 1985 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1986 | } |
| 1987 | } |
| 1988 | uint32_t packetSize_vkDestroyBufferView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 1989 | countingStream->rewind(); |
| 1990 | uint32_t opcode_vkDestroyBufferView = OP_vkDestroyBufferView; |
| 1991 | stream->write(&opcode_vkDestroyBufferView, sizeof(uint32_t)); |
| 1992 | stream->write(&packetSize_vkDestroyBufferView, sizeof(uint32_t)); |
| 1993 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 1994 | stream->write((VkBufferView*)&bufferView, sizeof(VkBufferView)); |
| 1995 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 1996 | if (pAllocator) |
| 1997 | { |
| 1998 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 1999 | } |
| 2000 | } |
| 2001 | |
| 2002 | VkResult VkEncoder::vkCreateImage( |
| 2003 | VkDevice device, |
| 2004 | const VkImageCreateInfo* pCreateInfo, |
| 2005 | const VkAllocationCallbacks* pAllocator, |
| 2006 | VkImage* pImage) |
| 2007 | { |
| 2008 | auto stream = mImpl->stream(); |
| 2009 | auto countingStream = mImpl->countingStream(); |
| 2010 | countingStream->rewind(); |
| 2011 | { |
| 2012 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2013 | marshal_VkImageCreateInfo(countingStream, (const VkImageCreateInfo*)(pCreateInfo)); |
| 2014 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2015 | if (pAllocator) |
| 2016 | { |
| 2017 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2018 | } |
| 2019 | countingStream->write((VkImage*)pImage, sizeof(VkImage)); |
| 2020 | } |
| 2021 | uint32_t packetSize_vkCreateImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2022 | countingStream->rewind(); |
| 2023 | uint32_t opcode_vkCreateImage = OP_vkCreateImage; |
| 2024 | stream->write(&opcode_vkCreateImage, sizeof(uint32_t)); |
| 2025 | stream->write(&packetSize_vkCreateImage, sizeof(uint32_t)); |
| 2026 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2027 | marshal_VkImageCreateInfo(stream, (const VkImageCreateInfo*)(pCreateInfo)); |
| 2028 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2029 | if (pAllocator) |
| 2030 | { |
| 2031 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2032 | } |
| 2033 | stream->write((VkImage*)pImage, sizeof(VkImage)); |
| 2034 | stream->read((VkImage*)pImage, sizeof(VkImage)); |
| 2035 | VkResult vkCreateImage_VkResult_return = (VkResult)0; |
| 2036 | stream->read(&vkCreateImage_VkResult_return, sizeof(VkResult)); |
| 2037 | return vkCreateImage_VkResult_return; |
| 2038 | } |
| 2039 | |
| 2040 | void VkEncoder::vkDestroyImage( |
| 2041 | VkDevice device, |
| 2042 | VkImage image, |
| 2043 | const VkAllocationCallbacks* pAllocator) |
| 2044 | { |
| 2045 | auto stream = mImpl->stream(); |
| 2046 | auto countingStream = mImpl->countingStream(); |
| 2047 | countingStream->rewind(); |
| 2048 | { |
| 2049 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2050 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 2051 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2052 | if (pAllocator) |
| 2053 | { |
| 2054 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2055 | } |
| 2056 | } |
| 2057 | uint32_t packetSize_vkDestroyImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2058 | countingStream->rewind(); |
| 2059 | uint32_t opcode_vkDestroyImage = OP_vkDestroyImage; |
| 2060 | stream->write(&opcode_vkDestroyImage, sizeof(uint32_t)); |
| 2061 | stream->write(&packetSize_vkDestroyImage, sizeof(uint32_t)); |
| 2062 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2063 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 2064 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2065 | if (pAllocator) |
| 2066 | { |
| 2067 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2068 | } |
| 2069 | } |
| 2070 | |
| 2071 | void VkEncoder::vkGetImageSubresourceLayout( |
| 2072 | VkDevice device, |
| 2073 | VkImage image, |
| 2074 | const VkImageSubresource* pSubresource, |
| 2075 | VkSubresourceLayout* pLayout) |
| 2076 | { |
| 2077 | auto stream = mImpl->stream(); |
| 2078 | auto countingStream = mImpl->countingStream(); |
| 2079 | countingStream->rewind(); |
| 2080 | { |
| 2081 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2082 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 2083 | marshal_VkImageSubresource(countingStream, (const VkImageSubresource*)(pSubresource)); |
| 2084 | marshal_VkSubresourceLayout(countingStream, (VkSubresourceLayout*)(pLayout)); |
| 2085 | } |
| 2086 | uint32_t packetSize_vkGetImageSubresourceLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2087 | countingStream->rewind(); |
| 2088 | uint32_t opcode_vkGetImageSubresourceLayout = OP_vkGetImageSubresourceLayout; |
| 2089 | stream->write(&opcode_vkGetImageSubresourceLayout, sizeof(uint32_t)); |
| 2090 | stream->write(&packetSize_vkGetImageSubresourceLayout, sizeof(uint32_t)); |
| 2091 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2092 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 2093 | marshal_VkImageSubresource(stream, (const VkImageSubresource*)(pSubresource)); |
| 2094 | marshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout)); |
| 2095 | unmarshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout)); |
| 2096 | } |
| 2097 | |
| 2098 | VkResult VkEncoder::vkCreateImageView( |
| 2099 | VkDevice device, |
| 2100 | const VkImageViewCreateInfo* pCreateInfo, |
| 2101 | const VkAllocationCallbacks* pAllocator, |
| 2102 | VkImageView* pView) |
| 2103 | { |
| 2104 | auto stream = mImpl->stream(); |
| 2105 | auto countingStream = mImpl->countingStream(); |
| 2106 | countingStream->rewind(); |
| 2107 | { |
| 2108 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2109 | marshal_VkImageViewCreateInfo(countingStream, (const VkImageViewCreateInfo*)(pCreateInfo)); |
| 2110 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2111 | if (pAllocator) |
| 2112 | { |
| 2113 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2114 | } |
| 2115 | countingStream->write((VkImageView*)pView, sizeof(VkImageView)); |
| 2116 | } |
| 2117 | uint32_t packetSize_vkCreateImageView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2118 | countingStream->rewind(); |
| 2119 | uint32_t opcode_vkCreateImageView = OP_vkCreateImageView; |
| 2120 | stream->write(&opcode_vkCreateImageView, sizeof(uint32_t)); |
| 2121 | stream->write(&packetSize_vkCreateImageView, sizeof(uint32_t)); |
| 2122 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2123 | marshal_VkImageViewCreateInfo(stream, (const VkImageViewCreateInfo*)(pCreateInfo)); |
| 2124 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2125 | if (pAllocator) |
| 2126 | { |
| 2127 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2128 | } |
| 2129 | stream->write((VkImageView*)pView, sizeof(VkImageView)); |
| 2130 | stream->read((VkImageView*)pView, sizeof(VkImageView)); |
| 2131 | VkResult vkCreateImageView_VkResult_return = (VkResult)0; |
| 2132 | stream->read(&vkCreateImageView_VkResult_return, sizeof(VkResult)); |
| 2133 | return vkCreateImageView_VkResult_return; |
| 2134 | } |
| 2135 | |
| 2136 | void VkEncoder::vkDestroyImageView( |
| 2137 | VkDevice device, |
| 2138 | VkImageView imageView, |
| 2139 | const VkAllocationCallbacks* pAllocator) |
| 2140 | { |
| 2141 | auto stream = mImpl->stream(); |
| 2142 | auto countingStream = mImpl->countingStream(); |
| 2143 | countingStream->rewind(); |
| 2144 | { |
| 2145 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2146 | countingStream->write((VkImageView*)&imageView, sizeof(VkImageView)); |
| 2147 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2148 | if (pAllocator) |
| 2149 | { |
| 2150 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2151 | } |
| 2152 | } |
| 2153 | uint32_t packetSize_vkDestroyImageView = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2154 | countingStream->rewind(); |
| 2155 | uint32_t opcode_vkDestroyImageView = OP_vkDestroyImageView; |
| 2156 | stream->write(&opcode_vkDestroyImageView, sizeof(uint32_t)); |
| 2157 | stream->write(&packetSize_vkDestroyImageView, sizeof(uint32_t)); |
| 2158 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2159 | stream->write((VkImageView*)&imageView, sizeof(VkImageView)); |
| 2160 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2161 | if (pAllocator) |
| 2162 | { |
| 2163 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2164 | } |
| 2165 | } |
| 2166 | |
| 2167 | VkResult VkEncoder::vkCreateShaderModule( |
| 2168 | VkDevice device, |
| 2169 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 2170 | const VkAllocationCallbacks* pAllocator, |
| 2171 | VkShaderModule* pShaderModule) |
| 2172 | { |
| 2173 | auto stream = mImpl->stream(); |
| 2174 | auto countingStream = mImpl->countingStream(); |
| 2175 | countingStream->rewind(); |
| 2176 | { |
| 2177 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2178 | marshal_VkShaderModuleCreateInfo(countingStream, (const VkShaderModuleCreateInfo*)(pCreateInfo)); |
| 2179 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2180 | if (pAllocator) |
| 2181 | { |
| 2182 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2183 | } |
| 2184 | countingStream->write((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2185 | } |
| 2186 | uint32_t packetSize_vkCreateShaderModule = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2187 | countingStream->rewind(); |
| 2188 | uint32_t opcode_vkCreateShaderModule = OP_vkCreateShaderModule; |
| 2189 | stream->write(&opcode_vkCreateShaderModule, sizeof(uint32_t)); |
| 2190 | stream->write(&packetSize_vkCreateShaderModule, sizeof(uint32_t)); |
| 2191 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2192 | marshal_VkShaderModuleCreateInfo(stream, (const VkShaderModuleCreateInfo*)(pCreateInfo)); |
| 2193 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2194 | if (pAllocator) |
| 2195 | { |
| 2196 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2197 | } |
| 2198 | stream->write((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2199 | stream->read((VkShaderModule*)pShaderModule, sizeof(VkShaderModule)); |
| 2200 | VkResult vkCreateShaderModule_VkResult_return = (VkResult)0; |
| 2201 | stream->read(&vkCreateShaderModule_VkResult_return, sizeof(VkResult)); |
| 2202 | return vkCreateShaderModule_VkResult_return; |
| 2203 | } |
| 2204 | |
| 2205 | void VkEncoder::vkDestroyShaderModule( |
| 2206 | VkDevice device, |
| 2207 | VkShaderModule shaderModule, |
| 2208 | const VkAllocationCallbacks* pAllocator) |
| 2209 | { |
| 2210 | auto stream = mImpl->stream(); |
| 2211 | auto countingStream = mImpl->countingStream(); |
| 2212 | countingStream->rewind(); |
| 2213 | { |
| 2214 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2215 | countingStream->write((VkShaderModule*)&shaderModule, sizeof(VkShaderModule)); |
| 2216 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2217 | if (pAllocator) |
| 2218 | { |
| 2219 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2220 | } |
| 2221 | } |
| 2222 | uint32_t packetSize_vkDestroyShaderModule = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2223 | countingStream->rewind(); |
| 2224 | uint32_t opcode_vkDestroyShaderModule = OP_vkDestroyShaderModule; |
| 2225 | stream->write(&opcode_vkDestroyShaderModule, sizeof(uint32_t)); |
| 2226 | stream->write(&packetSize_vkDestroyShaderModule, sizeof(uint32_t)); |
| 2227 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2228 | stream->write((VkShaderModule*)&shaderModule, sizeof(VkShaderModule)); |
| 2229 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2230 | if (pAllocator) |
| 2231 | { |
| 2232 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2233 | } |
| 2234 | } |
| 2235 | |
| 2236 | VkResult VkEncoder::vkCreatePipelineCache( |
| 2237 | VkDevice device, |
| 2238 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 2239 | const VkAllocationCallbacks* pAllocator, |
| 2240 | VkPipelineCache* pPipelineCache) |
| 2241 | { |
| 2242 | auto stream = mImpl->stream(); |
| 2243 | auto countingStream = mImpl->countingStream(); |
| 2244 | countingStream->rewind(); |
| 2245 | { |
| 2246 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2247 | marshal_VkPipelineCacheCreateInfo(countingStream, (const VkPipelineCacheCreateInfo*)(pCreateInfo)); |
| 2248 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2249 | if (pAllocator) |
| 2250 | { |
| 2251 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2252 | } |
| 2253 | countingStream->write((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2254 | } |
| 2255 | uint32_t packetSize_vkCreatePipelineCache = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2256 | countingStream->rewind(); |
| 2257 | uint32_t opcode_vkCreatePipelineCache = OP_vkCreatePipelineCache; |
| 2258 | stream->write(&opcode_vkCreatePipelineCache, sizeof(uint32_t)); |
| 2259 | stream->write(&packetSize_vkCreatePipelineCache, sizeof(uint32_t)); |
| 2260 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2261 | marshal_VkPipelineCacheCreateInfo(stream, (const VkPipelineCacheCreateInfo*)(pCreateInfo)); |
| 2262 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2263 | if (pAllocator) |
| 2264 | { |
| 2265 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2266 | } |
| 2267 | stream->write((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2268 | stream->read((VkPipelineCache*)pPipelineCache, sizeof(VkPipelineCache)); |
| 2269 | VkResult vkCreatePipelineCache_VkResult_return = (VkResult)0; |
| 2270 | stream->read(&vkCreatePipelineCache_VkResult_return, sizeof(VkResult)); |
| 2271 | return vkCreatePipelineCache_VkResult_return; |
| 2272 | } |
| 2273 | |
| 2274 | void VkEncoder::vkDestroyPipelineCache( |
| 2275 | VkDevice device, |
| 2276 | VkPipelineCache pipelineCache, |
| 2277 | const VkAllocationCallbacks* pAllocator) |
| 2278 | { |
| 2279 | auto stream = mImpl->stream(); |
| 2280 | auto countingStream = mImpl->countingStream(); |
| 2281 | countingStream->rewind(); |
| 2282 | { |
| 2283 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2284 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2285 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2286 | if (pAllocator) |
| 2287 | { |
| 2288 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2289 | } |
| 2290 | } |
| 2291 | uint32_t packetSize_vkDestroyPipelineCache = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2292 | countingStream->rewind(); |
| 2293 | uint32_t opcode_vkDestroyPipelineCache = OP_vkDestroyPipelineCache; |
| 2294 | stream->write(&opcode_vkDestroyPipelineCache, sizeof(uint32_t)); |
| 2295 | stream->write(&packetSize_vkDestroyPipelineCache, sizeof(uint32_t)); |
| 2296 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2297 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2298 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2299 | if (pAllocator) |
| 2300 | { |
| 2301 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2302 | } |
| 2303 | } |
| 2304 | |
| 2305 | VkResult VkEncoder::vkGetPipelineCacheData( |
| 2306 | VkDevice device, |
| 2307 | VkPipelineCache pipelineCache, |
| 2308 | size_t* pDataSize, |
| 2309 | void* pData) |
| 2310 | { |
| 2311 | auto stream = mImpl->stream(); |
| 2312 | auto countingStream = mImpl->countingStream(); |
| 2313 | countingStream->rewind(); |
| 2314 | { |
| 2315 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2316 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2317 | countingStream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 2318 | if (pDataSize) |
| 2319 | { |
| 2320 | countingStream->write((size_t*)pDataSize, sizeof(size_t)); |
| 2321 | } |
| 2322 | countingStream->write((void**)&pData, sizeof(void*)); |
| 2323 | if (pData) |
| 2324 | { |
| 2325 | countingStream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2326 | } |
| 2327 | } |
| 2328 | uint32_t packetSize_vkGetPipelineCacheData = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2329 | countingStream->rewind(); |
| 2330 | uint32_t opcode_vkGetPipelineCacheData = OP_vkGetPipelineCacheData; |
| 2331 | stream->write(&opcode_vkGetPipelineCacheData, sizeof(uint32_t)); |
| 2332 | stream->write(&packetSize_vkGetPipelineCacheData, sizeof(uint32_t)); |
| 2333 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2334 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2335 | stream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 2336 | if (pDataSize) |
| 2337 | { |
| 2338 | stream->write((size_t*)pDataSize, sizeof(size_t)); |
| 2339 | } |
| 2340 | stream->write((void**)&pData, sizeof(void*)); |
| 2341 | if (pData) |
| 2342 | { |
| 2343 | stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2344 | } |
| 2345 | size_t* check_pDataSize; |
| 2346 | stream->read((size_t**)&check_pDataSize, sizeof(size_t*)); |
| 2347 | if (pDataSize) |
| 2348 | { |
| 2349 | if (!(check_pDataSize)) |
| 2350 | { |
| 2351 | fprintf(stderr, "fatal: pDataSize inconsistent between guest and host\n"); |
| 2352 | } |
| 2353 | stream->read((size_t*)pDataSize, sizeof(size_t)); |
| 2354 | } |
| 2355 | void* check_pData; |
| 2356 | stream->read((void**)&check_pData, sizeof(void*)); |
| 2357 | if (pData) |
| 2358 | { |
| 2359 | if (!(check_pData)) |
| 2360 | { |
| 2361 | fprintf(stderr, "fatal: pData inconsistent between guest and host\n"); |
| 2362 | } |
| 2363 | stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 2364 | } |
| 2365 | VkResult vkGetPipelineCacheData_VkResult_return = (VkResult)0; |
| 2366 | stream->read(&vkGetPipelineCacheData_VkResult_return, sizeof(VkResult)); |
| 2367 | return vkGetPipelineCacheData_VkResult_return; |
| 2368 | } |
| 2369 | |
| 2370 | VkResult VkEncoder::vkMergePipelineCaches( |
| 2371 | VkDevice device, |
| 2372 | VkPipelineCache dstCache, |
| 2373 | uint32_t srcCacheCount, |
| 2374 | const VkPipelineCache* pSrcCaches) |
| 2375 | { |
| 2376 | auto stream = mImpl->stream(); |
| 2377 | auto countingStream = mImpl->countingStream(); |
| 2378 | countingStream->rewind(); |
| 2379 | { |
| 2380 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2381 | countingStream->write((VkPipelineCache*)&dstCache, sizeof(VkPipelineCache)); |
| 2382 | countingStream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 2383 | countingStream->write((const VkPipelineCache*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkPipelineCache)); |
| 2384 | } |
| 2385 | uint32_t packetSize_vkMergePipelineCaches = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2386 | countingStream->rewind(); |
| 2387 | uint32_t opcode_vkMergePipelineCaches = OP_vkMergePipelineCaches; |
| 2388 | stream->write(&opcode_vkMergePipelineCaches, sizeof(uint32_t)); |
| 2389 | stream->write(&packetSize_vkMergePipelineCaches, sizeof(uint32_t)); |
| 2390 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2391 | stream->write((VkPipelineCache*)&dstCache, sizeof(VkPipelineCache)); |
| 2392 | stream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 2393 | stream->write((const VkPipelineCache*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkPipelineCache)); |
| 2394 | VkResult vkMergePipelineCaches_VkResult_return = (VkResult)0; |
| 2395 | stream->read(&vkMergePipelineCaches_VkResult_return, sizeof(VkResult)); |
| 2396 | return vkMergePipelineCaches_VkResult_return; |
| 2397 | } |
| 2398 | |
| 2399 | VkResult VkEncoder::vkCreateGraphicsPipelines( |
| 2400 | VkDevice device, |
| 2401 | VkPipelineCache pipelineCache, |
| 2402 | uint32_t createInfoCount, |
| 2403 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 2404 | const VkAllocationCallbacks* pAllocator, |
| 2405 | VkPipeline* pPipelines) |
| 2406 | { |
| 2407 | auto stream = mImpl->stream(); |
| 2408 | auto countingStream = mImpl->countingStream(); |
| 2409 | countingStream->rewind(); |
| 2410 | { |
| 2411 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2412 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2413 | countingStream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2414 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2415 | { |
| 2416 | marshal_VkGraphicsPipelineCreateInfo(countingStream, (const VkGraphicsPipelineCreateInfo*)(pCreateInfos + i)); |
| 2417 | } |
| 2418 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2419 | if (pAllocator) |
| 2420 | { |
| 2421 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2422 | } |
| 2423 | countingStream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2424 | } |
| 2425 | uint32_t packetSize_vkCreateGraphicsPipelines = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2426 | countingStream->rewind(); |
| 2427 | uint32_t opcode_vkCreateGraphicsPipelines = OP_vkCreateGraphicsPipelines; |
| 2428 | stream->write(&opcode_vkCreateGraphicsPipelines, sizeof(uint32_t)); |
| 2429 | stream->write(&packetSize_vkCreateGraphicsPipelines, sizeof(uint32_t)); |
| 2430 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2431 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2432 | stream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2433 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2434 | { |
| 2435 | marshal_VkGraphicsPipelineCreateInfo(stream, (const VkGraphicsPipelineCreateInfo*)(pCreateInfos + i)); |
| 2436 | } |
| 2437 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2438 | if (pAllocator) |
| 2439 | { |
| 2440 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2441 | } |
| 2442 | stream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2443 | stream->read((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2444 | VkResult vkCreateGraphicsPipelines_VkResult_return = (VkResult)0; |
| 2445 | stream->read(&vkCreateGraphicsPipelines_VkResult_return, sizeof(VkResult)); |
| 2446 | return vkCreateGraphicsPipelines_VkResult_return; |
| 2447 | } |
| 2448 | |
| 2449 | VkResult VkEncoder::vkCreateComputePipelines( |
| 2450 | VkDevice device, |
| 2451 | VkPipelineCache pipelineCache, |
| 2452 | uint32_t createInfoCount, |
| 2453 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 2454 | const VkAllocationCallbacks* pAllocator, |
| 2455 | VkPipeline* pPipelines) |
| 2456 | { |
| 2457 | auto stream = mImpl->stream(); |
| 2458 | auto countingStream = mImpl->countingStream(); |
| 2459 | countingStream->rewind(); |
| 2460 | { |
| 2461 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2462 | countingStream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2463 | countingStream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2464 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2465 | { |
| 2466 | marshal_VkComputePipelineCreateInfo(countingStream, (const VkComputePipelineCreateInfo*)(pCreateInfos + i)); |
| 2467 | } |
| 2468 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2469 | if (pAllocator) |
| 2470 | { |
| 2471 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2472 | } |
| 2473 | countingStream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2474 | } |
| 2475 | uint32_t packetSize_vkCreateComputePipelines = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2476 | countingStream->rewind(); |
| 2477 | uint32_t opcode_vkCreateComputePipelines = OP_vkCreateComputePipelines; |
| 2478 | stream->write(&opcode_vkCreateComputePipelines, sizeof(uint32_t)); |
| 2479 | stream->write(&packetSize_vkCreateComputePipelines, sizeof(uint32_t)); |
| 2480 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2481 | stream->write((VkPipelineCache*)&pipelineCache, sizeof(VkPipelineCache)); |
| 2482 | stream->write((uint32_t*)&createInfoCount, sizeof(uint32_t)); |
| 2483 | for (uint32_t i = 0; i < (uint32_t)((createInfoCount)); ++i) |
| 2484 | { |
| 2485 | marshal_VkComputePipelineCreateInfo(stream, (const VkComputePipelineCreateInfo*)(pCreateInfos + i)); |
| 2486 | } |
| 2487 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2488 | if (pAllocator) |
| 2489 | { |
| 2490 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2491 | } |
| 2492 | stream->write((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2493 | stream->read((VkPipeline*)pPipelines, ((createInfoCount)) * sizeof(VkPipeline)); |
| 2494 | VkResult vkCreateComputePipelines_VkResult_return = (VkResult)0; |
| 2495 | stream->read(&vkCreateComputePipelines_VkResult_return, sizeof(VkResult)); |
| 2496 | return vkCreateComputePipelines_VkResult_return; |
| 2497 | } |
| 2498 | |
| 2499 | void VkEncoder::vkDestroyPipeline( |
| 2500 | VkDevice device, |
| 2501 | VkPipeline pipeline, |
| 2502 | const VkAllocationCallbacks* pAllocator) |
| 2503 | { |
| 2504 | auto stream = mImpl->stream(); |
| 2505 | auto countingStream = mImpl->countingStream(); |
| 2506 | countingStream->rewind(); |
| 2507 | { |
| 2508 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2509 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 2510 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2511 | if (pAllocator) |
| 2512 | { |
| 2513 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2514 | } |
| 2515 | } |
| 2516 | uint32_t packetSize_vkDestroyPipeline = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2517 | countingStream->rewind(); |
| 2518 | uint32_t opcode_vkDestroyPipeline = OP_vkDestroyPipeline; |
| 2519 | stream->write(&opcode_vkDestroyPipeline, sizeof(uint32_t)); |
| 2520 | stream->write(&packetSize_vkDestroyPipeline, sizeof(uint32_t)); |
| 2521 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2522 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 2523 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2524 | if (pAllocator) |
| 2525 | { |
| 2526 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2527 | } |
| 2528 | } |
| 2529 | |
| 2530 | VkResult VkEncoder::vkCreatePipelineLayout( |
| 2531 | VkDevice device, |
| 2532 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 2533 | const VkAllocationCallbacks* pAllocator, |
| 2534 | VkPipelineLayout* pPipelineLayout) |
| 2535 | { |
| 2536 | auto stream = mImpl->stream(); |
| 2537 | auto countingStream = mImpl->countingStream(); |
| 2538 | countingStream->rewind(); |
| 2539 | { |
| 2540 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2541 | marshal_VkPipelineLayoutCreateInfo(countingStream, (const VkPipelineLayoutCreateInfo*)(pCreateInfo)); |
| 2542 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2543 | if (pAllocator) |
| 2544 | { |
| 2545 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2546 | } |
| 2547 | countingStream->write((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2548 | } |
| 2549 | uint32_t packetSize_vkCreatePipelineLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2550 | countingStream->rewind(); |
| 2551 | uint32_t opcode_vkCreatePipelineLayout = OP_vkCreatePipelineLayout; |
| 2552 | stream->write(&opcode_vkCreatePipelineLayout, sizeof(uint32_t)); |
| 2553 | stream->write(&packetSize_vkCreatePipelineLayout, sizeof(uint32_t)); |
| 2554 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2555 | marshal_VkPipelineLayoutCreateInfo(stream, (const VkPipelineLayoutCreateInfo*)(pCreateInfo)); |
| 2556 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2557 | if (pAllocator) |
| 2558 | { |
| 2559 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2560 | } |
| 2561 | stream->write((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2562 | stream->read((VkPipelineLayout*)pPipelineLayout, sizeof(VkPipelineLayout)); |
| 2563 | VkResult vkCreatePipelineLayout_VkResult_return = (VkResult)0; |
| 2564 | stream->read(&vkCreatePipelineLayout_VkResult_return, sizeof(VkResult)); |
| 2565 | return vkCreatePipelineLayout_VkResult_return; |
| 2566 | } |
| 2567 | |
| 2568 | void VkEncoder::vkDestroyPipelineLayout( |
| 2569 | VkDevice device, |
| 2570 | VkPipelineLayout pipelineLayout, |
| 2571 | const VkAllocationCallbacks* pAllocator) |
| 2572 | { |
| 2573 | auto stream = mImpl->stream(); |
| 2574 | auto countingStream = mImpl->countingStream(); |
| 2575 | countingStream->rewind(); |
| 2576 | { |
| 2577 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2578 | countingStream->write((VkPipelineLayout*)&pipelineLayout, sizeof(VkPipelineLayout)); |
| 2579 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2580 | if (pAllocator) |
| 2581 | { |
| 2582 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2583 | } |
| 2584 | } |
| 2585 | uint32_t packetSize_vkDestroyPipelineLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2586 | countingStream->rewind(); |
| 2587 | uint32_t opcode_vkDestroyPipelineLayout = OP_vkDestroyPipelineLayout; |
| 2588 | stream->write(&opcode_vkDestroyPipelineLayout, sizeof(uint32_t)); |
| 2589 | stream->write(&packetSize_vkDestroyPipelineLayout, sizeof(uint32_t)); |
| 2590 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2591 | stream->write((VkPipelineLayout*)&pipelineLayout, sizeof(VkPipelineLayout)); |
| 2592 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2593 | if (pAllocator) |
| 2594 | { |
| 2595 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2596 | } |
| 2597 | } |
| 2598 | |
| 2599 | VkResult VkEncoder::vkCreateSampler( |
| 2600 | VkDevice device, |
| 2601 | const VkSamplerCreateInfo* pCreateInfo, |
| 2602 | const VkAllocationCallbacks* pAllocator, |
| 2603 | VkSampler* pSampler) |
| 2604 | { |
| 2605 | auto stream = mImpl->stream(); |
| 2606 | auto countingStream = mImpl->countingStream(); |
| 2607 | countingStream->rewind(); |
| 2608 | { |
| 2609 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2610 | marshal_VkSamplerCreateInfo(countingStream, (const VkSamplerCreateInfo*)(pCreateInfo)); |
| 2611 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2612 | if (pAllocator) |
| 2613 | { |
| 2614 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2615 | } |
| 2616 | countingStream->write((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2617 | } |
| 2618 | uint32_t packetSize_vkCreateSampler = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2619 | countingStream->rewind(); |
| 2620 | uint32_t opcode_vkCreateSampler = OP_vkCreateSampler; |
| 2621 | stream->write(&opcode_vkCreateSampler, sizeof(uint32_t)); |
| 2622 | stream->write(&packetSize_vkCreateSampler, sizeof(uint32_t)); |
| 2623 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2624 | marshal_VkSamplerCreateInfo(stream, (const VkSamplerCreateInfo*)(pCreateInfo)); |
| 2625 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2626 | if (pAllocator) |
| 2627 | { |
| 2628 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2629 | } |
| 2630 | stream->write((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2631 | stream->read((VkSampler*)pSampler, sizeof(VkSampler)); |
| 2632 | VkResult vkCreateSampler_VkResult_return = (VkResult)0; |
| 2633 | stream->read(&vkCreateSampler_VkResult_return, sizeof(VkResult)); |
| 2634 | return vkCreateSampler_VkResult_return; |
| 2635 | } |
| 2636 | |
| 2637 | void VkEncoder::vkDestroySampler( |
| 2638 | VkDevice device, |
| 2639 | VkSampler sampler, |
| 2640 | const VkAllocationCallbacks* pAllocator) |
| 2641 | { |
| 2642 | auto stream = mImpl->stream(); |
| 2643 | auto countingStream = mImpl->countingStream(); |
| 2644 | countingStream->rewind(); |
| 2645 | { |
| 2646 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2647 | countingStream->write((VkSampler*)&sampler, sizeof(VkSampler)); |
| 2648 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2649 | if (pAllocator) |
| 2650 | { |
| 2651 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2652 | } |
| 2653 | } |
| 2654 | uint32_t packetSize_vkDestroySampler = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2655 | countingStream->rewind(); |
| 2656 | uint32_t opcode_vkDestroySampler = OP_vkDestroySampler; |
| 2657 | stream->write(&opcode_vkDestroySampler, sizeof(uint32_t)); |
| 2658 | stream->write(&packetSize_vkDestroySampler, sizeof(uint32_t)); |
| 2659 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2660 | stream->write((VkSampler*)&sampler, sizeof(VkSampler)); |
| 2661 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2662 | if (pAllocator) |
| 2663 | { |
| 2664 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2665 | } |
| 2666 | } |
| 2667 | |
| 2668 | VkResult VkEncoder::vkCreateDescriptorSetLayout( |
| 2669 | VkDevice device, |
| 2670 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 2671 | const VkAllocationCallbacks* pAllocator, |
| 2672 | VkDescriptorSetLayout* pSetLayout) |
| 2673 | { |
| 2674 | auto stream = mImpl->stream(); |
| 2675 | auto countingStream = mImpl->countingStream(); |
| 2676 | countingStream->rewind(); |
| 2677 | { |
| 2678 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2679 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 2680 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2681 | if (pAllocator) |
| 2682 | { |
| 2683 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2684 | } |
| 2685 | countingStream->write((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2686 | } |
| 2687 | uint32_t packetSize_vkCreateDescriptorSetLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2688 | countingStream->rewind(); |
| 2689 | uint32_t opcode_vkCreateDescriptorSetLayout = OP_vkCreateDescriptorSetLayout; |
| 2690 | stream->write(&opcode_vkCreateDescriptorSetLayout, sizeof(uint32_t)); |
| 2691 | stream->write(&packetSize_vkCreateDescriptorSetLayout, sizeof(uint32_t)); |
| 2692 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2693 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 2694 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2695 | if (pAllocator) |
| 2696 | { |
| 2697 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2698 | } |
| 2699 | stream->write((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2700 | stream->read((VkDescriptorSetLayout*)pSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2701 | VkResult vkCreateDescriptorSetLayout_VkResult_return = (VkResult)0; |
| 2702 | stream->read(&vkCreateDescriptorSetLayout_VkResult_return, sizeof(VkResult)); |
| 2703 | return vkCreateDescriptorSetLayout_VkResult_return; |
| 2704 | } |
| 2705 | |
| 2706 | void VkEncoder::vkDestroyDescriptorSetLayout( |
| 2707 | VkDevice device, |
| 2708 | VkDescriptorSetLayout descriptorSetLayout, |
| 2709 | const VkAllocationCallbacks* pAllocator) |
| 2710 | { |
| 2711 | auto stream = mImpl->stream(); |
| 2712 | auto countingStream = mImpl->countingStream(); |
| 2713 | countingStream->rewind(); |
| 2714 | { |
| 2715 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2716 | countingStream->write((VkDescriptorSetLayout*)&descriptorSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2717 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2718 | if (pAllocator) |
| 2719 | { |
| 2720 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2721 | } |
| 2722 | } |
| 2723 | uint32_t packetSize_vkDestroyDescriptorSetLayout = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2724 | countingStream->rewind(); |
| 2725 | uint32_t opcode_vkDestroyDescriptorSetLayout = OP_vkDestroyDescriptorSetLayout; |
| 2726 | stream->write(&opcode_vkDestroyDescriptorSetLayout, sizeof(uint32_t)); |
| 2727 | stream->write(&packetSize_vkDestroyDescriptorSetLayout, sizeof(uint32_t)); |
| 2728 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2729 | stream->write((VkDescriptorSetLayout*)&descriptorSetLayout, sizeof(VkDescriptorSetLayout)); |
| 2730 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2731 | if (pAllocator) |
| 2732 | { |
| 2733 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2734 | } |
| 2735 | } |
| 2736 | |
| 2737 | VkResult VkEncoder::vkCreateDescriptorPool( |
| 2738 | VkDevice device, |
| 2739 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 2740 | const VkAllocationCallbacks* pAllocator, |
| 2741 | VkDescriptorPool* pDescriptorPool) |
| 2742 | { |
| 2743 | auto stream = mImpl->stream(); |
| 2744 | auto countingStream = mImpl->countingStream(); |
| 2745 | countingStream->rewind(); |
| 2746 | { |
| 2747 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2748 | marshal_VkDescriptorPoolCreateInfo(countingStream, (const VkDescriptorPoolCreateInfo*)(pCreateInfo)); |
| 2749 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2750 | if (pAllocator) |
| 2751 | { |
| 2752 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2753 | } |
| 2754 | countingStream->write((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2755 | } |
| 2756 | uint32_t packetSize_vkCreateDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2757 | countingStream->rewind(); |
| 2758 | uint32_t opcode_vkCreateDescriptorPool = OP_vkCreateDescriptorPool; |
| 2759 | stream->write(&opcode_vkCreateDescriptorPool, sizeof(uint32_t)); |
| 2760 | stream->write(&packetSize_vkCreateDescriptorPool, sizeof(uint32_t)); |
| 2761 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2762 | marshal_VkDescriptorPoolCreateInfo(stream, (const VkDescriptorPoolCreateInfo*)(pCreateInfo)); |
| 2763 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2764 | if (pAllocator) |
| 2765 | { |
| 2766 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2767 | } |
| 2768 | stream->write((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2769 | stream->read((VkDescriptorPool*)pDescriptorPool, sizeof(VkDescriptorPool)); |
| 2770 | VkResult vkCreateDescriptorPool_VkResult_return = (VkResult)0; |
| 2771 | stream->read(&vkCreateDescriptorPool_VkResult_return, sizeof(VkResult)); |
| 2772 | return vkCreateDescriptorPool_VkResult_return; |
| 2773 | } |
| 2774 | |
| 2775 | void VkEncoder::vkDestroyDescriptorPool( |
| 2776 | VkDevice device, |
| 2777 | VkDescriptorPool descriptorPool, |
| 2778 | const VkAllocationCallbacks* pAllocator) |
| 2779 | { |
| 2780 | auto stream = mImpl->stream(); |
| 2781 | auto countingStream = mImpl->countingStream(); |
| 2782 | countingStream->rewind(); |
| 2783 | { |
| 2784 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2785 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2786 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2787 | if (pAllocator) |
| 2788 | { |
| 2789 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2790 | } |
| 2791 | } |
| 2792 | uint32_t packetSize_vkDestroyDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2793 | countingStream->rewind(); |
| 2794 | uint32_t opcode_vkDestroyDescriptorPool = OP_vkDestroyDescriptorPool; |
| 2795 | stream->write(&opcode_vkDestroyDescriptorPool, sizeof(uint32_t)); |
| 2796 | stream->write(&packetSize_vkDestroyDescriptorPool, sizeof(uint32_t)); |
| 2797 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2798 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2799 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2800 | if (pAllocator) |
| 2801 | { |
| 2802 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2803 | } |
| 2804 | } |
| 2805 | |
| 2806 | VkResult VkEncoder::vkResetDescriptorPool( |
| 2807 | VkDevice device, |
| 2808 | VkDescriptorPool descriptorPool, |
| 2809 | VkDescriptorPoolResetFlags flags) |
| 2810 | { |
| 2811 | auto stream = mImpl->stream(); |
| 2812 | auto countingStream = mImpl->countingStream(); |
| 2813 | countingStream->rewind(); |
| 2814 | { |
| 2815 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2816 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2817 | countingStream->write((VkDescriptorPoolResetFlags*)&flags, sizeof(VkDescriptorPoolResetFlags)); |
| 2818 | } |
| 2819 | uint32_t packetSize_vkResetDescriptorPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2820 | countingStream->rewind(); |
| 2821 | uint32_t opcode_vkResetDescriptorPool = OP_vkResetDescriptorPool; |
| 2822 | stream->write(&opcode_vkResetDescriptorPool, sizeof(uint32_t)); |
| 2823 | stream->write(&packetSize_vkResetDescriptorPool, sizeof(uint32_t)); |
| 2824 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2825 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2826 | stream->write((VkDescriptorPoolResetFlags*)&flags, sizeof(VkDescriptorPoolResetFlags)); |
| 2827 | VkResult vkResetDescriptorPool_VkResult_return = (VkResult)0; |
| 2828 | stream->read(&vkResetDescriptorPool_VkResult_return, sizeof(VkResult)); |
| 2829 | return vkResetDescriptorPool_VkResult_return; |
| 2830 | } |
| 2831 | |
| 2832 | VkResult VkEncoder::vkAllocateDescriptorSets( |
| 2833 | VkDevice device, |
| 2834 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
| 2835 | VkDescriptorSet* pDescriptorSets) |
| 2836 | { |
| 2837 | auto stream = mImpl->stream(); |
| 2838 | auto countingStream = mImpl->countingStream(); |
| 2839 | countingStream->rewind(); |
| 2840 | { |
| 2841 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2842 | marshal_VkDescriptorSetAllocateInfo(countingStream, (const VkDescriptorSetAllocateInfo*)(pAllocateInfo)); |
| 2843 | countingStream->write((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2844 | } |
| 2845 | uint32_t packetSize_vkAllocateDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2846 | countingStream->rewind(); |
| 2847 | uint32_t opcode_vkAllocateDescriptorSets = OP_vkAllocateDescriptorSets; |
| 2848 | stream->write(&opcode_vkAllocateDescriptorSets, sizeof(uint32_t)); |
| 2849 | stream->write(&packetSize_vkAllocateDescriptorSets, sizeof(uint32_t)); |
| 2850 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2851 | marshal_VkDescriptorSetAllocateInfo(stream, (const VkDescriptorSetAllocateInfo*)(pAllocateInfo)); |
| 2852 | stream->write((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2853 | stream->read((VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount * sizeof(VkDescriptorSet)); |
| 2854 | VkResult vkAllocateDescriptorSets_VkResult_return = (VkResult)0; |
| 2855 | stream->read(&vkAllocateDescriptorSets_VkResult_return, sizeof(VkResult)); |
| 2856 | return vkAllocateDescriptorSets_VkResult_return; |
| 2857 | } |
| 2858 | |
| 2859 | VkResult VkEncoder::vkFreeDescriptorSets( |
| 2860 | VkDevice device, |
| 2861 | VkDescriptorPool descriptorPool, |
| 2862 | uint32_t descriptorSetCount, |
| 2863 | const VkDescriptorSet* pDescriptorSets) |
| 2864 | { |
| 2865 | auto stream = mImpl->stream(); |
| 2866 | auto countingStream = mImpl->countingStream(); |
| 2867 | countingStream->rewind(); |
| 2868 | { |
| 2869 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2870 | countingStream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2871 | countingStream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 2872 | countingStream->write((const VkDescriptorSet**)&pDescriptorSets, sizeof(const VkDescriptorSet*)); |
| 2873 | if (pDescriptorSets) |
| 2874 | { |
| 2875 | countingStream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 2876 | } |
| 2877 | } |
| 2878 | uint32_t packetSize_vkFreeDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2879 | countingStream->rewind(); |
| 2880 | uint32_t opcode_vkFreeDescriptorSets = OP_vkFreeDescriptorSets; |
| 2881 | stream->write(&opcode_vkFreeDescriptorSets, sizeof(uint32_t)); |
| 2882 | stream->write(&packetSize_vkFreeDescriptorSets, sizeof(uint32_t)); |
| 2883 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2884 | stream->write((VkDescriptorPool*)&descriptorPool, sizeof(VkDescriptorPool)); |
| 2885 | stream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 2886 | stream->write((const VkDescriptorSet**)&pDescriptorSets, sizeof(const VkDescriptorSet*)); |
| 2887 | if (pDescriptorSets) |
| 2888 | { |
| 2889 | stream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 2890 | } |
| 2891 | VkResult vkFreeDescriptorSets_VkResult_return = (VkResult)0; |
| 2892 | stream->read(&vkFreeDescriptorSets_VkResult_return, sizeof(VkResult)); |
| 2893 | return vkFreeDescriptorSets_VkResult_return; |
| 2894 | } |
| 2895 | |
| 2896 | void VkEncoder::vkUpdateDescriptorSets( |
| 2897 | VkDevice device, |
| 2898 | uint32_t descriptorWriteCount, |
| 2899 | const VkWriteDescriptorSet* pDescriptorWrites, |
| 2900 | uint32_t descriptorCopyCount, |
| 2901 | const VkCopyDescriptorSet* pDescriptorCopies) |
| 2902 | { |
| 2903 | auto stream = mImpl->stream(); |
| 2904 | auto countingStream = mImpl->countingStream(); |
| 2905 | countingStream->rewind(); |
| 2906 | { |
| 2907 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2908 | countingStream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 2909 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 2910 | { |
| 2911 | marshal_VkWriteDescriptorSet(countingStream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 2912 | } |
| 2913 | countingStream->write((uint32_t*)&descriptorCopyCount, sizeof(uint32_t)); |
| 2914 | for (uint32_t i = 0; i < (uint32_t)((descriptorCopyCount)); ++i) |
| 2915 | { |
| 2916 | marshal_VkCopyDescriptorSet(countingStream, (const VkCopyDescriptorSet*)(pDescriptorCopies + i)); |
| 2917 | } |
| 2918 | } |
| 2919 | uint32_t packetSize_vkUpdateDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2920 | countingStream->rewind(); |
| 2921 | uint32_t opcode_vkUpdateDescriptorSets = OP_vkUpdateDescriptorSets; |
| 2922 | stream->write(&opcode_vkUpdateDescriptorSets, sizeof(uint32_t)); |
| 2923 | stream->write(&packetSize_vkUpdateDescriptorSets, sizeof(uint32_t)); |
| 2924 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2925 | stream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 2926 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 2927 | { |
| 2928 | marshal_VkWriteDescriptorSet(stream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 2929 | } |
| 2930 | stream->write((uint32_t*)&descriptorCopyCount, sizeof(uint32_t)); |
| 2931 | for (uint32_t i = 0; i < (uint32_t)((descriptorCopyCount)); ++i) |
| 2932 | { |
| 2933 | marshal_VkCopyDescriptorSet(stream, (const VkCopyDescriptorSet*)(pDescriptorCopies + i)); |
| 2934 | } |
| 2935 | } |
| 2936 | |
| 2937 | VkResult VkEncoder::vkCreateFramebuffer( |
| 2938 | VkDevice device, |
| 2939 | const VkFramebufferCreateInfo* pCreateInfo, |
| 2940 | const VkAllocationCallbacks* pAllocator, |
| 2941 | VkFramebuffer* pFramebuffer) |
| 2942 | { |
| 2943 | auto stream = mImpl->stream(); |
| 2944 | auto countingStream = mImpl->countingStream(); |
| 2945 | countingStream->rewind(); |
| 2946 | { |
| 2947 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2948 | marshal_VkFramebufferCreateInfo(countingStream, (const VkFramebufferCreateInfo*)(pCreateInfo)); |
| 2949 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2950 | if (pAllocator) |
| 2951 | { |
| 2952 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2953 | } |
| 2954 | countingStream->write((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2955 | } |
| 2956 | uint32_t packetSize_vkCreateFramebuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2957 | countingStream->rewind(); |
| 2958 | uint32_t opcode_vkCreateFramebuffer = OP_vkCreateFramebuffer; |
| 2959 | stream->write(&opcode_vkCreateFramebuffer, sizeof(uint32_t)); |
| 2960 | stream->write(&packetSize_vkCreateFramebuffer, sizeof(uint32_t)); |
| 2961 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2962 | marshal_VkFramebufferCreateInfo(stream, (const VkFramebufferCreateInfo*)(pCreateInfo)); |
| 2963 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2964 | if (pAllocator) |
| 2965 | { |
| 2966 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2967 | } |
| 2968 | stream->write((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2969 | stream->read((VkFramebuffer*)pFramebuffer, sizeof(VkFramebuffer)); |
| 2970 | VkResult vkCreateFramebuffer_VkResult_return = (VkResult)0; |
| 2971 | stream->read(&vkCreateFramebuffer_VkResult_return, sizeof(VkResult)); |
| 2972 | return vkCreateFramebuffer_VkResult_return; |
| 2973 | } |
| 2974 | |
| 2975 | void VkEncoder::vkDestroyFramebuffer( |
| 2976 | VkDevice device, |
| 2977 | VkFramebuffer framebuffer, |
| 2978 | const VkAllocationCallbacks* pAllocator) |
| 2979 | { |
| 2980 | auto stream = mImpl->stream(); |
| 2981 | auto countingStream = mImpl->countingStream(); |
| 2982 | countingStream->rewind(); |
| 2983 | { |
| 2984 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2985 | countingStream->write((VkFramebuffer*)&framebuffer, sizeof(VkFramebuffer)); |
| 2986 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 2987 | if (pAllocator) |
| 2988 | { |
| 2989 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 2990 | } |
| 2991 | } |
| 2992 | uint32_t packetSize_vkDestroyFramebuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 2993 | countingStream->rewind(); |
| 2994 | uint32_t opcode_vkDestroyFramebuffer = OP_vkDestroyFramebuffer; |
| 2995 | stream->write(&opcode_vkDestroyFramebuffer, sizeof(uint32_t)); |
| 2996 | stream->write(&packetSize_vkDestroyFramebuffer, sizeof(uint32_t)); |
| 2997 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 2998 | stream->write((VkFramebuffer*)&framebuffer, sizeof(VkFramebuffer)); |
| 2999 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3000 | if (pAllocator) |
| 3001 | { |
| 3002 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3003 | } |
| 3004 | } |
| 3005 | |
| 3006 | VkResult VkEncoder::vkCreateRenderPass( |
| 3007 | VkDevice device, |
| 3008 | const VkRenderPassCreateInfo* pCreateInfo, |
| 3009 | const VkAllocationCallbacks* pAllocator, |
| 3010 | VkRenderPass* pRenderPass) |
| 3011 | { |
| 3012 | auto stream = mImpl->stream(); |
| 3013 | auto countingStream = mImpl->countingStream(); |
| 3014 | countingStream->rewind(); |
| 3015 | { |
| 3016 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3017 | marshal_VkRenderPassCreateInfo(countingStream, (const VkRenderPassCreateInfo*)(pCreateInfo)); |
| 3018 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3019 | if (pAllocator) |
| 3020 | { |
| 3021 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3022 | } |
| 3023 | countingStream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3024 | } |
| 3025 | uint32_t packetSize_vkCreateRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3026 | countingStream->rewind(); |
| 3027 | uint32_t opcode_vkCreateRenderPass = OP_vkCreateRenderPass; |
| 3028 | stream->write(&opcode_vkCreateRenderPass, sizeof(uint32_t)); |
| 3029 | stream->write(&packetSize_vkCreateRenderPass, sizeof(uint32_t)); |
| 3030 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3031 | marshal_VkRenderPassCreateInfo(stream, (const VkRenderPassCreateInfo*)(pCreateInfo)); |
| 3032 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3033 | if (pAllocator) |
| 3034 | { |
| 3035 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3036 | } |
| 3037 | stream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3038 | stream->read((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 3039 | VkResult vkCreateRenderPass_VkResult_return = (VkResult)0; |
| 3040 | stream->read(&vkCreateRenderPass_VkResult_return, sizeof(VkResult)); |
| 3041 | return vkCreateRenderPass_VkResult_return; |
| 3042 | } |
| 3043 | |
| 3044 | void VkEncoder::vkDestroyRenderPass( |
| 3045 | VkDevice device, |
| 3046 | VkRenderPass renderPass, |
| 3047 | const VkAllocationCallbacks* pAllocator) |
| 3048 | { |
| 3049 | auto stream = mImpl->stream(); |
| 3050 | auto countingStream = mImpl->countingStream(); |
| 3051 | countingStream->rewind(); |
| 3052 | { |
| 3053 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3054 | countingStream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3055 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3056 | if (pAllocator) |
| 3057 | { |
| 3058 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3059 | } |
| 3060 | } |
| 3061 | uint32_t packetSize_vkDestroyRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3062 | countingStream->rewind(); |
| 3063 | uint32_t opcode_vkDestroyRenderPass = OP_vkDestroyRenderPass; |
| 3064 | stream->write(&opcode_vkDestroyRenderPass, sizeof(uint32_t)); |
| 3065 | stream->write(&packetSize_vkDestroyRenderPass, sizeof(uint32_t)); |
| 3066 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3067 | stream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3068 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3069 | if (pAllocator) |
| 3070 | { |
| 3071 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3072 | } |
| 3073 | } |
| 3074 | |
| 3075 | void VkEncoder::vkGetRenderAreaGranularity( |
| 3076 | VkDevice device, |
| 3077 | VkRenderPass renderPass, |
| 3078 | VkExtent2D* pGranularity) |
| 3079 | { |
| 3080 | auto stream = mImpl->stream(); |
| 3081 | auto countingStream = mImpl->countingStream(); |
| 3082 | countingStream->rewind(); |
| 3083 | { |
| 3084 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3085 | countingStream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3086 | marshal_VkExtent2D(countingStream, (VkExtent2D*)(pGranularity)); |
| 3087 | } |
| 3088 | uint32_t packetSize_vkGetRenderAreaGranularity = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3089 | countingStream->rewind(); |
| 3090 | uint32_t opcode_vkGetRenderAreaGranularity = OP_vkGetRenderAreaGranularity; |
| 3091 | stream->write(&opcode_vkGetRenderAreaGranularity, sizeof(uint32_t)); |
| 3092 | stream->write(&packetSize_vkGetRenderAreaGranularity, sizeof(uint32_t)); |
| 3093 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3094 | stream->write((VkRenderPass*)&renderPass, sizeof(VkRenderPass)); |
| 3095 | marshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity)); |
| 3096 | unmarshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity)); |
| 3097 | } |
| 3098 | |
| 3099 | VkResult VkEncoder::vkCreateCommandPool( |
| 3100 | VkDevice device, |
| 3101 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 3102 | const VkAllocationCallbacks* pAllocator, |
| 3103 | VkCommandPool* pCommandPool) |
| 3104 | { |
| 3105 | auto stream = mImpl->stream(); |
| 3106 | auto countingStream = mImpl->countingStream(); |
| 3107 | countingStream->rewind(); |
| 3108 | { |
| 3109 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3110 | marshal_VkCommandPoolCreateInfo(countingStream, (const VkCommandPoolCreateInfo*)(pCreateInfo)); |
| 3111 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3112 | if (pAllocator) |
| 3113 | { |
| 3114 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3115 | } |
| 3116 | countingStream->write((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3117 | } |
| 3118 | uint32_t packetSize_vkCreateCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3119 | countingStream->rewind(); |
| 3120 | uint32_t opcode_vkCreateCommandPool = OP_vkCreateCommandPool; |
| 3121 | stream->write(&opcode_vkCreateCommandPool, sizeof(uint32_t)); |
| 3122 | stream->write(&packetSize_vkCreateCommandPool, sizeof(uint32_t)); |
| 3123 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3124 | marshal_VkCommandPoolCreateInfo(stream, (const VkCommandPoolCreateInfo*)(pCreateInfo)); |
| 3125 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3126 | if (pAllocator) |
| 3127 | { |
| 3128 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3129 | } |
| 3130 | stream->write((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3131 | stream->read((VkCommandPool*)pCommandPool, sizeof(VkCommandPool)); |
| 3132 | VkResult vkCreateCommandPool_VkResult_return = (VkResult)0; |
| 3133 | stream->read(&vkCreateCommandPool_VkResult_return, sizeof(VkResult)); |
| 3134 | return vkCreateCommandPool_VkResult_return; |
| 3135 | } |
| 3136 | |
| 3137 | void VkEncoder::vkDestroyCommandPool( |
| 3138 | VkDevice device, |
| 3139 | VkCommandPool commandPool, |
| 3140 | const VkAllocationCallbacks* pAllocator) |
| 3141 | { |
| 3142 | auto stream = mImpl->stream(); |
| 3143 | auto countingStream = mImpl->countingStream(); |
| 3144 | countingStream->rewind(); |
| 3145 | { |
| 3146 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3147 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3148 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3149 | if (pAllocator) |
| 3150 | { |
| 3151 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3152 | } |
| 3153 | } |
| 3154 | uint32_t packetSize_vkDestroyCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3155 | countingStream->rewind(); |
| 3156 | uint32_t opcode_vkDestroyCommandPool = OP_vkDestroyCommandPool; |
| 3157 | stream->write(&opcode_vkDestroyCommandPool, sizeof(uint32_t)); |
| 3158 | stream->write(&packetSize_vkDestroyCommandPool, sizeof(uint32_t)); |
| 3159 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3160 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3161 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 3162 | if (pAllocator) |
| 3163 | { |
| 3164 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 3165 | } |
| 3166 | } |
| 3167 | |
| 3168 | VkResult VkEncoder::vkResetCommandPool( |
| 3169 | VkDevice device, |
| 3170 | VkCommandPool commandPool, |
| 3171 | VkCommandPoolResetFlags flags) |
| 3172 | { |
| 3173 | auto stream = mImpl->stream(); |
| 3174 | auto countingStream = mImpl->countingStream(); |
| 3175 | countingStream->rewind(); |
| 3176 | { |
| 3177 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3178 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3179 | countingStream->write((VkCommandPoolResetFlags*)&flags, sizeof(VkCommandPoolResetFlags)); |
| 3180 | } |
| 3181 | uint32_t packetSize_vkResetCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3182 | countingStream->rewind(); |
| 3183 | uint32_t opcode_vkResetCommandPool = OP_vkResetCommandPool; |
| 3184 | stream->write(&opcode_vkResetCommandPool, sizeof(uint32_t)); |
| 3185 | stream->write(&packetSize_vkResetCommandPool, sizeof(uint32_t)); |
| 3186 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3187 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3188 | stream->write((VkCommandPoolResetFlags*)&flags, sizeof(VkCommandPoolResetFlags)); |
| 3189 | VkResult vkResetCommandPool_VkResult_return = (VkResult)0; |
| 3190 | stream->read(&vkResetCommandPool_VkResult_return, sizeof(VkResult)); |
| 3191 | return vkResetCommandPool_VkResult_return; |
| 3192 | } |
| 3193 | |
| 3194 | VkResult VkEncoder::vkAllocateCommandBuffers( |
| 3195 | VkDevice device, |
| 3196 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 3197 | VkCommandBuffer* pCommandBuffers) |
| 3198 | { |
| 3199 | auto stream = mImpl->stream(); |
| 3200 | auto countingStream = mImpl->countingStream(); |
| 3201 | countingStream->rewind(); |
| 3202 | { |
| 3203 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3204 | marshal_VkCommandBufferAllocateInfo(countingStream, (const VkCommandBufferAllocateInfo*)(pAllocateInfo)); |
| 3205 | countingStream->write((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3206 | } |
| 3207 | uint32_t packetSize_vkAllocateCommandBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3208 | countingStream->rewind(); |
| 3209 | uint32_t opcode_vkAllocateCommandBuffers = OP_vkAllocateCommandBuffers; |
| 3210 | stream->write(&opcode_vkAllocateCommandBuffers, sizeof(uint32_t)); |
| 3211 | stream->write(&packetSize_vkAllocateCommandBuffers, sizeof(uint32_t)); |
| 3212 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3213 | marshal_VkCommandBufferAllocateInfo(stream, (const VkCommandBufferAllocateInfo*)(pAllocateInfo)); |
| 3214 | stream->write((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3215 | stream->read((VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount * sizeof(VkCommandBuffer)); |
| 3216 | VkResult vkAllocateCommandBuffers_VkResult_return = (VkResult)0; |
| 3217 | stream->read(&vkAllocateCommandBuffers_VkResult_return, sizeof(VkResult)); |
| 3218 | return vkAllocateCommandBuffers_VkResult_return; |
| 3219 | } |
| 3220 | |
| 3221 | void VkEncoder::vkFreeCommandBuffers( |
| 3222 | VkDevice device, |
| 3223 | VkCommandPool commandPool, |
| 3224 | uint32_t commandBufferCount, |
| 3225 | const VkCommandBuffer* pCommandBuffers) |
| 3226 | { |
| 3227 | auto stream = mImpl->stream(); |
| 3228 | auto countingStream = mImpl->countingStream(); |
| 3229 | countingStream->rewind(); |
| 3230 | { |
| 3231 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3232 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3233 | countingStream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 3234 | countingStream->write((const VkCommandBuffer**)&pCommandBuffers, sizeof(const VkCommandBuffer*)); |
| 3235 | if (pCommandBuffers) |
| 3236 | { |
| 3237 | countingStream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 3238 | } |
| 3239 | } |
| 3240 | uint32_t packetSize_vkFreeCommandBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3241 | countingStream->rewind(); |
| 3242 | uint32_t opcode_vkFreeCommandBuffers = OP_vkFreeCommandBuffers; |
| 3243 | stream->write(&opcode_vkFreeCommandBuffers, sizeof(uint32_t)); |
| 3244 | stream->write(&packetSize_vkFreeCommandBuffers, sizeof(uint32_t)); |
| 3245 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 3246 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 3247 | stream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 3248 | stream->write((const VkCommandBuffer**)&pCommandBuffers, sizeof(const VkCommandBuffer*)); |
| 3249 | if (pCommandBuffers) |
| 3250 | { |
| 3251 | stream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 3252 | } |
| 3253 | } |
| 3254 | |
| 3255 | VkResult VkEncoder::vkBeginCommandBuffer( |
| 3256 | VkCommandBuffer commandBuffer, |
| 3257 | const VkCommandBufferBeginInfo* pBeginInfo) |
| 3258 | { |
| 3259 | auto stream = mImpl->stream(); |
| 3260 | auto countingStream = mImpl->countingStream(); |
| 3261 | countingStream->rewind(); |
| 3262 | { |
| 3263 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3264 | marshal_VkCommandBufferBeginInfo(countingStream, (const VkCommandBufferBeginInfo*)(pBeginInfo)); |
| 3265 | } |
| 3266 | uint32_t packetSize_vkBeginCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3267 | countingStream->rewind(); |
| 3268 | uint32_t opcode_vkBeginCommandBuffer = OP_vkBeginCommandBuffer; |
| 3269 | stream->write(&opcode_vkBeginCommandBuffer, sizeof(uint32_t)); |
| 3270 | stream->write(&packetSize_vkBeginCommandBuffer, sizeof(uint32_t)); |
| 3271 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3272 | marshal_VkCommandBufferBeginInfo(stream, (const VkCommandBufferBeginInfo*)(pBeginInfo)); |
| 3273 | VkResult vkBeginCommandBuffer_VkResult_return = (VkResult)0; |
| 3274 | stream->read(&vkBeginCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3275 | return vkBeginCommandBuffer_VkResult_return; |
| 3276 | } |
| 3277 | |
| 3278 | VkResult VkEncoder::vkEndCommandBuffer( |
| 3279 | VkCommandBuffer commandBuffer) |
| 3280 | { |
| 3281 | auto stream = mImpl->stream(); |
| 3282 | auto countingStream = mImpl->countingStream(); |
| 3283 | countingStream->rewind(); |
| 3284 | { |
| 3285 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3286 | } |
| 3287 | uint32_t packetSize_vkEndCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3288 | countingStream->rewind(); |
| 3289 | uint32_t opcode_vkEndCommandBuffer = OP_vkEndCommandBuffer; |
| 3290 | stream->write(&opcode_vkEndCommandBuffer, sizeof(uint32_t)); |
| 3291 | stream->write(&packetSize_vkEndCommandBuffer, sizeof(uint32_t)); |
| 3292 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3293 | VkResult vkEndCommandBuffer_VkResult_return = (VkResult)0; |
| 3294 | stream->read(&vkEndCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3295 | return vkEndCommandBuffer_VkResult_return; |
| 3296 | } |
| 3297 | |
| 3298 | VkResult VkEncoder::vkResetCommandBuffer( |
| 3299 | VkCommandBuffer commandBuffer, |
| 3300 | VkCommandBufferResetFlags flags) |
| 3301 | { |
| 3302 | auto stream = mImpl->stream(); |
| 3303 | auto countingStream = mImpl->countingStream(); |
| 3304 | countingStream->rewind(); |
| 3305 | { |
| 3306 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3307 | countingStream->write((VkCommandBufferResetFlags*)&flags, sizeof(VkCommandBufferResetFlags)); |
| 3308 | } |
| 3309 | uint32_t packetSize_vkResetCommandBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3310 | countingStream->rewind(); |
| 3311 | uint32_t opcode_vkResetCommandBuffer = OP_vkResetCommandBuffer; |
| 3312 | stream->write(&opcode_vkResetCommandBuffer, sizeof(uint32_t)); |
| 3313 | stream->write(&packetSize_vkResetCommandBuffer, sizeof(uint32_t)); |
| 3314 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3315 | stream->write((VkCommandBufferResetFlags*)&flags, sizeof(VkCommandBufferResetFlags)); |
| 3316 | VkResult vkResetCommandBuffer_VkResult_return = (VkResult)0; |
| 3317 | stream->read(&vkResetCommandBuffer_VkResult_return, sizeof(VkResult)); |
| 3318 | return vkResetCommandBuffer_VkResult_return; |
| 3319 | } |
| 3320 | |
| 3321 | void VkEncoder::vkCmdBindPipeline( |
| 3322 | VkCommandBuffer commandBuffer, |
| 3323 | VkPipelineBindPoint pipelineBindPoint, |
| 3324 | VkPipeline pipeline) |
| 3325 | { |
| 3326 | auto stream = mImpl->stream(); |
| 3327 | auto countingStream = mImpl->countingStream(); |
| 3328 | countingStream->rewind(); |
| 3329 | { |
| 3330 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3331 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3332 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 3333 | } |
| 3334 | uint32_t packetSize_vkCmdBindPipeline = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3335 | countingStream->rewind(); |
| 3336 | uint32_t opcode_vkCmdBindPipeline = OP_vkCmdBindPipeline; |
| 3337 | stream->write(&opcode_vkCmdBindPipeline, sizeof(uint32_t)); |
| 3338 | stream->write(&packetSize_vkCmdBindPipeline, sizeof(uint32_t)); |
| 3339 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3340 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3341 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 3342 | } |
| 3343 | |
| 3344 | void VkEncoder::vkCmdSetViewport( |
| 3345 | VkCommandBuffer commandBuffer, |
| 3346 | uint32_t firstViewport, |
| 3347 | uint32_t viewportCount, |
| 3348 | const VkViewport* pViewports) |
| 3349 | { |
| 3350 | auto stream = mImpl->stream(); |
| 3351 | auto countingStream = mImpl->countingStream(); |
| 3352 | countingStream->rewind(); |
| 3353 | { |
| 3354 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3355 | countingStream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 3356 | countingStream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 3357 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 3358 | { |
| 3359 | marshal_VkViewport(countingStream, (const VkViewport*)(pViewports + i)); |
| 3360 | } |
| 3361 | } |
| 3362 | uint32_t packetSize_vkCmdSetViewport = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3363 | countingStream->rewind(); |
| 3364 | uint32_t opcode_vkCmdSetViewport = OP_vkCmdSetViewport; |
| 3365 | stream->write(&opcode_vkCmdSetViewport, sizeof(uint32_t)); |
| 3366 | stream->write(&packetSize_vkCmdSetViewport, sizeof(uint32_t)); |
| 3367 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3368 | stream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 3369 | stream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 3370 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 3371 | { |
| 3372 | marshal_VkViewport(stream, (const VkViewport*)(pViewports + i)); |
| 3373 | } |
| 3374 | } |
| 3375 | |
| 3376 | void VkEncoder::vkCmdSetScissor( |
| 3377 | VkCommandBuffer commandBuffer, |
| 3378 | uint32_t firstScissor, |
| 3379 | uint32_t scissorCount, |
| 3380 | const VkRect2D* pScissors) |
| 3381 | { |
| 3382 | auto stream = mImpl->stream(); |
| 3383 | auto countingStream = mImpl->countingStream(); |
| 3384 | countingStream->rewind(); |
| 3385 | { |
| 3386 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3387 | countingStream->write((uint32_t*)&firstScissor, sizeof(uint32_t)); |
| 3388 | countingStream->write((uint32_t*)&scissorCount, sizeof(uint32_t)); |
| 3389 | for (uint32_t i = 0; i < (uint32_t)((scissorCount)); ++i) |
| 3390 | { |
| 3391 | marshal_VkRect2D(countingStream, (const VkRect2D*)(pScissors + i)); |
| 3392 | } |
| 3393 | } |
| 3394 | uint32_t packetSize_vkCmdSetScissor = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3395 | countingStream->rewind(); |
| 3396 | uint32_t opcode_vkCmdSetScissor = OP_vkCmdSetScissor; |
| 3397 | stream->write(&opcode_vkCmdSetScissor, sizeof(uint32_t)); |
| 3398 | stream->write(&packetSize_vkCmdSetScissor, sizeof(uint32_t)); |
| 3399 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3400 | stream->write((uint32_t*)&firstScissor, sizeof(uint32_t)); |
| 3401 | stream->write((uint32_t*)&scissorCount, sizeof(uint32_t)); |
| 3402 | for (uint32_t i = 0; i < (uint32_t)((scissorCount)); ++i) |
| 3403 | { |
| 3404 | marshal_VkRect2D(stream, (const VkRect2D*)(pScissors + i)); |
| 3405 | } |
| 3406 | } |
| 3407 | |
| 3408 | void VkEncoder::vkCmdSetLineWidth( |
| 3409 | VkCommandBuffer commandBuffer, |
| 3410 | float lineWidth) |
| 3411 | { |
| 3412 | auto stream = mImpl->stream(); |
| 3413 | auto countingStream = mImpl->countingStream(); |
| 3414 | countingStream->rewind(); |
| 3415 | { |
| 3416 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3417 | countingStream->write((float*)&lineWidth, sizeof(float)); |
| 3418 | } |
| 3419 | uint32_t packetSize_vkCmdSetLineWidth = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3420 | countingStream->rewind(); |
| 3421 | uint32_t opcode_vkCmdSetLineWidth = OP_vkCmdSetLineWidth; |
| 3422 | stream->write(&opcode_vkCmdSetLineWidth, sizeof(uint32_t)); |
| 3423 | stream->write(&packetSize_vkCmdSetLineWidth, sizeof(uint32_t)); |
| 3424 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3425 | stream->write((float*)&lineWidth, sizeof(float)); |
| 3426 | } |
| 3427 | |
| 3428 | void VkEncoder::vkCmdSetDepthBias( |
| 3429 | VkCommandBuffer commandBuffer, |
| 3430 | float depthBiasConstantFactor, |
| 3431 | float depthBiasClamp, |
| 3432 | float depthBiasSlopeFactor) |
| 3433 | { |
| 3434 | auto stream = mImpl->stream(); |
| 3435 | auto countingStream = mImpl->countingStream(); |
| 3436 | countingStream->rewind(); |
| 3437 | { |
| 3438 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3439 | countingStream->write((float*)&depthBiasConstantFactor, sizeof(float)); |
| 3440 | countingStream->write((float*)&depthBiasClamp, sizeof(float)); |
| 3441 | countingStream->write((float*)&depthBiasSlopeFactor, sizeof(float)); |
| 3442 | } |
| 3443 | uint32_t packetSize_vkCmdSetDepthBias = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3444 | countingStream->rewind(); |
| 3445 | uint32_t opcode_vkCmdSetDepthBias = OP_vkCmdSetDepthBias; |
| 3446 | stream->write(&opcode_vkCmdSetDepthBias, sizeof(uint32_t)); |
| 3447 | stream->write(&packetSize_vkCmdSetDepthBias, sizeof(uint32_t)); |
| 3448 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3449 | stream->write((float*)&depthBiasConstantFactor, sizeof(float)); |
| 3450 | stream->write((float*)&depthBiasClamp, sizeof(float)); |
| 3451 | stream->write((float*)&depthBiasSlopeFactor, sizeof(float)); |
| 3452 | } |
| 3453 | |
| 3454 | void VkEncoder::vkCmdSetBlendConstants( |
| 3455 | VkCommandBuffer commandBuffer, |
| 3456 | const float blendConstants) |
| 3457 | { |
| 3458 | auto stream = mImpl->stream(); |
| 3459 | auto countingStream = mImpl->countingStream(); |
| 3460 | countingStream->rewind(); |
| 3461 | { |
| 3462 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3463 | countingStream->write((const float*)&blendConstants, 4 * sizeof(const float)); |
| 3464 | } |
| 3465 | uint32_t packetSize_vkCmdSetBlendConstants = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3466 | countingStream->rewind(); |
| 3467 | uint32_t opcode_vkCmdSetBlendConstants = OP_vkCmdSetBlendConstants; |
| 3468 | stream->write(&opcode_vkCmdSetBlendConstants, sizeof(uint32_t)); |
| 3469 | stream->write(&packetSize_vkCmdSetBlendConstants, sizeof(uint32_t)); |
| 3470 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3471 | stream->write((const float*)&blendConstants, 4 * sizeof(const float)); |
| 3472 | } |
| 3473 | |
| 3474 | void VkEncoder::vkCmdSetDepthBounds( |
| 3475 | VkCommandBuffer commandBuffer, |
| 3476 | float minDepthBounds, |
| 3477 | float maxDepthBounds) |
| 3478 | { |
| 3479 | auto stream = mImpl->stream(); |
| 3480 | auto countingStream = mImpl->countingStream(); |
| 3481 | countingStream->rewind(); |
| 3482 | { |
| 3483 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3484 | countingStream->write((float*)&minDepthBounds, sizeof(float)); |
| 3485 | countingStream->write((float*)&maxDepthBounds, sizeof(float)); |
| 3486 | } |
| 3487 | uint32_t packetSize_vkCmdSetDepthBounds = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3488 | countingStream->rewind(); |
| 3489 | uint32_t opcode_vkCmdSetDepthBounds = OP_vkCmdSetDepthBounds; |
| 3490 | stream->write(&opcode_vkCmdSetDepthBounds, sizeof(uint32_t)); |
| 3491 | stream->write(&packetSize_vkCmdSetDepthBounds, sizeof(uint32_t)); |
| 3492 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3493 | stream->write((float*)&minDepthBounds, sizeof(float)); |
| 3494 | stream->write((float*)&maxDepthBounds, sizeof(float)); |
| 3495 | } |
| 3496 | |
| 3497 | void VkEncoder::vkCmdSetStencilCompareMask( |
| 3498 | VkCommandBuffer commandBuffer, |
| 3499 | VkStencilFaceFlags faceMask, |
| 3500 | uint32_t compareMask) |
| 3501 | { |
| 3502 | auto stream = mImpl->stream(); |
| 3503 | auto countingStream = mImpl->countingStream(); |
| 3504 | countingStream->rewind(); |
| 3505 | { |
| 3506 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3507 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3508 | countingStream->write((uint32_t*)&compareMask, sizeof(uint32_t)); |
| 3509 | } |
| 3510 | uint32_t packetSize_vkCmdSetStencilCompareMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3511 | countingStream->rewind(); |
| 3512 | uint32_t opcode_vkCmdSetStencilCompareMask = OP_vkCmdSetStencilCompareMask; |
| 3513 | stream->write(&opcode_vkCmdSetStencilCompareMask, sizeof(uint32_t)); |
| 3514 | stream->write(&packetSize_vkCmdSetStencilCompareMask, sizeof(uint32_t)); |
| 3515 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3516 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3517 | stream->write((uint32_t*)&compareMask, sizeof(uint32_t)); |
| 3518 | } |
| 3519 | |
| 3520 | void VkEncoder::vkCmdSetStencilWriteMask( |
| 3521 | VkCommandBuffer commandBuffer, |
| 3522 | VkStencilFaceFlags faceMask, |
| 3523 | uint32_t writeMask) |
| 3524 | { |
| 3525 | auto stream = mImpl->stream(); |
| 3526 | auto countingStream = mImpl->countingStream(); |
| 3527 | countingStream->rewind(); |
| 3528 | { |
| 3529 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3530 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3531 | countingStream->write((uint32_t*)&writeMask, sizeof(uint32_t)); |
| 3532 | } |
| 3533 | uint32_t packetSize_vkCmdSetStencilWriteMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3534 | countingStream->rewind(); |
| 3535 | uint32_t opcode_vkCmdSetStencilWriteMask = OP_vkCmdSetStencilWriteMask; |
| 3536 | stream->write(&opcode_vkCmdSetStencilWriteMask, sizeof(uint32_t)); |
| 3537 | stream->write(&packetSize_vkCmdSetStencilWriteMask, sizeof(uint32_t)); |
| 3538 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3539 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3540 | stream->write((uint32_t*)&writeMask, sizeof(uint32_t)); |
| 3541 | } |
| 3542 | |
| 3543 | void VkEncoder::vkCmdSetStencilReference( |
| 3544 | VkCommandBuffer commandBuffer, |
| 3545 | VkStencilFaceFlags faceMask, |
| 3546 | uint32_t reference) |
| 3547 | { |
| 3548 | auto stream = mImpl->stream(); |
| 3549 | auto countingStream = mImpl->countingStream(); |
| 3550 | countingStream->rewind(); |
| 3551 | { |
| 3552 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3553 | countingStream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3554 | countingStream->write((uint32_t*)&reference, sizeof(uint32_t)); |
| 3555 | } |
| 3556 | uint32_t packetSize_vkCmdSetStencilReference = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3557 | countingStream->rewind(); |
| 3558 | uint32_t opcode_vkCmdSetStencilReference = OP_vkCmdSetStencilReference; |
| 3559 | stream->write(&opcode_vkCmdSetStencilReference, sizeof(uint32_t)); |
| 3560 | stream->write(&packetSize_vkCmdSetStencilReference, sizeof(uint32_t)); |
| 3561 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3562 | stream->write((VkStencilFaceFlags*)&faceMask, sizeof(VkStencilFaceFlags)); |
| 3563 | stream->write((uint32_t*)&reference, sizeof(uint32_t)); |
| 3564 | } |
| 3565 | |
| 3566 | void VkEncoder::vkCmdBindDescriptorSets( |
| 3567 | VkCommandBuffer commandBuffer, |
| 3568 | VkPipelineBindPoint pipelineBindPoint, |
| 3569 | VkPipelineLayout layout, |
| 3570 | uint32_t firstSet, |
| 3571 | uint32_t descriptorSetCount, |
| 3572 | const VkDescriptorSet* pDescriptorSets, |
| 3573 | uint32_t dynamicOffsetCount, |
| 3574 | const uint32_t* pDynamicOffsets) |
| 3575 | { |
| 3576 | auto stream = mImpl->stream(); |
| 3577 | auto countingStream = mImpl->countingStream(); |
| 3578 | countingStream->rewind(); |
| 3579 | { |
| 3580 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3581 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3582 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 3583 | countingStream->write((uint32_t*)&firstSet, sizeof(uint32_t)); |
| 3584 | countingStream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 3585 | countingStream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 3586 | countingStream->write((uint32_t*)&dynamicOffsetCount, sizeof(uint32_t)); |
| 3587 | countingStream->write((const uint32_t*)pDynamicOffsets, ((dynamicOffsetCount)) * sizeof(const uint32_t)); |
| 3588 | } |
| 3589 | uint32_t packetSize_vkCmdBindDescriptorSets = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3590 | countingStream->rewind(); |
| 3591 | uint32_t opcode_vkCmdBindDescriptorSets = OP_vkCmdBindDescriptorSets; |
| 3592 | stream->write(&opcode_vkCmdBindDescriptorSets, sizeof(uint32_t)); |
| 3593 | stream->write(&packetSize_vkCmdBindDescriptorSets, sizeof(uint32_t)); |
| 3594 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3595 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 3596 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 3597 | stream->write((uint32_t*)&firstSet, sizeof(uint32_t)); |
| 3598 | stream->write((uint32_t*)&descriptorSetCount, sizeof(uint32_t)); |
| 3599 | stream->write((const VkDescriptorSet*)pDescriptorSets, ((descriptorSetCount)) * sizeof(const VkDescriptorSet)); |
| 3600 | stream->write((uint32_t*)&dynamicOffsetCount, sizeof(uint32_t)); |
| 3601 | stream->write((const uint32_t*)pDynamicOffsets, ((dynamicOffsetCount)) * sizeof(const uint32_t)); |
| 3602 | } |
| 3603 | |
| 3604 | void VkEncoder::vkCmdBindIndexBuffer( |
| 3605 | VkCommandBuffer commandBuffer, |
| 3606 | VkBuffer buffer, |
| 3607 | VkDeviceSize offset, |
| 3608 | VkIndexType indexType) |
| 3609 | { |
| 3610 | auto stream = mImpl->stream(); |
| 3611 | auto countingStream = mImpl->countingStream(); |
| 3612 | countingStream->rewind(); |
| 3613 | { |
| 3614 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3615 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3616 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3617 | countingStream->write((VkIndexType*)&indexType, sizeof(VkIndexType)); |
| 3618 | } |
| 3619 | uint32_t packetSize_vkCmdBindIndexBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3620 | countingStream->rewind(); |
| 3621 | uint32_t opcode_vkCmdBindIndexBuffer = OP_vkCmdBindIndexBuffer; |
| 3622 | stream->write(&opcode_vkCmdBindIndexBuffer, sizeof(uint32_t)); |
| 3623 | stream->write(&packetSize_vkCmdBindIndexBuffer, sizeof(uint32_t)); |
| 3624 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3625 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3626 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3627 | stream->write((VkIndexType*)&indexType, sizeof(VkIndexType)); |
| 3628 | } |
| 3629 | |
| 3630 | void VkEncoder::vkCmdBindVertexBuffers( |
| 3631 | VkCommandBuffer commandBuffer, |
| 3632 | uint32_t firstBinding, |
| 3633 | uint32_t bindingCount, |
| 3634 | const VkBuffer* pBuffers, |
| 3635 | const VkDeviceSize* pOffsets) |
| 3636 | { |
| 3637 | auto stream = mImpl->stream(); |
| 3638 | auto countingStream = mImpl->countingStream(); |
| 3639 | countingStream->rewind(); |
| 3640 | { |
| 3641 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3642 | countingStream->write((uint32_t*)&firstBinding, sizeof(uint32_t)); |
| 3643 | countingStream->write((uint32_t*)&bindingCount, sizeof(uint32_t)); |
| 3644 | countingStream->write((const VkBuffer*)pBuffers, ((bindingCount)) * sizeof(const VkBuffer)); |
| 3645 | countingStream->write((const VkDeviceSize*)pOffsets, ((bindingCount)) * sizeof(const VkDeviceSize)); |
| 3646 | } |
| 3647 | uint32_t packetSize_vkCmdBindVertexBuffers = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3648 | countingStream->rewind(); |
| 3649 | uint32_t opcode_vkCmdBindVertexBuffers = OP_vkCmdBindVertexBuffers; |
| 3650 | stream->write(&opcode_vkCmdBindVertexBuffers, sizeof(uint32_t)); |
| 3651 | stream->write(&packetSize_vkCmdBindVertexBuffers, sizeof(uint32_t)); |
| 3652 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3653 | stream->write((uint32_t*)&firstBinding, sizeof(uint32_t)); |
| 3654 | stream->write((uint32_t*)&bindingCount, sizeof(uint32_t)); |
| 3655 | stream->write((const VkBuffer*)pBuffers, ((bindingCount)) * sizeof(const VkBuffer)); |
| 3656 | stream->write((const VkDeviceSize*)pOffsets, ((bindingCount)) * sizeof(const VkDeviceSize)); |
| 3657 | } |
| 3658 | |
| 3659 | void VkEncoder::vkCmdDraw( |
| 3660 | VkCommandBuffer commandBuffer, |
| 3661 | uint32_t vertexCount, |
| 3662 | uint32_t instanceCount, |
| 3663 | uint32_t firstVertex, |
| 3664 | uint32_t firstInstance) |
| 3665 | { |
| 3666 | auto stream = mImpl->stream(); |
| 3667 | auto countingStream = mImpl->countingStream(); |
| 3668 | countingStream->rewind(); |
| 3669 | { |
| 3670 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3671 | countingStream->write((uint32_t*)&vertexCount, sizeof(uint32_t)); |
| 3672 | countingStream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3673 | countingStream->write((uint32_t*)&firstVertex, sizeof(uint32_t)); |
| 3674 | countingStream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3675 | } |
| 3676 | uint32_t packetSize_vkCmdDraw = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3677 | countingStream->rewind(); |
| 3678 | uint32_t opcode_vkCmdDraw = OP_vkCmdDraw; |
| 3679 | stream->write(&opcode_vkCmdDraw, sizeof(uint32_t)); |
| 3680 | stream->write(&packetSize_vkCmdDraw, sizeof(uint32_t)); |
| 3681 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3682 | stream->write((uint32_t*)&vertexCount, sizeof(uint32_t)); |
| 3683 | stream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3684 | stream->write((uint32_t*)&firstVertex, sizeof(uint32_t)); |
| 3685 | stream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3686 | } |
| 3687 | |
| 3688 | void VkEncoder::vkCmdDrawIndexed( |
| 3689 | VkCommandBuffer commandBuffer, |
| 3690 | uint32_t indexCount, |
| 3691 | uint32_t instanceCount, |
| 3692 | uint32_t firstIndex, |
| 3693 | int32_t vertexOffset, |
| 3694 | uint32_t firstInstance) |
| 3695 | { |
| 3696 | auto stream = mImpl->stream(); |
| 3697 | auto countingStream = mImpl->countingStream(); |
| 3698 | countingStream->rewind(); |
| 3699 | { |
| 3700 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3701 | countingStream->write((uint32_t*)&indexCount, sizeof(uint32_t)); |
| 3702 | countingStream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3703 | countingStream->write((uint32_t*)&firstIndex, sizeof(uint32_t)); |
| 3704 | countingStream->write((int32_t*)&vertexOffset, sizeof(int32_t)); |
| 3705 | countingStream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3706 | } |
| 3707 | uint32_t packetSize_vkCmdDrawIndexed = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3708 | countingStream->rewind(); |
| 3709 | uint32_t opcode_vkCmdDrawIndexed = OP_vkCmdDrawIndexed; |
| 3710 | stream->write(&opcode_vkCmdDrawIndexed, sizeof(uint32_t)); |
| 3711 | stream->write(&packetSize_vkCmdDrawIndexed, sizeof(uint32_t)); |
| 3712 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3713 | stream->write((uint32_t*)&indexCount, sizeof(uint32_t)); |
| 3714 | stream->write((uint32_t*)&instanceCount, sizeof(uint32_t)); |
| 3715 | stream->write((uint32_t*)&firstIndex, sizeof(uint32_t)); |
| 3716 | stream->write((int32_t*)&vertexOffset, sizeof(int32_t)); |
| 3717 | stream->write((uint32_t*)&firstInstance, sizeof(uint32_t)); |
| 3718 | } |
| 3719 | |
| 3720 | void VkEncoder::vkCmdDrawIndirect( |
| 3721 | VkCommandBuffer commandBuffer, |
| 3722 | VkBuffer buffer, |
| 3723 | VkDeviceSize offset, |
| 3724 | uint32_t drawCount, |
| 3725 | uint32_t stride) |
| 3726 | { |
| 3727 | auto stream = mImpl->stream(); |
| 3728 | auto countingStream = mImpl->countingStream(); |
| 3729 | countingStream->rewind(); |
| 3730 | { |
| 3731 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3732 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3733 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3734 | countingStream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3735 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3736 | } |
| 3737 | uint32_t packetSize_vkCmdDrawIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3738 | countingStream->rewind(); |
| 3739 | uint32_t opcode_vkCmdDrawIndirect = OP_vkCmdDrawIndirect; |
| 3740 | stream->write(&opcode_vkCmdDrawIndirect, sizeof(uint32_t)); |
| 3741 | stream->write(&packetSize_vkCmdDrawIndirect, sizeof(uint32_t)); |
| 3742 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3743 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3744 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3745 | stream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3746 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3747 | } |
| 3748 | |
| 3749 | void VkEncoder::vkCmdDrawIndexedIndirect( |
| 3750 | VkCommandBuffer commandBuffer, |
| 3751 | VkBuffer buffer, |
| 3752 | VkDeviceSize offset, |
| 3753 | uint32_t drawCount, |
| 3754 | uint32_t stride) |
| 3755 | { |
| 3756 | auto stream = mImpl->stream(); |
| 3757 | auto countingStream = mImpl->countingStream(); |
| 3758 | countingStream->rewind(); |
| 3759 | { |
| 3760 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3761 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3762 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3763 | countingStream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3764 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3765 | } |
| 3766 | uint32_t packetSize_vkCmdDrawIndexedIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3767 | countingStream->rewind(); |
| 3768 | uint32_t opcode_vkCmdDrawIndexedIndirect = OP_vkCmdDrawIndexedIndirect; |
| 3769 | stream->write(&opcode_vkCmdDrawIndexedIndirect, sizeof(uint32_t)); |
| 3770 | stream->write(&packetSize_vkCmdDrawIndexedIndirect, sizeof(uint32_t)); |
| 3771 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3772 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3773 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3774 | stream->write((uint32_t*)&drawCount, sizeof(uint32_t)); |
| 3775 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 3776 | } |
| 3777 | |
| 3778 | void VkEncoder::vkCmdDispatch( |
| 3779 | VkCommandBuffer commandBuffer, |
| 3780 | uint32_t groupCountX, |
| 3781 | uint32_t groupCountY, |
| 3782 | uint32_t groupCountZ) |
| 3783 | { |
| 3784 | auto stream = mImpl->stream(); |
| 3785 | auto countingStream = mImpl->countingStream(); |
| 3786 | countingStream->rewind(); |
| 3787 | { |
| 3788 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3789 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 3790 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 3791 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 3792 | } |
| 3793 | uint32_t packetSize_vkCmdDispatch = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3794 | countingStream->rewind(); |
| 3795 | uint32_t opcode_vkCmdDispatch = OP_vkCmdDispatch; |
| 3796 | stream->write(&opcode_vkCmdDispatch, sizeof(uint32_t)); |
| 3797 | stream->write(&packetSize_vkCmdDispatch, sizeof(uint32_t)); |
| 3798 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3799 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 3800 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 3801 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 3802 | } |
| 3803 | |
| 3804 | void VkEncoder::vkCmdDispatchIndirect( |
| 3805 | VkCommandBuffer commandBuffer, |
| 3806 | VkBuffer buffer, |
| 3807 | VkDeviceSize offset) |
| 3808 | { |
| 3809 | auto stream = mImpl->stream(); |
| 3810 | auto countingStream = mImpl->countingStream(); |
| 3811 | countingStream->rewind(); |
| 3812 | { |
| 3813 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3814 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3815 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3816 | } |
| 3817 | uint32_t packetSize_vkCmdDispatchIndirect = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3818 | countingStream->rewind(); |
| 3819 | uint32_t opcode_vkCmdDispatchIndirect = OP_vkCmdDispatchIndirect; |
| 3820 | stream->write(&opcode_vkCmdDispatchIndirect, sizeof(uint32_t)); |
| 3821 | stream->write(&packetSize_vkCmdDispatchIndirect, sizeof(uint32_t)); |
| 3822 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3823 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 3824 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 3825 | } |
| 3826 | |
| 3827 | void VkEncoder::vkCmdCopyBuffer( |
| 3828 | VkCommandBuffer commandBuffer, |
| 3829 | VkBuffer srcBuffer, |
| 3830 | VkBuffer dstBuffer, |
| 3831 | uint32_t regionCount, |
| 3832 | const VkBufferCopy* pRegions) |
| 3833 | { |
| 3834 | auto stream = mImpl->stream(); |
| 3835 | auto countingStream = mImpl->countingStream(); |
| 3836 | countingStream->rewind(); |
| 3837 | { |
| 3838 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3839 | countingStream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3840 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 3841 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3842 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3843 | { |
| 3844 | marshal_VkBufferCopy(countingStream, (const VkBufferCopy*)(pRegions + i)); |
| 3845 | } |
| 3846 | } |
| 3847 | uint32_t packetSize_vkCmdCopyBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3848 | countingStream->rewind(); |
| 3849 | uint32_t opcode_vkCmdCopyBuffer = OP_vkCmdCopyBuffer; |
| 3850 | stream->write(&opcode_vkCmdCopyBuffer, sizeof(uint32_t)); |
| 3851 | stream->write(&packetSize_vkCmdCopyBuffer, sizeof(uint32_t)); |
| 3852 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3853 | stream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3854 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 3855 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3856 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3857 | { |
| 3858 | marshal_VkBufferCopy(stream, (const VkBufferCopy*)(pRegions + i)); |
| 3859 | } |
| 3860 | } |
| 3861 | |
| 3862 | void VkEncoder::vkCmdCopyImage( |
| 3863 | VkCommandBuffer commandBuffer, |
| 3864 | VkImage srcImage, |
| 3865 | VkImageLayout srcImageLayout, |
| 3866 | VkImage dstImage, |
| 3867 | VkImageLayout dstImageLayout, |
| 3868 | uint32_t regionCount, |
| 3869 | const VkImageCopy* pRegions) |
| 3870 | { |
| 3871 | auto stream = mImpl->stream(); |
| 3872 | auto countingStream = mImpl->countingStream(); |
| 3873 | countingStream->rewind(); |
| 3874 | { |
| 3875 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3876 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3877 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3878 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3879 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3880 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3881 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3882 | { |
| 3883 | marshal_VkImageCopy(countingStream, (const VkImageCopy*)(pRegions + i)); |
| 3884 | } |
| 3885 | } |
| 3886 | uint32_t packetSize_vkCmdCopyImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3887 | countingStream->rewind(); |
| 3888 | uint32_t opcode_vkCmdCopyImage = OP_vkCmdCopyImage; |
| 3889 | stream->write(&opcode_vkCmdCopyImage, sizeof(uint32_t)); |
| 3890 | stream->write(&packetSize_vkCmdCopyImage, sizeof(uint32_t)); |
| 3891 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3892 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3893 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3894 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3895 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3896 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3897 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3898 | { |
| 3899 | marshal_VkImageCopy(stream, (const VkImageCopy*)(pRegions + i)); |
| 3900 | } |
| 3901 | } |
| 3902 | |
| 3903 | void VkEncoder::vkCmdBlitImage( |
| 3904 | VkCommandBuffer commandBuffer, |
| 3905 | VkImage srcImage, |
| 3906 | VkImageLayout srcImageLayout, |
| 3907 | VkImage dstImage, |
| 3908 | VkImageLayout dstImageLayout, |
| 3909 | uint32_t regionCount, |
| 3910 | const VkImageBlit* pRegions, |
| 3911 | VkFilter filter) |
| 3912 | { |
| 3913 | auto stream = mImpl->stream(); |
| 3914 | auto countingStream = mImpl->countingStream(); |
| 3915 | countingStream->rewind(); |
| 3916 | { |
| 3917 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3918 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3919 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3920 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3921 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3922 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3923 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3924 | { |
| 3925 | marshal_VkImageBlit(countingStream, (const VkImageBlit*)(pRegions + i)); |
| 3926 | } |
| 3927 | countingStream->write((VkFilter*)&filter, sizeof(VkFilter)); |
| 3928 | } |
| 3929 | uint32_t packetSize_vkCmdBlitImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3930 | countingStream->rewind(); |
| 3931 | uint32_t opcode_vkCmdBlitImage = OP_vkCmdBlitImage; |
| 3932 | stream->write(&opcode_vkCmdBlitImage, sizeof(uint32_t)); |
| 3933 | stream->write(&packetSize_vkCmdBlitImage, sizeof(uint32_t)); |
| 3934 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3935 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3936 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 3937 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3938 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3939 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3940 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3941 | { |
| 3942 | marshal_VkImageBlit(stream, (const VkImageBlit*)(pRegions + i)); |
| 3943 | } |
| 3944 | stream->write((VkFilter*)&filter, sizeof(VkFilter)); |
| 3945 | } |
| 3946 | |
| 3947 | void VkEncoder::vkCmdCopyBufferToImage( |
| 3948 | VkCommandBuffer commandBuffer, |
| 3949 | VkBuffer srcBuffer, |
| 3950 | VkImage dstImage, |
| 3951 | VkImageLayout dstImageLayout, |
| 3952 | uint32_t regionCount, |
| 3953 | const VkBufferImageCopy* pRegions) |
| 3954 | { |
| 3955 | auto stream = mImpl->stream(); |
| 3956 | auto countingStream = mImpl->countingStream(); |
| 3957 | countingStream->rewind(); |
| 3958 | { |
| 3959 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3960 | countingStream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3961 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3962 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3963 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3964 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3965 | { |
| 3966 | marshal_VkBufferImageCopy(countingStream, (const VkBufferImageCopy*)(pRegions + i)); |
| 3967 | } |
| 3968 | } |
| 3969 | uint32_t packetSize_vkCmdCopyBufferToImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 3970 | countingStream->rewind(); |
| 3971 | uint32_t opcode_vkCmdCopyBufferToImage = OP_vkCmdCopyBufferToImage; |
| 3972 | stream->write(&opcode_vkCmdCopyBufferToImage, sizeof(uint32_t)); |
| 3973 | stream->write(&packetSize_vkCmdCopyBufferToImage, sizeof(uint32_t)); |
| 3974 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3975 | stream->write((VkBuffer*)&srcBuffer, sizeof(VkBuffer)); |
| 3976 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 3977 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 3978 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 3979 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 3980 | { |
| 3981 | marshal_VkBufferImageCopy(stream, (const VkBufferImageCopy*)(pRegions + i)); |
| 3982 | } |
| 3983 | } |
| 3984 | |
| 3985 | void VkEncoder::vkCmdCopyImageToBuffer( |
| 3986 | VkCommandBuffer commandBuffer, |
| 3987 | VkImage srcImage, |
| 3988 | VkImageLayout srcImageLayout, |
| 3989 | VkBuffer dstBuffer, |
| 3990 | uint32_t regionCount, |
| 3991 | const VkBufferImageCopy* pRegions) |
| 3992 | { |
| 3993 | auto stream = mImpl->stream(); |
| 3994 | auto countingStream = mImpl->countingStream(); |
| 3995 | countingStream->rewind(); |
| 3996 | { |
| 3997 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 3998 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 3999 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4000 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4001 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4002 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4003 | { |
| 4004 | marshal_VkBufferImageCopy(countingStream, (const VkBufferImageCopy*)(pRegions + i)); |
| 4005 | } |
| 4006 | } |
| 4007 | uint32_t packetSize_vkCmdCopyImageToBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4008 | countingStream->rewind(); |
| 4009 | uint32_t opcode_vkCmdCopyImageToBuffer = OP_vkCmdCopyImageToBuffer; |
| 4010 | stream->write(&opcode_vkCmdCopyImageToBuffer, sizeof(uint32_t)); |
| 4011 | stream->write(&packetSize_vkCmdCopyImageToBuffer, sizeof(uint32_t)); |
| 4012 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4013 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4014 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4015 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4016 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4017 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4018 | { |
| 4019 | marshal_VkBufferImageCopy(stream, (const VkBufferImageCopy*)(pRegions + i)); |
| 4020 | } |
| 4021 | } |
| 4022 | |
| 4023 | void VkEncoder::vkCmdUpdateBuffer( |
| 4024 | VkCommandBuffer commandBuffer, |
| 4025 | VkBuffer dstBuffer, |
| 4026 | VkDeviceSize dstOffset, |
| 4027 | VkDeviceSize dataSize, |
| 4028 | const void* pData) |
| 4029 | { |
| 4030 | auto stream = mImpl->stream(); |
| 4031 | auto countingStream = mImpl->countingStream(); |
| 4032 | countingStream->rewind(); |
| 4033 | { |
| 4034 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4035 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4036 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4037 | countingStream->write((VkDeviceSize*)&dataSize, sizeof(VkDeviceSize)); |
| 4038 | countingStream->write((const void*)pData, ((dataSize)) * sizeof(const uint8_t)); |
| 4039 | } |
| 4040 | uint32_t packetSize_vkCmdUpdateBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4041 | countingStream->rewind(); |
| 4042 | uint32_t opcode_vkCmdUpdateBuffer = OP_vkCmdUpdateBuffer; |
| 4043 | stream->write(&opcode_vkCmdUpdateBuffer, sizeof(uint32_t)); |
| 4044 | stream->write(&packetSize_vkCmdUpdateBuffer, sizeof(uint32_t)); |
| 4045 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4046 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4047 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4048 | stream->write((VkDeviceSize*)&dataSize, sizeof(VkDeviceSize)); |
| 4049 | stream->write((const void*)pData, ((dataSize)) * sizeof(const uint8_t)); |
| 4050 | } |
| 4051 | |
| 4052 | void VkEncoder::vkCmdFillBuffer( |
| 4053 | VkCommandBuffer commandBuffer, |
| 4054 | VkBuffer dstBuffer, |
| 4055 | VkDeviceSize dstOffset, |
| 4056 | VkDeviceSize size, |
| 4057 | uint32_t data) |
| 4058 | { |
| 4059 | auto stream = mImpl->stream(); |
| 4060 | auto countingStream = mImpl->countingStream(); |
| 4061 | countingStream->rewind(); |
| 4062 | { |
| 4063 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4064 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4065 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4066 | countingStream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 4067 | countingStream->write((uint32_t*)&data, sizeof(uint32_t)); |
| 4068 | } |
| 4069 | uint32_t packetSize_vkCmdFillBuffer = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4070 | countingStream->rewind(); |
| 4071 | uint32_t opcode_vkCmdFillBuffer = OP_vkCmdFillBuffer; |
| 4072 | stream->write(&opcode_vkCmdFillBuffer, sizeof(uint32_t)); |
| 4073 | stream->write(&packetSize_vkCmdFillBuffer, sizeof(uint32_t)); |
| 4074 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4075 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4076 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4077 | stream->write((VkDeviceSize*)&size, sizeof(VkDeviceSize)); |
| 4078 | stream->write((uint32_t*)&data, sizeof(uint32_t)); |
| 4079 | } |
| 4080 | |
| 4081 | void VkEncoder::vkCmdClearColorImage( |
| 4082 | VkCommandBuffer commandBuffer, |
| 4083 | VkImage image, |
| 4084 | VkImageLayout imageLayout, |
| 4085 | const VkClearColorValue* pColor, |
| 4086 | uint32_t rangeCount, |
| 4087 | const VkImageSubresourceRange* pRanges) |
| 4088 | { |
| 4089 | auto stream = mImpl->stream(); |
| 4090 | auto countingStream = mImpl->countingStream(); |
| 4091 | countingStream->rewind(); |
| 4092 | { |
| 4093 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4094 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 4095 | countingStream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4096 | marshal_VkClearColorValue(countingStream, (const VkClearColorValue*)(pColor)); |
| 4097 | countingStream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4098 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4099 | { |
| 4100 | marshal_VkImageSubresourceRange(countingStream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4101 | } |
| 4102 | } |
| 4103 | uint32_t packetSize_vkCmdClearColorImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4104 | countingStream->rewind(); |
| 4105 | uint32_t opcode_vkCmdClearColorImage = OP_vkCmdClearColorImage; |
| 4106 | stream->write(&opcode_vkCmdClearColorImage, sizeof(uint32_t)); |
| 4107 | stream->write(&packetSize_vkCmdClearColorImage, sizeof(uint32_t)); |
| 4108 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4109 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 4110 | stream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4111 | marshal_VkClearColorValue(stream, (const VkClearColorValue*)(pColor)); |
| 4112 | stream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4113 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4114 | { |
| 4115 | marshal_VkImageSubresourceRange(stream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4116 | } |
| 4117 | } |
| 4118 | |
| 4119 | void VkEncoder::vkCmdClearDepthStencilImage( |
| 4120 | VkCommandBuffer commandBuffer, |
| 4121 | VkImage image, |
| 4122 | VkImageLayout imageLayout, |
| 4123 | const VkClearDepthStencilValue* pDepthStencil, |
| 4124 | uint32_t rangeCount, |
| 4125 | const VkImageSubresourceRange* pRanges) |
| 4126 | { |
| 4127 | auto stream = mImpl->stream(); |
| 4128 | auto countingStream = mImpl->countingStream(); |
| 4129 | countingStream->rewind(); |
| 4130 | { |
| 4131 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4132 | countingStream->write((VkImage*)&image, sizeof(VkImage)); |
| 4133 | countingStream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4134 | marshal_VkClearDepthStencilValue(countingStream, (const VkClearDepthStencilValue*)(pDepthStencil)); |
| 4135 | countingStream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4136 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4137 | { |
| 4138 | marshal_VkImageSubresourceRange(countingStream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4139 | } |
| 4140 | } |
| 4141 | uint32_t packetSize_vkCmdClearDepthStencilImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4142 | countingStream->rewind(); |
| 4143 | uint32_t opcode_vkCmdClearDepthStencilImage = OP_vkCmdClearDepthStencilImage; |
| 4144 | stream->write(&opcode_vkCmdClearDepthStencilImage, sizeof(uint32_t)); |
| 4145 | stream->write(&packetSize_vkCmdClearDepthStencilImage, sizeof(uint32_t)); |
| 4146 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4147 | stream->write((VkImage*)&image, sizeof(VkImage)); |
| 4148 | stream->write((VkImageLayout*)&imageLayout, sizeof(VkImageLayout)); |
| 4149 | marshal_VkClearDepthStencilValue(stream, (const VkClearDepthStencilValue*)(pDepthStencil)); |
| 4150 | stream->write((uint32_t*)&rangeCount, sizeof(uint32_t)); |
| 4151 | for (uint32_t i = 0; i < (uint32_t)((rangeCount)); ++i) |
| 4152 | { |
| 4153 | marshal_VkImageSubresourceRange(stream, (const VkImageSubresourceRange*)(pRanges + i)); |
| 4154 | } |
| 4155 | } |
| 4156 | |
| 4157 | void VkEncoder::vkCmdClearAttachments( |
| 4158 | VkCommandBuffer commandBuffer, |
| 4159 | uint32_t attachmentCount, |
| 4160 | const VkClearAttachment* pAttachments, |
| 4161 | uint32_t rectCount, |
| 4162 | const VkClearRect* pRects) |
| 4163 | { |
| 4164 | auto stream = mImpl->stream(); |
| 4165 | auto countingStream = mImpl->countingStream(); |
| 4166 | countingStream->rewind(); |
| 4167 | { |
| 4168 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4169 | countingStream->write((uint32_t*)&attachmentCount, sizeof(uint32_t)); |
| 4170 | for (uint32_t i = 0; i < (uint32_t)((attachmentCount)); ++i) |
| 4171 | { |
| 4172 | marshal_VkClearAttachment(countingStream, (const VkClearAttachment*)(pAttachments + i)); |
| 4173 | } |
| 4174 | countingStream->write((uint32_t*)&rectCount, sizeof(uint32_t)); |
| 4175 | for (uint32_t i = 0; i < (uint32_t)((rectCount)); ++i) |
| 4176 | { |
| 4177 | marshal_VkClearRect(countingStream, (const VkClearRect*)(pRects + i)); |
| 4178 | } |
| 4179 | } |
| 4180 | uint32_t packetSize_vkCmdClearAttachments = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4181 | countingStream->rewind(); |
| 4182 | uint32_t opcode_vkCmdClearAttachments = OP_vkCmdClearAttachments; |
| 4183 | stream->write(&opcode_vkCmdClearAttachments, sizeof(uint32_t)); |
| 4184 | stream->write(&packetSize_vkCmdClearAttachments, sizeof(uint32_t)); |
| 4185 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4186 | stream->write((uint32_t*)&attachmentCount, sizeof(uint32_t)); |
| 4187 | for (uint32_t i = 0; i < (uint32_t)((attachmentCount)); ++i) |
| 4188 | { |
| 4189 | marshal_VkClearAttachment(stream, (const VkClearAttachment*)(pAttachments + i)); |
| 4190 | } |
| 4191 | stream->write((uint32_t*)&rectCount, sizeof(uint32_t)); |
| 4192 | for (uint32_t i = 0; i < (uint32_t)((rectCount)); ++i) |
| 4193 | { |
| 4194 | marshal_VkClearRect(stream, (const VkClearRect*)(pRects + i)); |
| 4195 | } |
| 4196 | } |
| 4197 | |
| 4198 | void VkEncoder::vkCmdResolveImage( |
| 4199 | VkCommandBuffer commandBuffer, |
| 4200 | VkImage srcImage, |
| 4201 | VkImageLayout srcImageLayout, |
| 4202 | VkImage dstImage, |
| 4203 | VkImageLayout dstImageLayout, |
| 4204 | uint32_t regionCount, |
| 4205 | const VkImageResolve* pRegions) |
| 4206 | { |
| 4207 | auto stream = mImpl->stream(); |
| 4208 | auto countingStream = mImpl->countingStream(); |
| 4209 | countingStream->rewind(); |
| 4210 | { |
| 4211 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4212 | countingStream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4213 | countingStream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4214 | countingStream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 4215 | countingStream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 4216 | countingStream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4217 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4218 | { |
| 4219 | marshal_VkImageResolve(countingStream, (const VkImageResolve*)(pRegions + i)); |
| 4220 | } |
| 4221 | } |
| 4222 | uint32_t packetSize_vkCmdResolveImage = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4223 | countingStream->rewind(); |
| 4224 | uint32_t opcode_vkCmdResolveImage = OP_vkCmdResolveImage; |
| 4225 | stream->write(&opcode_vkCmdResolveImage, sizeof(uint32_t)); |
| 4226 | stream->write(&packetSize_vkCmdResolveImage, sizeof(uint32_t)); |
| 4227 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4228 | stream->write((VkImage*)&srcImage, sizeof(VkImage)); |
| 4229 | stream->write((VkImageLayout*)&srcImageLayout, sizeof(VkImageLayout)); |
| 4230 | stream->write((VkImage*)&dstImage, sizeof(VkImage)); |
| 4231 | stream->write((VkImageLayout*)&dstImageLayout, sizeof(VkImageLayout)); |
| 4232 | stream->write((uint32_t*)®ionCount, sizeof(uint32_t)); |
| 4233 | for (uint32_t i = 0; i < (uint32_t)((regionCount)); ++i) |
| 4234 | { |
| 4235 | marshal_VkImageResolve(stream, (const VkImageResolve*)(pRegions + i)); |
| 4236 | } |
| 4237 | } |
| 4238 | |
| 4239 | void VkEncoder::vkCmdSetEvent( |
| 4240 | VkCommandBuffer commandBuffer, |
| 4241 | VkEvent event, |
| 4242 | VkPipelineStageFlags stageMask) |
| 4243 | { |
| 4244 | auto stream = mImpl->stream(); |
| 4245 | auto countingStream = mImpl->countingStream(); |
| 4246 | countingStream->rewind(); |
| 4247 | { |
| 4248 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4249 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4250 | countingStream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4251 | } |
| 4252 | uint32_t packetSize_vkCmdSetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4253 | countingStream->rewind(); |
| 4254 | uint32_t opcode_vkCmdSetEvent = OP_vkCmdSetEvent; |
| 4255 | stream->write(&opcode_vkCmdSetEvent, sizeof(uint32_t)); |
| 4256 | stream->write(&packetSize_vkCmdSetEvent, sizeof(uint32_t)); |
| 4257 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4258 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4259 | stream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4260 | } |
| 4261 | |
| 4262 | void VkEncoder::vkCmdResetEvent( |
| 4263 | VkCommandBuffer commandBuffer, |
| 4264 | VkEvent event, |
| 4265 | VkPipelineStageFlags stageMask) |
| 4266 | { |
| 4267 | auto stream = mImpl->stream(); |
| 4268 | auto countingStream = mImpl->countingStream(); |
| 4269 | countingStream->rewind(); |
| 4270 | { |
| 4271 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4272 | countingStream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4273 | countingStream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4274 | } |
| 4275 | uint32_t packetSize_vkCmdResetEvent = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4276 | countingStream->rewind(); |
| 4277 | uint32_t opcode_vkCmdResetEvent = OP_vkCmdResetEvent; |
| 4278 | stream->write(&opcode_vkCmdResetEvent, sizeof(uint32_t)); |
| 4279 | stream->write(&packetSize_vkCmdResetEvent, sizeof(uint32_t)); |
| 4280 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4281 | stream->write((VkEvent*)&event, sizeof(VkEvent)); |
| 4282 | stream->write((VkPipelineStageFlags*)&stageMask, sizeof(VkPipelineStageFlags)); |
| 4283 | } |
| 4284 | |
| 4285 | void VkEncoder::vkCmdWaitEvents( |
| 4286 | VkCommandBuffer commandBuffer, |
| 4287 | uint32_t eventCount, |
| 4288 | const VkEvent* pEvents, |
| 4289 | VkPipelineStageFlags srcStageMask, |
| 4290 | VkPipelineStageFlags dstStageMask, |
| 4291 | uint32_t memoryBarrierCount, |
| 4292 | const VkMemoryBarrier* pMemoryBarriers, |
| 4293 | uint32_t bufferMemoryBarrierCount, |
| 4294 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 4295 | uint32_t imageMemoryBarrierCount, |
| 4296 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 4297 | { |
| 4298 | auto stream = mImpl->stream(); |
| 4299 | auto countingStream = mImpl->countingStream(); |
| 4300 | countingStream->rewind(); |
| 4301 | { |
| 4302 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4303 | countingStream->write((uint32_t*)&eventCount, sizeof(uint32_t)); |
| 4304 | countingStream->write((const VkEvent*)pEvents, ((eventCount)) * sizeof(const VkEvent)); |
| 4305 | countingStream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4306 | countingStream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4307 | countingStream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4308 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4309 | { |
| 4310 | marshal_VkMemoryBarrier(countingStream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4311 | } |
| 4312 | countingStream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4313 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4314 | { |
| 4315 | marshal_VkBufferMemoryBarrier(countingStream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4316 | } |
| 4317 | countingStream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4318 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4319 | { |
| 4320 | marshal_VkImageMemoryBarrier(countingStream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4321 | } |
| 4322 | } |
| 4323 | uint32_t packetSize_vkCmdWaitEvents = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4324 | countingStream->rewind(); |
| 4325 | uint32_t opcode_vkCmdWaitEvents = OP_vkCmdWaitEvents; |
| 4326 | stream->write(&opcode_vkCmdWaitEvents, sizeof(uint32_t)); |
| 4327 | stream->write(&packetSize_vkCmdWaitEvents, sizeof(uint32_t)); |
| 4328 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4329 | stream->write((uint32_t*)&eventCount, sizeof(uint32_t)); |
| 4330 | stream->write((const VkEvent*)pEvents, ((eventCount)) * sizeof(const VkEvent)); |
| 4331 | stream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4332 | stream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4333 | stream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4334 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4335 | { |
| 4336 | marshal_VkMemoryBarrier(stream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4337 | } |
| 4338 | stream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4339 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4340 | { |
| 4341 | marshal_VkBufferMemoryBarrier(stream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4342 | } |
| 4343 | stream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4344 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4345 | { |
| 4346 | marshal_VkImageMemoryBarrier(stream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4347 | } |
| 4348 | } |
| 4349 | |
| 4350 | void VkEncoder::vkCmdPipelineBarrier( |
| 4351 | VkCommandBuffer commandBuffer, |
| 4352 | VkPipelineStageFlags srcStageMask, |
| 4353 | VkPipelineStageFlags dstStageMask, |
| 4354 | VkDependencyFlags dependencyFlags, |
| 4355 | uint32_t memoryBarrierCount, |
| 4356 | const VkMemoryBarrier* pMemoryBarriers, |
| 4357 | uint32_t bufferMemoryBarrierCount, |
| 4358 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 4359 | uint32_t imageMemoryBarrierCount, |
| 4360 | const VkImageMemoryBarrier* pImageMemoryBarriers) |
| 4361 | { |
| 4362 | auto stream = mImpl->stream(); |
| 4363 | auto countingStream = mImpl->countingStream(); |
| 4364 | countingStream->rewind(); |
| 4365 | { |
| 4366 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4367 | countingStream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4368 | countingStream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4369 | countingStream->write((VkDependencyFlags*)&dependencyFlags, sizeof(VkDependencyFlags)); |
| 4370 | countingStream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4371 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4372 | { |
| 4373 | marshal_VkMemoryBarrier(countingStream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4374 | } |
| 4375 | countingStream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4376 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4377 | { |
| 4378 | marshal_VkBufferMemoryBarrier(countingStream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4379 | } |
| 4380 | countingStream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4381 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4382 | { |
| 4383 | marshal_VkImageMemoryBarrier(countingStream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4384 | } |
| 4385 | } |
| 4386 | uint32_t packetSize_vkCmdPipelineBarrier = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4387 | countingStream->rewind(); |
| 4388 | uint32_t opcode_vkCmdPipelineBarrier = OP_vkCmdPipelineBarrier; |
| 4389 | stream->write(&opcode_vkCmdPipelineBarrier, sizeof(uint32_t)); |
| 4390 | stream->write(&packetSize_vkCmdPipelineBarrier, sizeof(uint32_t)); |
| 4391 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4392 | stream->write((VkPipelineStageFlags*)&srcStageMask, sizeof(VkPipelineStageFlags)); |
| 4393 | stream->write((VkPipelineStageFlags*)&dstStageMask, sizeof(VkPipelineStageFlags)); |
| 4394 | stream->write((VkDependencyFlags*)&dependencyFlags, sizeof(VkDependencyFlags)); |
| 4395 | stream->write((uint32_t*)&memoryBarrierCount, sizeof(uint32_t)); |
| 4396 | for (uint32_t i = 0; i < (uint32_t)((memoryBarrierCount)); ++i) |
| 4397 | { |
| 4398 | marshal_VkMemoryBarrier(stream, (const VkMemoryBarrier*)(pMemoryBarriers + i)); |
| 4399 | } |
| 4400 | stream->write((uint32_t*)&bufferMemoryBarrierCount, sizeof(uint32_t)); |
| 4401 | for (uint32_t i = 0; i < (uint32_t)((bufferMemoryBarrierCount)); ++i) |
| 4402 | { |
| 4403 | marshal_VkBufferMemoryBarrier(stream, (const VkBufferMemoryBarrier*)(pBufferMemoryBarriers + i)); |
| 4404 | } |
| 4405 | stream->write((uint32_t*)&imageMemoryBarrierCount, sizeof(uint32_t)); |
| 4406 | for (uint32_t i = 0; i < (uint32_t)((imageMemoryBarrierCount)); ++i) |
| 4407 | { |
| 4408 | marshal_VkImageMemoryBarrier(stream, (const VkImageMemoryBarrier*)(pImageMemoryBarriers + i)); |
| 4409 | } |
| 4410 | } |
| 4411 | |
| 4412 | void VkEncoder::vkCmdBeginQuery( |
| 4413 | VkCommandBuffer commandBuffer, |
| 4414 | VkQueryPool queryPool, |
| 4415 | uint32_t query, |
| 4416 | VkQueryControlFlags flags) |
| 4417 | { |
| 4418 | auto stream = mImpl->stream(); |
| 4419 | auto countingStream = mImpl->countingStream(); |
| 4420 | countingStream->rewind(); |
| 4421 | { |
| 4422 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4423 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4424 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4425 | countingStream->write((VkQueryControlFlags*)&flags, sizeof(VkQueryControlFlags)); |
| 4426 | } |
| 4427 | uint32_t packetSize_vkCmdBeginQuery = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4428 | countingStream->rewind(); |
| 4429 | uint32_t opcode_vkCmdBeginQuery = OP_vkCmdBeginQuery; |
| 4430 | stream->write(&opcode_vkCmdBeginQuery, sizeof(uint32_t)); |
| 4431 | stream->write(&packetSize_vkCmdBeginQuery, sizeof(uint32_t)); |
| 4432 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4433 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4434 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4435 | stream->write((VkQueryControlFlags*)&flags, sizeof(VkQueryControlFlags)); |
| 4436 | } |
| 4437 | |
| 4438 | void VkEncoder::vkCmdEndQuery( |
| 4439 | VkCommandBuffer commandBuffer, |
| 4440 | VkQueryPool queryPool, |
| 4441 | uint32_t query) |
| 4442 | { |
| 4443 | auto stream = mImpl->stream(); |
| 4444 | auto countingStream = mImpl->countingStream(); |
| 4445 | countingStream->rewind(); |
| 4446 | { |
| 4447 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4448 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4449 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4450 | } |
| 4451 | uint32_t packetSize_vkCmdEndQuery = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4452 | countingStream->rewind(); |
| 4453 | uint32_t opcode_vkCmdEndQuery = OP_vkCmdEndQuery; |
| 4454 | stream->write(&opcode_vkCmdEndQuery, sizeof(uint32_t)); |
| 4455 | stream->write(&packetSize_vkCmdEndQuery, sizeof(uint32_t)); |
| 4456 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4457 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4458 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4459 | } |
| 4460 | |
| 4461 | void VkEncoder::vkCmdResetQueryPool( |
| 4462 | VkCommandBuffer commandBuffer, |
| 4463 | VkQueryPool queryPool, |
| 4464 | uint32_t firstQuery, |
| 4465 | uint32_t queryCount) |
| 4466 | { |
| 4467 | auto stream = mImpl->stream(); |
| 4468 | auto countingStream = mImpl->countingStream(); |
| 4469 | countingStream->rewind(); |
| 4470 | { |
| 4471 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4472 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4473 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4474 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4475 | } |
| 4476 | uint32_t packetSize_vkCmdResetQueryPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4477 | countingStream->rewind(); |
| 4478 | uint32_t opcode_vkCmdResetQueryPool = OP_vkCmdResetQueryPool; |
| 4479 | stream->write(&opcode_vkCmdResetQueryPool, sizeof(uint32_t)); |
| 4480 | stream->write(&packetSize_vkCmdResetQueryPool, sizeof(uint32_t)); |
| 4481 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4482 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4483 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4484 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4485 | } |
| 4486 | |
| 4487 | void VkEncoder::vkCmdWriteTimestamp( |
| 4488 | VkCommandBuffer commandBuffer, |
| 4489 | VkPipelineStageFlagBits pipelineStage, |
| 4490 | VkQueryPool queryPool, |
| 4491 | uint32_t query) |
| 4492 | { |
| 4493 | auto stream = mImpl->stream(); |
| 4494 | auto countingStream = mImpl->countingStream(); |
| 4495 | countingStream->rewind(); |
| 4496 | { |
| 4497 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4498 | countingStream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 4499 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4500 | countingStream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4501 | } |
| 4502 | uint32_t packetSize_vkCmdWriteTimestamp = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4503 | countingStream->rewind(); |
| 4504 | uint32_t opcode_vkCmdWriteTimestamp = OP_vkCmdWriteTimestamp; |
| 4505 | stream->write(&opcode_vkCmdWriteTimestamp, sizeof(uint32_t)); |
| 4506 | stream->write(&packetSize_vkCmdWriteTimestamp, sizeof(uint32_t)); |
| 4507 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4508 | stream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 4509 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4510 | stream->write((uint32_t*)&query, sizeof(uint32_t)); |
| 4511 | } |
| 4512 | |
| 4513 | void VkEncoder::vkCmdCopyQueryPoolResults( |
| 4514 | VkCommandBuffer commandBuffer, |
| 4515 | VkQueryPool queryPool, |
| 4516 | uint32_t firstQuery, |
| 4517 | uint32_t queryCount, |
| 4518 | VkBuffer dstBuffer, |
| 4519 | VkDeviceSize dstOffset, |
| 4520 | VkDeviceSize stride, |
| 4521 | VkQueryResultFlags flags) |
| 4522 | { |
| 4523 | auto stream = mImpl->stream(); |
| 4524 | auto countingStream = mImpl->countingStream(); |
| 4525 | countingStream->rewind(); |
| 4526 | { |
| 4527 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4528 | countingStream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4529 | countingStream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4530 | countingStream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4531 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4532 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4533 | countingStream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 4534 | countingStream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 4535 | } |
| 4536 | uint32_t packetSize_vkCmdCopyQueryPoolResults = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4537 | countingStream->rewind(); |
| 4538 | uint32_t opcode_vkCmdCopyQueryPoolResults = OP_vkCmdCopyQueryPoolResults; |
| 4539 | stream->write(&opcode_vkCmdCopyQueryPoolResults, sizeof(uint32_t)); |
| 4540 | stream->write(&packetSize_vkCmdCopyQueryPoolResults, sizeof(uint32_t)); |
| 4541 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4542 | stream->write((VkQueryPool*)&queryPool, sizeof(VkQueryPool)); |
| 4543 | stream->write((uint32_t*)&firstQuery, sizeof(uint32_t)); |
| 4544 | stream->write((uint32_t*)&queryCount, sizeof(uint32_t)); |
| 4545 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 4546 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 4547 | stream->write((VkDeviceSize*)&stride, sizeof(VkDeviceSize)); |
| 4548 | stream->write((VkQueryResultFlags*)&flags, sizeof(VkQueryResultFlags)); |
| 4549 | } |
| 4550 | |
| 4551 | void VkEncoder::vkCmdPushConstants( |
| 4552 | VkCommandBuffer commandBuffer, |
| 4553 | VkPipelineLayout layout, |
| 4554 | VkShaderStageFlags stageFlags, |
| 4555 | uint32_t offset, |
| 4556 | uint32_t size, |
| 4557 | const void* pValues) |
| 4558 | { |
| 4559 | auto stream = mImpl->stream(); |
| 4560 | auto countingStream = mImpl->countingStream(); |
| 4561 | countingStream->rewind(); |
| 4562 | { |
| 4563 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4564 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 4565 | countingStream->write((VkShaderStageFlags*)&stageFlags, sizeof(VkShaderStageFlags)); |
| 4566 | countingStream->write((uint32_t*)&offset, sizeof(uint32_t)); |
| 4567 | countingStream->write((uint32_t*)&size, sizeof(uint32_t)); |
| 4568 | countingStream->write((const void*)pValues, ((size)) * sizeof(const uint8_t)); |
| 4569 | } |
| 4570 | uint32_t packetSize_vkCmdPushConstants = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4571 | countingStream->rewind(); |
| 4572 | uint32_t opcode_vkCmdPushConstants = OP_vkCmdPushConstants; |
| 4573 | stream->write(&opcode_vkCmdPushConstants, sizeof(uint32_t)); |
| 4574 | stream->write(&packetSize_vkCmdPushConstants, sizeof(uint32_t)); |
| 4575 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4576 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 4577 | stream->write((VkShaderStageFlags*)&stageFlags, sizeof(VkShaderStageFlags)); |
| 4578 | stream->write((uint32_t*)&offset, sizeof(uint32_t)); |
| 4579 | stream->write((uint32_t*)&size, sizeof(uint32_t)); |
| 4580 | stream->write((const void*)pValues, ((size)) * sizeof(const uint8_t)); |
| 4581 | } |
| 4582 | |
| 4583 | void VkEncoder::vkCmdBeginRenderPass( |
| 4584 | VkCommandBuffer commandBuffer, |
| 4585 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 4586 | VkSubpassContents contents) |
| 4587 | { |
| 4588 | auto stream = mImpl->stream(); |
| 4589 | auto countingStream = mImpl->countingStream(); |
| 4590 | countingStream->rewind(); |
| 4591 | { |
| 4592 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4593 | marshal_VkRenderPassBeginInfo(countingStream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 4594 | countingStream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4595 | } |
| 4596 | uint32_t packetSize_vkCmdBeginRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4597 | countingStream->rewind(); |
| 4598 | uint32_t opcode_vkCmdBeginRenderPass = OP_vkCmdBeginRenderPass; |
| 4599 | stream->write(&opcode_vkCmdBeginRenderPass, sizeof(uint32_t)); |
| 4600 | stream->write(&packetSize_vkCmdBeginRenderPass, sizeof(uint32_t)); |
| 4601 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4602 | marshal_VkRenderPassBeginInfo(stream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 4603 | stream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4604 | } |
| 4605 | |
| 4606 | void VkEncoder::vkCmdNextSubpass( |
| 4607 | VkCommandBuffer commandBuffer, |
| 4608 | VkSubpassContents contents) |
| 4609 | { |
| 4610 | auto stream = mImpl->stream(); |
| 4611 | auto countingStream = mImpl->countingStream(); |
| 4612 | countingStream->rewind(); |
| 4613 | { |
| 4614 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4615 | countingStream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4616 | } |
| 4617 | uint32_t packetSize_vkCmdNextSubpass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4618 | countingStream->rewind(); |
| 4619 | uint32_t opcode_vkCmdNextSubpass = OP_vkCmdNextSubpass; |
| 4620 | stream->write(&opcode_vkCmdNextSubpass, sizeof(uint32_t)); |
| 4621 | stream->write(&packetSize_vkCmdNextSubpass, sizeof(uint32_t)); |
| 4622 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4623 | stream->write((VkSubpassContents*)&contents, sizeof(VkSubpassContents)); |
| 4624 | } |
| 4625 | |
| 4626 | void VkEncoder::vkCmdEndRenderPass( |
| 4627 | VkCommandBuffer commandBuffer) |
| 4628 | { |
| 4629 | auto stream = mImpl->stream(); |
| 4630 | auto countingStream = mImpl->countingStream(); |
| 4631 | countingStream->rewind(); |
| 4632 | { |
| 4633 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4634 | } |
| 4635 | uint32_t packetSize_vkCmdEndRenderPass = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4636 | countingStream->rewind(); |
| 4637 | uint32_t opcode_vkCmdEndRenderPass = OP_vkCmdEndRenderPass; |
| 4638 | stream->write(&opcode_vkCmdEndRenderPass, sizeof(uint32_t)); |
| 4639 | stream->write(&packetSize_vkCmdEndRenderPass, sizeof(uint32_t)); |
| 4640 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4641 | } |
| 4642 | |
| 4643 | void VkEncoder::vkCmdExecuteCommands( |
| 4644 | VkCommandBuffer commandBuffer, |
| 4645 | uint32_t commandBufferCount, |
| 4646 | const VkCommandBuffer* pCommandBuffers) |
| 4647 | { |
| 4648 | auto stream = mImpl->stream(); |
| 4649 | auto countingStream = mImpl->countingStream(); |
| 4650 | countingStream->rewind(); |
| 4651 | { |
| 4652 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4653 | countingStream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 4654 | countingStream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 4655 | } |
| 4656 | uint32_t packetSize_vkCmdExecuteCommands = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4657 | countingStream->rewind(); |
| 4658 | uint32_t opcode_vkCmdExecuteCommands = OP_vkCmdExecuteCommands; |
| 4659 | stream->write(&opcode_vkCmdExecuteCommands, sizeof(uint32_t)); |
| 4660 | stream->write(&packetSize_vkCmdExecuteCommands, sizeof(uint32_t)); |
| 4661 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4662 | stream->write((uint32_t*)&commandBufferCount, sizeof(uint32_t)); |
| 4663 | stream->write((const VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)) * sizeof(const VkCommandBuffer)); |
| 4664 | } |
| 4665 | |
| 4666 | #endif |
| 4667 | #ifdef VK_VERSION_1_1 |
| 4668 | VkResult VkEncoder::vkEnumerateInstanceVersion( |
| 4669 | uint32_t* pApiVersion) |
| 4670 | { |
| 4671 | auto stream = mImpl->stream(); |
| 4672 | auto countingStream = mImpl->countingStream(); |
| 4673 | countingStream->rewind(); |
| 4674 | { |
| 4675 | countingStream->write((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4676 | } |
| 4677 | uint32_t packetSize_vkEnumerateInstanceVersion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4678 | countingStream->rewind(); |
| 4679 | uint32_t opcode_vkEnumerateInstanceVersion = OP_vkEnumerateInstanceVersion; |
| 4680 | stream->write(&opcode_vkEnumerateInstanceVersion, sizeof(uint32_t)); |
| 4681 | stream->write(&packetSize_vkEnumerateInstanceVersion, sizeof(uint32_t)); |
| 4682 | stream->write((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4683 | stream->read((uint32_t*)pApiVersion, sizeof(uint32_t)); |
| 4684 | VkResult vkEnumerateInstanceVersion_VkResult_return = (VkResult)0; |
| 4685 | stream->read(&vkEnumerateInstanceVersion_VkResult_return, sizeof(VkResult)); |
| 4686 | return vkEnumerateInstanceVersion_VkResult_return; |
| 4687 | } |
| 4688 | |
| 4689 | VkResult VkEncoder::vkBindBufferMemory2( |
| 4690 | VkDevice device, |
| 4691 | uint32_t bindInfoCount, |
| 4692 | const VkBindBufferMemoryInfo* pBindInfos) |
| 4693 | { |
| 4694 | auto stream = mImpl->stream(); |
| 4695 | auto countingStream = mImpl->countingStream(); |
| 4696 | countingStream->rewind(); |
| 4697 | { |
| 4698 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4699 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4700 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4701 | { |
| 4702 | marshal_VkBindBufferMemoryInfo(countingStream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 4703 | } |
| 4704 | } |
| 4705 | uint32_t packetSize_vkBindBufferMemory2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4706 | countingStream->rewind(); |
| 4707 | uint32_t opcode_vkBindBufferMemory2 = OP_vkBindBufferMemory2; |
| 4708 | stream->write(&opcode_vkBindBufferMemory2, sizeof(uint32_t)); |
| 4709 | stream->write(&packetSize_vkBindBufferMemory2, sizeof(uint32_t)); |
| 4710 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4711 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4712 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4713 | { |
| 4714 | marshal_VkBindBufferMemoryInfo(stream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 4715 | } |
| 4716 | VkResult vkBindBufferMemory2_VkResult_return = (VkResult)0; |
| 4717 | stream->read(&vkBindBufferMemory2_VkResult_return, sizeof(VkResult)); |
| 4718 | return vkBindBufferMemory2_VkResult_return; |
| 4719 | } |
| 4720 | |
| 4721 | VkResult VkEncoder::vkBindImageMemory2( |
| 4722 | VkDevice device, |
| 4723 | uint32_t bindInfoCount, |
| 4724 | const VkBindImageMemoryInfo* pBindInfos) |
| 4725 | { |
| 4726 | auto stream = mImpl->stream(); |
| 4727 | auto countingStream = mImpl->countingStream(); |
| 4728 | countingStream->rewind(); |
| 4729 | { |
| 4730 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4731 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4732 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4733 | { |
| 4734 | marshal_VkBindImageMemoryInfo(countingStream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 4735 | } |
| 4736 | } |
| 4737 | uint32_t packetSize_vkBindImageMemory2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4738 | countingStream->rewind(); |
| 4739 | uint32_t opcode_vkBindImageMemory2 = OP_vkBindImageMemory2; |
| 4740 | stream->write(&opcode_vkBindImageMemory2, sizeof(uint32_t)); |
| 4741 | stream->write(&packetSize_vkBindImageMemory2, sizeof(uint32_t)); |
| 4742 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4743 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 4744 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 4745 | { |
| 4746 | marshal_VkBindImageMemoryInfo(stream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 4747 | } |
| 4748 | VkResult vkBindImageMemory2_VkResult_return = (VkResult)0; |
| 4749 | stream->read(&vkBindImageMemory2_VkResult_return, sizeof(VkResult)); |
| 4750 | return vkBindImageMemory2_VkResult_return; |
| 4751 | } |
| 4752 | |
| 4753 | void VkEncoder::vkGetDeviceGroupPeerMemoryFeatures( |
| 4754 | VkDevice device, |
| 4755 | uint32_t heapIndex, |
| 4756 | uint32_t localDeviceIndex, |
| 4757 | uint32_t remoteDeviceIndex, |
| 4758 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 4759 | { |
| 4760 | auto stream = mImpl->stream(); |
| 4761 | auto countingStream = mImpl->countingStream(); |
| 4762 | countingStream->rewind(); |
| 4763 | { |
| 4764 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4765 | countingStream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 4766 | countingStream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 4767 | countingStream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 4768 | countingStream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4769 | } |
| 4770 | uint32_t packetSize_vkGetDeviceGroupPeerMemoryFeatures = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4771 | countingStream->rewind(); |
| 4772 | uint32_t opcode_vkGetDeviceGroupPeerMemoryFeatures = OP_vkGetDeviceGroupPeerMemoryFeatures; |
| 4773 | stream->write(&opcode_vkGetDeviceGroupPeerMemoryFeatures, sizeof(uint32_t)); |
| 4774 | stream->write(&packetSize_vkGetDeviceGroupPeerMemoryFeatures, sizeof(uint32_t)); |
| 4775 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4776 | stream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 4777 | stream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 4778 | stream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 4779 | stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4780 | stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 4781 | } |
| 4782 | |
| 4783 | void VkEncoder::vkCmdSetDeviceMask( |
| 4784 | VkCommandBuffer commandBuffer, |
| 4785 | uint32_t deviceMask) |
| 4786 | { |
| 4787 | auto stream = mImpl->stream(); |
| 4788 | auto countingStream = mImpl->countingStream(); |
| 4789 | countingStream->rewind(); |
| 4790 | { |
| 4791 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4792 | countingStream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 4793 | } |
| 4794 | uint32_t packetSize_vkCmdSetDeviceMask = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4795 | countingStream->rewind(); |
| 4796 | uint32_t opcode_vkCmdSetDeviceMask = OP_vkCmdSetDeviceMask; |
| 4797 | stream->write(&opcode_vkCmdSetDeviceMask, sizeof(uint32_t)); |
| 4798 | stream->write(&packetSize_vkCmdSetDeviceMask, sizeof(uint32_t)); |
| 4799 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4800 | stream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 4801 | } |
| 4802 | |
| 4803 | void VkEncoder::vkCmdDispatchBase( |
| 4804 | VkCommandBuffer commandBuffer, |
| 4805 | uint32_t baseGroupX, |
| 4806 | uint32_t baseGroupY, |
| 4807 | uint32_t baseGroupZ, |
| 4808 | uint32_t groupCountX, |
| 4809 | uint32_t groupCountY, |
| 4810 | uint32_t groupCountZ) |
| 4811 | { |
| 4812 | auto stream = mImpl->stream(); |
| 4813 | auto countingStream = mImpl->countingStream(); |
| 4814 | countingStream->rewind(); |
| 4815 | { |
| 4816 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4817 | countingStream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 4818 | countingStream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 4819 | countingStream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 4820 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 4821 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 4822 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 4823 | } |
| 4824 | uint32_t packetSize_vkCmdDispatchBase = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4825 | countingStream->rewind(); |
| 4826 | uint32_t opcode_vkCmdDispatchBase = OP_vkCmdDispatchBase; |
| 4827 | stream->write(&opcode_vkCmdDispatchBase, sizeof(uint32_t)); |
| 4828 | stream->write(&packetSize_vkCmdDispatchBase, sizeof(uint32_t)); |
| 4829 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 4830 | stream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 4831 | stream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 4832 | stream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 4833 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 4834 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 4835 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 4836 | } |
| 4837 | |
| 4838 | VkResult VkEncoder::vkEnumeratePhysicalDeviceGroups( |
| 4839 | VkInstance instance, |
| 4840 | uint32_t* pPhysicalDeviceGroupCount, |
| 4841 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 4842 | { |
| 4843 | auto stream = mImpl->stream(); |
| 4844 | auto countingStream = mImpl->countingStream(); |
| 4845 | countingStream->rewind(); |
| 4846 | { |
| 4847 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 4848 | countingStream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4849 | if (pPhysicalDeviceGroupCount) |
| 4850 | { |
| 4851 | countingStream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4852 | } |
| 4853 | countingStream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4854 | if (pPhysicalDeviceGroupProperties) |
| 4855 | { |
| 4856 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4857 | { |
| 4858 | marshal_VkPhysicalDeviceGroupProperties(countingStream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4859 | } |
| 4860 | } |
| 4861 | } |
| 4862 | uint32_t packetSize_vkEnumeratePhysicalDeviceGroups = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4863 | countingStream->rewind(); |
| 4864 | uint32_t opcode_vkEnumeratePhysicalDeviceGroups = OP_vkEnumeratePhysicalDeviceGroups; |
| 4865 | stream->write(&opcode_vkEnumeratePhysicalDeviceGroups, sizeof(uint32_t)); |
| 4866 | stream->write(&packetSize_vkEnumeratePhysicalDeviceGroups, sizeof(uint32_t)); |
| 4867 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 4868 | stream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4869 | if (pPhysicalDeviceGroupCount) |
| 4870 | { |
| 4871 | stream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4872 | } |
| 4873 | stream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4874 | if (pPhysicalDeviceGroupProperties) |
| 4875 | { |
| 4876 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4877 | { |
| 4878 | marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4879 | } |
| 4880 | } |
| 4881 | uint32_t* check_pPhysicalDeviceGroupCount; |
| 4882 | stream->read((uint32_t**)&check_pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 4883 | if (pPhysicalDeviceGroupCount) |
| 4884 | { |
| 4885 | if (!(check_pPhysicalDeviceGroupCount)) |
| 4886 | { |
| 4887 | fprintf(stderr, "fatal: pPhysicalDeviceGroupCount inconsistent between guest and host\n"); |
| 4888 | } |
| 4889 | stream->read((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 4890 | } |
| 4891 | VkPhysicalDeviceGroupProperties* check_pPhysicalDeviceGroupProperties; |
| 4892 | stream->read((VkPhysicalDeviceGroupProperties**)&check_pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 4893 | if (pPhysicalDeviceGroupProperties) |
| 4894 | { |
| 4895 | if (!(check_pPhysicalDeviceGroupProperties)) |
| 4896 | { |
| 4897 | fprintf(stderr, "fatal: pPhysicalDeviceGroupProperties inconsistent between guest and host\n"); |
| 4898 | } |
| 4899 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 4900 | { |
| 4901 | unmarshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 4902 | } |
| 4903 | } |
| 4904 | VkResult vkEnumeratePhysicalDeviceGroups_VkResult_return = (VkResult)0; |
| 4905 | stream->read(&vkEnumeratePhysicalDeviceGroups_VkResult_return, sizeof(VkResult)); |
| 4906 | return vkEnumeratePhysicalDeviceGroups_VkResult_return; |
| 4907 | } |
| 4908 | |
| 4909 | void VkEncoder::vkGetImageMemoryRequirements2( |
| 4910 | VkDevice device, |
| 4911 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 4912 | VkMemoryRequirements2* pMemoryRequirements) |
| 4913 | { |
| 4914 | auto stream = mImpl->stream(); |
| 4915 | auto countingStream = mImpl->countingStream(); |
| 4916 | countingStream->rewind(); |
| 4917 | { |
| 4918 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4919 | marshal_VkImageMemoryRequirementsInfo2(countingStream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 4920 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4921 | } |
| 4922 | uint32_t packetSize_vkGetImageMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4923 | countingStream->rewind(); |
| 4924 | uint32_t opcode_vkGetImageMemoryRequirements2 = OP_vkGetImageMemoryRequirements2; |
| 4925 | stream->write(&opcode_vkGetImageMemoryRequirements2, sizeof(uint32_t)); |
| 4926 | stream->write(&packetSize_vkGetImageMemoryRequirements2, sizeof(uint32_t)); |
| 4927 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4928 | marshal_VkImageMemoryRequirementsInfo2(stream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 4929 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4930 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4931 | } |
| 4932 | |
| 4933 | void VkEncoder::vkGetBufferMemoryRequirements2( |
| 4934 | VkDevice device, |
| 4935 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 4936 | VkMemoryRequirements2* pMemoryRequirements) |
| 4937 | { |
| 4938 | auto stream = mImpl->stream(); |
| 4939 | auto countingStream = mImpl->countingStream(); |
| 4940 | countingStream->rewind(); |
| 4941 | { |
| 4942 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4943 | marshal_VkBufferMemoryRequirementsInfo2(countingStream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 4944 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4945 | } |
| 4946 | uint32_t packetSize_vkGetBufferMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4947 | countingStream->rewind(); |
| 4948 | uint32_t opcode_vkGetBufferMemoryRequirements2 = OP_vkGetBufferMemoryRequirements2; |
| 4949 | stream->write(&opcode_vkGetBufferMemoryRequirements2, sizeof(uint32_t)); |
| 4950 | stream->write(&packetSize_vkGetBufferMemoryRequirements2, sizeof(uint32_t)); |
| 4951 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4952 | marshal_VkBufferMemoryRequirementsInfo2(stream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 4953 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4954 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 4955 | } |
| 4956 | |
| 4957 | void VkEncoder::vkGetImageSparseMemoryRequirements2( |
| 4958 | VkDevice device, |
| 4959 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 4960 | uint32_t* pSparseMemoryRequirementCount, |
| 4961 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 4962 | { |
| 4963 | auto stream = mImpl->stream(); |
| 4964 | auto countingStream = mImpl->countingStream(); |
| 4965 | countingStream->rewind(); |
| 4966 | { |
| 4967 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4968 | marshal_VkImageSparseMemoryRequirementsInfo2(countingStream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 4969 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 4970 | if (pSparseMemoryRequirementCount) |
| 4971 | { |
| 4972 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 4973 | } |
| 4974 | countingStream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 4975 | if (pSparseMemoryRequirements) |
| 4976 | { |
| 4977 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 4978 | { |
| 4979 | marshal_VkSparseImageMemoryRequirements2(countingStream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 4980 | } |
| 4981 | } |
| 4982 | } |
| 4983 | uint32_t packetSize_vkGetImageSparseMemoryRequirements2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 4984 | countingStream->rewind(); |
| 4985 | uint32_t opcode_vkGetImageSparseMemoryRequirements2 = OP_vkGetImageSparseMemoryRequirements2; |
| 4986 | stream->write(&opcode_vkGetImageSparseMemoryRequirements2, sizeof(uint32_t)); |
| 4987 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements2, sizeof(uint32_t)); |
| 4988 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 4989 | marshal_VkImageSparseMemoryRequirementsInfo2(stream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 4990 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 4991 | if (pSparseMemoryRequirementCount) |
| 4992 | { |
| 4993 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 4994 | } |
| 4995 | stream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 4996 | if (pSparseMemoryRequirements) |
| 4997 | { |
| 4998 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 4999 | { |
| 5000 | marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 5001 | } |
| 5002 | } |
| 5003 | uint32_t* check_pSparseMemoryRequirementCount; |
| 5004 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 5005 | if (pSparseMemoryRequirementCount) |
| 5006 | { |
| 5007 | if (!(check_pSparseMemoryRequirementCount)) |
| 5008 | { |
| 5009 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 5010 | } |
| 5011 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 5012 | } |
| 5013 | VkSparseImageMemoryRequirements2* check_pSparseMemoryRequirements; |
| 5014 | stream->read((VkSparseImageMemoryRequirements2**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 5015 | if (pSparseMemoryRequirements) |
| 5016 | { |
| 5017 | if (!(check_pSparseMemoryRequirements)) |
| 5018 | { |
| 5019 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 5020 | } |
| 5021 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 5022 | { |
| 5023 | unmarshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 5024 | } |
| 5025 | } |
| 5026 | } |
| 5027 | |
| 5028 | void VkEncoder::vkGetPhysicalDeviceFeatures2( |
| 5029 | VkPhysicalDevice physicalDevice, |
| 5030 | VkPhysicalDeviceFeatures2* pFeatures) |
| 5031 | { |
| 5032 | auto stream = mImpl->stream(); |
| 5033 | auto countingStream = mImpl->countingStream(); |
| 5034 | countingStream->rewind(); |
| 5035 | { |
| 5036 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5037 | marshal_VkPhysicalDeviceFeatures2(countingStream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5038 | } |
| 5039 | uint32_t packetSize_vkGetPhysicalDeviceFeatures2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5040 | countingStream->rewind(); |
| 5041 | uint32_t opcode_vkGetPhysicalDeviceFeatures2 = OP_vkGetPhysicalDeviceFeatures2; |
| 5042 | stream->write(&opcode_vkGetPhysicalDeviceFeatures2, sizeof(uint32_t)); |
| 5043 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures2, sizeof(uint32_t)); |
| 5044 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5045 | marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5046 | unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 5047 | } |
| 5048 | |
| 5049 | void VkEncoder::vkGetPhysicalDeviceProperties2( |
| 5050 | VkPhysicalDevice physicalDevice, |
| 5051 | VkPhysicalDeviceProperties2* pProperties) |
| 5052 | { |
| 5053 | auto stream = mImpl->stream(); |
| 5054 | auto countingStream = mImpl->countingStream(); |
| 5055 | countingStream->rewind(); |
| 5056 | { |
| 5057 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5058 | marshal_VkPhysicalDeviceProperties2(countingStream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5059 | } |
| 5060 | uint32_t packetSize_vkGetPhysicalDeviceProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5061 | countingStream->rewind(); |
| 5062 | uint32_t opcode_vkGetPhysicalDeviceProperties2 = OP_vkGetPhysicalDeviceProperties2; |
| 5063 | stream->write(&opcode_vkGetPhysicalDeviceProperties2, sizeof(uint32_t)); |
| 5064 | stream->write(&packetSize_vkGetPhysicalDeviceProperties2, sizeof(uint32_t)); |
| 5065 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5066 | marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5067 | unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 5068 | } |
| 5069 | |
| 5070 | void VkEncoder::vkGetPhysicalDeviceFormatProperties2( |
| 5071 | VkPhysicalDevice physicalDevice, |
| 5072 | VkFormat format, |
| 5073 | VkFormatProperties2* pFormatProperties) |
| 5074 | { |
| 5075 | auto stream = mImpl->stream(); |
| 5076 | auto countingStream = mImpl->countingStream(); |
| 5077 | countingStream->rewind(); |
| 5078 | { |
| 5079 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5080 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 5081 | marshal_VkFormatProperties2(countingStream, (VkFormatProperties2*)(pFormatProperties)); |
| 5082 | } |
| 5083 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5084 | countingStream->rewind(); |
| 5085 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties2 = OP_vkGetPhysicalDeviceFormatProperties2; |
| 5086 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties2, sizeof(uint32_t)); |
| 5087 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties2, sizeof(uint32_t)); |
| 5088 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5089 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 5090 | marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 5091 | unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 5092 | } |
| 5093 | |
| 5094 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties2( |
| 5095 | VkPhysicalDevice physicalDevice, |
| 5096 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 5097 | VkImageFormatProperties2* pImageFormatProperties) |
| 5098 | { |
| 5099 | auto stream = mImpl->stream(); |
| 5100 | auto countingStream = mImpl->countingStream(); |
| 5101 | countingStream->rewind(); |
| 5102 | { |
| 5103 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5104 | marshal_VkPhysicalDeviceImageFormatInfo2(countingStream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 5105 | marshal_VkImageFormatProperties2(countingStream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5106 | } |
| 5107 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5108 | countingStream->rewind(); |
| 5109 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties2 = OP_vkGetPhysicalDeviceImageFormatProperties2; |
| 5110 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties2, sizeof(uint32_t)); |
| 5111 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties2, sizeof(uint32_t)); |
| 5112 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5113 | marshal_VkPhysicalDeviceImageFormatInfo2(stream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 5114 | marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5115 | unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 5116 | VkResult vkGetPhysicalDeviceImageFormatProperties2_VkResult_return = (VkResult)0; |
| 5117 | stream->read(&vkGetPhysicalDeviceImageFormatProperties2_VkResult_return, sizeof(VkResult)); |
| 5118 | return vkGetPhysicalDeviceImageFormatProperties2_VkResult_return; |
| 5119 | } |
| 5120 | |
| 5121 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties2( |
| 5122 | VkPhysicalDevice physicalDevice, |
| 5123 | uint32_t* pQueueFamilyPropertyCount, |
| 5124 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 5125 | { |
| 5126 | auto stream = mImpl->stream(); |
| 5127 | auto countingStream = mImpl->countingStream(); |
| 5128 | countingStream->rewind(); |
| 5129 | { |
| 5130 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5131 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5132 | if (pQueueFamilyPropertyCount) |
| 5133 | { |
| 5134 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5135 | } |
| 5136 | countingStream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5137 | if (pQueueFamilyProperties) |
| 5138 | { |
| 5139 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5140 | { |
| 5141 | marshal_VkQueueFamilyProperties2(countingStream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5142 | } |
| 5143 | } |
| 5144 | } |
| 5145 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5146 | countingStream->rewind(); |
| 5147 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties2 = OP_vkGetPhysicalDeviceQueueFamilyProperties2; |
| 5148 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties2, sizeof(uint32_t)); |
| 5149 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties2, sizeof(uint32_t)); |
| 5150 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5151 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5152 | if (pQueueFamilyPropertyCount) |
| 5153 | { |
| 5154 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5155 | } |
| 5156 | stream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5157 | if (pQueueFamilyProperties) |
| 5158 | { |
| 5159 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5160 | { |
| 5161 | marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5162 | } |
| 5163 | } |
| 5164 | uint32_t* check_pQueueFamilyPropertyCount; |
| 5165 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 5166 | if (pQueueFamilyPropertyCount) |
| 5167 | { |
| 5168 | if (!(check_pQueueFamilyPropertyCount)) |
| 5169 | { |
| 5170 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 5171 | } |
| 5172 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 5173 | } |
| 5174 | VkQueueFamilyProperties2* check_pQueueFamilyProperties; |
| 5175 | stream->read((VkQueueFamilyProperties2**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 5176 | if (pQueueFamilyProperties) |
| 5177 | { |
| 5178 | if (!(check_pQueueFamilyProperties)) |
| 5179 | { |
| 5180 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 5181 | } |
| 5182 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 5183 | { |
| 5184 | unmarshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 5185 | } |
| 5186 | } |
| 5187 | } |
| 5188 | |
| 5189 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties2( |
| 5190 | VkPhysicalDevice physicalDevice, |
| 5191 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 5192 | { |
| 5193 | auto stream = mImpl->stream(); |
| 5194 | auto countingStream = mImpl->countingStream(); |
| 5195 | countingStream->rewind(); |
| 5196 | { |
| 5197 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5198 | marshal_VkPhysicalDeviceMemoryProperties2(countingStream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5199 | } |
| 5200 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5201 | countingStream->rewind(); |
| 5202 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties2 = OP_vkGetPhysicalDeviceMemoryProperties2; |
| 5203 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties2, sizeof(uint32_t)); |
| 5204 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties2, sizeof(uint32_t)); |
| 5205 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5206 | marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5207 | unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 5208 | } |
| 5209 | |
| 5210 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties2( |
| 5211 | VkPhysicalDevice physicalDevice, |
| 5212 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 5213 | uint32_t* pPropertyCount, |
| 5214 | VkSparseImageFormatProperties2* pProperties) |
| 5215 | { |
| 5216 | auto stream = mImpl->stream(); |
| 5217 | auto countingStream = mImpl->countingStream(); |
| 5218 | countingStream->rewind(); |
| 5219 | { |
| 5220 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5221 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(countingStream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 5222 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 5223 | if (pPropertyCount) |
| 5224 | { |
| 5225 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5226 | } |
| 5227 | countingStream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5228 | if (pProperties) |
| 5229 | { |
| 5230 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5231 | { |
| 5232 | marshal_VkSparseImageFormatProperties2(countingStream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5233 | } |
| 5234 | } |
| 5235 | } |
| 5236 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5237 | countingStream->rewind(); |
| 5238 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties2 = OP_vkGetPhysicalDeviceSparseImageFormatProperties2; |
| 5239 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties2, sizeof(uint32_t)); |
| 5240 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2, sizeof(uint32_t)); |
| 5241 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5242 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(stream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 5243 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 5244 | if (pPropertyCount) |
| 5245 | { |
| 5246 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5247 | } |
| 5248 | stream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5249 | if (pProperties) |
| 5250 | { |
| 5251 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5252 | { |
| 5253 | marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5254 | } |
| 5255 | } |
| 5256 | uint32_t* check_pPropertyCount; |
| 5257 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 5258 | if (pPropertyCount) |
| 5259 | { |
| 5260 | if (!(check_pPropertyCount)) |
| 5261 | { |
| 5262 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 5263 | } |
| 5264 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 5265 | } |
| 5266 | VkSparseImageFormatProperties2* check_pProperties; |
| 5267 | stream->read((VkSparseImageFormatProperties2**)&check_pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 5268 | if (pProperties) |
| 5269 | { |
| 5270 | if (!(check_pProperties)) |
| 5271 | { |
| 5272 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 5273 | } |
| 5274 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 5275 | { |
| 5276 | unmarshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 5277 | } |
| 5278 | } |
| 5279 | } |
| 5280 | |
| 5281 | void VkEncoder::vkTrimCommandPool( |
| 5282 | VkDevice device, |
| 5283 | VkCommandPool commandPool, |
| 5284 | VkCommandPoolTrimFlags flags) |
| 5285 | { |
| 5286 | auto stream = mImpl->stream(); |
| 5287 | auto countingStream = mImpl->countingStream(); |
| 5288 | countingStream->rewind(); |
| 5289 | { |
| 5290 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5291 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 5292 | countingStream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 5293 | } |
| 5294 | uint32_t packetSize_vkTrimCommandPool = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5295 | countingStream->rewind(); |
| 5296 | uint32_t opcode_vkTrimCommandPool = OP_vkTrimCommandPool; |
| 5297 | stream->write(&opcode_vkTrimCommandPool, sizeof(uint32_t)); |
| 5298 | stream->write(&packetSize_vkTrimCommandPool, sizeof(uint32_t)); |
| 5299 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5300 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 5301 | stream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 5302 | } |
| 5303 | |
| 5304 | void VkEncoder::vkGetDeviceQueue2( |
| 5305 | VkDevice device, |
| 5306 | const VkDeviceQueueInfo2* pQueueInfo, |
| 5307 | VkQueue* pQueue) |
| 5308 | { |
| 5309 | auto stream = mImpl->stream(); |
| 5310 | auto countingStream = mImpl->countingStream(); |
| 5311 | countingStream->rewind(); |
| 5312 | { |
| 5313 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5314 | marshal_VkDeviceQueueInfo2(countingStream, (const VkDeviceQueueInfo2*)(pQueueInfo)); |
| 5315 | countingStream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5316 | } |
| 5317 | uint32_t packetSize_vkGetDeviceQueue2 = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5318 | countingStream->rewind(); |
| 5319 | uint32_t opcode_vkGetDeviceQueue2 = OP_vkGetDeviceQueue2; |
| 5320 | stream->write(&opcode_vkGetDeviceQueue2, sizeof(uint32_t)); |
| 5321 | stream->write(&packetSize_vkGetDeviceQueue2, sizeof(uint32_t)); |
| 5322 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5323 | marshal_VkDeviceQueueInfo2(stream, (const VkDeviceQueueInfo2*)(pQueueInfo)); |
| 5324 | stream->write((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5325 | stream->read((VkQueue*)pQueue, sizeof(VkQueue)); |
| 5326 | } |
| 5327 | |
| 5328 | VkResult VkEncoder::vkCreateSamplerYcbcrConversion( |
| 5329 | VkDevice device, |
| 5330 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 5331 | const VkAllocationCallbacks* pAllocator, |
| 5332 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 5333 | { |
| 5334 | auto stream = mImpl->stream(); |
| 5335 | auto countingStream = mImpl->countingStream(); |
| 5336 | countingStream->rewind(); |
| 5337 | { |
| 5338 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5339 | marshal_VkSamplerYcbcrConversionCreateInfo(countingStream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 5340 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5341 | if (pAllocator) |
| 5342 | { |
| 5343 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5344 | } |
| 5345 | countingStream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5346 | } |
| 5347 | uint32_t packetSize_vkCreateSamplerYcbcrConversion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5348 | countingStream->rewind(); |
| 5349 | uint32_t opcode_vkCreateSamplerYcbcrConversion = OP_vkCreateSamplerYcbcrConversion; |
| 5350 | stream->write(&opcode_vkCreateSamplerYcbcrConversion, sizeof(uint32_t)); |
| 5351 | stream->write(&packetSize_vkCreateSamplerYcbcrConversion, sizeof(uint32_t)); |
| 5352 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5353 | marshal_VkSamplerYcbcrConversionCreateInfo(stream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 5354 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5355 | if (pAllocator) |
| 5356 | { |
| 5357 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5358 | } |
| 5359 | stream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5360 | stream->read((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5361 | VkResult vkCreateSamplerYcbcrConversion_VkResult_return = (VkResult)0; |
| 5362 | stream->read(&vkCreateSamplerYcbcrConversion_VkResult_return, sizeof(VkResult)); |
| 5363 | return vkCreateSamplerYcbcrConversion_VkResult_return; |
| 5364 | } |
| 5365 | |
| 5366 | void VkEncoder::vkDestroySamplerYcbcrConversion( |
| 5367 | VkDevice device, |
| 5368 | VkSamplerYcbcrConversion ycbcrConversion, |
| 5369 | const VkAllocationCallbacks* pAllocator) |
| 5370 | { |
| 5371 | auto stream = mImpl->stream(); |
| 5372 | auto countingStream = mImpl->countingStream(); |
| 5373 | countingStream->rewind(); |
| 5374 | { |
| 5375 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5376 | countingStream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5377 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5378 | if (pAllocator) |
| 5379 | { |
| 5380 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5381 | } |
| 5382 | } |
| 5383 | uint32_t packetSize_vkDestroySamplerYcbcrConversion = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5384 | countingStream->rewind(); |
| 5385 | uint32_t opcode_vkDestroySamplerYcbcrConversion = OP_vkDestroySamplerYcbcrConversion; |
| 5386 | stream->write(&opcode_vkDestroySamplerYcbcrConversion, sizeof(uint32_t)); |
| 5387 | stream->write(&packetSize_vkDestroySamplerYcbcrConversion, sizeof(uint32_t)); |
| 5388 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5389 | stream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 5390 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5391 | if (pAllocator) |
| 5392 | { |
| 5393 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5394 | } |
| 5395 | } |
| 5396 | |
| 5397 | VkResult VkEncoder::vkCreateDescriptorUpdateTemplate( |
| 5398 | VkDevice device, |
| 5399 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 5400 | const VkAllocationCallbacks* pAllocator, |
| 5401 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 5402 | { |
| 5403 | auto stream = mImpl->stream(); |
| 5404 | auto countingStream = mImpl->countingStream(); |
| 5405 | countingStream->rewind(); |
| 5406 | { |
| 5407 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5408 | marshal_VkDescriptorUpdateTemplateCreateInfo(countingStream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 5409 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5410 | if (pAllocator) |
| 5411 | { |
| 5412 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5413 | } |
| 5414 | countingStream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5415 | } |
| 5416 | uint32_t packetSize_vkCreateDescriptorUpdateTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5417 | countingStream->rewind(); |
| 5418 | uint32_t opcode_vkCreateDescriptorUpdateTemplate = OP_vkCreateDescriptorUpdateTemplate; |
| 5419 | stream->write(&opcode_vkCreateDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5420 | stream->write(&packetSize_vkCreateDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5421 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5422 | marshal_VkDescriptorUpdateTemplateCreateInfo(stream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 5423 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5424 | if (pAllocator) |
| 5425 | { |
| 5426 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5427 | } |
| 5428 | stream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5429 | stream->read((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5430 | VkResult vkCreateDescriptorUpdateTemplate_VkResult_return = (VkResult)0; |
| 5431 | stream->read(&vkCreateDescriptorUpdateTemplate_VkResult_return, sizeof(VkResult)); |
| 5432 | return vkCreateDescriptorUpdateTemplate_VkResult_return; |
| 5433 | } |
| 5434 | |
| 5435 | void VkEncoder::vkDestroyDescriptorUpdateTemplate( |
| 5436 | VkDevice device, |
| 5437 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 5438 | const VkAllocationCallbacks* pAllocator) |
| 5439 | { |
| 5440 | auto stream = mImpl->stream(); |
| 5441 | auto countingStream = mImpl->countingStream(); |
| 5442 | countingStream->rewind(); |
| 5443 | { |
| 5444 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5445 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5446 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5447 | if (pAllocator) |
| 5448 | { |
| 5449 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5450 | } |
| 5451 | } |
| 5452 | uint32_t packetSize_vkDestroyDescriptorUpdateTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5453 | countingStream->rewind(); |
| 5454 | uint32_t opcode_vkDestroyDescriptorUpdateTemplate = OP_vkDestroyDescriptorUpdateTemplate; |
| 5455 | stream->write(&opcode_vkDestroyDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5456 | stream->write(&packetSize_vkDestroyDescriptorUpdateTemplate, sizeof(uint32_t)); |
| 5457 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5458 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5459 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5460 | if (pAllocator) |
| 5461 | { |
| 5462 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5463 | } |
| 5464 | } |
| 5465 | |
| 5466 | void VkEncoder::vkUpdateDescriptorSetWithTemplate( |
| 5467 | VkDevice device, |
| 5468 | VkDescriptorSet descriptorSet, |
| 5469 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 5470 | const void* pData) |
| 5471 | { |
| 5472 | auto stream = mImpl->stream(); |
| 5473 | auto countingStream = mImpl->countingStream(); |
| 5474 | countingStream->rewind(); |
| 5475 | { |
| 5476 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5477 | countingStream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 5478 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5479 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 5480 | if (pData) |
| 5481 | { |
| 5482 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 5483 | } |
| 5484 | } |
| 5485 | uint32_t packetSize_vkUpdateDescriptorSetWithTemplate = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5486 | countingStream->rewind(); |
| 5487 | uint32_t opcode_vkUpdateDescriptorSetWithTemplate = OP_vkUpdateDescriptorSetWithTemplate; |
| 5488 | stream->write(&opcode_vkUpdateDescriptorSetWithTemplate, sizeof(uint32_t)); |
| 5489 | stream->write(&packetSize_vkUpdateDescriptorSetWithTemplate, sizeof(uint32_t)); |
| 5490 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5491 | stream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 5492 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 5493 | stream->write((const void**)&pData, sizeof(const void*)); |
| 5494 | if (pData) |
| 5495 | { |
| 5496 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 5497 | } |
| 5498 | } |
| 5499 | |
| 5500 | void VkEncoder::vkGetPhysicalDeviceExternalBufferProperties( |
| 5501 | VkPhysicalDevice physicalDevice, |
| 5502 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 5503 | VkExternalBufferProperties* pExternalBufferProperties) |
| 5504 | { |
| 5505 | auto stream = mImpl->stream(); |
| 5506 | auto countingStream = mImpl->countingStream(); |
| 5507 | countingStream->rewind(); |
| 5508 | { |
| 5509 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5510 | marshal_VkPhysicalDeviceExternalBufferInfo(countingStream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 5511 | marshal_VkExternalBufferProperties(countingStream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5512 | } |
| 5513 | uint32_t packetSize_vkGetPhysicalDeviceExternalBufferProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5514 | countingStream->rewind(); |
| 5515 | uint32_t opcode_vkGetPhysicalDeviceExternalBufferProperties = OP_vkGetPhysicalDeviceExternalBufferProperties; |
| 5516 | stream->write(&opcode_vkGetPhysicalDeviceExternalBufferProperties, sizeof(uint32_t)); |
| 5517 | stream->write(&packetSize_vkGetPhysicalDeviceExternalBufferProperties, sizeof(uint32_t)); |
| 5518 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5519 | marshal_VkPhysicalDeviceExternalBufferInfo(stream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 5520 | marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5521 | unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 5522 | } |
| 5523 | |
| 5524 | void VkEncoder::vkGetPhysicalDeviceExternalFenceProperties( |
| 5525 | VkPhysicalDevice physicalDevice, |
| 5526 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 5527 | VkExternalFenceProperties* pExternalFenceProperties) |
| 5528 | { |
| 5529 | auto stream = mImpl->stream(); |
| 5530 | auto countingStream = mImpl->countingStream(); |
| 5531 | countingStream->rewind(); |
| 5532 | { |
| 5533 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5534 | marshal_VkPhysicalDeviceExternalFenceInfo(countingStream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 5535 | marshal_VkExternalFenceProperties(countingStream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5536 | } |
| 5537 | uint32_t packetSize_vkGetPhysicalDeviceExternalFenceProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5538 | countingStream->rewind(); |
| 5539 | uint32_t opcode_vkGetPhysicalDeviceExternalFenceProperties = OP_vkGetPhysicalDeviceExternalFenceProperties; |
| 5540 | stream->write(&opcode_vkGetPhysicalDeviceExternalFenceProperties, sizeof(uint32_t)); |
| 5541 | stream->write(&packetSize_vkGetPhysicalDeviceExternalFenceProperties, sizeof(uint32_t)); |
| 5542 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5543 | marshal_VkPhysicalDeviceExternalFenceInfo(stream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 5544 | marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5545 | unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 5546 | } |
| 5547 | |
| 5548 | void VkEncoder::vkGetPhysicalDeviceExternalSemaphoreProperties( |
| 5549 | VkPhysicalDevice physicalDevice, |
| 5550 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 5551 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 5552 | { |
| 5553 | auto stream = mImpl->stream(); |
| 5554 | auto countingStream = mImpl->countingStream(); |
| 5555 | countingStream->rewind(); |
| 5556 | { |
| 5557 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5558 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(countingStream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 5559 | marshal_VkExternalSemaphoreProperties(countingStream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5560 | } |
| 5561 | uint32_t packetSize_vkGetPhysicalDeviceExternalSemaphoreProperties = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5562 | countingStream->rewind(); |
| 5563 | uint32_t opcode_vkGetPhysicalDeviceExternalSemaphoreProperties = OP_vkGetPhysicalDeviceExternalSemaphoreProperties; |
| 5564 | stream->write(&opcode_vkGetPhysicalDeviceExternalSemaphoreProperties, sizeof(uint32_t)); |
| 5565 | stream->write(&packetSize_vkGetPhysicalDeviceExternalSemaphoreProperties, sizeof(uint32_t)); |
| 5566 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5567 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 5568 | marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5569 | unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 5570 | } |
| 5571 | |
| 5572 | void VkEncoder::vkGetDescriptorSetLayoutSupport( |
| 5573 | VkDevice device, |
| 5574 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 5575 | VkDescriptorSetLayoutSupport* pSupport) |
| 5576 | { |
| 5577 | auto stream = mImpl->stream(); |
| 5578 | auto countingStream = mImpl->countingStream(); |
| 5579 | countingStream->rewind(); |
| 5580 | { |
| 5581 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5582 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 5583 | marshal_VkDescriptorSetLayoutSupport(countingStream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5584 | } |
| 5585 | uint32_t packetSize_vkGetDescriptorSetLayoutSupport = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5586 | countingStream->rewind(); |
| 5587 | uint32_t opcode_vkGetDescriptorSetLayoutSupport = OP_vkGetDescriptorSetLayoutSupport; |
| 5588 | stream->write(&opcode_vkGetDescriptorSetLayoutSupport, sizeof(uint32_t)); |
| 5589 | stream->write(&packetSize_vkGetDescriptorSetLayoutSupport, sizeof(uint32_t)); |
| 5590 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5591 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 5592 | marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5593 | unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 5594 | } |
| 5595 | |
| 5596 | #endif |
| 5597 | #ifdef VK_KHR_surface |
| 5598 | void VkEncoder::vkDestroySurfaceKHR( |
| 5599 | VkInstance instance, |
| 5600 | VkSurfaceKHR surface, |
| 5601 | const VkAllocationCallbacks* pAllocator) |
| 5602 | { |
| 5603 | auto stream = mImpl->stream(); |
| 5604 | auto countingStream = mImpl->countingStream(); |
| 5605 | countingStream->rewind(); |
| 5606 | { |
| 5607 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 5608 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5609 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5610 | if (pAllocator) |
| 5611 | { |
| 5612 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5613 | } |
| 5614 | } |
| 5615 | uint32_t packetSize_vkDestroySurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5616 | countingStream->rewind(); |
| 5617 | uint32_t opcode_vkDestroySurfaceKHR = OP_vkDestroySurfaceKHR; |
| 5618 | stream->write(&opcode_vkDestroySurfaceKHR, sizeof(uint32_t)); |
| 5619 | stream->write(&packetSize_vkDestroySurfaceKHR, sizeof(uint32_t)); |
| 5620 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 5621 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5622 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5623 | if (pAllocator) |
| 5624 | { |
| 5625 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5626 | } |
| 5627 | } |
| 5628 | |
| 5629 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceSupportKHR( |
| 5630 | VkPhysicalDevice physicalDevice, |
| 5631 | uint32_t queueFamilyIndex, |
| 5632 | VkSurfaceKHR surface, |
| 5633 | VkBool32* pSupported) |
| 5634 | { |
| 5635 | auto stream = mImpl->stream(); |
| 5636 | auto countingStream = mImpl->countingStream(); |
| 5637 | countingStream->rewind(); |
| 5638 | { |
| 5639 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5640 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 5641 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5642 | countingStream->write((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5643 | } |
| 5644 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5645 | countingStream->rewind(); |
| 5646 | uint32_t opcode_vkGetPhysicalDeviceSurfaceSupportKHR = OP_vkGetPhysicalDeviceSurfaceSupportKHR; |
| 5647 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceSupportKHR, sizeof(uint32_t)); |
| 5648 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceSupportKHR, sizeof(uint32_t)); |
| 5649 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5650 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 5651 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5652 | stream->write((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5653 | stream->read((VkBool32*)pSupported, sizeof(VkBool32)); |
| 5654 | VkResult vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return = (VkResult)0; |
| 5655 | stream->read(&vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return, sizeof(VkResult)); |
| 5656 | return vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return; |
| 5657 | } |
| 5658 | |
| 5659 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 5660 | VkPhysicalDevice physicalDevice, |
| 5661 | VkSurfaceKHR surface, |
| 5662 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) |
| 5663 | { |
| 5664 | auto stream = mImpl->stream(); |
| 5665 | auto countingStream = mImpl->countingStream(); |
| 5666 | countingStream->rewind(); |
| 5667 | { |
| 5668 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5669 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5670 | marshal_VkSurfaceCapabilitiesKHR(countingStream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5671 | } |
| 5672 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5673 | countingStream->rewind(); |
| 5674 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = OP_vkGetPhysicalDeviceSurfaceCapabilitiesKHR; |
| 5675 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, sizeof(uint32_t)); |
| 5676 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, sizeof(uint32_t)); |
| 5677 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5678 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5679 | marshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5680 | unmarshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities)); |
| 5681 | VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 5682 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 5683 | return vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return; |
| 5684 | } |
| 5685 | |
| 5686 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 5687 | VkPhysicalDevice physicalDevice, |
| 5688 | VkSurfaceKHR surface, |
| 5689 | uint32_t* pSurfaceFormatCount, |
| 5690 | VkSurfaceFormatKHR* pSurfaceFormats) |
| 5691 | { |
| 5692 | auto stream = mImpl->stream(); |
| 5693 | auto countingStream = mImpl->countingStream(); |
| 5694 | countingStream->rewind(); |
| 5695 | { |
| 5696 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5697 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5698 | countingStream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5699 | if (pSurfaceFormatCount) |
| 5700 | { |
| 5701 | countingStream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5702 | } |
| 5703 | countingStream->write((VkSurfaceFormatKHR**)&pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5704 | if (pSurfaceFormats) |
| 5705 | { |
| 5706 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5707 | { |
| 5708 | marshal_VkSurfaceFormatKHR(countingStream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5709 | } |
| 5710 | } |
| 5711 | } |
| 5712 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceFormatsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5713 | countingStream->rewind(); |
| 5714 | uint32_t opcode_vkGetPhysicalDeviceSurfaceFormatsKHR = OP_vkGetPhysicalDeviceSurfaceFormatsKHR; |
| 5715 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceFormatsKHR, sizeof(uint32_t)); |
| 5716 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceFormatsKHR, sizeof(uint32_t)); |
| 5717 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5718 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5719 | stream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5720 | if (pSurfaceFormatCount) |
| 5721 | { |
| 5722 | stream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5723 | } |
| 5724 | stream->write((VkSurfaceFormatKHR**)&pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5725 | if (pSurfaceFormats) |
| 5726 | { |
| 5727 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5728 | { |
| 5729 | marshal_VkSurfaceFormatKHR(stream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5730 | } |
| 5731 | } |
| 5732 | uint32_t* check_pSurfaceFormatCount; |
| 5733 | stream->read((uint32_t**)&check_pSurfaceFormatCount, sizeof(uint32_t*)); |
| 5734 | if (pSurfaceFormatCount) |
| 5735 | { |
| 5736 | if (!(check_pSurfaceFormatCount)) |
| 5737 | { |
| 5738 | fprintf(stderr, "fatal: pSurfaceFormatCount inconsistent between guest and host\n"); |
| 5739 | } |
| 5740 | stream->read((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 5741 | } |
| 5742 | VkSurfaceFormatKHR* check_pSurfaceFormats; |
| 5743 | stream->read((VkSurfaceFormatKHR**)&check_pSurfaceFormats, sizeof(VkSurfaceFormatKHR*)); |
| 5744 | if (pSurfaceFormats) |
| 5745 | { |
| 5746 | if (!(check_pSurfaceFormats)) |
| 5747 | { |
| 5748 | fprintf(stderr, "fatal: pSurfaceFormats inconsistent between guest and host\n"); |
| 5749 | } |
| 5750 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 5751 | { |
| 5752 | unmarshal_VkSurfaceFormatKHR(stream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i)); |
| 5753 | } |
| 5754 | } |
| 5755 | VkResult vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return = (VkResult)0; |
| 5756 | stream->read(&vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return, sizeof(VkResult)); |
| 5757 | return vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return; |
| 5758 | } |
| 5759 | |
| 5760 | VkResult VkEncoder::vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 5761 | VkPhysicalDevice physicalDevice, |
| 5762 | VkSurfaceKHR surface, |
| 5763 | uint32_t* pPresentModeCount, |
| 5764 | VkPresentModeKHR* pPresentModes) |
| 5765 | { |
| 5766 | auto stream = mImpl->stream(); |
| 5767 | auto countingStream = mImpl->countingStream(); |
| 5768 | countingStream->rewind(); |
| 5769 | { |
| 5770 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5771 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5772 | countingStream->write((uint32_t**)&pPresentModeCount, sizeof(uint32_t*)); |
| 5773 | if (pPresentModeCount) |
| 5774 | { |
| 5775 | countingStream->write((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5776 | } |
| 5777 | countingStream->write((VkPresentModeKHR**)&pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5778 | if (pPresentModes) |
| 5779 | { |
| 5780 | countingStream->write((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5781 | } |
| 5782 | } |
| 5783 | uint32_t packetSize_vkGetPhysicalDeviceSurfacePresentModesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5784 | countingStream->rewind(); |
| 5785 | uint32_t opcode_vkGetPhysicalDeviceSurfacePresentModesKHR = OP_vkGetPhysicalDeviceSurfacePresentModesKHR; |
| 5786 | stream->write(&opcode_vkGetPhysicalDeviceSurfacePresentModesKHR, sizeof(uint32_t)); |
| 5787 | stream->write(&packetSize_vkGetPhysicalDeviceSurfacePresentModesKHR, sizeof(uint32_t)); |
| 5788 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 5789 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 5790 | stream->write((uint32_t**)&pPresentModeCount, sizeof(uint32_t*)); |
| 5791 | if (pPresentModeCount) |
| 5792 | { |
| 5793 | stream->write((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5794 | } |
| 5795 | stream->write((VkPresentModeKHR**)&pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5796 | if (pPresentModes) |
| 5797 | { |
| 5798 | stream->write((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5799 | } |
| 5800 | uint32_t* check_pPresentModeCount; |
| 5801 | stream->read((uint32_t**)&check_pPresentModeCount, sizeof(uint32_t*)); |
| 5802 | if (pPresentModeCount) |
| 5803 | { |
| 5804 | if (!(check_pPresentModeCount)) |
| 5805 | { |
| 5806 | fprintf(stderr, "fatal: pPresentModeCount inconsistent between guest and host\n"); |
| 5807 | } |
| 5808 | stream->read((uint32_t*)pPresentModeCount, sizeof(uint32_t)); |
| 5809 | } |
| 5810 | VkPresentModeKHR* check_pPresentModes; |
| 5811 | stream->read((VkPresentModeKHR**)&check_pPresentModes, sizeof(VkPresentModeKHR*)); |
| 5812 | if (pPresentModes) |
| 5813 | { |
| 5814 | if (!(check_pPresentModes)) |
| 5815 | { |
| 5816 | fprintf(stderr, "fatal: pPresentModes inconsistent between guest and host\n"); |
| 5817 | } |
| 5818 | stream->read((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR)); |
| 5819 | } |
| 5820 | VkResult vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return = (VkResult)0; |
| 5821 | stream->read(&vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return, sizeof(VkResult)); |
| 5822 | return vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return; |
| 5823 | } |
| 5824 | |
| 5825 | #endif |
| 5826 | #ifdef VK_KHR_swapchain |
| 5827 | VkResult VkEncoder::vkCreateSwapchainKHR( |
| 5828 | VkDevice device, |
| 5829 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
| 5830 | const VkAllocationCallbacks* pAllocator, |
| 5831 | VkSwapchainKHR* pSwapchain) |
| 5832 | { |
| 5833 | auto stream = mImpl->stream(); |
| 5834 | auto countingStream = mImpl->countingStream(); |
| 5835 | countingStream->rewind(); |
| 5836 | { |
| 5837 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5838 | marshal_VkSwapchainCreateInfoKHR(countingStream, (const VkSwapchainCreateInfoKHR*)(pCreateInfo)); |
| 5839 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5840 | if (pAllocator) |
| 5841 | { |
| 5842 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5843 | } |
| 5844 | countingStream->write((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5845 | } |
| 5846 | uint32_t packetSize_vkCreateSwapchainKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5847 | countingStream->rewind(); |
| 5848 | uint32_t opcode_vkCreateSwapchainKHR = OP_vkCreateSwapchainKHR; |
| 5849 | stream->write(&opcode_vkCreateSwapchainKHR, sizeof(uint32_t)); |
| 5850 | stream->write(&packetSize_vkCreateSwapchainKHR, sizeof(uint32_t)); |
| 5851 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5852 | marshal_VkSwapchainCreateInfoKHR(stream, (const VkSwapchainCreateInfoKHR*)(pCreateInfo)); |
| 5853 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5854 | if (pAllocator) |
| 5855 | { |
| 5856 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5857 | } |
| 5858 | stream->write((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5859 | stream->read((VkSwapchainKHR*)pSwapchain, sizeof(VkSwapchainKHR)); |
| 5860 | VkResult vkCreateSwapchainKHR_VkResult_return = (VkResult)0; |
| 5861 | stream->read(&vkCreateSwapchainKHR_VkResult_return, sizeof(VkResult)); |
| 5862 | return vkCreateSwapchainKHR_VkResult_return; |
| 5863 | } |
| 5864 | |
| 5865 | void VkEncoder::vkDestroySwapchainKHR( |
| 5866 | VkDevice device, |
| 5867 | VkSwapchainKHR swapchain, |
| 5868 | const VkAllocationCallbacks* pAllocator) |
| 5869 | { |
| 5870 | auto stream = mImpl->stream(); |
| 5871 | auto countingStream = mImpl->countingStream(); |
| 5872 | countingStream->rewind(); |
| 5873 | { |
| 5874 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5875 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5876 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5877 | if (pAllocator) |
| 5878 | { |
| 5879 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5880 | } |
| 5881 | } |
| 5882 | uint32_t packetSize_vkDestroySwapchainKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5883 | countingStream->rewind(); |
| 5884 | uint32_t opcode_vkDestroySwapchainKHR = OP_vkDestroySwapchainKHR; |
| 5885 | stream->write(&opcode_vkDestroySwapchainKHR, sizeof(uint32_t)); |
| 5886 | stream->write(&packetSize_vkDestroySwapchainKHR, sizeof(uint32_t)); |
| 5887 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5888 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5889 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 5890 | if (pAllocator) |
| 5891 | { |
| 5892 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 5893 | } |
| 5894 | } |
| 5895 | |
| 5896 | VkResult VkEncoder::vkGetSwapchainImagesKHR( |
| 5897 | VkDevice device, |
| 5898 | VkSwapchainKHR swapchain, |
| 5899 | uint32_t* pSwapchainImageCount, |
| 5900 | VkImage* pSwapchainImages) |
| 5901 | { |
| 5902 | auto stream = mImpl->stream(); |
| 5903 | auto countingStream = mImpl->countingStream(); |
| 5904 | countingStream->rewind(); |
| 5905 | { |
| 5906 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5907 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5908 | countingStream->write((uint32_t**)&pSwapchainImageCount, sizeof(uint32_t*)); |
| 5909 | if (pSwapchainImageCount) |
| 5910 | { |
| 5911 | countingStream->write((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5912 | } |
| 5913 | countingStream->write((VkImage**)&pSwapchainImages, sizeof(VkImage*)); |
| 5914 | if (pSwapchainImages) |
| 5915 | { |
| 5916 | countingStream->write((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5917 | } |
| 5918 | } |
| 5919 | uint32_t packetSize_vkGetSwapchainImagesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5920 | countingStream->rewind(); |
| 5921 | uint32_t opcode_vkGetSwapchainImagesKHR = OP_vkGetSwapchainImagesKHR; |
| 5922 | stream->write(&opcode_vkGetSwapchainImagesKHR, sizeof(uint32_t)); |
| 5923 | stream->write(&packetSize_vkGetSwapchainImagesKHR, sizeof(uint32_t)); |
| 5924 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5925 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5926 | stream->write((uint32_t**)&pSwapchainImageCount, sizeof(uint32_t*)); |
| 5927 | if (pSwapchainImageCount) |
| 5928 | { |
| 5929 | stream->write((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5930 | } |
| 5931 | stream->write((VkImage**)&pSwapchainImages, sizeof(VkImage*)); |
| 5932 | if (pSwapchainImages) |
| 5933 | { |
| 5934 | stream->write((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5935 | } |
| 5936 | uint32_t* check_pSwapchainImageCount; |
| 5937 | stream->read((uint32_t**)&check_pSwapchainImageCount, sizeof(uint32_t*)); |
| 5938 | if (pSwapchainImageCount) |
| 5939 | { |
| 5940 | if (!(check_pSwapchainImageCount)) |
| 5941 | { |
| 5942 | fprintf(stderr, "fatal: pSwapchainImageCount inconsistent between guest and host\n"); |
| 5943 | } |
| 5944 | stream->read((uint32_t*)pSwapchainImageCount, sizeof(uint32_t)); |
| 5945 | } |
| 5946 | VkImage* check_pSwapchainImages; |
| 5947 | stream->read((VkImage**)&check_pSwapchainImages, sizeof(VkImage*)); |
| 5948 | if (pSwapchainImages) |
| 5949 | { |
| 5950 | if (!(check_pSwapchainImages)) |
| 5951 | { |
| 5952 | fprintf(stderr, "fatal: pSwapchainImages inconsistent between guest and host\n"); |
| 5953 | } |
| 5954 | stream->read((VkImage*)pSwapchainImages, (*(pSwapchainImageCount)) * sizeof(VkImage)); |
| 5955 | } |
| 5956 | VkResult vkGetSwapchainImagesKHR_VkResult_return = (VkResult)0; |
| 5957 | stream->read(&vkGetSwapchainImagesKHR_VkResult_return, sizeof(VkResult)); |
| 5958 | return vkGetSwapchainImagesKHR_VkResult_return; |
| 5959 | } |
| 5960 | |
| 5961 | VkResult VkEncoder::vkAcquireNextImageKHR( |
| 5962 | VkDevice device, |
| 5963 | VkSwapchainKHR swapchain, |
| 5964 | uint64_t timeout, |
| 5965 | VkSemaphore semaphore, |
| 5966 | VkFence fence, |
| 5967 | uint32_t* pImageIndex) |
| 5968 | { |
| 5969 | auto stream = mImpl->stream(); |
| 5970 | auto countingStream = mImpl->countingStream(); |
| 5971 | countingStream->rewind(); |
| 5972 | { |
| 5973 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5974 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5975 | countingStream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 5976 | countingStream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 5977 | countingStream->write((VkFence*)&fence, sizeof(VkFence)); |
| 5978 | countingStream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 5979 | } |
| 5980 | uint32_t packetSize_vkAcquireNextImageKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 5981 | countingStream->rewind(); |
| 5982 | uint32_t opcode_vkAcquireNextImageKHR = OP_vkAcquireNextImageKHR; |
| 5983 | stream->write(&opcode_vkAcquireNextImageKHR, sizeof(uint32_t)); |
| 5984 | stream->write(&packetSize_vkAcquireNextImageKHR, sizeof(uint32_t)); |
| 5985 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 5986 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 5987 | stream->write((uint64_t*)&timeout, sizeof(uint64_t)); |
| 5988 | stream->write((VkSemaphore*)&semaphore, sizeof(VkSemaphore)); |
| 5989 | stream->write((VkFence*)&fence, sizeof(VkFence)); |
| 5990 | stream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 5991 | stream->read((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 5992 | VkResult vkAcquireNextImageKHR_VkResult_return = (VkResult)0; |
| 5993 | stream->read(&vkAcquireNextImageKHR_VkResult_return, sizeof(VkResult)); |
| 5994 | return vkAcquireNextImageKHR_VkResult_return; |
| 5995 | } |
| 5996 | |
| 5997 | VkResult VkEncoder::vkQueuePresentKHR( |
| 5998 | VkQueue queue, |
| 5999 | const VkPresentInfoKHR* pPresentInfo) |
| 6000 | { |
| 6001 | auto stream = mImpl->stream(); |
| 6002 | auto countingStream = mImpl->countingStream(); |
| 6003 | countingStream->rewind(); |
| 6004 | { |
| 6005 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 6006 | marshal_VkPresentInfoKHR(countingStream, (const VkPresentInfoKHR*)(pPresentInfo)); |
| 6007 | } |
| 6008 | uint32_t packetSize_vkQueuePresentKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6009 | countingStream->rewind(); |
| 6010 | uint32_t opcode_vkQueuePresentKHR = OP_vkQueuePresentKHR; |
| 6011 | stream->write(&opcode_vkQueuePresentKHR, sizeof(uint32_t)); |
| 6012 | stream->write(&packetSize_vkQueuePresentKHR, sizeof(uint32_t)); |
| 6013 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 6014 | marshal_VkPresentInfoKHR(stream, (const VkPresentInfoKHR*)(pPresentInfo)); |
| 6015 | VkResult vkQueuePresentKHR_VkResult_return = (VkResult)0; |
| 6016 | stream->read(&vkQueuePresentKHR_VkResult_return, sizeof(VkResult)); |
| 6017 | return vkQueuePresentKHR_VkResult_return; |
| 6018 | } |
| 6019 | |
| 6020 | VkResult VkEncoder::vkGetDeviceGroupPresentCapabilitiesKHR( |
| 6021 | VkDevice device, |
| 6022 | VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) |
| 6023 | { |
| 6024 | auto stream = mImpl->stream(); |
| 6025 | auto countingStream = mImpl->countingStream(); |
| 6026 | countingStream->rewind(); |
| 6027 | { |
| 6028 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6029 | marshal_VkDeviceGroupPresentCapabilitiesKHR(countingStream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6030 | } |
| 6031 | uint32_t packetSize_vkGetDeviceGroupPresentCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6032 | countingStream->rewind(); |
| 6033 | uint32_t opcode_vkGetDeviceGroupPresentCapabilitiesKHR = OP_vkGetDeviceGroupPresentCapabilitiesKHR; |
| 6034 | stream->write(&opcode_vkGetDeviceGroupPresentCapabilitiesKHR, sizeof(uint32_t)); |
| 6035 | stream->write(&packetSize_vkGetDeviceGroupPresentCapabilitiesKHR, sizeof(uint32_t)); |
| 6036 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6037 | marshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6038 | unmarshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities)); |
| 6039 | VkResult vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 6040 | stream->read(&vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 6041 | return vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return; |
| 6042 | } |
| 6043 | |
| 6044 | VkResult VkEncoder::vkGetDeviceGroupSurfacePresentModesKHR( |
| 6045 | VkDevice device, |
| 6046 | VkSurfaceKHR surface, |
| 6047 | VkDeviceGroupPresentModeFlagsKHR* pModes) |
| 6048 | { |
| 6049 | auto stream = mImpl->stream(); |
| 6050 | auto countingStream = mImpl->countingStream(); |
| 6051 | countingStream->rewind(); |
| 6052 | { |
| 6053 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6054 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6055 | countingStream->write((VkDeviceGroupPresentModeFlagsKHR**)&pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6056 | if (pModes) |
| 6057 | { |
| 6058 | countingStream->write((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6059 | } |
| 6060 | } |
| 6061 | uint32_t packetSize_vkGetDeviceGroupSurfacePresentModesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6062 | countingStream->rewind(); |
| 6063 | uint32_t opcode_vkGetDeviceGroupSurfacePresentModesKHR = OP_vkGetDeviceGroupSurfacePresentModesKHR; |
| 6064 | stream->write(&opcode_vkGetDeviceGroupSurfacePresentModesKHR, sizeof(uint32_t)); |
| 6065 | stream->write(&packetSize_vkGetDeviceGroupSurfacePresentModesKHR, sizeof(uint32_t)); |
| 6066 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6067 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6068 | stream->write((VkDeviceGroupPresentModeFlagsKHR**)&pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6069 | if (pModes) |
| 6070 | { |
| 6071 | stream->write((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6072 | } |
| 6073 | VkDeviceGroupPresentModeFlagsKHR* check_pModes; |
| 6074 | stream->read((VkDeviceGroupPresentModeFlagsKHR**)&check_pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR*)); |
| 6075 | if (pModes) |
| 6076 | { |
| 6077 | if (!(check_pModes)) |
| 6078 | { |
| 6079 | fprintf(stderr, "fatal: pModes inconsistent between guest and host\n"); |
| 6080 | } |
| 6081 | stream->read((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); |
| 6082 | } |
| 6083 | VkResult vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return = (VkResult)0; |
| 6084 | stream->read(&vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return, sizeof(VkResult)); |
| 6085 | return vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return; |
| 6086 | } |
| 6087 | |
| 6088 | VkResult VkEncoder::vkGetPhysicalDevicePresentRectanglesKHR( |
| 6089 | VkPhysicalDevice physicalDevice, |
| 6090 | VkSurfaceKHR surface, |
| 6091 | uint32_t* pRectCount, |
| 6092 | VkRect2D* pRects) |
| 6093 | { |
| 6094 | auto stream = mImpl->stream(); |
| 6095 | auto countingStream = mImpl->countingStream(); |
| 6096 | countingStream->rewind(); |
| 6097 | { |
| 6098 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6099 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6100 | countingStream->write((uint32_t**)&pRectCount, sizeof(uint32_t*)); |
| 6101 | if (pRectCount) |
| 6102 | { |
| 6103 | countingStream->write((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6104 | } |
| 6105 | countingStream->write((VkRect2D**)&pRects, sizeof(VkRect2D*)); |
| 6106 | if (pRects) |
| 6107 | { |
| 6108 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6109 | { |
| 6110 | marshal_VkRect2D(countingStream, (VkRect2D*)(pRects + i)); |
| 6111 | } |
| 6112 | } |
| 6113 | } |
| 6114 | uint32_t packetSize_vkGetPhysicalDevicePresentRectanglesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6115 | countingStream->rewind(); |
| 6116 | uint32_t opcode_vkGetPhysicalDevicePresentRectanglesKHR = OP_vkGetPhysicalDevicePresentRectanglesKHR; |
| 6117 | stream->write(&opcode_vkGetPhysicalDevicePresentRectanglesKHR, sizeof(uint32_t)); |
| 6118 | stream->write(&packetSize_vkGetPhysicalDevicePresentRectanglesKHR, sizeof(uint32_t)); |
| 6119 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6120 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 6121 | stream->write((uint32_t**)&pRectCount, sizeof(uint32_t*)); |
| 6122 | if (pRectCount) |
| 6123 | { |
| 6124 | stream->write((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6125 | } |
| 6126 | stream->write((VkRect2D**)&pRects, sizeof(VkRect2D*)); |
| 6127 | if (pRects) |
| 6128 | { |
| 6129 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6130 | { |
| 6131 | marshal_VkRect2D(stream, (VkRect2D*)(pRects + i)); |
| 6132 | } |
| 6133 | } |
| 6134 | uint32_t* check_pRectCount; |
| 6135 | stream->read((uint32_t**)&check_pRectCount, sizeof(uint32_t*)); |
| 6136 | if (pRectCount) |
| 6137 | { |
| 6138 | if (!(check_pRectCount)) |
| 6139 | { |
| 6140 | fprintf(stderr, "fatal: pRectCount inconsistent between guest and host\n"); |
| 6141 | } |
| 6142 | stream->read((uint32_t*)pRectCount, sizeof(uint32_t)); |
| 6143 | } |
| 6144 | VkRect2D* check_pRects; |
| 6145 | stream->read((VkRect2D**)&check_pRects, sizeof(VkRect2D*)); |
| 6146 | if (pRects) |
| 6147 | { |
| 6148 | if (!(check_pRects)) |
| 6149 | { |
| 6150 | fprintf(stderr, "fatal: pRects inconsistent between guest and host\n"); |
| 6151 | } |
| 6152 | for (uint32_t i = 0; i < (uint32_t)(*(pRectCount)); ++i) |
| 6153 | { |
| 6154 | unmarshal_VkRect2D(stream, (VkRect2D*)(pRects + i)); |
| 6155 | } |
| 6156 | } |
| 6157 | VkResult vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return = (VkResult)0; |
| 6158 | stream->read(&vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return, sizeof(VkResult)); |
| 6159 | return vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return; |
| 6160 | } |
| 6161 | |
| 6162 | VkResult VkEncoder::vkAcquireNextImage2KHR( |
| 6163 | VkDevice device, |
| 6164 | const VkAcquireNextImageInfoKHR* pAcquireInfo, |
| 6165 | uint32_t* pImageIndex) |
| 6166 | { |
| 6167 | auto stream = mImpl->stream(); |
| 6168 | auto countingStream = mImpl->countingStream(); |
| 6169 | countingStream->rewind(); |
| 6170 | { |
| 6171 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6172 | marshal_VkAcquireNextImageInfoKHR(countingStream, (const VkAcquireNextImageInfoKHR*)(pAcquireInfo)); |
| 6173 | countingStream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6174 | } |
| 6175 | uint32_t packetSize_vkAcquireNextImage2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6176 | countingStream->rewind(); |
| 6177 | uint32_t opcode_vkAcquireNextImage2KHR = OP_vkAcquireNextImage2KHR; |
| 6178 | stream->write(&opcode_vkAcquireNextImage2KHR, sizeof(uint32_t)); |
| 6179 | stream->write(&packetSize_vkAcquireNextImage2KHR, sizeof(uint32_t)); |
| 6180 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6181 | marshal_VkAcquireNextImageInfoKHR(stream, (const VkAcquireNextImageInfoKHR*)(pAcquireInfo)); |
| 6182 | stream->write((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6183 | stream->read((uint32_t*)pImageIndex, sizeof(uint32_t)); |
| 6184 | VkResult vkAcquireNextImage2KHR_VkResult_return = (VkResult)0; |
| 6185 | stream->read(&vkAcquireNextImage2KHR_VkResult_return, sizeof(VkResult)); |
| 6186 | return vkAcquireNextImage2KHR_VkResult_return; |
| 6187 | } |
| 6188 | |
| 6189 | #endif |
| 6190 | #ifdef VK_KHR_display |
| 6191 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 6192 | VkPhysicalDevice physicalDevice, |
| 6193 | uint32_t* pPropertyCount, |
| 6194 | VkDisplayPropertiesKHR* pProperties) |
| 6195 | { |
| 6196 | auto stream = mImpl->stream(); |
| 6197 | auto countingStream = mImpl->countingStream(); |
| 6198 | countingStream->rewind(); |
| 6199 | { |
| 6200 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6201 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6202 | if (pPropertyCount) |
| 6203 | { |
| 6204 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6205 | } |
| 6206 | countingStream->write((VkDisplayPropertiesKHR**)&pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6207 | if (pProperties) |
| 6208 | { |
| 6209 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6210 | { |
| 6211 | marshal_VkDisplayPropertiesKHR(countingStream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6212 | } |
| 6213 | } |
| 6214 | } |
| 6215 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6216 | countingStream->rewind(); |
| 6217 | uint32_t opcode_vkGetPhysicalDeviceDisplayPropertiesKHR = OP_vkGetPhysicalDeviceDisplayPropertiesKHR; |
| 6218 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPropertiesKHR, sizeof(uint32_t)); |
| 6219 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPropertiesKHR, sizeof(uint32_t)); |
| 6220 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6221 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6222 | if (pPropertyCount) |
| 6223 | { |
| 6224 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6225 | } |
| 6226 | stream->write((VkDisplayPropertiesKHR**)&pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6227 | if (pProperties) |
| 6228 | { |
| 6229 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6230 | { |
| 6231 | marshal_VkDisplayPropertiesKHR(stream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6232 | } |
| 6233 | } |
| 6234 | uint32_t* check_pPropertyCount; |
| 6235 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6236 | if (pPropertyCount) |
| 6237 | { |
| 6238 | if (!(check_pPropertyCount)) |
| 6239 | { |
| 6240 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6241 | } |
| 6242 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6243 | } |
| 6244 | VkDisplayPropertiesKHR* check_pProperties; |
| 6245 | stream->read((VkDisplayPropertiesKHR**)&check_pProperties, sizeof(VkDisplayPropertiesKHR*)); |
| 6246 | if (pProperties) |
| 6247 | { |
| 6248 | if (!(check_pProperties)) |
| 6249 | { |
| 6250 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6251 | } |
| 6252 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6253 | { |
| 6254 | unmarshal_VkDisplayPropertiesKHR(stream, (VkDisplayPropertiesKHR*)(pProperties + i)); |
| 6255 | } |
| 6256 | } |
| 6257 | VkResult vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return = (VkResult)0; |
| 6258 | stream->read(&vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6259 | return vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return; |
| 6260 | } |
| 6261 | |
| 6262 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 6263 | VkPhysicalDevice physicalDevice, |
| 6264 | uint32_t* pPropertyCount, |
| 6265 | VkDisplayPlanePropertiesKHR* pProperties) |
| 6266 | { |
| 6267 | auto stream = mImpl->stream(); |
| 6268 | auto countingStream = mImpl->countingStream(); |
| 6269 | countingStream->rewind(); |
| 6270 | { |
| 6271 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6272 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6273 | if (pPropertyCount) |
| 6274 | { |
| 6275 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6276 | } |
| 6277 | countingStream->write((VkDisplayPlanePropertiesKHR**)&pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6278 | if (pProperties) |
| 6279 | { |
| 6280 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6281 | { |
| 6282 | marshal_VkDisplayPlanePropertiesKHR(countingStream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6283 | } |
| 6284 | } |
| 6285 | } |
| 6286 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6287 | countingStream->rewind(); |
| 6288 | uint32_t opcode_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = OP_vkGetPhysicalDeviceDisplayPlanePropertiesKHR; |
| 6289 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, sizeof(uint32_t)); |
| 6290 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, sizeof(uint32_t)); |
| 6291 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6292 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6293 | if (pPropertyCount) |
| 6294 | { |
| 6295 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6296 | } |
| 6297 | stream->write((VkDisplayPlanePropertiesKHR**)&pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6298 | if (pProperties) |
| 6299 | { |
| 6300 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6301 | { |
| 6302 | marshal_VkDisplayPlanePropertiesKHR(stream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6303 | } |
| 6304 | } |
| 6305 | uint32_t* check_pPropertyCount; |
| 6306 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6307 | if (pPropertyCount) |
| 6308 | { |
| 6309 | if (!(check_pPropertyCount)) |
| 6310 | { |
| 6311 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6312 | } |
| 6313 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6314 | } |
| 6315 | VkDisplayPlanePropertiesKHR* check_pProperties; |
| 6316 | stream->read((VkDisplayPlanePropertiesKHR**)&check_pProperties, sizeof(VkDisplayPlanePropertiesKHR*)); |
| 6317 | if (pProperties) |
| 6318 | { |
| 6319 | if (!(check_pProperties)) |
| 6320 | { |
| 6321 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6322 | } |
| 6323 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6324 | { |
| 6325 | unmarshal_VkDisplayPlanePropertiesKHR(stream, (VkDisplayPlanePropertiesKHR*)(pProperties + i)); |
| 6326 | } |
| 6327 | } |
| 6328 | VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return = (VkResult)0; |
| 6329 | stream->read(&vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6330 | return vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return; |
| 6331 | } |
| 6332 | |
| 6333 | VkResult VkEncoder::vkGetDisplayPlaneSupportedDisplaysKHR( |
| 6334 | VkPhysicalDevice physicalDevice, |
| 6335 | uint32_t planeIndex, |
| 6336 | uint32_t* pDisplayCount, |
| 6337 | VkDisplayKHR* pDisplays) |
| 6338 | { |
| 6339 | auto stream = mImpl->stream(); |
| 6340 | auto countingStream = mImpl->countingStream(); |
| 6341 | countingStream->rewind(); |
| 6342 | { |
| 6343 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6344 | countingStream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6345 | countingStream->write((uint32_t**)&pDisplayCount, sizeof(uint32_t*)); |
| 6346 | if (pDisplayCount) |
| 6347 | { |
| 6348 | countingStream->write((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6349 | } |
| 6350 | countingStream->write((VkDisplayKHR**)&pDisplays, sizeof(VkDisplayKHR*)); |
| 6351 | if (pDisplays) |
| 6352 | { |
| 6353 | countingStream->write((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6354 | } |
| 6355 | } |
| 6356 | uint32_t packetSize_vkGetDisplayPlaneSupportedDisplaysKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6357 | countingStream->rewind(); |
| 6358 | uint32_t opcode_vkGetDisplayPlaneSupportedDisplaysKHR = OP_vkGetDisplayPlaneSupportedDisplaysKHR; |
| 6359 | stream->write(&opcode_vkGetDisplayPlaneSupportedDisplaysKHR, sizeof(uint32_t)); |
| 6360 | stream->write(&packetSize_vkGetDisplayPlaneSupportedDisplaysKHR, sizeof(uint32_t)); |
| 6361 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6362 | stream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6363 | stream->write((uint32_t**)&pDisplayCount, sizeof(uint32_t*)); |
| 6364 | if (pDisplayCount) |
| 6365 | { |
| 6366 | stream->write((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6367 | } |
| 6368 | stream->write((VkDisplayKHR**)&pDisplays, sizeof(VkDisplayKHR*)); |
| 6369 | if (pDisplays) |
| 6370 | { |
| 6371 | stream->write((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6372 | } |
| 6373 | uint32_t* check_pDisplayCount; |
| 6374 | stream->read((uint32_t**)&check_pDisplayCount, sizeof(uint32_t*)); |
| 6375 | if (pDisplayCount) |
| 6376 | { |
| 6377 | if (!(check_pDisplayCount)) |
| 6378 | { |
| 6379 | fprintf(stderr, "fatal: pDisplayCount inconsistent between guest and host\n"); |
| 6380 | } |
| 6381 | stream->read((uint32_t*)pDisplayCount, sizeof(uint32_t)); |
| 6382 | } |
| 6383 | VkDisplayKHR* check_pDisplays; |
| 6384 | stream->read((VkDisplayKHR**)&check_pDisplays, sizeof(VkDisplayKHR*)); |
| 6385 | if (pDisplays) |
| 6386 | { |
| 6387 | if (!(check_pDisplays)) |
| 6388 | { |
| 6389 | fprintf(stderr, "fatal: pDisplays inconsistent between guest and host\n"); |
| 6390 | } |
| 6391 | stream->read((VkDisplayKHR*)pDisplays, (*(pDisplayCount)) * sizeof(VkDisplayKHR)); |
| 6392 | } |
| 6393 | VkResult vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return = (VkResult)0; |
| 6394 | stream->read(&vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return, sizeof(VkResult)); |
| 6395 | return vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return; |
| 6396 | } |
| 6397 | |
| 6398 | VkResult VkEncoder::vkGetDisplayModePropertiesKHR( |
| 6399 | VkPhysicalDevice physicalDevice, |
| 6400 | VkDisplayKHR display, |
| 6401 | uint32_t* pPropertyCount, |
| 6402 | VkDisplayModePropertiesKHR* pProperties) |
| 6403 | { |
| 6404 | auto stream = mImpl->stream(); |
| 6405 | auto countingStream = mImpl->countingStream(); |
| 6406 | countingStream->rewind(); |
| 6407 | { |
| 6408 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6409 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6410 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6411 | if (pPropertyCount) |
| 6412 | { |
| 6413 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6414 | } |
| 6415 | countingStream->write((VkDisplayModePropertiesKHR**)&pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6416 | if (pProperties) |
| 6417 | { |
| 6418 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6419 | { |
| 6420 | marshal_VkDisplayModePropertiesKHR(countingStream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6421 | } |
| 6422 | } |
| 6423 | } |
| 6424 | uint32_t packetSize_vkGetDisplayModePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6425 | countingStream->rewind(); |
| 6426 | uint32_t opcode_vkGetDisplayModePropertiesKHR = OP_vkGetDisplayModePropertiesKHR; |
| 6427 | stream->write(&opcode_vkGetDisplayModePropertiesKHR, sizeof(uint32_t)); |
| 6428 | stream->write(&packetSize_vkGetDisplayModePropertiesKHR, sizeof(uint32_t)); |
| 6429 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6430 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6431 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 6432 | if (pPropertyCount) |
| 6433 | { |
| 6434 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6435 | } |
| 6436 | stream->write((VkDisplayModePropertiesKHR**)&pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6437 | if (pProperties) |
| 6438 | { |
| 6439 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6440 | { |
| 6441 | marshal_VkDisplayModePropertiesKHR(stream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6442 | } |
| 6443 | } |
| 6444 | uint32_t* check_pPropertyCount; |
| 6445 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 6446 | if (pPropertyCount) |
| 6447 | { |
| 6448 | if (!(check_pPropertyCount)) |
| 6449 | { |
| 6450 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 6451 | } |
| 6452 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 6453 | } |
| 6454 | VkDisplayModePropertiesKHR* check_pProperties; |
| 6455 | stream->read((VkDisplayModePropertiesKHR**)&check_pProperties, sizeof(VkDisplayModePropertiesKHR*)); |
| 6456 | if (pProperties) |
| 6457 | { |
| 6458 | if (!(check_pProperties)) |
| 6459 | { |
| 6460 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 6461 | } |
| 6462 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 6463 | { |
| 6464 | unmarshal_VkDisplayModePropertiesKHR(stream, (VkDisplayModePropertiesKHR*)(pProperties + i)); |
| 6465 | } |
| 6466 | } |
| 6467 | VkResult vkGetDisplayModePropertiesKHR_VkResult_return = (VkResult)0; |
| 6468 | stream->read(&vkGetDisplayModePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 6469 | return vkGetDisplayModePropertiesKHR_VkResult_return; |
| 6470 | } |
| 6471 | |
| 6472 | VkResult VkEncoder::vkCreateDisplayModeKHR( |
| 6473 | VkPhysicalDevice physicalDevice, |
| 6474 | VkDisplayKHR display, |
| 6475 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
| 6476 | const VkAllocationCallbacks* pAllocator, |
| 6477 | VkDisplayModeKHR* pMode) |
| 6478 | { |
| 6479 | auto stream = mImpl->stream(); |
| 6480 | auto countingStream = mImpl->countingStream(); |
| 6481 | countingStream->rewind(); |
| 6482 | { |
| 6483 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6484 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6485 | marshal_VkDisplayModeCreateInfoKHR(countingStream, (const VkDisplayModeCreateInfoKHR*)(pCreateInfo)); |
| 6486 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6487 | if (pAllocator) |
| 6488 | { |
| 6489 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6490 | } |
| 6491 | countingStream->write((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6492 | } |
| 6493 | uint32_t packetSize_vkCreateDisplayModeKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6494 | countingStream->rewind(); |
| 6495 | uint32_t opcode_vkCreateDisplayModeKHR = OP_vkCreateDisplayModeKHR; |
| 6496 | stream->write(&opcode_vkCreateDisplayModeKHR, sizeof(uint32_t)); |
| 6497 | stream->write(&packetSize_vkCreateDisplayModeKHR, sizeof(uint32_t)); |
| 6498 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6499 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 6500 | marshal_VkDisplayModeCreateInfoKHR(stream, (const VkDisplayModeCreateInfoKHR*)(pCreateInfo)); |
| 6501 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6502 | if (pAllocator) |
| 6503 | { |
| 6504 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6505 | } |
| 6506 | stream->write((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6507 | stream->read((VkDisplayModeKHR*)pMode, sizeof(VkDisplayModeKHR)); |
| 6508 | VkResult vkCreateDisplayModeKHR_VkResult_return = (VkResult)0; |
| 6509 | stream->read(&vkCreateDisplayModeKHR_VkResult_return, sizeof(VkResult)); |
| 6510 | return vkCreateDisplayModeKHR_VkResult_return; |
| 6511 | } |
| 6512 | |
| 6513 | VkResult VkEncoder::vkGetDisplayPlaneCapabilitiesKHR( |
| 6514 | VkPhysicalDevice physicalDevice, |
| 6515 | VkDisplayModeKHR mode, |
| 6516 | uint32_t planeIndex, |
| 6517 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) |
| 6518 | { |
| 6519 | auto stream = mImpl->stream(); |
| 6520 | auto countingStream = mImpl->countingStream(); |
| 6521 | countingStream->rewind(); |
| 6522 | { |
| 6523 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6524 | countingStream->write((VkDisplayModeKHR*)&mode, sizeof(VkDisplayModeKHR)); |
| 6525 | countingStream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6526 | marshal_VkDisplayPlaneCapabilitiesKHR(countingStream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6527 | } |
| 6528 | uint32_t packetSize_vkGetDisplayPlaneCapabilitiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6529 | countingStream->rewind(); |
| 6530 | uint32_t opcode_vkGetDisplayPlaneCapabilitiesKHR = OP_vkGetDisplayPlaneCapabilitiesKHR; |
| 6531 | stream->write(&opcode_vkGetDisplayPlaneCapabilitiesKHR, sizeof(uint32_t)); |
| 6532 | stream->write(&packetSize_vkGetDisplayPlaneCapabilitiesKHR, sizeof(uint32_t)); |
| 6533 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6534 | stream->write((VkDisplayModeKHR*)&mode, sizeof(VkDisplayModeKHR)); |
| 6535 | stream->write((uint32_t*)&planeIndex, sizeof(uint32_t)); |
| 6536 | marshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6537 | unmarshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities)); |
| 6538 | VkResult vkGetDisplayPlaneCapabilitiesKHR_VkResult_return = (VkResult)0; |
| 6539 | stream->read(&vkGetDisplayPlaneCapabilitiesKHR_VkResult_return, sizeof(VkResult)); |
| 6540 | return vkGetDisplayPlaneCapabilitiesKHR_VkResult_return; |
| 6541 | } |
| 6542 | |
| 6543 | VkResult VkEncoder::vkCreateDisplayPlaneSurfaceKHR( |
| 6544 | VkInstance instance, |
| 6545 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
| 6546 | const VkAllocationCallbacks* pAllocator, |
| 6547 | VkSurfaceKHR* pSurface) |
| 6548 | { |
| 6549 | auto stream = mImpl->stream(); |
| 6550 | auto countingStream = mImpl->countingStream(); |
| 6551 | countingStream->rewind(); |
| 6552 | { |
| 6553 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6554 | marshal_VkDisplaySurfaceCreateInfoKHR(countingStream, (const VkDisplaySurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6555 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6556 | if (pAllocator) |
| 6557 | { |
| 6558 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6559 | } |
| 6560 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6561 | } |
| 6562 | uint32_t packetSize_vkCreateDisplayPlaneSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6563 | countingStream->rewind(); |
| 6564 | uint32_t opcode_vkCreateDisplayPlaneSurfaceKHR = OP_vkCreateDisplayPlaneSurfaceKHR; |
| 6565 | stream->write(&opcode_vkCreateDisplayPlaneSurfaceKHR, sizeof(uint32_t)); |
| 6566 | stream->write(&packetSize_vkCreateDisplayPlaneSurfaceKHR, sizeof(uint32_t)); |
| 6567 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6568 | marshal_VkDisplaySurfaceCreateInfoKHR(stream, (const VkDisplaySurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6569 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6570 | if (pAllocator) |
| 6571 | { |
| 6572 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6573 | } |
| 6574 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6575 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6576 | VkResult vkCreateDisplayPlaneSurfaceKHR_VkResult_return = (VkResult)0; |
| 6577 | stream->read(&vkCreateDisplayPlaneSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6578 | return vkCreateDisplayPlaneSurfaceKHR_VkResult_return; |
| 6579 | } |
| 6580 | |
| 6581 | #endif |
| 6582 | #ifdef VK_KHR_display_swapchain |
| 6583 | VkResult VkEncoder::vkCreateSharedSwapchainsKHR( |
| 6584 | VkDevice device, |
| 6585 | uint32_t swapchainCount, |
| 6586 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 6587 | const VkAllocationCallbacks* pAllocator, |
| 6588 | VkSwapchainKHR* pSwapchains) |
| 6589 | { |
| 6590 | auto stream = mImpl->stream(); |
| 6591 | auto countingStream = mImpl->countingStream(); |
| 6592 | countingStream->rewind(); |
| 6593 | { |
| 6594 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6595 | countingStream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 6596 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 6597 | { |
| 6598 | marshal_VkSwapchainCreateInfoKHR(countingStream, (const VkSwapchainCreateInfoKHR*)(pCreateInfos + i)); |
| 6599 | } |
| 6600 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6601 | if (pAllocator) |
| 6602 | { |
| 6603 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6604 | } |
| 6605 | countingStream->write((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6606 | } |
| 6607 | uint32_t packetSize_vkCreateSharedSwapchainsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6608 | countingStream->rewind(); |
| 6609 | uint32_t opcode_vkCreateSharedSwapchainsKHR = OP_vkCreateSharedSwapchainsKHR; |
| 6610 | stream->write(&opcode_vkCreateSharedSwapchainsKHR, sizeof(uint32_t)); |
| 6611 | stream->write(&packetSize_vkCreateSharedSwapchainsKHR, sizeof(uint32_t)); |
| 6612 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 6613 | stream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 6614 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 6615 | { |
| 6616 | marshal_VkSwapchainCreateInfoKHR(stream, (const VkSwapchainCreateInfoKHR*)(pCreateInfos + i)); |
| 6617 | } |
| 6618 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6619 | if (pAllocator) |
| 6620 | { |
| 6621 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6622 | } |
| 6623 | stream->write((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6624 | stream->read((VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(VkSwapchainKHR)); |
| 6625 | VkResult vkCreateSharedSwapchainsKHR_VkResult_return = (VkResult)0; |
| 6626 | stream->read(&vkCreateSharedSwapchainsKHR_VkResult_return, sizeof(VkResult)); |
| 6627 | return vkCreateSharedSwapchainsKHR_VkResult_return; |
| 6628 | } |
| 6629 | |
| 6630 | #endif |
| 6631 | #ifdef VK_KHR_xlib_surface |
| 6632 | VkResult VkEncoder::vkCreateXlibSurfaceKHR( |
| 6633 | VkInstance instance, |
| 6634 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
| 6635 | const VkAllocationCallbacks* pAllocator, |
| 6636 | VkSurfaceKHR* pSurface) |
| 6637 | { |
| 6638 | auto stream = mImpl->stream(); |
| 6639 | auto countingStream = mImpl->countingStream(); |
| 6640 | countingStream->rewind(); |
| 6641 | { |
| 6642 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6643 | marshal_VkXlibSurfaceCreateInfoKHR(countingStream, (const VkXlibSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6644 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6645 | if (pAllocator) |
| 6646 | { |
| 6647 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6648 | } |
| 6649 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6650 | } |
| 6651 | uint32_t packetSize_vkCreateXlibSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6652 | countingStream->rewind(); |
| 6653 | uint32_t opcode_vkCreateXlibSurfaceKHR = OP_vkCreateXlibSurfaceKHR; |
| 6654 | stream->write(&opcode_vkCreateXlibSurfaceKHR, sizeof(uint32_t)); |
| 6655 | stream->write(&packetSize_vkCreateXlibSurfaceKHR, sizeof(uint32_t)); |
| 6656 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6657 | marshal_VkXlibSurfaceCreateInfoKHR(stream, (const VkXlibSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6658 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6659 | if (pAllocator) |
| 6660 | { |
| 6661 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6662 | } |
| 6663 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6664 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6665 | VkResult vkCreateXlibSurfaceKHR_VkResult_return = (VkResult)0; |
| 6666 | stream->read(&vkCreateXlibSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6667 | return vkCreateXlibSurfaceKHR_VkResult_return; |
| 6668 | } |
| 6669 | |
| 6670 | VkBool32 VkEncoder::vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 6671 | VkPhysicalDevice physicalDevice, |
| 6672 | uint32_t queueFamilyIndex, |
| 6673 | Display* dpy, |
| 6674 | VisualID visualID) |
| 6675 | { |
| 6676 | auto stream = mImpl->stream(); |
| 6677 | auto countingStream = mImpl->countingStream(); |
| 6678 | countingStream->rewind(); |
| 6679 | { |
| 6680 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6681 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6682 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 6683 | countingStream->write((VisualID*)&visualID, sizeof(VisualID)); |
| 6684 | } |
| 6685 | uint32_t packetSize_vkGetPhysicalDeviceXlibPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6686 | countingStream->rewind(); |
| 6687 | uint32_t opcode_vkGetPhysicalDeviceXlibPresentationSupportKHR = OP_vkGetPhysicalDeviceXlibPresentationSupportKHR; |
| 6688 | stream->write(&opcode_vkGetPhysicalDeviceXlibPresentationSupportKHR, sizeof(uint32_t)); |
| 6689 | stream->write(&packetSize_vkGetPhysicalDeviceXlibPresentationSupportKHR, sizeof(uint32_t)); |
| 6690 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6691 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6692 | stream->write((Display*)dpy, sizeof(Display)); |
| 6693 | stream->write((VisualID*)&visualID, sizeof(VisualID)); |
| 6694 | stream->read((Display*)dpy, sizeof(Display)); |
| 6695 | VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6696 | stream->read(&vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6697 | return vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return; |
| 6698 | } |
| 6699 | |
| 6700 | #endif |
| 6701 | #ifdef VK_KHR_xcb_surface |
| 6702 | VkResult VkEncoder::vkCreateXcbSurfaceKHR( |
| 6703 | VkInstance instance, |
| 6704 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
| 6705 | const VkAllocationCallbacks* pAllocator, |
| 6706 | VkSurfaceKHR* pSurface) |
| 6707 | { |
| 6708 | auto stream = mImpl->stream(); |
| 6709 | auto countingStream = mImpl->countingStream(); |
| 6710 | countingStream->rewind(); |
| 6711 | { |
| 6712 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6713 | marshal_VkXcbSurfaceCreateInfoKHR(countingStream, (const VkXcbSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6714 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6715 | if (pAllocator) |
| 6716 | { |
| 6717 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6718 | } |
| 6719 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6720 | } |
| 6721 | uint32_t packetSize_vkCreateXcbSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6722 | countingStream->rewind(); |
| 6723 | uint32_t opcode_vkCreateXcbSurfaceKHR = OP_vkCreateXcbSurfaceKHR; |
| 6724 | stream->write(&opcode_vkCreateXcbSurfaceKHR, sizeof(uint32_t)); |
| 6725 | stream->write(&packetSize_vkCreateXcbSurfaceKHR, sizeof(uint32_t)); |
| 6726 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6727 | marshal_VkXcbSurfaceCreateInfoKHR(stream, (const VkXcbSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6728 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6729 | if (pAllocator) |
| 6730 | { |
| 6731 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6732 | } |
| 6733 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6734 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6735 | VkResult vkCreateXcbSurfaceKHR_VkResult_return = (VkResult)0; |
| 6736 | stream->read(&vkCreateXcbSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6737 | return vkCreateXcbSurfaceKHR_VkResult_return; |
| 6738 | } |
| 6739 | |
| 6740 | VkBool32 VkEncoder::vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 6741 | VkPhysicalDevice physicalDevice, |
| 6742 | uint32_t queueFamilyIndex, |
| 6743 | xcb_connection_t* connection, |
| 6744 | xcb_visualid_t visual_id) |
| 6745 | { |
| 6746 | auto stream = mImpl->stream(); |
| 6747 | auto countingStream = mImpl->countingStream(); |
| 6748 | countingStream->rewind(); |
| 6749 | { |
| 6750 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6751 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6752 | countingStream->write((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6753 | countingStream->write((xcb_visualid_t*)&visual_id, sizeof(xcb_visualid_t)); |
| 6754 | } |
| 6755 | uint32_t packetSize_vkGetPhysicalDeviceXcbPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6756 | countingStream->rewind(); |
| 6757 | uint32_t opcode_vkGetPhysicalDeviceXcbPresentationSupportKHR = OP_vkGetPhysicalDeviceXcbPresentationSupportKHR; |
| 6758 | stream->write(&opcode_vkGetPhysicalDeviceXcbPresentationSupportKHR, sizeof(uint32_t)); |
| 6759 | stream->write(&packetSize_vkGetPhysicalDeviceXcbPresentationSupportKHR, sizeof(uint32_t)); |
| 6760 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6761 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6762 | stream->write((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6763 | stream->write((xcb_visualid_t*)&visual_id, sizeof(xcb_visualid_t)); |
| 6764 | stream->read((xcb_connection_t*)connection, sizeof(xcb_connection_t)); |
| 6765 | VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6766 | stream->read(&vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6767 | return vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return; |
| 6768 | } |
| 6769 | |
| 6770 | #endif |
| 6771 | #ifdef VK_KHR_wayland_surface |
| 6772 | VkResult VkEncoder::vkCreateWaylandSurfaceKHR( |
| 6773 | VkInstance instance, |
| 6774 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
| 6775 | const VkAllocationCallbacks* pAllocator, |
| 6776 | VkSurfaceKHR* pSurface) |
| 6777 | { |
| 6778 | auto stream = mImpl->stream(); |
| 6779 | auto countingStream = mImpl->countingStream(); |
| 6780 | countingStream->rewind(); |
| 6781 | { |
| 6782 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6783 | marshal_VkWaylandSurfaceCreateInfoKHR(countingStream, (const VkWaylandSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6784 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6785 | if (pAllocator) |
| 6786 | { |
| 6787 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6788 | } |
| 6789 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6790 | } |
| 6791 | uint32_t packetSize_vkCreateWaylandSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6792 | countingStream->rewind(); |
| 6793 | uint32_t opcode_vkCreateWaylandSurfaceKHR = OP_vkCreateWaylandSurfaceKHR; |
| 6794 | stream->write(&opcode_vkCreateWaylandSurfaceKHR, sizeof(uint32_t)); |
| 6795 | stream->write(&packetSize_vkCreateWaylandSurfaceKHR, sizeof(uint32_t)); |
| 6796 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6797 | marshal_VkWaylandSurfaceCreateInfoKHR(stream, (const VkWaylandSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6798 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6799 | if (pAllocator) |
| 6800 | { |
| 6801 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6802 | } |
| 6803 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6804 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6805 | VkResult vkCreateWaylandSurfaceKHR_VkResult_return = (VkResult)0; |
| 6806 | stream->read(&vkCreateWaylandSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6807 | return vkCreateWaylandSurfaceKHR_VkResult_return; |
| 6808 | } |
| 6809 | |
| 6810 | VkBool32 VkEncoder::vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 6811 | VkPhysicalDevice physicalDevice, |
| 6812 | uint32_t queueFamilyIndex, |
| 6813 | wl_display* display) |
| 6814 | { |
| 6815 | auto stream = mImpl->stream(); |
| 6816 | auto countingStream = mImpl->countingStream(); |
| 6817 | countingStream->rewind(); |
| 6818 | { |
| 6819 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6820 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6821 | countingStream->write((wl_display*)display, sizeof(wl_display)); |
| 6822 | } |
| 6823 | uint32_t packetSize_vkGetPhysicalDeviceWaylandPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6824 | countingStream->rewind(); |
| 6825 | uint32_t opcode_vkGetPhysicalDeviceWaylandPresentationSupportKHR = OP_vkGetPhysicalDeviceWaylandPresentationSupportKHR; |
| 6826 | stream->write(&opcode_vkGetPhysicalDeviceWaylandPresentationSupportKHR, sizeof(uint32_t)); |
| 6827 | stream->write(&packetSize_vkGetPhysicalDeviceWaylandPresentationSupportKHR, sizeof(uint32_t)); |
| 6828 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6829 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6830 | stream->write((wl_display*)display, sizeof(wl_display)); |
| 6831 | stream->read((wl_display*)display, sizeof(wl_display)); |
| 6832 | VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6833 | stream->read(&vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6834 | return vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return; |
| 6835 | } |
| 6836 | |
| 6837 | #endif |
| 6838 | #ifdef VK_KHR_mir_surface |
| 6839 | VkResult VkEncoder::vkCreateMirSurfaceKHR( |
| 6840 | VkInstance instance, |
| 6841 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
| 6842 | const VkAllocationCallbacks* pAllocator, |
| 6843 | VkSurfaceKHR* pSurface) |
| 6844 | { |
| 6845 | auto stream = mImpl->stream(); |
| 6846 | auto countingStream = mImpl->countingStream(); |
| 6847 | countingStream->rewind(); |
| 6848 | { |
| 6849 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6850 | marshal_VkMirSurfaceCreateInfoKHR(countingStream, (const VkMirSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6851 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6852 | if (pAllocator) |
| 6853 | { |
| 6854 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6855 | } |
| 6856 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6857 | } |
| 6858 | uint32_t packetSize_vkCreateMirSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6859 | countingStream->rewind(); |
| 6860 | uint32_t opcode_vkCreateMirSurfaceKHR = OP_vkCreateMirSurfaceKHR; |
| 6861 | stream->write(&opcode_vkCreateMirSurfaceKHR, sizeof(uint32_t)); |
| 6862 | stream->write(&packetSize_vkCreateMirSurfaceKHR, sizeof(uint32_t)); |
| 6863 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6864 | marshal_VkMirSurfaceCreateInfoKHR(stream, (const VkMirSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6865 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6866 | if (pAllocator) |
| 6867 | { |
| 6868 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6869 | } |
| 6870 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6871 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6872 | VkResult vkCreateMirSurfaceKHR_VkResult_return = (VkResult)0; |
| 6873 | stream->read(&vkCreateMirSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6874 | return vkCreateMirSurfaceKHR_VkResult_return; |
| 6875 | } |
| 6876 | |
| 6877 | VkBool32 VkEncoder::vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 6878 | VkPhysicalDevice physicalDevice, |
| 6879 | uint32_t queueFamilyIndex, |
| 6880 | MirConnection* connection) |
| 6881 | { |
| 6882 | auto stream = mImpl->stream(); |
| 6883 | auto countingStream = mImpl->countingStream(); |
| 6884 | countingStream->rewind(); |
| 6885 | { |
| 6886 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6887 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6888 | countingStream->write((MirConnection*)connection, sizeof(MirConnection)); |
| 6889 | } |
| 6890 | uint32_t packetSize_vkGetPhysicalDeviceMirPresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6891 | countingStream->rewind(); |
| 6892 | uint32_t opcode_vkGetPhysicalDeviceMirPresentationSupportKHR = OP_vkGetPhysicalDeviceMirPresentationSupportKHR; |
| 6893 | stream->write(&opcode_vkGetPhysicalDeviceMirPresentationSupportKHR, sizeof(uint32_t)); |
| 6894 | stream->write(&packetSize_vkGetPhysicalDeviceMirPresentationSupportKHR, sizeof(uint32_t)); |
| 6895 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6896 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6897 | stream->write((MirConnection*)connection, sizeof(MirConnection)); |
| 6898 | stream->read((MirConnection*)connection, sizeof(MirConnection)); |
| 6899 | VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 6900 | stream->read(&vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 6901 | return vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return; |
| 6902 | } |
| 6903 | |
| 6904 | #endif |
| 6905 | #ifdef VK_KHR_android_surface |
| 6906 | VkResult VkEncoder::vkCreateAndroidSurfaceKHR( |
| 6907 | VkInstance instance, |
| 6908 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
| 6909 | const VkAllocationCallbacks* pAllocator, |
| 6910 | VkSurfaceKHR* pSurface) |
| 6911 | { |
| 6912 | auto stream = mImpl->stream(); |
| 6913 | auto countingStream = mImpl->countingStream(); |
| 6914 | countingStream->rewind(); |
| 6915 | { |
| 6916 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6917 | marshal_VkAndroidSurfaceCreateInfoKHR(countingStream, (const VkAndroidSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6918 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6919 | if (pAllocator) |
| 6920 | { |
| 6921 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6922 | } |
| 6923 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6924 | } |
| 6925 | uint32_t packetSize_vkCreateAndroidSurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6926 | countingStream->rewind(); |
| 6927 | uint32_t opcode_vkCreateAndroidSurfaceKHR = OP_vkCreateAndroidSurfaceKHR; |
| 6928 | stream->write(&opcode_vkCreateAndroidSurfaceKHR, sizeof(uint32_t)); |
| 6929 | stream->write(&packetSize_vkCreateAndroidSurfaceKHR, sizeof(uint32_t)); |
| 6930 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6931 | marshal_VkAndroidSurfaceCreateInfoKHR(stream, (const VkAndroidSurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6932 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6933 | if (pAllocator) |
| 6934 | { |
| 6935 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6936 | } |
| 6937 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6938 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6939 | VkResult vkCreateAndroidSurfaceKHR_VkResult_return = (VkResult)0; |
| 6940 | stream->read(&vkCreateAndroidSurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6941 | return vkCreateAndroidSurfaceKHR_VkResult_return; |
| 6942 | } |
| 6943 | |
| 6944 | #endif |
| 6945 | #ifdef VK_KHR_win32_surface |
| 6946 | VkResult VkEncoder::vkCreateWin32SurfaceKHR( |
| 6947 | VkInstance instance, |
| 6948 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
| 6949 | const VkAllocationCallbacks* pAllocator, |
| 6950 | VkSurfaceKHR* pSurface) |
| 6951 | { |
| 6952 | auto stream = mImpl->stream(); |
| 6953 | auto countingStream = mImpl->countingStream(); |
| 6954 | countingStream->rewind(); |
| 6955 | { |
| 6956 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6957 | marshal_VkWin32SurfaceCreateInfoKHR(countingStream, (const VkWin32SurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6958 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6959 | if (pAllocator) |
| 6960 | { |
| 6961 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6962 | } |
| 6963 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6964 | } |
| 6965 | uint32_t packetSize_vkCreateWin32SurfaceKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6966 | countingStream->rewind(); |
| 6967 | uint32_t opcode_vkCreateWin32SurfaceKHR = OP_vkCreateWin32SurfaceKHR; |
| 6968 | stream->write(&opcode_vkCreateWin32SurfaceKHR, sizeof(uint32_t)); |
| 6969 | stream->write(&packetSize_vkCreateWin32SurfaceKHR, sizeof(uint32_t)); |
| 6970 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 6971 | marshal_VkWin32SurfaceCreateInfoKHR(stream, (const VkWin32SurfaceCreateInfoKHR*)(pCreateInfo)); |
| 6972 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 6973 | if (pAllocator) |
| 6974 | { |
| 6975 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 6976 | } |
| 6977 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6978 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 6979 | VkResult vkCreateWin32SurfaceKHR_VkResult_return = (VkResult)0; |
| 6980 | stream->read(&vkCreateWin32SurfaceKHR_VkResult_return, sizeof(VkResult)); |
| 6981 | return vkCreateWin32SurfaceKHR_VkResult_return; |
| 6982 | } |
| 6983 | |
| 6984 | VkBool32 VkEncoder::vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 6985 | VkPhysicalDevice physicalDevice, |
| 6986 | uint32_t queueFamilyIndex) |
| 6987 | { |
| 6988 | auto stream = mImpl->stream(); |
| 6989 | auto countingStream = mImpl->countingStream(); |
| 6990 | countingStream->rewind(); |
| 6991 | { |
| 6992 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 6993 | countingStream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 6994 | } |
| 6995 | uint32_t packetSize_vkGetPhysicalDeviceWin32PresentationSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 6996 | countingStream->rewind(); |
| 6997 | uint32_t opcode_vkGetPhysicalDeviceWin32PresentationSupportKHR = OP_vkGetPhysicalDeviceWin32PresentationSupportKHR; |
| 6998 | stream->write(&opcode_vkGetPhysicalDeviceWin32PresentationSupportKHR, sizeof(uint32_t)); |
| 6999 | stream->write(&packetSize_vkGetPhysicalDeviceWin32PresentationSupportKHR, sizeof(uint32_t)); |
| 7000 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7001 | stream->write((uint32_t*)&queueFamilyIndex, sizeof(uint32_t)); |
| 7002 | VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return = (VkBool32)0; |
| 7003 | stream->read(&vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return, sizeof(VkBool32)); |
| 7004 | return vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return; |
| 7005 | } |
| 7006 | |
| 7007 | #endif |
| 7008 | #ifdef VK_KHR_sampler_mirror_clamp_to_edge |
| 7009 | #endif |
| 7010 | #ifdef VK_KHR_multiview |
| 7011 | #endif |
| 7012 | #ifdef VK_KHR_get_physical_device_properties2 |
| 7013 | void VkEncoder::vkGetPhysicalDeviceFeatures2KHR( |
| 7014 | VkPhysicalDevice physicalDevice, |
| 7015 | VkPhysicalDeviceFeatures2* pFeatures) |
| 7016 | { |
| 7017 | auto stream = mImpl->stream(); |
| 7018 | auto countingStream = mImpl->countingStream(); |
| 7019 | countingStream->rewind(); |
| 7020 | { |
| 7021 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7022 | marshal_VkPhysicalDeviceFeatures2(countingStream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7023 | } |
| 7024 | uint32_t packetSize_vkGetPhysicalDeviceFeatures2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7025 | countingStream->rewind(); |
| 7026 | uint32_t opcode_vkGetPhysicalDeviceFeatures2KHR = OP_vkGetPhysicalDeviceFeatures2KHR; |
| 7027 | stream->write(&opcode_vkGetPhysicalDeviceFeatures2KHR, sizeof(uint32_t)); |
| 7028 | stream->write(&packetSize_vkGetPhysicalDeviceFeatures2KHR, sizeof(uint32_t)); |
| 7029 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7030 | marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7031 | unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures)); |
| 7032 | } |
| 7033 | |
| 7034 | void VkEncoder::vkGetPhysicalDeviceProperties2KHR( |
| 7035 | VkPhysicalDevice physicalDevice, |
| 7036 | VkPhysicalDeviceProperties2* pProperties) |
| 7037 | { |
| 7038 | auto stream = mImpl->stream(); |
| 7039 | auto countingStream = mImpl->countingStream(); |
| 7040 | countingStream->rewind(); |
| 7041 | { |
| 7042 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7043 | marshal_VkPhysicalDeviceProperties2(countingStream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7044 | } |
| 7045 | uint32_t packetSize_vkGetPhysicalDeviceProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7046 | countingStream->rewind(); |
| 7047 | uint32_t opcode_vkGetPhysicalDeviceProperties2KHR = OP_vkGetPhysicalDeviceProperties2KHR; |
| 7048 | stream->write(&opcode_vkGetPhysicalDeviceProperties2KHR, sizeof(uint32_t)); |
| 7049 | stream->write(&packetSize_vkGetPhysicalDeviceProperties2KHR, sizeof(uint32_t)); |
| 7050 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7051 | marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7052 | unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties)); |
| 7053 | } |
| 7054 | |
| 7055 | void VkEncoder::vkGetPhysicalDeviceFormatProperties2KHR( |
| 7056 | VkPhysicalDevice physicalDevice, |
| 7057 | VkFormat format, |
| 7058 | VkFormatProperties2* pFormatProperties) |
| 7059 | { |
| 7060 | auto stream = mImpl->stream(); |
| 7061 | auto countingStream = mImpl->countingStream(); |
| 7062 | countingStream->rewind(); |
| 7063 | { |
| 7064 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7065 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 7066 | marshal_VkFormatProperties2(countingStream, (VkFormatProperties2*)(pFormatProperties)); |
| 7067 | } |
| 7068 | uint32_t packetSize_vkGetPhysicalDeviceFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7069 | countingStream->rewind(); |
| 7070 | uint32_t opcode_vkGetPhysicalDeviceFormatProperties2KHR = OP_vkGetPhysicalDeviceFormatProperties2KHR; |
| 7071 | stream->write(&opcode_vkGetPhysicalDeviceFormatProperties2KHR, sizeof(uint32_t)); |
| 7072 | stream->write(&packetSize_vkGetPhysicalDeviceFormatProperties2KHR, sizeof(uint32_t)); |
| 7073 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7074 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 7075 | marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 7076 | unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties)); |
| 7077 | } |
| 7078 | |
| 7079 | VkResult VkEncoder::vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 7080 | VkPhysicalDevice physicalDevice, |
| 7081 | const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, |
| 7082 | VkImageFormatProperties2* pImageFormatProperties) |
| 7083 | { |
| 7084 | auto stream = mImpl->stream(); |
| 7085 | auto countingStream = mImpl->countingStream(); |
| 7086 | countingStream->rewind(); |
| 7087 | { |
| 7088 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7089 | marshal_VkPhysicalDeviceImageFormatInfo2(countingStream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 7090 | marshal_VkImageFormatProperties2(countingStream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7091 | } |
| 7092 | uint32_t packetSize_vkGetPhysicalDeviceImageFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7093 | countingStream->rewind(); |
| 7094 | uint32_t opcode_vkGetPhysicalDeviceImageFormatProperties2KHR = OP_vkGetPhysicalDeviceImageFormatProperties2KHR; |
| 7095 | stream->write(&opcode_vkGetPhysicalDeviceImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7096 | stream->write(&packetSize_vkGetPhysicalDeviceImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7097 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7098 | marshal_VkPhysicalDeviceImageFormatInfo2(stream, (const VkPhysicalDeviceImageFormatInfo2*)(pImageFormatInfo)); |
| 7099 | marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7100 | unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties)); |
| 7101 | VkResult vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return = (VkResult)0; |
| 7102 | stream->read(&vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 7103 | return vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return; |
| 7104 | } |
| 7105 | |
| 7106 | void VkEncoder::vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 7107 | VkPhysicalDevice physicalDevice, |
| 7108 | uint32_t* pQueueFamilyPropertyCount, |
| 7109 | VkQueueFamilyProperties2* pQueueFamilyProperties) |
| 7110 | { |
| 7111 | auto stream = mImpl->stream(); |
| 7112 | auto countingStream = mImpl->countingStream(); |
| 7113 | countingStream->rewind(); |
| 7114 | { |
| 7115 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7116 | countingStream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7117 | if (pQueueFamilyPropertyCount) |
| 7118 | { |
| 7119 | countingStream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7120 | } |
| 7121 | countingStream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7122 | if (pQueueFamilyProperties) |
| 7123 | { |
| 7124 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7125 | { |
| 7126 | marshal_VkQueueFamilyProperties2(countingStream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7127 | } |
| 7128 | } |
| 7129 | } |
| 7130 | uint32_t packetSize_vkGetPhysicalDeviceQueueFamilyProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7131 | countingStream->rewind(); |
| 7132 | uint32_t opcode_vkGetPhysicalDeviceQueueFamilyProperties2KHR = OP_vkGetPhysicalDeviceQueueFamilyProperties2KHR; |
| 7133 | stream->write(&opcode_vkGetPhysicalDeviceQueueFamilyProperties2KHR, sizeof(uint32_t)); |
| 7134 | stream->write(&packetSize_vkGetPhysicalDeviceQueueFamilyProperties2KHR, sizeof(uint32_t)); |
| 7135 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7136 | stream->write((uint32_t**)&pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7137 | if (pQueueFamilyPropertyCount) |
| 7138 | { |
| 7139 | stream->write((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7140 | } |
| 7141 | stream->write((VkQueueFamilyProperties2**)&pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7142 | if (pQueueFamilyProperties) |
| 7143 | { |
| 7144 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7145 | { |
| 7146 | marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7147 | } |
| 7148 | } |
| 7149 | uint32_t* check_pQueueFamilyPropertyCount; |
| 7150 | stream->read((uint32_t**)&check_pQueueFamilyPropertyCount, sizeof(uint32_t*)); |
| 7151 | if (pQueueFamilyPropertyCount) |
| 7152 | { |
| 7153 | if (!(check_pQueueFamilyPropertyCount)) |
| 7154 | { |
| 7155 | fprintf(stderr, "fatal: pQueueFamilyPropertyCount inconsistent between guest and host\n"); |
| 7156 | } |
| 7157 | stream->read((uint32_t*)pQueueFamilyPropertyCount, sizeof(uint32_t)); |
| 7158 | } |
| 7159 | VkQueueFamilyProperties2* check_pQueueFamilyProperties; |
| 7160 | stream->read((VkQueueFamilyProperties2**)&check_pQueueFamilyProperties, sizeof(VkQueueFamilyProperties2*)); |
| 7161 | if (pQueueFamilyProperties) |
| 7162 | { |
| 7163 | if (!(check_pQueueFamilyProperties)) |
| 7164 | { |
| 7165 | fprintf(stderr, "fatal: pQueueFamilyProperties inconsistent between guest and host\n"); |
| 7166 | } |
| 7167 | for (uint32_t i = 0; i < (uint32_t)(*(pQueueFamilyPropertyCount)); ++i) |
| 7168 | { |
| 7169 | unmarshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i)); |
| 7170 | } |
| 7171 | } |
| 7172 | } |
| 7173 | |
| 7174 | void VkEncoder::vkGetPhysicalDeviceMemoryProperties2KHR( |
| 7175 | VkPhysicalDevice physicalDevice, |
| 7176 | VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
| 7177 | { |
| 7178 | auto stream = mImpl->stream(); |
| 7179 | auto countingStream = mImpl->countingStream(); |
| 7180 | countingStream->rewind(); |
| 7181 | { |
| 7182 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7183 | marshal_VkPhysicalDeviceMemoryProperties2(countingStream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7184 | } |
| 7185 | uint32_t packetSize_vkGetPhysicalDeviceMemoryProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7186 | countingStream->rewind(); |
| 7187 | uint32_t opcode_vkGetPhysicalDeviceMemoryProperties2KHR = OP_vkGetPhysicalDeviceMemoryProperties2KHR; |
| 7188 | stream->write(&opcode_vkGetPhysicalDeviceMemoryProperties2KHR, sizeof(uint32_t)); |
| 7189 | stream->write(&packetSize_vkGetPhysicalDeviceMemoryProperties2KHR, sizeof(uint32_t)); |
| 7190 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7191 | marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7192 | unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties)); |
| 7193 | } |
| 7194 | |
| 7195 | void VkEncoder::vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 7196 | VkPhysicalDevice physicalDevice, |
| 7197 | const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, |
| 7198 | uint32_t* pPropertyCount, |
| 7199 | VkSparseImageFormatProperties2* pProperties) |
| 7200 | { |
| 7201 | auto stream = mImpl->stream(); |
| 7202 | auto countingStream = mImpl->countingStream(); |
| 7203 | countingStream->rewind(); |
| 7204 | { |
| 7205 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7206 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(countingStream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 7207 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 7208 | if (pPropertyCount) |
| 7209 | { |
| 7210 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7211 | } |
| 7212 | countingStream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7213 | if (pProperties) |
| 7214 | { |
| 7215 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7216 | { |
| 7217 | marshal_VkSparseImageFormatProperties2(countingStream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7218 | } |
| 7219 | } |
| 7220 | } |
| 7221 | uint32_t packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7222 | countingStream->rewind(); |
| 7223 | uint32_t opcode_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = OP_vkGetPhysicalDeviceSparseImageFormatProperties2KHR; |
| 7224 | stream->write(&opcode_vkGetPhysicalDeviceSparseImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7225 | stream->write(&packetSize_vkGetPhysicalDeviceSparseImageFormatProperties2KHR, sizeof(uint32_t)); |
| 7226 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7227 | marshal_VkPhysicalDeviceSparseImageFormatInfo2(stream, (const VkPhysicalDeviceSparseImageFormatInfo2*)(pFormatInfo)); |
| 7228 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 7229 | if (pPropertyCount) |
| 7230 | { |
| 7231 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7232 | } |
| 7233 | stream->write((VkSparseImageFormatProperties2**)&pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7234 | if (pProperties) |
| 7235 | { |
| 7236 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7237 | { |
| 7238 | marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7239 | } |
| 7240 | } |
| 7241 | uint32_t* check_pPropertyCount; |
| 7242 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 7243 | if (pPropertyCount) |
| 7244 | { |
| 7245 | if (!(check_pPropertyCount)) |
| 7246 | { |
| 7247 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 7248 | } |
| 7249 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 7250 | } |
| 7251 | VkSparseImageFormatProperties2* check_pProperties; |
| 7252 | stream->read((VkSparseImageFormatProperties2**)&check_pProperties, sizeof(VkSparseImageFormatProperties2*)); |
| 7253 | if (pProperties) |
| 7254 | { |
| 7255 | if (!(check_pProperties)) |
| 7256 | { |
| 7257 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 7258 | } |
| 7259 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 7260 | { |
| 7261 | unmarshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i)); |
| 7262 | } |
| 7263 | } |
| 7264 | } |
| 7265 | |
| 7266 | #endif |
| 7267 | #ifdef VK_KHR_device_group |
| 7268 | void VkEncoder::vkGetDeviceGroupPeerMemoryFeaturesKHR( |
| 7269 | VkDevice device, |
| 7270 | uint32_t heapIndex, |
| 7271 | uint32_t localDeviceIndex, |
| 7272 | uint32_t remoteDeviceIndex, |
| 7273 | VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
| 7274 | { |
| 7275 | auto stream = mImpl->stream(); |
| 7276 | auto countingStream = mImpl->countingStream(); |
| 7277 | countingStream->rewind(); |
| 7278 | { |
| 7279 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7280 | countingStream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 7281 | countingStream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 7282 | countingStream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 7283 | countingStream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7284 | } |
| 7285 | uint32_t packetSize_vkGetDeviceGroupPeerMemoryFeaturesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7286 | countingStream->rewind(); |
| 7287 | uint32_t opcode_vkGetDeviceGroupPeerMemoryFeaturesKHR = OP_vkGetDeviceGroupPeerMemoryFeaturesKHR; |
| 7288 | stream->write(&opcode_vkGetDeviceGroupPeerMemoryFeaturesKHR, sizeof(uint32_t)); |
| 7289 | stream->write(&packetSize_vkGetDeviceGroupPeerMemoryFeaturesKHR, sizeof(uint32_t)); |
| 7290 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7291 | stream->write((uint32_t*)&heapIndex, sizeof(uint32_t)); |
| 7292 | stream->write((uint32_t*)&localDeviceIndex, sizeof(uint32_t)); |
| 7293 | stream->write((uint32_t*)&remoteDeviceIndex, sizeof(uint32_t)); |
| 7294 | stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7295 | stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags)); |
| 7296 | } |
| 7297 | |
| 7298 | void VkEncoder::vkCmdSetDeviceMaskKHR( |
| 7299 | VkCommandBuffer commandBuffer, |
| 7300 | uint32_t deviceMask) |
| 7301 | { |
| 7302 | auto stream = mImpl->stream(); |
| 7303 | auto countingStream = mImpl->countingStream(); |
| 7304 | countingStream->rewind(); |
| 7305 | { |
| 7306 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7307 | countingStream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 7308 | } |
| 7309 | uint32_t packetSize_vkCmdSetDeviceMaskKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7310 | countingStream->rewind(); |
| 7311 | uint32_t opcode_vkCmdSetDeviceMaskKHR = OP_vkCmdSetDeviceMaskKHR; |
| 7312 | stream->write(&opcode_vkCmdSetDeviceMaskKHR, sizeof(uint32_t)); |
| 7313 | stream->write(&packetSize_vkCmdSetDeviceMaskKHR, sizeof(uint32_t)); |
| 7314 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7315 | stream->write((uint32_t*)&deviceMask, sizeof(uint32_t)); |
| 7316 | } |
| 7317 | |
| 7318 | void VkEncoder::vkCmdDispatchBaseKHR( |
| 7319 | VkCommandBuffer commandBuffer, |
| 7320 | uint32_t baseGroupX, |
| 7321 | uint32_t baseGroupY, |
| 7322 | uint32_t baseGroupZ, |
| 7323 | uint32_t groupCountX, |
| 7324 | uint32_t groupCountY, |
| 7325 | uint32_t groupCountZ) |
| 7326 | { |
| 7327 | auto stream = mImpl->stream(); |
| 7328 | auto countingStream = mImpl->countingStream(); |
| 7329 | countingStream->rewind(); |
| 7330 | { |
| 7331 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7332 | countingStream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 7333 | countingStream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 7334 | countingStream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 7335 | countingStream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 7336 | countingStream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 7337 | countingStream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 7338 | } |
| 7339 | uint32_t packetSize_vkCmdDispatchBaseKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7340 | countingStream->rewind(); |
| 7341 | uint32_t opcode_vkCmdDispatchBaseKHR = OP_vkCmdDispatchBaseKHR; |
| 7342 | stream->write(&opcode_vkCmdDispatchBaseKHR, sizeof(uint32_t)); |
| 7343 | stream->write(&packetSize_vkCmdDispatchBaseKHR, sizeof(uint32_t)); |
| 7344 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7345 | stream->write((uint32_t*)&baseGroupX, sizeof(uint32_t)); |
| 7346 | stream->write((uint32_t*)&baseGroupY, sizeof(uint32_t)); |
| 7347 | stream->write((uint32_t*)&baseGroupZ, sizeof(uint32_t)); |
| 7348 | stream->write((uint32_t*)&groupCountX, sizeof(uint32_t)); |
| 7349 | stream->write((uint32_t*)&groupCountY, sizeof(uint32_t)); |
| 7350 | stream->write((uint32_t*)&groupCountZ, sizeof(uint32_t)); |
| 7351 | } |
| 7352 | |
| 7353 | #endif |
| 7354 | #ifdef VK_KHR_shader_draw_parameters |
| 7355 | #endif |
| 7356 | #ifdef VK_KHR_maintenance1 |
| 7357 | void VkEncoder::vkTrimCommandPoolKHR( |
| 7358 | VkDevice device, |
| 7359 | VkCommandPool commandPool, |
| 7360 | VkCommandPoolTrimFlags flags) |
| 7361 | { |
| 7362 | auto stream = mImpl->stream(); |
| 7363 | auto countingStream = mImpl->countingStream(); |
| 7364 | countingStream->rewind(); |
| 7365 | { |
| 7366 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7367 | countingStream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 7368 | countingStream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 7369 | } |
| 7370 | uint32_t packetSize_vkTrimCommandPoolKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7371 | countingStream->rewind(); |
| 7372 | uint32_t opcode_vkTrimCommandPoolKHR = OP_vkTrimCommandPoolKHR; |
| 7373 | stream->write(&opcode_vkTrimCommandPoolKHR, sizeof(uint32_t)); |
| 7374 | stream->write(&packetSize_vkTrimCommandPoolKHR, sizeof(uint32_t)); |
| 7375 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7376 | stream->write((VkCommandPool*)&commandPool, sizeof(VkCommandPool)); |
| 7377 | stream->write((VkCommandPoolTrimFlags*)&flags, sizeof(VkCommandPoolTrimFlags)); |
| 7378 | } |
| 7379 | |
| 7380 | #endif |
| 7381 | #ifdef VK_KHR_device_group_creation |
| 7382 | VkResult VkEncoder::vkEnumeratePhysicalDeviceGroupsKHR( |
| 7383 | VkInstance instance, |
| 7384 | uint32_t* pPhysicalDeviceGroupCount, |
| 7385 | VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
| 7386 | { |
| 7387 | auto stream = mImpl->stream(); |
| 7388 | auto countingStream = mImpl->countingStream(); |
| 7389 | countingStream->rewind(); |
| 7390 | { |
| 7391 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 7392 | countingStream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7393 | if (pPhysicalDeviceGroupCount) |
| 7394 | { |
| 7395 | countingStream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7396 | } |
| 7397 | countingStream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7398 | if (pPhysicalDeviceGroupProperties) |
| 7399 | { |
| 7400 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7401 | { |
| 7402 | marshal_VkPhysicalDeviceGroupProperties(countingStream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7403 | } |
| 7404 | } |
| 7405 | } |
| 7406 | uint32_t packetSize_vkEnumeratePhysicalDeviceGroupsKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7407 | countingStream->rewind(); |
| 7408 | uint32_t opcode_vkEnumeratePhysicalDeviceGroupsKHR = OP_vkEnumeratePhysicalDeviceGroupsKHR; |
| 7409 | stream->write(&opcode_vkEnumeratePhysicalDeviceGroupsKHR, sizeof(uint32_t)); |
| 7410 | stream->write(&packetSize_vkEnumeratePhysicalDeviceGroupsKHR, sizeof(uint32_t)); |
| 7411 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 7412 | stream->write((uint32_t**)&pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7413 | if (pPhysicalDeviceGroupCount) |
| 7414 | { |
| 7415 | stream->write((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7416 | } |
| 7417 | stream->write((VkPhysicalDeviceGroupProperties**)&pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7418 | if (pPhysicalDeviceGroupProperties) |
| 7419 | { |
| 7420 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7421 | { |
| 7422 | marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7423 | } |
| 7424 | } |
| 7425 | uint32_t* check_pPhysicalDeviceGroupCount; |
| 7426 | stream->read((uint32_t**)&check_pPhysicalDeviceGroupCount, sizeof(uint32_t*)); |
| 7427 | if (pPhysicalDeviceGroupCount) |
| 7428 | { |
| 7429 | if (!(check_pPhysicalDeviceGroupCount)) |
| 7430 | { |
| 7431 | fprintf(stderr, "fatal: pPhysicalDeviceGroupCount inconsistent between guest and host\n"); |
| 7432 | } |
| 7433 | stream->read((uint32_t*)pPhysicalDeviceGroupCount, sizeof(uint32_t)); |
| 7434 | } |
| 7435 | VkPhysicalDeviceGroupProperties* check_pPhysicalDeviceGroupProperties; |
| 7436 | stream->read((VkPhysicalDeviceGroupProperties**)&check_pPhysicalDeviceGroupProperties, sizeof(VkPhysicalDeviceGroupProperties*)); |
| 7437 | if (pPhysicalDeviceGroupProperties) |
| 7438 | { |
| 7439 | if (!(check_pPhysicalDeviceGroupProperties)) |
| 7440 | { |
| 7441 | fprintf(stderr, "fatal: pPhysicalDeviceGroupProperties inconsistent between guest and host\n"); |
| 7442 | } |
| 7443 | for (uint32_t i = 0; i < (uint32_t)(*(pPhysicalDeviceGroupCount)); ++i) |
| 7444 | { |
| 7445 | unmarshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i)); |
| 7446 | } |
| 7447 | } |
| 7448 | VkResult vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return = (VkResult)0; |
| 7449 | stream->read(&vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return, sizeof(VkResult)); |
| 7450 | return vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return; |
| 7451 | } |
| 7452 | |
| 7453 | #endif |
| 7454 | #ifdef VK_KHR_external_memory_capabilities |
| 7455 | void VkEncoder::vkGetPhysicalDeviceExternalBufferPropertiesKHR( |
| 7456 | VkPhysicalDevice physicalDevice, |
| 7457 | const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, |
| 7458 | VkExternalBufferProperties* pExternalBufferProperties) |
| 7459 | { |
| 7460 | auto stream = mImpl->stream(); |
| 7461 | auto countingStream = mImpl->countingStream(); |
| 7462 | countingStream->rewind(); |
| 7463 | { |
| 7464 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7465 | marshal_VkPhysicalDeviceExternalBufferInfo(countingStream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 7466 | marshal_VkExternalBufferProperties(countingStream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7467 | } |
| 7468 | uint32_t packetSize_vkGetPhysicalDeviceExternalBufferPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7469 | countingStream->rewind(); |
| 7470 | uint32_t opcode_vkGetPhysicalDeviceExternalBufferPropertiesKHR = OP_vkGetPhysicalDeviceExternalBufferPropertiesKHR; |
| 7471 | stream->write(&opcode_vkGetPhysicalDeviceExternalBufferPropertiesKHR, sizeof(uint32_t)); |
| 7472 | stream->write(&packetSize_vkGetPhysicalDeviceExternalBufferPropertiesKHR, sizeof(uint32_t)); |
| 7473 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7474 | marshal_VkPhysicalDeviceExternalBufferInfo(stream, (const VkPhysicalDeviceExternalBufferInfo*)(pExternalBufferInfo)); |
| 7475 | marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7476 | unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties)); |
| 7477 | } |
| 7478 | |
| 7479 | #endif |
| 7480 | #ifdef VK_KHR_external_memory |
| 7481 | #endif |
| 7482 | #ifdef VK_KHR_external_memory_win32 |
| 7483 | VkResult VkEncoder::vkGetMemoryWin32HandleKHR( |
| 7484 | VkDevice device, |
| 7485 | const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 7486 | HANDLE* pHandle) |
| 7487 | { |
| 7488 | auto stream = mImpl->stream(); |
| 7489 | auto countingStream = mImpl->countingStream(); |
| 7490 | countingStream->rewind(); |
| 7491 | { |
| 7492 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7493 | marshal_VkMemoryGetWin32HandleInfoKHR(countingStream, (const VkMemoryGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7494 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7495 | } |
| 7496 | uint32_t packetSize_vkGetMemoryWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7497 | countingStream->rewind(); |
| 7498 | uint32_t opcode_vkGetMemoryWin32HandleKHR = OP_vkGetMemoryWin32HandleKHR; |
| 7499 | stream->write(&opcode_vkGetMemoryWin32HandleKHR, sizeof(uint32_t)); |
| 7500 | stream->write(&packetSize_vkGetMemoryWin32HandleKHR, sizeof(uint32_t)); |
| 7501 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7502 | marshal_VkMemoryGetWin32HandleInfoKHR(stream, (const VkMemoryGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7503 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7504 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7505 | VkResult vkGetMemoryWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7506 | stream->read(&vkGetMemoryWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7507 | return vkGetMemoryWin32HandleKHR_VkResult_return; |
| 7508 | } |
| 7509 | |
| 7510 | VkResult VkEncoder::vkGetMemoryWin32HandlePropertiesKHR( |
| 7511 | VkDevice device, |
| 7512 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 7513 | HANDLE handle, |
| 7514 | VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) |
| 7515 | { |
| 7516 | auto stream = mImpl->stream(); |
| 7517 | auto countingStream = mImpl->countingStream(); |
| 7518 | countingStream->rewind(); |
| 7519 | { |
| 7520 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7521 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7522 | countingStream->write((HANDLE*)&handle, sizeof(HANDLE)); |
| 7523 | marshal_VkMemoryWin32HandlePropertiesKHR(countingStream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7524 | } |
| 7525 | uint32_t packetSize_vkGetMemoryWin32HandlePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7526 | countingStream->rewind(); |
| 7527 | uint32_t opcode_vkGetMemoryWin32HandlePropertiesKHR = OP_vkGetMemoryWin32HandlePropertiesKHR; |
| 7528 | stream->write(&opcode_vkGetMemoryWin32HandlePropertiesKHR, sizeof(uint32_t)); |
| 7529 | stream->write(&packetSize_vkGetMemoryWin32HandlePropertiesKHR, sizeof(uint32_t)); |
| 7530 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7531 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7532 | stream->write((HANDLE*)&handle, sizeof(HANDLE)); |
| 7533 | marshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7534 | unmarshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties)); |
| 7535 | VkResult vkGetMemoryWin32HandlePropertiesKHR_VkResult_return = (VkResult)0; |
| 7536 | stream->read(&vkGetMemoryWin32HandlePropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 7537 | return vkGetMemoryWin32HandlePropertiesKHR_VkResult_return; |
| 7538 | } |
| 7539 | |
| 7540 | #endif |
| 7541 | #ifdef VK_KHR_external_memory_fd |
| 7542 | VkResult VkEncoder::vkGetMemoryFdKHR( |
| 7543 | VkDevice device, |
| 7544 | const VkMemoryGetFdInfoKHR* pGetFdInfo, |
| 7545 | int* pFd) |
| 7546 | { |
| 7547 | auto stream = mImpl->stream(); |
| 7548 | auto countingStream = mImpl->countingStream(); |
| 7549 | countingStream->rewind(); |
| 7550 | { |
| 7551 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7552 | marshal_VkMemoryGetFdInfoKHR(countingStream, (const VkMemoryGetFdInfoKHR*)(pGetFdInfo)); |
| 7553 | countingStream->write((int*)pFd, sizeof(int)); |
| 7554 | } |
| 7555 | uint32_t packetSize_vkGetMemoryFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7556 | countingStream->rewind(); |
| 7557 | uint32_t opcode_vkGetMemoryFdKHR = OP_vkGetMemoryFdKHR; |
| 7558 | stream->write(&opcode_vkGetMemoryFdKHR, sizeof(uint32_t)); |
| 7559 | stream->write(&packetSize_vkGetMemoryFdKHR, sizeof(uint32_t)); |
| 7560 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7561 | marshal_VkMemoryGetFdInfoKHR(stream, (const VkMemoryGetFdInfoKHR*)(pGetFdInfo)); |
| 7562 | stream->write((int*)pFd, sizeof(int)); |
| 7563 | stream->read((int*)pFd, sizeof(int)); |
| 7564 | VkResult vkGetMemoryFdKHR_VkResult_return = (VkResult)0; |
| 7565 | stream->read(&vkGetMemoryFdKHR_VkResult_return, sizeof(VkResult)); |
| 7566 | return vkGetMemoryFdKHR_VkResult_return; |
| 7567 | } |
| 7568 | |
| 7569 | VkResult VkEncoder::vkGetMemoryFdPropertiesKHR( |
| 7570 | VkDevice device, |
| 7571 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 7572 | int fd, |
| 7573 | VkMemoryFdPropertiesKHR* pMemoryFdProperties) |
| 7574 | { |
| 7575 | auto stream = mImpl->stream(); |
| 7576 | auto countingStream = mImpl->countingStream(); |
| 7577 | countingStream->rewind(); |
| 7578 | { |
| 7579 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7580 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7581 | countingStream->write((int*)&fd, sizeof(int)); |
| 7582 | marshal_VkMemoryFdPropertiesKHR(countingStream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7583 | } |
| 7584 | uint32_t packetSize_vkGetMemoryFdPropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7585 | countingStream->rewind(); |
| 7586 | uint32_t opcode_vkGetMemoryFdPropertiesKHR = OP_vkGetMemoryFdPropertiesKHR; |
| 7587 | stream->write(&opcode_vkGetMemoryFdPropertiesKHR, sizeof(uint32_t)); |
| 7588 | stream->write(&packetSize_vkGetMemoryFdPropertiesKHR, sizeof(uint32_t)); |
| 7589 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7590 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 7591 | stream->write((int*)&fd, sizeof(int)); |
| 7592 | marshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7593 | unmarshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties)); |
| 7594 | VkResult vkGetMemoryFdPropertiesKHR_VkResult_return = (VkResult)0; |
| 7595 | stream->read(&vkGetMemoryFdPropertiesKHR_VkResult_return, sizeof(VkResult)); |
| 7596 | return vkGetMemoryFdPropertiesKHR_VkResult_return; |
| 7597 | } |
| 7598 | |
| 7599 | #endif |
| 7600 | #ifdef VK_KHR_win32_keyed_mutex |
| 7601 | #endif |
| 7602 | #ifdef VK_KHR_external_semaphore_capabilities |
| 7603 | void VkEncoder::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( |
| 7604 | VkPhysicalDevice physicalDevice, |
| 7605 | const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, |
| 7606 | VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
| 7607 | { |
| 7608 | auto stream = mImpl->stream(); |
| 7609 | auto countingStream = mImpl->countingStream(); |
| 7610 | countingStream->rewind(); |
| 7611 | { |
| 7612 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7613 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(countingStream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 7614 | marshal_VkExternalSemaphoreProperties(countingStream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7615 | } |
| 7616 | uint32_t packetSize_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7617 | countingStream->rewind(); |
| 7618 | uint32_t opcode_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = OP_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; |
| 7619 | stream->write(&opcode_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, sizeof(uint32_t)); |
| 7620 | stream->write(&packetSize_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, sizeof(uint32_t)); |
| 7621 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 7622 | marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (const VkPhysicalDeviceExternalSemaphoreInfo*)(pExternalSemaphoreInfo)); |
| 7623 | marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7624 | unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties)); |
| 7625 | } |
| 7626 | |
| 7627 | #endif |
| 7628 | #ifdef VK_KHR_external_semaphore |
| 7629 | #endif |
| 7630 | #ifdef VK_KHR_external_semaphore_win32 |
| 7631 | VkResult VkEncoder::vkImportSemaphoreWin32HandleKHR( |
| 7632 | VkDevice device, |
| 7633 | const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) |
| 7634 | { |
| 7635 | auto stream = mImpl->stream(); |
| 7636 | auto countingStream = mImpl->countingStream(); |
| 7637 | countingStream->rewind(); |
| 7638 | { |
| 7639 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7640 | marshal_VkImportSemaphoreWin32HandleInfoKHR(countingStream, (const VkImportSemaphoreWin32HandleInfoKHR*)(pImportSemaphoreWin32HandleInfo)); |
| 7641 | } |
| 7642 | uint32_t packetSize_vkImportSemaphoreWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7643 | countingStream->rewind(); |
| 7644 | uint32_t opcode_vkImportSemaphoreWin32HandleKHR = OP_vkImportSemaphoreWin32HandleKHR; |
| 7645 | stream->write(&opcode_vkImportSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7646 | stream->write(&packetSize_vkImportSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7647 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7648 | marshal_VkImportSemaphoreWin32HandleInfoKHR(stream, (const VkImportSemaphoreWin32HandleInfoKHR*)(pImportSemaphoreWin32HandleInfo)); |
| 7649 | VkResult vkImportSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7650 | stream->read(&vkImportSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7651 | return vkImportSemaphoreWin32HandleKHR_VkResult_return; |
| 7652 | } |
| 7653 | |
| 7654 | VkResult VkEncoder::vkGetSemaphoreWin32HandleKHR( |
| 7655 | VkDevice device, |
| 7656 | const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 7657 | HANDLE* pHandle) |
| 7658 | { |
| 7659 | auto stream = mImpl->stream(); |
| 7660 | auto countingStream = mImpl->countingStream(); |
| 7661 | countingStream->rewind(); |
| 7662 | { |
| 7663 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7664 | marshal_VkSemaphoreGetWin32HandleInfoKHR(countingStream, (const VkSemaphoreGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7665 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7666 | } |
| 7667 | uint32_t packetSize_vkGetSemaphoreWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7668 | countingStream->rewind(); |
| 7669 | uint32_t opcode_vkGetSemaphoreWin32HandleKHR = OP_vkGetSemaphoreWin32HandleKHR; |
| 7670 | stream->write(&opcode_vkGetSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7671 | stream->write(&packetSize_vkGetSemaphoreWin32HandleKHR, sizeof(uint32_t)); |
| 7672 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7673 | marshal_VkSemaphoreGetWin32HandleInfoKHR(stream, (const VkSemaphoreGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 7674 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7675 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 7676 | VkResult vkGetSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0; |
| 7677 | stream->read(&vkGetSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 7678 | return vkGetSemaphoreWin32HandleKHR_VkResult_return; |
| 7679 | } |
| 7680 | |
| 7681 | #endif |
| 7682 | #ifdef VK_KHR_external_semaphore_fd |
| 7683 | VkResult VkEncoder::vkImportSemaphoreFdKHR( |
| 7684 | VkDevice device, |
| 7685 | const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) |
| 7686 | { |
| 7687 | auto stream = mImpl->stream(); |
| 7688 | auto countingStream = mImpl->countingStream(); |
| 7689 | countingStream->rewind(); |
| 7690 | { |
| 7691 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7692 | marshal_VkImportSemaphoreFdInfoKHR(countingStream, (const VkImportSemaphoreFdInfoKHR*)(pImportSemaphoreFdInfo)); |
| 7693 | } |
| 7694 | uint32_t packetSize_vkImportSemaphoreFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7695 | countingStream->rewind(); |
| 7696 | uint32_t opcode_vkImportSemaphoreFdKHR = OP_vkImportSemaphoreFdKHR; |
| 7697 | stream->write(&opcode_vkImportSemaphoreFdKHR, sizeof(uint32_t)); |
| 7698 | stream->write(&packetSize_vkImportSemaphoreFdKHR, sizeof(uint32_t)); |
| 7699 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7700 | marshal_VkImportSemaphoreFdInfoKHR(stream, (const VkImportSemaphoreFdInfoKHR*)(pImportSemaphoreFdInfo)); |
| 7701 | VkResult vkImportSemaphoreFdKHR_VkResult_return = (VkResult)0; |
| 7702 | stream->read(&vkImportSemaphoreFdKHR_VkResult_return, sizeof(VkResult)); |
| 7703 | return vkImportSemaphoreFdKHR_VkResult_return; |
| 7704 | } |
| 7705 | |
| 7706 | VkResult VkEncoder::vkGetSemaphoreFdKHR( |
| 7707 | VkDevice device, |
| 7708 | const VkSemaphoreGetFdInfoKHR* pGetFdInfo, |
| 7709 | int* pFd) |
| 7710 | { |
| 7711 | auto stream = mImpl->stream(); |
| 7712 | auto countingStream = mImpl->countingStream(); |
| 7713 | countingStream->rewind(); |
| 7714 | { |
| 7715 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7716 | marshal_VkSemaphoreGetFdInfoKHR(countingStream, (const VkSemaphoreGetFdInfoKHR*)(pGetFdInfo)); |
| 7717 | countingStream->write((int*)pFd, sizeof(int)); |
| 7718 | } |
| 7719 | uint32_t packetSize_vkGetSemaphoreFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7720 | countingStream->rewind(); |
| 7721 | uint32_t opcode_vkGetSemaphoreFdKHR = OP_vkGetSemaphoreFdKHR; |
| 7722 | stream->write(&opcode_vkGetSemaphoreFdKHR, sizeof(uint32_t)); |
| 7723 | stream->write(&packetSize_vkGetSemaphoreFdKHR, sizeof(uint32_t)); |
| 7724 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7725 | marshal_VkSemaphoreGetFdInfoKHR(stream, (const VkSemaphoreGetFdInfoKHR*)(pGetFdInfo)); |
| 7726 | stream->write((int*)pFd, sizeof(int)); |
| 7727 | stream->read((int*)pFd, sizeof(int)); |
| 7728 | VkResult vkGetSemaphoreFdKHR_VkResult_return = (VkResult)0; |
| 7729 | stream->read(&vkGetSemaphoreFdKHR_VkResult_return, sizeof(VkResult)); |
| 7730 | return vkGetSemaphoreFdKHR_VkResult_return; |
| 7731 | } |
| 7732 | |
| 7733 | #endif |
| 7734 | #ifdef VK_KHR_push_descriptor |
| 7735 | void VkEncoder::vkCmdPushDescriptorSetKHR( |
| 7736 | VkCommandBuffer commandBuffer, |
| 7737 | VkPipelineBindPoint pipelineBindPoint, |
| 7738 | VkPipelineLayout layout, |
| 7739 | uint32_t set, |
| 7740 | uint32_t descriptorWriteCount, |
| 7741 | const VkWriteDescriptorSet* pDescriptorWrites) |
| 7742 | { |
| 7743 | auto stream = mImpl->stream(); |
| 7744 | auto countingStream = mImpl->countingStream(); |
| 7745 | countingStream->rewind(); |
| 7746 | { |
| 7747 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7748 | countingStream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 7749 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7750 | countingStream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7751 | countingStream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 7752 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 7753 | { |
| 7754 | marshal_VkWriteDescriptorSet(countingStream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 7755 | } |
| 7756 | } |
| 7757 | uint32_t packetSize_vkCmdPushDescriptorSetKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7758 | countingStream->rewind(); |
| 7759 | uint32_t opcode_vkCmdPushDescriptorSetKHR = OP_vkCmdPushDescriptorSetKHR; |
| 7760 | stream->write(&opcode_vkCmdPushDescriptorSetKHR, sizeof(uint32_t)); |
| 7761 | stream->write(&packetSize_vkCmdPushDescriptorSetKHR, sizeof(uint32_t)); |
| 7762 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7763 | stream->write((VkPipelineBindPoint*)&pipelineBindPoint, sizeof(VkPipelineBindPoint)); |
| 7764 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7765 | stream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7766 | stream->write((uint32_t*)&descriptorWriteCount, sizeof(uint32_t)); |
| 7767 | for (uint32_t i = 0; i < (uint32_t)((descriptorWriteCount)); ++i) |
| 7768 | { |
| 7769 | marshal_VkWriteDescriptorSet(stream, (const VkWriteDescriptorSet*)(pDescriptorWrites + i)); |
| 7770 | } |
| 7771 | } |
| 7772 | |
| 7773 | void VkEncoder::vkCmdPushDescriptorSetWithTemplateKHR( |
| 7774 | VkCommandBuffer commandBuffer, |
| 7775 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7776 | VkPipelineLayout layout, |
| 7777 | uint32_t set, |
| 7778 | const void* pData) |
| 7779 | { |
| 7780 | auto stream = mImpl->stream(); |
| 7781 | auto countingStream = mImpl->countingStream(); |
| 7782 | countingStream->rewind(); |
| 7783 | { |
| 7784 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7785 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7786 | countingStream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7787 | countingStream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7788 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 7789 | if (pData) |
| 7790 | { |
| 7791 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 7792 | } |
| 7793 | } |
| 7794 | uint32_t packetSize_vkCmdPushDescriptorSetWithTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7795 | countingStream->rewind(); |
| 7796 | uint32_t opcode_vkCmdPushDescriptorSetWithTemplateKHR = OP_vkCmdPushDescriptorSetWithTemplateKHR; |
| 7797 | stream->write(&opcode_vkCmdPushDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7798 | stream->write(&packetSize_vkCmdPushDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7799 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7800 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7801 | stream->write((VkPipelineLayout*)&layout, sizeof(VkPipelineLayout)); |
| 7802 | stream->write((uint32_t*)&set, sizeof(uint32_t)); |
| 7803 | stream->write((const void**)&pData, sizeof(const void*)); |
| 7804 | if (pData) |
| 7805 | { |
| 7806 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 7807 | } |
| 7808 | } |
| 7809 | |
| 7810 | #endif |
| 7811 | #ifdef VK_KHR_16bit_storage |
| 7812 | #endif |
| 7813 | #ifdef VK_KHR_incremental_present |
| 7814 | #endif |
| 7815 | #ifdef VK_KHR_descriptor_update_template |
| 7816 | VkResult VkEncoder::vkCreateDescriptorUpdateTemplateKHR( |
| 7817 | VkDevice device, |
| 7818 | const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, |
| 7819 | const VkAllocationCallbacks* pAllocator, |
| 7820 | VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
| 7821 | { |
| 7822 | auto stream = mImpl->stream(); |
| 7823 | auto countingStream = mImpl->countingStream(); |
| 7824 | countingStream->rewind(); |
| 7825 | { |
| 7826 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7827 | marshal_VkDescriptorUpdateTemplateCreateInfo(countingStream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 7828 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7829 | if (pAllocator) |
| 7830 | { |
| 7831 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7832 | } |
| 7833 | countingStream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7834 | } |
| 7835 | uint32_t packetSize_vkCreateDescriptorUpdateTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7836 | countingStream->rewind(); |
| 7837 | uint32_t opcode_vkCreateDescriptorUpdateTemplateKHR = OP_vkCreateDescriptorUpdateTemplateKHR; |
| 7838 | stream->write(&opcode_vkCreateDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7839 | stream->write(&packetSize_vkCreateDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7840 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7841 | marshal_VkDescriptorUpdateTemplateCreateInfo(stream, (const VkDescriptorUpdateTemplateCreateInfo*)(pCreateInfo)); |
| 7842 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7843 | if (pAllocator) |
| 7844 | { |
| 7845 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7846 | } |
| 7847 | stream->write((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7848 | stream->read((VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7849 | VkResult vkCreateDescriptorUpdateTemplateKHR_VkResult_return = (VkResult)0; |
| 7850 | stream->read(&vkCreateDescriptorUpdateTemplateKHR_VkResult_return, sizeof(VkResult)); |
| 7851 | return vkCreateDescriptorUpdateTemplateKHR_VkResult_return; |
| 7852 | } |
| 7853 | |
| 7854 | void VkEncoder::vkDestroyDescriptorUpdateTemplateKHR( |
| 7855 | VkDevice device, |
| 7856 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7857 | const VkAllocationCallbacks* pAllocator) |
| 7858 | { |
| 7859 | auto stream = mImpl->stream(); |
| 7860 | auto countingStream = mImpl->countingStream(); |
| 7861 | countingStream->rewind(); |
| 7862 | { |
| 7863 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7864 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7865 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7866 | if (pAllocator) |
| 7867 | { |
| 7868 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7869 | } |
| 7870 | } |
| 7871 | uint32_t packetSize_vkDestroyDescriptorUpdateTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7872 | countingStream->rewind(); |
| 7873 | uint32_t opcode_vkDestroyDescriptorUpdateTemplateKHR = OP_vkDestroyDescriptorUpdateTemplateKHR; |
| 7874 | stream->write(&opcode_vkDestroyDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7875 | stream->write(&packetSize_vkDestroyDescriptorUpdateTemplateKHR, sizeof(uint32_t)); |
| 7876 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7877 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7878 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7879 | if (pAllocator) |
| 7880 | { |
| 7881 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7882 | } |
| 7883 | } |
| 7884 | |
| 7885 | void VkEncoder::vkUpdateDescriptorSetWithTemplateKHR( |
| 7886 | VkDevice device, |
| 7887 | VkDescriptorSet descriptorSet, |
| 7888 | VkDescriptorUpdateTemplate descriptorUpdateTemplate, |
| 7889 | const void* pData) |
| 7890 | { |
| 7891 | auto stream = mImpl->stream(); |
| 7892 | auto countingStream = mImpl->countingStream(); |
| 7893 | countingStream->rewind(); |
| 7894 | { |
| 7895 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7896 | countingStream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 7897 | countingStream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7898 | countingStream->write((const void**)&pData, sizeof(const void*)); |
| 7899 | if (pData) |
| 7900 | { |
| 7901 | countingStream->write((const void*)pData, sizeof(const uint8_t)); |
| 7902 | } |
| 7903 | } |
| 7904 | uint32_t packetSize_vkUpdateDescriptorSetWithTemplateKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7905 | countingStream->rewind(); |
| 7906 | uint32_t opcode_vkUpdateDescriptorSetWithTemplateKHR = OP_vkUpdateDescriptorSetWithTemplateKHR; |
| 7907 | stream->write(&opcode_vkUpdateDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7908 | stream->write(&packetSize_vkUpdateDescriptorSetWithTemplateKHR, sizeof(uint32_t)); |
| 7909 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7910 | stream->write((VkDescriptorSet*)&descriptorSet, sizeof(VkDescriptorSet)); |
| 7911 | stream->write((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate, sizeof(VkDescriptorUpdateTemplate)); |
| 7912 | stream->write((const void**)&pData, sizeof(const void*)); |
| 7913 | if (pData) |
| 7914 | { |
| 7915 | stream->write((const void*)pData, sizeof(const uint8_t)); |
| 7916 | } |
| 7917 | } |
| 7918 | |
| 7919 | #endif |
| 7920 | #ifdef VK_KHR_create_renderpass2 |
| 7921 | VkResult VkEncoder::vkCreateRenderPass2KHR( |
| 7922 | VkDevice device, |
| 7923 | const VkRenderPassCreateInfo2KHR* pCreateInfo, |
| 7924 | const VkAllocationCallbacks* pAllocator, |
| 7925 | VkRenderPass* pRenderPass) |
| 7926 | { |
| 7927 | auto stream = mImpl->stream(); |
| 7928 | auto countingStream = mImpl->countingStream(); |
| 7929 | countingStream->rewind(); |
| 7930 | { |
| 7931 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7932 | marshal_VkRenderPassCreateInfo2KHR(countingStream, (const VkRenderPassCreateInfo2KHR*)(pCreateInfo)); |
| 7933 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7934 | if (pAllocator) |
| 7935 | { |
| 7936 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7937 | } |
| 7938 | countingStream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7939 | } |
| 7940 | uint32_t packetSize_vkCreateRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7941 | countingStream->rewind(); |
| 7942 | uint32_t opcode_vkCreateRenderPass2KHR = OP_vkCreateRenderPass2KHR; |
| 7943 | stream->write(&opcode_vkCreateRenderPass2KHR, sizeof(uint32_t)); |
| 7944 | stream->write(&packetSize_vkCreateRenderPass2KHR, sizeof(uint32_t)); |
| 7945 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 7946 | marshal_VkRenderPassCreateInfo2KHR(stream, (const VkRenderPassCreateInfo2KHR*)(pCreateInfo)); |
| 7947 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 7948 | if (pAllocator) |
| 7949 | { |
| 7950 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 7951 | } |
| 7952 | stream->write((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7953 | stream->read((VkRenderPass*)pRenderPass, sizeof(VkRenderPass)); |
| 7954 | VkResult vkCreateRenderPass2KHR_VkResult_return = (VkResult)0; |
| 7955 | stream->read(&vkCreateRenderPass2KHR_VkResult_return, sizeof(VkResult)); |
| 7956 | return vkCreateRenderPass2KHR_VkResult_return; |
| 7957 | } |
| 7958 | |
| 7959 | void VkEncoder::vkCmdBeginRenderPass2KHR( |
| 7960 | VkCommandBuffer commandBuffer, |
| 7961 | const VkRenderPassBeginInfo* pRenderPassBegin, |
| 7962 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo) |
| 7963 | { |
| 7964 | auto stream = mImpl->stream(); |
| 7965 | auto countingStream = mImpl->countingStream(); |
| 7966 | countingStream->rewind(); |
| 7967 | { |
| 7968 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7969 | marshal_VkRenderPassBeginInfo(countingStream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 7970 | marshal_VkSubpassBeginInfoKHR(countingStream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7971 | } |
| 7972 | uint32_t packetSize_vkCmdBeginRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7973 | countingStream->rewind(); |
| 7974 | uint32_t opcode_vkCmdBeginRenderPass2KHR = OP_vkCmdBeginRenderPass2KHR; |
| 7975 | stream->write(&opcode_vkCmdBeginRenderPass2KHR, sizeof(uint32_t)); |
| 7976 | stream->write(&packetSize_vkCmdBeginRenderPass2KHR, sizeof(uint32_t)); |
| 7977 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7978 | marshal_VkRenderPassBeginInfo(stream, (const VkRenderPassBeginInfo*)(pRenderPassBegin)); |
| 7979 | marshal_VkSubpassBeginInfoKHR(stream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7980 | } |
| 7981 | |
| 7982 | void VkEncoder::vkCmdNextSubpass2KHR( |
| 7983 | VkCommandBuffer commandBuffer, |
| 7984 | const VkSubpassBeginInfoKHR* pSubpassBeginInfo, |
| 7985 | const VkSubpassEndInfoKHR* pSubpassEndInfo) |
| 7986 | { |
| 7987 | auto stream = mImpl->stream(); |
| 7988 | auto countingStream = mImpl->countingStream(); |
| 7989 | countingStream->rewind(); |
| 7990 | { |
| 7991 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 7992 | marshal_VkSubpassBeginInfoKHR(countingStream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 7993 | marshal_VkSubpassEndInfoKHR(countingStream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 7994 | } |
| 7995 | uint32_t packetSize_vkCmdNextSubpass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 7996 | countingStream->rewind(); |
| 7997 | uint32_t opcode_vkCmdNextSubpass2KHR = OP_vkCmdNextSubpass2KHR; |
| 7998 | stream->write(&opcode_vkCmdNextSubpass2KHR, sizeof(uint32_t)); |
| 7999 | stream->write(&packetSize_vkCmdNextSubpass2KHR, sizeof(uint32_t)); |
| 8000 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8001 | marshal_VkSubpassBeginInfoKHR(stream, (const VkSubpassBeginInfoKHR*)(pSubpassBeginInfo)); |
| 8002 | marshal_VkSubpassEndInfoKHR(stream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8003 | } |
| 8004 | |
| 8005 | void VkEncoder::vkCmdEndRenderPass2KHR( |
| 8006 | VkCommandBuffer commandBuffer, |
| 8007 | const VkSubpassEndInfoKHR* pSubpassEndInfo) |
| 8008 | { |
| 8009 | auto stream = mImpl->stream(); |
| 8010 | auto countingStream = mImpl->countingStream(); |
| 8011 | countingStream->rewind(); |
| 8012 | { |
| 8013 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8014 | marshal_VkSubpassEndInfoKHR(countingStream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8015 | } |
| 8016 | uint32_t packetSize_vkCmdEndRenderPass2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8017 | countingStream->rewind(); |
| 8018 | uint32_t opcode_vkCmdEndRenderPass2KHR = OP_vkCmdEndRenderPass2KHR; |
| 8019 | stream->write(&opcode_vkCmdEndRenderPass2KHR, sizeof(uint32_t)); |
| 8020 | stream->write(&packetSize_vkCmdEndRenderPass2KHR, sizeof(uint32_t)); |
| 8021 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8022 | marshal_VkSubpassEndInfoKHR(stream, (const VkSubpassEndInfoKHR*)(pSubpassEndInfo)); |
| 8023 | } |
| 8024 | |
| 8025 | #endif |
| 8026 | #ifdef VK_KHR_shared_presentable_image |
| 8027 | VkResult VkEncoder::vkGetSwapchainStatusKHR( |
| 8028 | VkDevice device, |
| 8029 | VkSwapchainKHR swapchain) |
| 8030 | { |
| 8031 | auto stream = mImpl->stream(); |
| 8032 | auto countingStream = mImpl->countingStream(); |
| 8033 | countingStream->rewind(); |
| 8034 | { |
| 8035 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8036 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 8037 | } |
| 8038 | uint32_t packetSize_vkGetSwapchainStatusKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8039 | countingStream->rewind(); |
| 8040 | uint32_t opcode_vkGetSwapchainStatusKHR = OP_vkGetSwapchainStatusKHR; |
| 8041 | stream->write(&opcode_vkGetSwapchainStatusKHR, sizeof(uint32_t)); |
| 8042 | stream->write(&packetSize_vkGetSwapchainStatusKHR, sizeof(uint32_t)); |
| 8043 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8044 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 8045 | VkResult vkGetSwapchainStatusKHR_VkResult_return = (VkResult)0; |
| 8046 | stream->read(&vkGetSwapchainStatusKHR_VkResult_return, sizeof(VkResult)); |
| 8047 | return vkGetSwapchainStatusKHR_VkResult_return; |
| 8048 | } |
| 8049 | |
| 8050 | #endif |
| 8051 | #ifdef VK_KHR_external_fence_capabilities |
| 8052 | void VkEncoder::vkGetPhysicalDeviceExternalFencePropertiesKHR( |
| 8053 | VkPhysicalDevice physicalDevice, |
| 8054 | const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, |
| 8055 | VkExternalFenceProperties* pExternalFenceProperties) |
| 8056 | { |
| 8057 | auto stream = mImpl->stream(); |
| 8058 | auto countingStream = mImpl->countingStream(); |
| 8059 | countingStream->rewind(); |
| 8060 | { |
| 8061 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8062 | marshal_VkPhysicalDeviceExternalFenceInfo(countingStream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 8063 | marshal_VkExternalFenceProperties(countingStream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8064 | } |
| 8065 | uint32_t packetSize_vkGetPhysicalDeviceExternalFencePropertiesKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8066 | countingStream->rewind(); |
| 8067 | uint32_t opcode_vkGetPhysicalDeviceExternalFencePropertiesKHR = OP_vkGetPhysicalDeviceExternalFencePropertiesKHR; |
| 8068 | stream->write(&opcode_vkGetPhysicalDeviceExternalFencePropertiesKHR, sizeof(uint32_t)); |
| 8069 | stream->write(&packetSize_vkGetPhysicalDeviceExternalFencePropertiesKHR, sizeof(uint32_t)); |
| 8070 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8071 | marshal_VkPhysicalDeviceExternalFenceInfo(stream, (const VkPhysicalDeviceExternalFenceInfo*)(pExternalFenceInfo)); |
| 8072 | marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8073 | unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties)); |
| 8074 | } |
| 8075 | |
| 8076 | #endif |
| 8077 | #ifdef VK_KHR_external_fence |
| 8078 | #endif |
| 8079 | #ifdef VK_KHR_external_fence_win32 |
| 8080 | VkResult VkEncoder::vkImportFenceWin32HandleKHR( |
| 8081 | VkDevice device, |
| 8082 | const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) |
| 8083 | { |
| 8084 | auto stream = mImpl->stream(); |
| 8085 | auto countingStream = mImpl->countingStream(); |
| 8086 | countingStream->rewind(); |
| 8087 | { |
| 8088 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8089 | marshal_VkImportFenceWin32HandleInfoKHR(countingStream, (const VkImportFenceWin32HandleInfoKHR*)(pImportFenceWin32HandleInfo)); |
| 8090 | } |
| 8091 | uint32_t packetSize_vkImportFenceWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8092 | countingStream->rewind(); |
| 8093 | uint32_t opcode_vkImportFenceWin32HandleKHR = OP_vkImportFenceWin32HandleKHR; |
| 8094 | stream->write(&opcode_vkImportFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8095 | stream->write(&packetSize_vkImportFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8096 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8097 | marshal_VkImportFenceWin32HandleInfoKHR(stream, (const VkImportFenceWin32HandleInfoKHR*)(pImportFenceWin32HandleInfo)); |
| 8098 | VkResult vkImportFenceWin32HandleKHR_VkResult_return = (VkResult)0; |
| 8099 | stream->read(&vkImportFenceWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 8100 | return vkImportFenceWin32HandleKHR_VkResult_return; |
| 8101 | } |
| 8102 | |
| 8103 | VkResult VkEncoder::vkGetFenceWin32HandleKHR( |
| 8104 | VkDevice device, |
| 8105 | const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, |
| 8106 | HANDLE* pHandle) |
| 8107 | { |
| 8108 | auto stream = mImpl->stream(); |
| 8109 | auto countingStream = mImpl->countingStream(); |
| 8110 | countingStream->rewind(); |
| 8111 | { |
| 8112 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8113 | marshal_VkFenceGetWin32HandleInfoKHR(countingStream, (const VkFenceGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 8114 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8115 | } |
| 8116 | uint32_t packetSize_vkGetFenceWin32HandleKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8117 | countingStream->rewind(); |
| 8118 | uint32_t opcode_vkGetFenceWin32HandleKHR = OP_vkGetFenceWin32HandleKHR; |
| 8119 | stream->write(&opcode_vkGetFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8120 | stream->write(&packetSize_vkGetFenceWin32HandleKHR, sizeof(uint32_t)); |
| 8121 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8122 | marshal_VkFenceGetWin32HandleInfoKHR(stream, (const VkFenceGetWin32HandleInfoKHR*)(pGetWin32HandleInfo)); |
| 8123 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8124 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 8125 | VkResult vkGetFenceWin32HandleKHR_VkResult_return = (VkResult)0; |
| 8126 | stream->read(&vkGetFenceWin32HandleKHR_VkResult_return, sizeof(VkResult)); |
| 8127 | return vkGetFenceWin32HandleKHR_VkResult_return; |
| 8128 | } |
| 8129 | |
| 8130 | #endif |
| 8131 | #ifdef VK_KHR_external_fence_fd |
| 8132 | VkResult VkEncoder::vkImportFenceFdKHR( |
| 8133 | VkDevice device, |
| 8134 | const VkImportFenceFdInfoKHR* pImportFenceFdInfo) |
| 8135 | { |
| 8136 | auto stream = mImpl->stream(); |
| 8137 | auto countingStream = mImpl->countingStream(); |
| 8138 | countingStream->rewind(); |
| 8139 | { |
| 8140 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8141 | marshal_VkImportFenceFdInfoKHR(countingStream, (const VkImportFenceFdInfoKHR*)(pImportFenceFdInfo)); |
| 8142 | } |
| 8143 | uint32_t packetSize_vkImportFenceFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8144 | countingStream->rewind(); |
| 8145 | uint32_t opcode_vkImportFenceFdKHR = OP_vkImportFenceFdKHR; |
| 8146 | stream->write(&opcode_vkImportFenceFdKHR, sizeof(uint32_t)); |
| 8147 | stream->write(&packetSize_vkImportFenceFdKHR, sizeof(uint32_t)); |
| 8148 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8149 | marshal_VkImportFenceFdInfoKHR(stream, (const VkImportFenceFdInfoKHR*)(pImportFenceFdInfo)); |
| 8150 | VkResult vkImportFenceFdKHR_VkResult_return = (VkResult)0; |
| 8151 | stream->read(&vkImportFenceFdKHR_VkResult_return, sizeof(VkResult)); |
| 8152 | return vkImportFenceFdKHR_VkResult_return; |
| 8153 | } |
| 8154 | |
| 8155 | VkResult VkEncoder::vkGetFenceFdKHR( |
| 8156 | VkDevice device, |
| 8157 | const VkFenceGetFdInfoKHR* pGetFdInfo, |
| 8158 | int* pFd) |
| 8159 | { |
| 8160 | auto stream = mImpl->stream(); |
| 8161 | auto countingStream = mImpl->countingStream(); |
| 8162 | countingStream->rewind(); |
| 8163 | { |
| 8164 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8165 | marshal_VkFenceGetFdInfoKHR(countingStream, (const VkFenceGetFdInfoKHR*)(pGetFdInfo)); |
| 8166 | countingStream->write((int*)pFd, sizeof(int)); |
| 8167 | } |
| 8168 | uint32_t packetSize_vkGetFenceFdKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8169 | countingStream->rewind(); |
| 8170 | uint32_t opcode_vkGetFenceFdKHR = OP_vkGetFenceFdKHR; |
| 8171 | stream->write(&opcode_vkGetFenceFdKHR, sizeof(uint32_t)); |
| 8172 | stream->write(&packetSize_vkGetFenceFdKHR, sizeof(uint32_t)); |
| 8173 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8174 | marshal_VkFenceGetFdInfoKHR(stream, (const VkFenceGetFdInfoKHR*)(pGetFdInfo)); |
| 8175 | stream->write((int*)pFd, sizeof(int)); |
| 8176 | stream->read((int*)pFd, sizeof(int)); |
| 8177 | VkResult vkGetFenceFdKHR_VkResult_return = (VkResult)0; |
| 8178 | stream->read(&vkGetFenceFdKHR_VkResult_return, sizeof(VkResult)); |
| 8179 | return vkGetFenceFdKHR_VkResult_return; |
| 8180 | } |
| 8181 | |
| 8182 | #endif |
| 8183 | #ifdef VK_KHR_maintenance2 |
| 8184 | #endif |
| 8185 | #ifdef VK_KHR_get_surface_capabilities2 |
| 8186 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilities2KHR( |
| 8187 | VkPhysicalDevice physicalDevice, |
| 8188 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 8189 | VkSurfaceCapabilities2KHR* pSurfaceCapabilities) |
| 8190 | { |
| 8191 | auto stream = mImpl->stream(); |
| 8192 | auto countingStream = mImpl->countingStream(); |
| 8193 | countingStream->rewind(); |
| 8194 | { |
| 8195 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8196 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(countingStream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8197 | marshal_VkSurfaceCapabilities2KHR(countingStream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8198 | } |
| 8199 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilities2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8200 | countingStream->rewind(); |
| 8201 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilities2KHR = OP_vkGetPhysicalDeviceSurfaceCapabilities2KHR; |
| 8202 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilities2KHR, sizeof(uint32_t)); |
| 8203 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilities2KHR, sizeof(uint32_t)); |
| 8204 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8205 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(stream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8206 | marshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8207 | unmarshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities)); |
| 8208 | VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return = (VkResult)0; |
| 8209 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return, sizeof(VkResult)); |
| 8210 | return vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return; |
| 8211 | } |
| 8212 | |
| 8213 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceFormats2KHR( |
| 8214 | VkPhysicalDevice physicalDevice, |
| 8215 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 8216 | uint32_t* pSurfaceFormatCount, |
| 8217 | VkSurfaceFormat2KHR* pSurfaceFormats) |
| 8218 | { |
| 8219 | auto stream = mImpl->stream(); |
| 8220 | auto countingStream = mImpl->countingStream(); |
| 8221 | countingStream->rewind(); |
| 8222 | { |
| 8223 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8224 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(countingStream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8225 | countingStream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8226 | if (pSurfaceFormatCount) |
| 8227 | { |
| 8228 | countingStream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8229 | } |
| 8230 | countingStream->write((VkSurfaceFormat2KHR**)&pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8231 | if (pSurfaceFormats) |
| 8232 | { |
| 8233 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8234 | { |
| 8235 | marshal_VkSurfaceFormat2KHR(countingStream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8236 | } |
| 8237 | } |
| 8238 | } |
| 8239 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceFormats2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8240 | countingStream->rewind(); |
| 8241 | uint32_t opcode_vkGetPhysicalDeviceSurfaceFormats2KHR = OP_vkGetPhysicalDeviceSurfaceFormats2KHR; |
| 8242 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceFormats2KHR, sizeof(uint32_t)); |
| 8243 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceFormats2KHR, sizeof(uint32_t)); |
| 8244 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8245 | marshal_VkPhysicalDeviceSurfaceInfo2KHR(stream, (const VkPhysicalDeviceSurfaceInfo2KHR*)(pSurfaceInfo)); |
| 8246 | stream->write((uint32_t**)&pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8247 | if (pSurfaceFormatCount) |
| 8248 | { |
| 8249 | stream->write((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8250 | } |
| 8251 | stream->write((VkSurfaceFormat2KHR**)&pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8252 | if (pSurfaceFormats) |
| 8253 | { |
| 8254 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8255 | { |
| 8256 | marshal_VkSurfaceFormat2KHR(stream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8257 | } |
| 8258 | } |
| 8259 | uint32_t* check_pSurfaceFormatCount; |
| 8260 | stream->read((uint32_t**)&check_pSurfaceFormatCount, sizeof(uint32_t*)); |
| 8261 | if (pSurfaceFormatCount) |
| 8262 | { |
| 8263 | if (!(check_pSurfaceFormatCount)) |
| 8264 | { |
| 8265 | fprintf(stderr, "fatal: pSurfaceFormatCount inconsistent between guest and host\n"); |
| 8266 | } |
| 8267 | stream->read((uint32_t*)pSurfaceFormatCount, sizeof(uint32_t)); |
| 8268 | } |
| 8269 | VkSurfaceFormat2KHR* check_pSurfaceFormats; |
| 8270 | stream->read((VkSurfaceFormat2KHR**)&check_pSurfaceFormats, sizeof(VkSurfaceFormat2KHR*)); |
| 8271 | if (pSurfaceFormats) |
| 8272 | { |
| 8273 | if (!(check_pSurfaceFormats)) |
| 8274 | { |
| 8275 | fprintf(stderr, "fatal: pSurfaceFormats inconsistent between guest and host\n"); |
| 8276 | } |
| 8277 | for (uint32_t i = 0; i < (uint32_t)(*(pSurfaceFormatCount)); ++i) |
| 8278 | { |
| 8279 | unmarshal_VkSurfaceFormat2KHR(stream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i)); |
| 8280 | } |
| 8281 | } |
| 8282 | VkResult vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return = (VkResult)0; |
| 8283 | stream->read(&vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return, sizeof(VkResult)); |
| 8284 | return vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return; |
| 8285 | } |
| 8286 | |
| 8287 | #endif |
| 8288 | #ifdef VK_KHR_variable_pointers |
| 8289 | #endif |
| 8290 | #ifdef VK_KHR_get_display_properties2 |
| 8291 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayProperties2KHR( |
| 8292 | VkPhysicalDevice physicalDevice, |
| 8293 | uint32_t* pPropertyCount, |
| 8294 | VkDisplayProperties2KHR* pProperties) |
| 8295 | { |
| 8296 | auto stream = mImpl->stream(); |
| 8297 | auto countingStream = mImpl->countingStream(); |
| 8298 | countingStream->rewind(); |
| 8299 | { |
| 8300 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8301 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8302 | if (pPropertyCount) |
| 8303 | { |
| 8304 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8305 | } |
| 8306 | countingStream->write((VkDisplayProperties2KHR**)&pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8307 | if (pProperties) |
| 8308 | { |
| 8309 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8310 | { |
| 8311 | marshal_VkDisplayProperties2KHR(countingStream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8312 | } |
| 8313 | } |
| 8314 | } |
| 8315 | uint32_t packetSize_vkGetPhysicalDeviceDisplayProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8316 | countingStream->rewind(); |
| 8317 | uint32_t opcode_vkGetPhysicalDeviceDisplayProperties2KHR = OP_vkGetPhysicalDeviceDisplayProperties2KHR; |
| 8318 | stream->write(&opcode_vkGetPhysicalDeviceDisplayProperties2KHR, sizeof(uint32_t)); |
| 8319 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayProperties2KHR, sizeof(uint32_t)); |
| 8320 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8321 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8322 | if (pPropertyCount) |
| 8323 | { |
| 8324 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8325 | } |
| 8326 | stream->write((VkDisplayProperties2KHR**)&pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8327 | if (pProperties) |
| 8328 | { |
| 8329 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8330 | { |
| 8331 | marshal_VkDisplayProperties2KHR(stream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8332 | } |
| 8333 | } |
| 8334 | uint32_t* check_pPropertyCount; |
| 8335 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8336 | if (pPropertyCount) |
| 8337 | { |
| 8338 | if (!(check_pPropertyCount)) |
| 8339 | { |
| 8340 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8341 | } |
| 8342 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8343 | } |
| 8344 | VkDisplayProperties2KHR* check_pProperties; |
| 8345 | stream->read((VkDisplayProperties2KHR**)&check_pProperties, sizeof(VkDisplayProperties2KHR*)); |
| 8346 | if (pProperties) |
| 8347 | { |
| 8348 | if (!(check_pProperties)) |
| 8349 | { |
| 8350 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8351 | } |
| 8352 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8353 | { |
| 8354 | unmarshal_VkDisplayProperties2KHR(stream, (VkDisplayProperties2KHR*)(pProperties + i)); |
| 8355 | } |
| 8356 | } |
| 8357 | VkResult vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return = (VkResult)0; |
| 8358 | stream->read(&vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8359 | return vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return; |
| 8360 | } |
| 8361 | |
| 8362 | VkResult VkEncoder::vkGetPhysicalDeviceDisplayPlaneProperties2KHR( |
| 8363 | VkPhysicalDevice physicalDevice, |
| 8364 | uint32_t* pPropertyCount, |
| 8365 | VkDisplayPlaneProperties2KHR* pProperties) |
| 8366 | { |
| 8367 | auto stream = mImpl->stream(); |
| 8368 | auto countingStream = mImpl->countingStream(); |
| 8369 | countingStream->rewind(); |
| 8370 | { |
| 8371 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8372 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8373 | if (pPropertyCount) |
| 8374 | { |
| 8375 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8376 | } |
| 8377 | countingStream->write((VkDisplayPlaneProperties2KHR**)&pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8378 | if (pProperties) |
| 8379 | { |
| 8380 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8381 | { |
| 8382 | marshal_VkDisplayPlaneProperties2KHR(countingStream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8383 | } |
| 8384 | } |
| 8385 | } |
| 8386 | uint32_t packetSize_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8387 | countingStream->rewind(); |
| 8388 | uint32_t opcode_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = OP_vkGetPhysicalDeviceDisplayPlaneProperties2KHR; |
| 8389 | stream->write(&opcode_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, sizeof(uint32_t)); |
| 8390 | stream->write(&packetSize_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, sizeof(uint32_t)); |
| 8391 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8392 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8393 | if (pPropertyCount) |
| 8394 | { |
| 8395 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8396 | } |
| 8397 | stream->write((VkDisplayPlaneProperties2KHR**)&pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8398 | if (pProperties) |
| 8399 | { |
| 8400 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8401 | { |
| 8402 | marshal_VkDisplayPlaneProperties2KHR(stream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8403 | } |
| 8404 | } |
| 8405 | uint32_t* check_pPropertyCount; |
| 8406 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8407 | if (pPropertyCount) |
| 8408 | { |
| 8409 | if (!(check_pPropertyCount)) |
| 8410 | { |
| 8411 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8412 | } |
| 8413 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8414 | } |
| 8415 | VkDisplayPlaneProperties2KHR* check_pProperties; |
| 8416 | stream->read((VkDisplayPlaneProperties2KHR**)&check_pProperties, sizeof(VkDisplayPlaneProperties2KHR*)); |
| 8417 | if (pProperties) |
| 8418 | { |
| 8419 | if (!(check_pProperties)) |
| 8420 | { |
| 8421 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8422 | } |
| 8423 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8424 | { |
| 8425 | unmarshal_VkDisplayPlaneProperties2KHR(stream, (VkDisplayPlaneProperties2KHR*)(pProperties + i)); |
| 8426 | } |
| 8427 | } |
| 8428 | VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return = (VkResult)0; |
| 8429 | stream->read(&vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8430 | return vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return; |
| 8431 | } |
| 8432 | |
| 8433 | VkResult VkEncoder::vkGetDisplayModeProperties2KHR( |
| 8434 | VkPhysicalDevice physicalDevice, |
| 8435 | VkDisplayKHR display, |
| 8436 | uint32_t* pPropertyCount, |
| 8437 | VkDisplayModeProperties2KHR* pProperties) |
| 8438 | { |
| 8439 | auto stream = mImpl->stream(); |
| 8440 | auto countingStream = mImpl->countingStream(); |
| 8441 | countingStream->rewind(); |
| 8442 | { |
| 8443 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8444 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 8445 | countingStream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8446 | if (pPropertyCount) |
| 8447 | { |
| 8448 | countingStream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8449 | } |
| 8450 | countingStream->write((VkDisplayModeProperties2KHR**)&pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8451 | if (pProperties) |
| 8452 | { |
| 8453 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8454 | { |
| 8455 | marshal_VkDisplayModeProperties2KHR(countingStream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8456 | } |
| 8457 | } |
| 8458 | } |
| 8459 | uint32_t packetSize_vkGetDisplayModeProperties2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8460 | countingStream->rewind(); |
| 8461 | uint32_t opcode_vkGetDisplayModeProperties2KHR = OP_vkGetDisplayModeProperties2KHR; |
| 8462 | stream->write(&opcode_vkGetDisplayModeProperties2KHR, sizeof(uint32_t)); |
| 8463 | stream->write(&packetSize_vkGetDisplayModeProperties2KHR, sizeof(uint32_t)); |
| 8464 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8465 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 8466 | stream->write((uint32_t**)&pPropertyCount, sizeof(uint32_t*)); |
| 8467 | if (pPropertyCount) |
| 8468 | { |
| 8469 | stream->write((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8470 | } |
| 8471 | stream->write((VkDisplayModeProperties2KHR**)&pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8472 | if (pProperties) |
| 8473 | { |
| 8474 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8475 | { |
| 8476 | marshal_VkDisplayModeProperties2KHR(stream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8477 | } |
| 8478 | } |
| 8479 | uint32_t* check_pPropertyCount; |
| 8480 | stream->read((uint32_t**)&check_pPropertyCount, sizeof(uint32_t*)); |
| 8481 | if (pPropertyCount) |
| 8482 | { |
| 8483 | if (!(check_pPropertyCount)) |
| 8484 | { |
| 8485 | fprintf(stderr, "fatal: pPropertyCount inconsistent between guest and host\n"); |
| 8486 | } |
| 8487 | stream->read((uint32_t*)pPropertyCount, sizeof(uint32_t)); |
| 8488 | } |
| 8489 | VkDisplayModeProperties2KHR* check_pProperties; |
| 8490 | stream->read((VkDisplayModeProperties2KHR**)&check_pProperties, sizeof(VkDisplayModeProperties2KHR*)); |
| 8491 | if (pProperties) |
| 8492 | { |
| 8493 | if (!(check_pProperties)) |
| 8494 | { |
| 8495 | fprintf(stderr, "fatal: pProperties inconsistent between guest and host\n"); |
| 8496 | } |
| 8497 | for (uint32_t i = 0; i < (uint32_t)(*(pPropertyCount)); ++i) |
| 8498 | { |
| 8499 | unmarshal_VkDisplayModeProperties2KHR(stream, (VkDisplayModeProperties2KHR*)(pProperties + i)); |
| 8500 | } |
| 8501 | } |
| 8502 | VkResult vkGetDisplayModeProperties2KHR_VkResult_return = (VkResult)0; |
| 8503 | stream->read(&vkGetDisplayModeProperties2KHR_VkResult_return, sizeof(VkResult)); |
| 8504 | return vkGetDisplayModeProperties2KHR_VkResult_return; |
| 8505 | } |
| 8506 | |
| 8507 | VkResult VkEncoder::vkGetDisplayPlaneCapabilities2KHR( |
| 8508 | VkPhysicalDevice physicalDevice, |
| 8509 | const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, |
| 8510 | VkDisplayPlaneCapabilities2KHR* pCapabilities) |
| 8511 | { |
| 8512 | auto stream = mImpl->stream(); |
| 8513 | auto countingStream = mImpl->countingStream(); |
| 8514 | countingStream->rewind(); |
| 8515 | { |
| 8516 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8517 | marshal_VkDisplayPlaneInfo2KHR(countingStream, (const VkDisplayPlaneInfo2KHR*)(pDisplayPlaneInfo)); |
| 8518 | marshal_VkDisplayPlaneCapabilities2KHR(countingStream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8519 | } |
| 8520 | uint32_t packetSize_vkGetDisplayPlaneCapabilities2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8521 | countingStream->rewind(); |
| 8522 | uint32_t opcode_vkGetDisplayPlaneCapabilities2KHR = OP_vkGetDisplayPlaneCapabilities2KHR; |
| 8523 | stream->write(&opcode_vkGetDisplayPlaneCapabilities2KHR, sizeof(uint32_t)); |
| 8524 | stream->write(&packetSize_vkGetDisplayPlaneCapabilities2KHR, sizeof(uint32_t)); |
| 8525 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 8526 | marshal_VkDisplayPlaneInfo2KHR(stream, (const VkDisplayPlaneInfo2KHR*)(pDisplayPlaneInfo)); |
| 8527 | marshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8528 | unmarshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities)); |
| 8529 | VkResult vkGetDisplayPlaneCapabilities2KHR_VkResult_return = (VkResult)0; |
| 8530 | stream->read(&vkGetDisplayPlaneCapabilities2KHR_VkResult_return, sizeof(VkResult)); |
| 8531 | return vkGetDisplayPlaneCapabilities2KHR_VkResult_return; |
| 8532 | } |
| 8533 | |
| 8534 | #endif |
| 8535 | #ifdef VK_KHR_dedicated_allocation |
| 8536 | #endif |
| 8537 | #ifdef VK_KHR_storage_buffer_storage_class |
| 8538 | #endif |
| 8539 | #ifdef VK_KHR_relaxed_block_layout |
| 8540 | #endif |
| 8541 | #ifdef VK_KHR_get_memory_requirements2 |
| 8542 | void VkEncoder::vkGetImageMemoryRequirements2KHR( |
| 8543 | VkDevice device, |
| 8544 | const VkImageMemoryRequirementsInfo2* pInfo, |
| 8545 | VkMemoryRequirements2* pMemoryRequirements) |
| 8546 | { |
| 8547 | auto stream = mImpl->stream(); |
| 8548 | auto countingStream = mImpl->countingStream(); |
| 8549 | countingStream->rewind(); |
| 8550 | { |
| 8551 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8552 | marshal_VkImageMemoryRequirementsInfo2(countingStream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 8553 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8554 | } |
| 8555 | uint32_t packetSize_vkGetImageMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8556 | countingStream->rewind(); |
| 8557 | uint32_t opcode_vkGetImageMemoryRequirements2KHR = OP_vkGetImageMemoryRequirements2KHR; |
| 8558 | stream->write(&opcode_vkGetImageMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8559 | stream->write(&packetSize_vkGetImageMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8560 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8561 | marshal_VkImageMemoryRequirementsInfo2(stream, (const VkImageMemoryRequirementsInfo2*)(pInfo)); |
| 8562 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8563 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8564 | } |
| 8565 | |
| 8566 | void VkEncoder::vkGetBufferMemoryRequirements2KHR( |
| 8567 | VkDevice device, |
| 8568 | const VkBufferMemoryRequirementsInfo2* pInfo, |
| 8569 | VkMemoryRequirements2* pMemoryRequirements) |
| 8570 | { |
| 8571 | auto stream = mImpl->stream(); |
| 8572 | auto countingStream = mImpl->countingStream(); |
| 8573 | countingStream->rewind(); |
| 8574 | { |
| 8575 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8576 | marshal_VkBufferMemoryRequirementsInfo2(countingStream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 8577 | marshal_VkMemoryRequirements2(countingStream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8578 | } |
| 8579 | uint32_t packetSize_vkGetBufferMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8580 | countingStream->rewind(); |
| 8581 | uint32_t opcode_vkGetBufferMemoryRequirements2KHR = OP_vkGetBufferMemoryRequirements2KHR; |
| 8582 | stream->write(&opcode_vkGetBufferMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8583 | stream->write(&packetSize_vkGetBufferMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8584 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8585 | marshal_VkBufferMemoryRequirementsInfo2(stream, (const VkBufferMemoryRequirementsInfo2*)(pInfo)); |
| 8586 | marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8587 | unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements)); |
| 8588 | } |
| 8589 | |
| 8590 | void VkEncoder::vkGetImageSparseMemoryRequirements2KHR( |
| 8591 | VkDevice device, |
| 8592 | const VkImageSparseMemoryRequirementsInfo2* pInfo, |
| 8593 | uint32_t* pSparseMemoryRequirementCount, |
| 8594 | VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
| 8595 | { |
| 8596 | auto stream = mImpl->stream(); |
| 8597 | auto countingStream = mImpl->countingStream(); |
| 8598 | countingStream->rewind(); |
| 8599 | { |
| 8600 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8601 | marshal_VkImageSparseMemoryRequirementsInfo2(countingStream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 8602 | countingStream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8603 | if (pSparseMemoryRequirementCount) |
| 8604 | { |
| 8605 | countingStream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8606 | } |
| 8607 | countingStream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8608 | if (pSparseMemoryRequirements) |
| 8609 | { |
| 8610 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8611 | { |
| 8612 | marshal_VkSparseImageMemoryRequirements2(countingStream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8613 | } |
| 8614 | } |
| 8615 | } |
| 8616 | uint32_t packetSize_vkGetImageSparseMemoryRequirements2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8617 | countingStream->rewind(); |
| 8618 | uint32_t opcode_vkGetImageSparseMemoryRequirements2KHR = OP_vkGetImageSparseMemoryRequirements2KHR; |
| 8619 | stream->write(&opcode_vkGetImageSparseMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8620 | stream->write(&packetSize_vkGetImageSparseMemoryRequirements2KHR, sizeof(uint32_t)); |
| 8621 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8622 | marshal_VkImageSparseMemoryRequirementsInfo2(stream, (const VkImageSparseMemoryRequirementsInfo2*)(pInfo)); |
| 8623 | stream->write((uint32_t**)&pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8624 | if (pSparseMemoryRequirementCount) |
| 8625 | { |
| 8626 | stream->write((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8627 | } |
| 8628 | stream->write((VkSparseImageMemoryRequirements2**)&pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8629 | if (pSparseMemoryRequirements) |
| 8630 | { |
| 8631 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8632 | { |
| 8633 | marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8634 | } |
| 8635 | } |
| 8636 | uint32_t* check_pSparseMemoryRequirementCount; |
| 8637 | stream->read((uint32_t**)&check_pSparseMemoryRequirementCount, sizeof(uint32_t*)); |
| 8638 | if (pSparseMemoryRequirementCount) |
| 8639 | { |
| 8640 | if (!(check_pSparseMemoryRequirementCount)) |
| 8641 | { |
| 8642 | fprintf(stderr, "fatal: pSparseMemoryRequirementCount inconsistent between guest and host\n"); |
| 8643 | } |
| 8644 | stream->read((uint32_t*)pSparseMemoryRequirementCount, sizeof(uint32_t)); |
| 8645 | } |
| 8646 | VkSparseImageMemoryRequirements2* check_pSparseMemoryRequirements; |
| 8647 | stream->read((VkSparseImageMemoryRequirements2**)&check_pSparseMemoryRequirements, sizeof(VkSparseImageMemoryRequirements2*)); |
| 8648 | if (pSparseMemoryRequirements) |
| 8649 | { |
| 8650 | if (!(check_pSparseMemoryRequirements)) |
| 8651 | { |
| 8652 | fprintf(stderr, "fatal: pSparseMemoryRequirements inconsistent between guest and host\n"); |
| 8653 | } |
| 8654 | for (uint32_t i = 0; i < (uint32_t)(*(pSparseMemoryRequirementCount)); ++i) |
| 8655 | { |
| 8656 | unmarshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i)); |
| 8657 | } |
| 8658 | } |
| 8659 | } |
| 8660 | |
| 8661 | #endif |
| 8662 | #ifdef VK_KHR_image_format_list |
| 8663 | #endif |
| 8664 | #ifdef VK_KHR_sampler_ycbcr_conversion |
| 8665 | VkResult VkEncoder::vkCreateSamplerYcbcrConversionKHR( |
| 8666 | VkDevice device, |
| 8667 | const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, |
| 8668 | const VkAllocationCallbacks* pAllocator, |
| 8669 | VkSamplerYcbcrConversion* pYcbcrConversion) |
| 8670 | { |
| 8671 | auto stream = mImpl->stream(); |
| 8672 | auto countingStream = mImpl->countingStream(); |
| 8673 | countingStream->rewind(); |
| 8674 | { |
| 8675 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8676 | marshal_VkSamplerYcbcrConversionCreateInfo(countingStream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 8677 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8678 | if (pAllocator) |
| 8679 | { |
| 8680 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8681 | } |
| 8682 | countingStream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8683 | } |
| 8684 | uint32_t packetSize_vkCreateSamplerYcbcrConversionKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8685 | countingStream->rewind(); |
| 8686 | uint32_t opcode_vkCreateSamplerYcbcrConversionKHR = OP_vkCreateSamplerYcbcrConversionKHR; |
| 8687 | stream->write(&opcode_vkCreateSamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8688 | stream->write(&packetSize_vkCreateSamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8689 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8690 | marshal_VkSamplerYcbcrConversionCreateInfo(stream, (const VkSamplerYcbcrConversionCreateInfo*)(pCreateInfo)); |
| 8691 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8692 | if (pAllocator) |
| 8693 | { |
| 8694 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8695 | } |
| 8696 | stream->write((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8697 | stream->read((VkSamplerYcbcrConversion*)pYcbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8698 | VkResult vkCreateSamplerYcbcrConversionKHR_VkResult_return = (VkResult)0; |
| 8699 | stream->read(&vkCreateSamplerYcbcrConversionKHR_VkResult_return, sizeof(VkResult)); |
| 8700 | return vkCreateSamplerYcbcrConversionKHR_VkResult_return; |
| 8701 | } |
| 8702 | |
| 8703 | void VkEncoder::vkDestroySamplerYcbcrConversionKHR( |
| 8704 | VkDevice device, |
| 8705 | VkSamplerYcbcrConversion ycbcrConversion, |
| 8706 | const VkAllocationCallbacks* pAllocator) |
| 8707 | { |
| 8708 | auto stream = mImpl->stream(); |
| 8709 | auto countingStream = mImpl->countingStream(); |
| 8710 | countingStream->rewind(); |
| 8711 | { |
| 8712 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8713 | countingStream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8714 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8715 | if (pAllocator) |
| 8716 | { |
| 8717 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8718 | } |
| 8719 | } |
| 8720 | uint32_t packetSize_vkDestroySamplerYcbcrConversionKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8721 | countingStream->rewind(); |
| 8722 | uint32_t opcode_vkDestroySamplerYcbcrConversionKHR = OP_vkDestroySamplerYcbcrConversionKHR; |
| 8723 | stream->write(&opcode_vkDestroySamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8724 | stream->write(&packetSize_vkDestroySamplerYcbcrConversionKHR, sizeof(uint32_t)); |
| 8725 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8726 | stream->write((VkSamplerYcbcrConversion*)&ycbcrConversion, sizeof(VkSamplerYcbcrConversion)); |
| 8727 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8728 | if (pAllocator) |
| 8729 | { |
| 8730 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8731 | } |
| 8732 | } |
| 8733 | |
| 8734 | #endif |
| 8735 | #ifdef VK_KHR_bind_memory2 |
| 8736 | VkResult VkEncoder::vkBindBufferMemory2KHR( |
| 8737 | VkDevice device, |
| 8738 | uint32_t bindInfoCount, |
| 8739 | const VkBindBufferMemoryInfo* pBindInfos) |
| 8740 | { |
| 8741 | auto stream = mImpl->stream(); |
| 8742 | auto countingStream = mImpl->countingStream(); |
| 8743 | countingStream->rewind(); |
| 8744 | { |
| 8745 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8746 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8747 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8748 | { |
| 8749 | marshal_VkBindBufferMemoryInfo(countingStream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 8750 | } |
| 8751 | } |
| 8752 | uint32_t packetSize_vkBindBufferMemory2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8753 | countingStream->rewind(); |
| 8754 | uint32_t opcode_vkBindBufferMemory2KHR = OP_vkBindBufferMemory2KHR; |
| 8755 | stream->write(&opcode_vkBindBufferMemory2KHR, sizeof(uint32_t)); |
| 8756 | stream->write(&packetSize_vkBindBufferMemory2KHR, sizeof(uint32_t)); |
| 8757 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8758 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8759 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8760 | { |
| 8761 | marshal_VkBindBufferMemoryInfo(stream, (const VkBindBufferMemoryInfo*)(pBindInfos + i)); |
| 8762 | } |
| 8763 | VkResult vkBindBufferMemory2KHR_VkResult_return = (VkResult)0; |
| 8764 | stream->read(&vkBindBufferMemory2KHR_VkResult_return, sizeof(VkResult)); |
| 8765 | return vkBindBufferMemory2KHR_VkResult_return; |
| 8766 | } |
| 8767 | |
| 8768 | VkResult VkEncoder::vkBindImageMemory2KHR( |
| 8769 | VkDevice device, |
| 8770 | uint32_t bindInfoCount, |
| 8771 | const VkBindImageMemoryInfo* pBindInfos) |
| 8772 | { |
| 8773 | auto stream = mImpl->stream(); |
| 8774 | auto countingStream = mImpl->countingStream(); |
| 8775 | countingStream->rewind(); |
| 8776 | { |
| 8777 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8778 | countingStream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8779 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8780 | { |
| 8781 | marshal_VkBindImageMemoryInfo(countingStream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 8782 | } |
| 8783 | } |
| 8784 | uint32_t packetSize_vkBindImageMemory2KHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8785 | countingStream->rewind(); |
| 8786 | uint32_t opcode_vkBindImageMemory2KHR = OP_vkBindImageMemory2KHR; |
| 8787 | stream->write(&opcode_vkBindImageMemory2KHR, sizeof(uint32_t)); |
| 8788 | stream->write(&packetSize_vkBindImageMemory2KHR, sizeof(uint32_t)); |
| 8789 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8790 | stream->write((uint32_t*)&bindInfoCount, sizeof(uint32_t)); |
| 8791 | for (uint32_t i = 0; i < (uint32_t)((bindInfoCount)); ++i) |
| 8792 | { |
| 8793 | marshal_VkBindImageMemoryInfo(stream, (const VkBindImageMemoryInfo*)(pBindInfos + i)); |
| 8794 | } |
| 8795 | VkResult vkBindImageMemory2KHR_VkResult_return = (VkResult)0; |
| 8796 | stream->read(&vkBindImageMemory2KHR_VkResult_return, sizeof(VkResult)); |
| 8797 | return vkBindImageMemory2KHR_VkResult_return; |
| 8798 | } |
| 8799 | |
| 8800 | #endif |
| 8801 | #ifdef VK_KHR_maintenance3 |
| 8802 | void VkEncoder::vkGetDescriptorSetLayoutSupportKHR( |
| 8803 | VkDevice device, |
| 8804 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 8805 | VkDescriptorSetLayoutSupport* pSupport) |
| 8806 | { |
| 8807 | auto stream = mImpl->stream(); |
| 8808 | auto countingStream = mImpl->countingStream(); |
| 8809 | countingStream->rewind(); |
| 8810 | { |
| 8811 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8812 | marshal_VkDescriptorSetLayoutCreateInfo(countingStream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 8813 | marshal_VkDescriptorSetLayoutSupport(countingStream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8814 | } |
| 8815 | uint32_t packetSize_vkGetDescriptorSetLayoutSupportKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8816 | countingStream->rewind(); |
| 8817 | uint32_t opcode_vkGetDescriptorSetLayoutSupportKHR = OP_vkGetDescriptorSetLayoutSupportKHR; |
| 8818 | stream->write(&opcode_vkGetDescriptorSetLayoutSupportKHR, sizeof(uint32_t)); |
| 8819 | stream->write(&packetSize_vkGetDescriptorSetLayoutSupportKHR, sizeof(uint32_t)); |
| 8820 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 8821 | marshal_VkDescriptorSetLayoutCreateInfo(stream, (const VkDescriptorSetLayoutCreateInfo*)(pCreateInfo)); |
| 8822 | marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8823 | unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport)); |
| 8824 | } |
| 8825 | |
| 8826 | #endif |
| 8827 | #ifdef VK_KHR_draw_indirect_count |
| 8828 | void VkEncoder::vkCmdDrawIndirectCountKHR( |
| 8829 | VkCommandBuffer commandBuffer, |
| 8830 | VkBuffer buffer, |
| 8831 | VkDeviceSize offset, |
| 8832 | VkBuffer countBuffer, |
| 8833 | VkDeviceSize countBufferOffset, |
| 8834 | uint32_t maxDrawCount, |
| 8835 | uint32_t stride) |
| 8836 | { |
| 8837 | auto stream = mImpl->stream(); |
| 8838 | auto countingStream = mImpl->countingStream(); |
| 8839 | countingStream->rewind(); |
| 8840 | { |
| 8841 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8842 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8843 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8844 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8845 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8846 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8847 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8848 | } |
| 8849 | uint32_t packetSize_vkCmdDrawIndirectCountKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8850 | countingStream->rewind(); |
| 8851 | uint32_t opcode_vkCmdDrawIndirectCountKHR = OP_vkCmdDrawIndirectCountKHR; |
| 8852 | stream->write(&opcode_vkCmdDrawIndirectCountKHR, sizeof(uint32_t)); |
| 8853 | stream->write(&packetSize_vkCmdDrawIndirectCountKHR, sizeof(uint32_t)); |
| 8854 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8855 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8856 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8857 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8858 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8859 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8860 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8861 | } |
| 8862 | |
| 8863 | void VkEncoder::vkCmdDrawIndexedIndirectCountKHR( |
| 8864 | VkCommandBuffer commandBuffer, |
| 8865 | VkBuffer buffer, |
| 8866 | VkDeviceSize offset, |
| 8867 | VkBuffer countBuffer, |
| 8868 | VkDeviceSize countBufferOffset, |
| 8869 | uint32_t maxDrawCount, |
| 8870 | uint32_t stride) |
| 8871 | { |
| 8872 | auto stream = mImpl->stream(); |
| 8873 | auto countingStream = mImpl->countingStream(); |
| 8874 | countingStream->rewind(); |
| 8875 | { |
| 8876 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8877 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8878 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8879 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8880 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8881 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8882 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8883 | } |
| 8884 | uint32_t packetSize_vkCmdDrawIndexedIndirectCountKHR = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8885 | countingStream->rewind(); |
| 8886 | uint32_t opcode_vkCmdDrawIndexedIndirectCountKHR = OP_vkCmdDrawIndexedIndirectCountKHR; |
| 8887 | stream->write(&opcode_vkCmdDrawIndexedIndirectCountKHR, sizeof(uint32_t)); |
| 8888 | stream->write(&packetSize_vkCmdDrawIndexedIndirectCountKHR, sizeof(uint32_t)); |
| 8889 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 8890 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 8891 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 8892 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 8893 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 8894 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 8895 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 8896 | } |
| 8897 | |
| 8898 | #endif |
| 8899 | #ifdef VK_KHR_8bit_storage |
| 8900 | #endif |
| 8901 | #ifdef VK_EXT_debug_report |
| 8902 | VkResult VkEncoder::vkCreateDebugReportCallbackEXT( |
| 8903 | VkInstance instance, |
| 8904 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 8905 | const VkAllocationCallbacks* pAllocator, |
| 8906 | VkDebugReportCallbackEXT* pCallback) |
| 8907 | { |
| 8908 | auto stream = mImpl->stream(); |
| 8909 | auto countingStream = mImpl->countingStream(); |
| 8910 | countingStream->rewind(); |
| 8911 | { |
| 8912 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8913 | marshal_VkDebugReportCallbackCreateInfoEXT(countingStream, (const VkDebugReportCallbackCreateInfoEXT*)(pCreateInfo)); |
| 8914 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8915 | if (pAllocator) |
| 8916 | { |
| 8917 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8918 | } |
| 8919 | countingStream->write((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8920 | } |
| 8921 | uint32_t packetSize_vkCreateDebugReportCallbackEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8922 | countingStream->rewind(); |
| 8923 | uint32_t opcode_vkCreateDebugReportCallbackEXT = OP_vkCreateDebugReportCallbackEXT; |
| 8924 | stream->write(&opcode_vkCreateDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8925 | stream->write(&packetSize_vkCreateDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8926 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8927 | marshal_VkDebugReportCallbackCreateInfoEXT(stream, (const VkDebugReportCallbackCreateInfoEXT*)(pCreateInfo)); |
| 8928 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8929 | if (pAllocator) |
| 8930 | { |
| 8931 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8932 | } |
| 8933 | stream->write((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8934 | stream->read((VkDebugReportCallbackEXT*)pCallback, sizeof(VkDebugReportCallbackEXT)); |
| 8935 | VkResult vkCreateDebugReportCallbackEXT_VkResult_return = (VkResult)0; |
| 8936 | stream->read(&vkCreateDebugReportCallbackEXT_VkResult_return, sizeof(VkResult)); |
| 8937 | return vkCreateDebugReportCallbackEXT_VkResult_return; |
| 8938 | } |
| 8939 | |
| 8940 | void VkEncoder::vkDestroyDebugReportCallbackEXT( |
| 8941 | VkInstance instance, |
| 8942 | VkDebugReportCallbackEXT callback, |
| 8943 | const VkAllocationCallbacks* pAllocator) |
| 8944 | { |
| 8945 | auto stream = mImpl->stream(); |
| 8946 | auto countingStream = mImpl->countingStream(); |
| 8947 | countingStream->rewind(); |
| 8948 | { |
| 8949 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8950 | countingStream->write((VkDebugReportCallbackEXT*)&callback, sizeof(VkDebugReportCallbackEXT)); |
| 8951 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8952 | if (pAllocator) |
| 8953 | { |
| 8954 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8955 | } |
| 8956 | } |
| 8957 | uint32_t packetSize_vkDestroyDebugReportCallbackEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8958 | countingStream->rewind(); |
| 8959 | uint32_t opcode_vkDestroyDebugReportCallbackEXT = OP_vkDestroyDebugReportCallbackEXT; |
| 8960 | stream->write(&opcode_vkDestroyDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8961 | stream->write(&packetSize_vkDestroyDebugReportCallbackEXT, sizeof(uint32_t)); |
| 8962 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8963 | stream->write((VkDebugReportCallbackEXT*)&callback, sizeof(VkDebugReportCallbackEXT)); |
| 8964 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 8965 | if (pAllocator) |
| 8966 | { |
| 8967 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 8968 | } |
| 8969 | } |
| 8970 | |
| 8971 | void VkEncoder::vkDebugReportMessageEXT( |
| 8972 | VkInstance instance, |
| 8973 | VkDebugReportFlagsEXT flags, |
| 8974 | VkDebugReportObjectTypeEXT objectType, |
| 8975 | uint64_t object, |
| 8976 | size_t location, |
| 8977 | int32_t messageCode, |
| 8978 | const char* pLayerPrefix, |
| 8979 | const char* pMessage) |
| 8980 | { |
| 8981 | auto stream = mImpl->stream(); |
| 8982 | auto countingStream = mImpl->countingStream(); |
| 8983 | countingStream->rewind(); |
| 8984 | { |
| 8985 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 8986 | countingStream->write((VkDebugReportFlagsEXT*)&flags, sizeof(VkDebugReportFlagsEXT)); |
| 8987 | countingStream->write((VkDebugReportObjectTypeEXT*)&objectType, sizeof(VkDebugReportObjectTypeEXT)); |
| 8988 | countingStream->write((uint64_t*)&object, sizeof(uint64_t)); |
| 8989 | countingStream->write((size_t*)&location, sizeof(size_t)); |
| 8990 | countingStream->write((int32_t*)&messageCode, sizeof(int32_t)); |
| 8991 | countingStream->putString(pLayerPrefix); |
| 8992 | countingStream->putString(pMessage); |
| 8993 | } |
| 8994 | uint32_t packetSize_vkDebugReportMessageEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 8995 | countingStream->rewind(); |
| 8996 | uint32_t opcode_vkDebugReportMessageEXT = OP_vkDebugReportMessageEXT; |
| 8997 | stream->write(&opcode_vkDebugReportMessageEXT, sizeof(uint32_t)); |
| 8998 | stream->write(&packetSize_vkDebugReportMessageEXT, sizeof(uint32_t)); |
| 8999 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9000 | stream->write((VkDebugReportFlagsEXT*)&flags, sizeof(VkDebugReportFlagsEXT)); |
| 9001 | stream->write((VkDebugReportObjectTypeEXT*)&objectType, sizeof(VkDebugReportObjectTypeEXT)); |
| 9002 | stream->write((uint64_t*)&object, sizeof(uint64_t)); |
| 9003 | stream->write((size_t*)&location, sizeof(size_t)); |
| 9004 | stream->write((int32_t*)&messageCode, sizeof(int32_t)); |
| 9005 | stream->putString(pLayerPrefix); |
| 9006 | stream->putString(pMessage); |
| 9007 | } |
| 9008 | |
| 9009 | #endif |
| 9010 | #ifdef VK_NV_glsl_shader |
| 9011 | #endif |
| 9012 | #ifdef VK_EXT_depth_range_unrestricted |
| 9013 | #endif |
| 9014 | #ifdef VK_IMG_filter_cubic |
| 9015 | #endif |
| 9016 | #ifdef VK_AMD_rasterization_order |
| 9017 | #endif |
| 9018 | #ifdef VK_AMD_shader_trinary_minmax |
| 9019 | #endif |
| 9020 | #ifdef VK_AMD_shader_explicit_vertex_parameter |
| 9021 | #endif |
| 9022 | #ifdef VK_EXT_debug_marker |
| 9023 | VkResult VkEncoder::vkDebugMarkerSetObjectTagEXT( |
| 9024 | VkDevice device, |
| 9025 | const VkDebugMarkerObjectTagInfoEXT* pTagInfo) |
| 9026 | { |
| 9027 | auto stream = mImpl->stream(); |
| 9028 | auto countingStream = mImpl->countingStream(); |
| 9029 | countingStream->rewind(); |
| 9030 | { |
| 9031 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9032 | marshal_VkDebugMarkerObjectTagInfoEXT(countingStream, (const VkDebugMarkerObjectTagInfoEXT*)(pTagInfo)); |
| 9033 | } |
| 9034 | uint32_t packetSize_vkDebugMarkerSetObjectTagEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9035 | countingStream->rewind(); |
| 9036 | uint32_t opcode_vkDebugMarkerSetObjectTagEXT = OP_vkDebugMarkerSetObjectTagEXT; |
| 9037 | stream->write(&opcode_vkDebugMarkerSetObjectTagEXT, sizeof(uint32_t)); |
| 9038 | stream->write(&packetSize_vkDebugMarkerSetObjectTagEXT, sizeof(uint32_t)); |
| 9039 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9040 | marshal_VkDebugMarkerObjectTagInfoEXT(stream, (const VkDebugMarkerObjectTagInfoEXT*)(pTagInfo)); |
| 9041 | VkResult vkDebugMarkerSetObjectTagEXT_VkResult_return = (VkResult)0; |
| 9042 | stream->read(&vkDebugMarkerSetObjectTagEXT_VkResult_return, sizeof(VkResult)); |
| 9043 | return vkDebugMarkerSetObjectTagEXT_VkResult_return; |
| 9044 | } |
| 9045 | |
| 9046 | VkResult VkEncoder::vkDebugMarkerSetObjectNameEXT( |
| 9047 | VkDevice device, |
| 9048 | const VkDebugMarkerObjectNameInfoEXT* pNameInfo) |
| 9049 | { |
| 9050 | auto stream = mImpl->stream(); |
| 9051 | auto countingStream = mImpl->countingStream(); |
| 9052 | countingStream->rewind(); |
| 9053 | { |
| 9054 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9055 | marshal_VkDebugMarkerObjectNameInfoEXT(countingStream, (const VkDebugMarkerObjectNameInfoEXT*)(pNameInfo)); |
| 9056 | } |
| 9057 | uint32_t packetSize_vkDebugMarkerSetObjectNameEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9058 | countingStream->rewind(); |
| 9059 | uint32_t opcode_vkDebugMarkerSetObjectNameEXT = OP_vkDebugMarkerSetObjectNameEXT; |
| 9060 | stream->write(&opcode_vkDebugMarkerSetObjectNameEXT, sizeof(uint32_t)); |
| 9061 | stream->write(&packetSize_vkDebugMarkerSetObjectNameEXT, sizeof(uint32_t)); |
| 9062 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9063 | marshal_VkDebugMarkerObjectNameInfoEXT(stream, (const VkDebugMarkerObjectNameInfoEXT*)(pNameInfo)); |
| 9064 | VkResult vkDebugMarkerSetObjectNameEXT_VkResult_return = (VkResult)0; |
| 9065 | stream->read(&vkDebugMarkerSetObjectNameEXT_VkResult_return, sizeof(VkResult)); |
| 9066 | return vkDebugMarkerSetObjectNameEXT_VkResult_return; |
| 9067 | } |
| 9068 | |
| 9069 | void VkEncoder::vkCmdDebugMarkerBeginEXT( |
| 9070 | VkCommandBuffer commandBuffer, |
| 9071 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 9072 | { |
| 9073 | auto stream = mImpl->stream(); |
| 9074 | auto countingStream = mImpl->countingStream(); |
| 9075 | countingStream->rewind(); |
| 9076 | { |
| 9077 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9078 | marshal_VkDebugMarkerMarkerInfoEXT(countingStream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9079 | } |
| 9080 | uint32_t packetSize_vkCmdDebugMarkerBeginEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9081 | countingStream->rewind(); |
| 9082 | uint32_t opcode_vkCmdDebugMarkerBeginEXT = OP_vkCmdDebugMarkerBeginEXT; |
| 9083 | stream->write(&opcode_vkCmdDebugMarkerBeginEXT, sizeof(uint32_t)); |
| 9084 | stream->write(&packetSize_vkCmdDebugMarkerBeginEXT, sizeof(uint32_t)); |
| 9085 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9086 | marshal_VkDebugMarkerMarkerInfoEXT(stream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9087 | } |
| 9088 | |
| 9089 | void VkEncoder::vkCmdDebugMarkerEndEXT( |
| 9090 | VkCommandBuffer commandBuffer) |
| 9091 | { |
| 9092 | auto stream = mImpl->stream(); |
| 9093 | auto countingStream = mImpl->countingStream(); |
| 9094 | countingStream->rewind(); |
| 9095 | { |
| 9096 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9097 | } |
| 9098 | uint32_t packetSize_vkCmdDebugMarkerEndEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9099 | countingStream->rewind(); |
| 9100 | uint32_t opcode_vkCmdDebugMarkerEndEXT = OP_vkCmdDebugMarkerEndEXT; |
| 9101 | stream->write(&opcode_vkCmdDebugMarkerEndEXT, sizeof(uint32_t)); |
| 9102 | stream->write(&packetSize_vkCmdDebugMarkerEndEXT, sizeof(uint32_t)); |
| 9103 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9104 | } |
| 9105 | |
| 9106 | void VkEncoder::vkCmdDebugMarkerInsertEXT( |
| 9107 | VkCommandBuffer commandBuffer, |
| 9108 | const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) |
| 9109 | { |
| 9110 | auto stream = mImpl->stream(); |
| 9111 | auto countingStream = mImpl->countingStream(); |
| 9112 | countingStream->rewind(); |
| 9113 | { |
| 9114 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9115 | marshal_VkDebugMarkerMarkerInfoEXT(countingStream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9116 | } |
| 9117 | uint32_t packetSize_vkCmdDebugMarkerInsertEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9118 | countingStream->rewind(); |
| 9119 | uint32_t opcode_vkCmdDebugMarkerInsertEXT = OP_vkCmdDebugMarkerInsertEXT; |
| 9120 | stream->write(&opcode_vkCmdDebugMarkerInsertEXT, sizeof(uint32_t)); |
| 9121 | stream->write(&packetSize_vkCmdDebugMarkerInsertEXT, sizeof(uint32_t)); |
| 9122 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9123 | marshal_VkDebugMarkerMarkerInfoEXT(stream, (const VkDebugMarkerMarkerInfoEXT*)(pMarkerInfo)); |
| 9124 | } |
| 9125 | |
| 9126 | #endif |
| 9127 | #ifdef VK_AMD_gcn_shader |
| 9128 | #endif |
| 9129 | #ifdef VK_NV_dedicated_allocation |
| 9130 | #endif |
| 9131 | #ifdef VK_AMD_draw_indirect_count |
| 9132 | void VkEncoder::vkCmdDrawIndirectCountAMD( |
| 9133 | VkCommandBuffer commandBuffer, |
| 9134 | VkBuffer buffer, |
| 9135 | VkDeviceSize offset, |
| 9136 | VkBuffer countBuffer, |
| 9137 | VkDeviceSize countBufferOffset, |
| 9138 | uint32_t maxDrawCount, |
| 9139 | uint32_t stride) |
| 9140 | { |
| 9141 | auto stream = mImpl->stream(); |
| 9142 | auto countingStream = mImpl->countingStream(); |
| 9143 | countingStream->rewind(); |
| 9144 | { |
| 9145 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9146 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9147 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9148 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9149 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9150 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9151 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9152 | } |
| 9153 | uint32_t packetSize_vkCmdDrawIndirectCountAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9154 | countingStream->rewind(); |
| 9155 | uint32_t opcode_vkCmdDrawIndirectCountAMD = OP_vkCmdDrawIndirectCountAMD; |
| 9156 | stream->write(&opcode_vkCmdDrawIndirectCountAMD, sizeof(uint32_t)); |
| 9157 | stream->write(&packetSize_vkCmdDrawIndirectCountAMD, sizeof(uint32_t)); |
| 9158 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9159 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9160 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9161 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9162 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9163 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9164 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9165 | } |
| 9166 | |
| 9167 | void VkEncoder::vkCmdDrawIndexedIndirectCountAMD( |
| 9168 | VkCommandBuffer commandBuffer, |
| 9169 | VkBuffer buffer, |
| 9170 | VkDeviceSize offset, |
| 9171 | VkBuffer countBuffer, |
| 9172 | VkDeviceSize countBufferOffset, |
| 9173 | uint32_t maxDrawCount, |
| 9174 | uint32_t stride) |
| 9175 | { |
| 9176 | auto stream = mImpl->stream(); |
| 9177 | auto countingStream = mImpl->countingStream(); |
| 9178 | countingStream->rewind(); |
| 9179 | { |
| 9180 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9181 | countingStream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9182 | countingStream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9183 | countingStream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9184 | countingStream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9185 | countingStream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9186 | countingStream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9187 | } |
| 9188 | uint32_t packetSize_vkCmdDrawIndexedIndirectCountAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9189 | countingStream->rewind(); |
| 9190 | uint32_t opcode_vkCmdDrawIndexedIndirectCountAMD = OP_vkCmdDrawIndexedIndirectCountAMD; |
| 9191 | stream->write(&opcode_vkCmdDrawIndexedIndirectCountAMD, sizeof(uint32_t)); |
| 9192 | stream->write(&packetSize_vkCmdDrawIndexedIndirectCountAMD, sizeof(uint32_t)); |
| 9193 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9194 | stream->write((VkBuffer*)&buffer, sizeof(VkBuffer)); |
| 9195 | stream->write((VkDeviceSize*)&offset, sizeof(VkDeviceSize)); |
| 9196 | stream->write((VkBuffer*)&countBuffer, sizeof(VkBuffer)); |
| 9197 | stream->write((VkDeviceSize*)&countBufferOffset, sizeof(VkDeviceSize)); |
| 9198 | stream->write((uint32_t*)&maxDrawCount, sizeof(uint32_t)); |
| 9199 | stream->write((uint32_t*)&stride, sizeof(uint32_t)); |
| 9200 | } |
| 9201 | |
| 9202 | #endif |
| 9203 | #ifdef VK_AMD_negative_viewport_height |
| 9204 | #endif |
| 9205 | #ifdef VK_AMD_gpu_shader_half_float |
| 9206 | #endif |
| 9207 | #ifdef VK_AMD_shader_ballot |
| 9208 | #endif |
| 9209 | #ifdef VK_AMD_texture_gather_bias_lod |
| 9210 | #endif |
| 9211 | #ifdef VK_AMD_shader_info |
| 9212 | VkResult VkEncoder::vkGetShaderInfoAMD( |
| 9213 | VkDevice device, |
| 9214 | VkPipeline pipeline, |
| 9215 | VkShaderStageFlagBits shaderStage, |
| 9216 | VkShaderInfoTypeAMD infoType, |
| 9217 | size_t* pInfoSize, |
| 9218 | void* pInfo) |
| 9219 | { |
| 9220 | auto stream = mImpl->stream(); |
| 9221 | auto countingStream = mImpl->countingStream(); |
| 9222 | countingStream->rewind(); |
| 9223 | { |
| 9224 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9225 | countingStream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 9226 | countingStream->write((VkShaderStageFlagBits*)&shaderStage, sizeof(VkShaderStageFlagBits)); |
| 9227 | countingStream->write((VkShaderInfoTypeAMD*)&infoType, sizeof(VkShaderInfoTypeAMD)); |
| 9228 | countingStream->write((size_t**)&pInfoSize, sizeof(size_t*)); |
| 9229 | if (pInfoSize) |
| 9230 | { |
| 9231 | countingStream->write((size_t*)pInfoSize, sizeof(size_t)); |
| 9232 | } |
| 9233 | countingStream->write((void**)&pInfo, sizeof(void*)); |
| 9234 | if (pInfo) |
| 9235 | { |
| 9236 | countingStream->write((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9237 | } |
| 9238 | } |
| 9239 | uint32_t packetSize_vkGetShaderInfoAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9240 | countingStream->rewind(); |
| 9241 | uint32_t opcode_vkGetShaderInfoAMD = OP_vkGetShaderInfoAMD; |
| 9242 | stream->write(&opcode_vkGetShaderInfoAMD, sizeof(uint32_t)); |
| 9243 | stream->write(&packetSize_vkGetShaderInfoAMD, sizeof(uint32_t)); |
| 9244 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9245 | stream->write((VkPipeline*)&pipeline, sizeof(VkPipeline)); |
| 9246 | stream->write((VkShaderStageFlagBits*)&shaderStage, sizeof(VkShaderStageFlagBits)); |
| 9247 | stream->write((VkShaderInfoTypeAMD*)&infoType, sizeof(VkShaderInfoTypeAMD)); |
| 9248 | stream->write((size_t**)&pInfoSize, sizeof(size_t*)); |
| 9249 | if (pInfoSize) |
| 9250 | { |
| 9251 | stream->write((size_t*)pInfoSize, sizeof(size_t)); |
| 9252 | } |
| 9253 | stream->write((void**)&pInfo, sizeof(void*)); |
| 9254 | if (pInfo) |
| 9255 | { |
| 9256 | stream->write((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9257 | } |
| 9258 | size_t* check_pInfoSize; |
| 9259 | stream->read((size_t**)&check_pInfoSize, sizeof(size_t*)); |
| 9260 | if (pInfoSize) |
| 9261 | { |
| 9262 | if (!(check_pInfoSize)) |
| 9263 | { |
| 9264 | fprintf(stderr, "fatal: pInfoSize inconsistent between guest and host\n"); |
| 9265 | } |
| 9266 | stream->read((size_t*)pInfoSize, sizeof(size_t)); |
| 9267 | } |
| 9268 | void* check_pInfo; |
| 9269 | stream->read((void**)&check_pInfo, sizeof(void*)); |
| 9270 | if (pInfo) |
| 9271 | { |
| 9272 | if (!(check_pInfo)) |
| 9273 | { |
| 9274 | fprintf(stderr, "fatal: pInfo inconsistent between guest and host\n"); |
| 9275 | } |
| 9276 | stream->read((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t)); |
| 9277 | } |
| 9278 | VkResult vkGetShaderInfoAMD_VkResult_return = (VkResult)0; |
| 9279 | stream->read(&vkGetShaderInfoAMD_VkResult_return, sizeof(VkResult)); |
| 9280 | return vkGetShaderInfoAMD_VkResult_return; |
| 9281 | } |
| 9282 | |
| 9283 | #endif |
| 9284 | #ifdef VK_AMD_shader_image_load_store_lod |
| 9285 | #endif |
| 9286 | #ifdef VK_IMG_format_pvrtc |
| 9287 | #endif |
| 9288 | #ifdef VK_NV_external_memory_capabilities |
| 9289 | VkResult VkEncoder::vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 9290 | VkPhysicalDevice physicalDevice, |
| 9291 | VkFormat format, |
| 9292 | VkImageType type, |
| 9293 | VkImageTiling tiling, |
| 9294 | VkImageUsageFlags usage, |
| 9295 | VkImageCreateFlags flags, |
| 9296 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 9297 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) |
| 9298 | { |
| 9299 | auto stream = mImpl->stream(); |
| 9300 | auto countingStream = mImpl->countingStream(); |
| 9301 | countingStream->rewind(); |
| 9302 | { |
| 9303 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9304 | countingStream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 9305 | countingStream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 9306 | countingStream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 9307 | countingStream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 9308 | countingStream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 9309 | countingStream->write((VkExternalMemoryHandleTypeFlagsNV*)&externalHandleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9310 | marshal_VkExternalImageFormatPropertiesNV(countingStream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9311 | } |
| 9312 | uint32_t packetSize_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9313 | countingStream->rewind(); |
| 9314 | uint32_t opcode_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = OP_vkGetPhysicalDeviceExternalImageFormatPropertiesNV; |
| 9315 | stream->write(&opcode_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, sizeof(uint32_t)); |
| 9316 | stream->write(&packetSize_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, sizeof(uint32_t)); |
| 9317 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9318 | stream->write((VkFormat*)&format, sizeof(VkFormat)); |
| 9319 | stream->write((VkImageType*)&type, sizeof(VkImageType)); |
| 9320 | stream->write((VkImageTiling*)&tiling, sizeof(VkImageTiling)); |
| 9321 | stream->write((VkImageUsageFlags*)&usage, sizeof(VkImageUsageFlags)); |
| 9322 | stream->write((VkImageCreateFlags*)&flags, sizeof(VkImageCreateFlags)); |
| 9323 | stream->write((VkExternalMemoryHandleTypeFlagsNV*)&externalHandleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9324 | marshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9325 | unmarshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties)); |
| 9326 | VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return = (VkResult)0; |
| 9327 | stream->read(&vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return, sizeof(VkResult)); |
| 9328 | return vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return; |
| 9329 | } |
| 9330 | |
| 9331 | #endif |
| 9332 | #ifdef VK_NV_external_memory |
| 9333 | #endif |
| 9334 | #ifdef VK_NV_external_memory_win32 |
| 9335 | VkResult VkEncoder::vkGetMemoryWin32HandleNV( |
| 9336 | VkDevice device, |
| 9337 | VkDeviceMemory memory, |
| 9338 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 9339 | HANDLE* pHandle) |
| 9340 | { |
| 9341 | auto stream = mImpl->stream(); |
| 9342 | auto countingStream = mImpl->countingStream(); |
| 9343 | countingStream->rewind(); |
| 9344 | { |
| 9345 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9346 | countingStream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 9347 | countingStream->write((VkExternalMemoryHandleTypeFlagsNV*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9348 | countingStream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9349 | } |
| 9350 | uint32_t packetSize_vkGetMemoryWin32HandleNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9351 | countingStream->rewind(); |
| 9352 | uint32_t opcode_vkGetMemoryWin32HandleNV = OP_vkGetMemoryWin32HandleNV; |
| 9353 | stream->write(&opcode_vkGetMemoryWin32HandleNV, sizeof(uint32_t)); |
| 9354 | stream->write(&packetSize_vkGetMemoryWin32HandleNV, sizeof(uint32_t)); |
| 9355 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9356 | stream->write((VkDeviceMemory*)&memory, sizeof(VkDeviceMemory)); |
| 9357 | stream->write((VkExternalMemoryHandleTypeFlagsNV*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); |
| 9358 | stream->write((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9359 | stream->read((HANDLE*)pHandle, sizeof(HANDLE)); |
| 9360 | VkResult vkGetMemoryWin32HandleNV_VkResult_return = (VkResult)0; |
| 9361 | stream->read(&vkGetMemoryWin32HandleNV_VkResult_return, sizeof(VkResult)); |
| 9362 | return vkGetMemoryWin32HandleNV_VkResult_return; |
| 9363 | } |
| 9364 | |
| 9365 | #endif |
| 9366 | #ifdef VK_NV_win32_keyed_mutex |
| 9367 | #endif |
| 9368 | #ifdef VK_EXT_validation_flags |
| 9369 | #endif |
| 9370 | #ifdef VK_NN_vi_surface |
| 9371 | VkResult VkEncoder::vkCreateViSurfaceNN( |
| 9372 | VkInstance instance, |
| 9373 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 9374 | const VkAllocationCallbacks* pAllocator, |
| 9375 | VkSurfaceKHR* pSurface) |
| 9376 | { |
| 9377 | auto stream = mImpl->stream(); |
| 9378 | auto countingStream = mImpl->countingStream(); |
| 9379 | countingStream->rewind(); |
| 9380 | { |
| 9381 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9382 | marshal_VkViSurfaceCreateInfoNN(countingStream, (const VkViSurfaceCreateInfoNN*)(pCreateInfo)); |
| 9383 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9384 | if (pAllocator) |
| 9385 | { |
| 9386 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9387 | } |
| 9388 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9389 | } |
| 9390 | uint32_t packetSize_vkCreateViSurfaceNN = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9391 | countingStream->rewind(); |
| 9392 | uint32_t opcode_vkCreateViSurfaceNN = OP_vkCreateViSurfaceNN; |
| 9393 | stream->write(&opcode_vkCreateViSurfaceNN, sizeof(uint32_t)); |
| 9394 | stream->write(&packetSize_vkCreateViSurfaceNN, sizeof(uint32_t)); |
| 9395 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 9396 | marshal_VkViSurfaceCreateInfoNN(stream, (const VkViSurfaceCreateInfoNN*)(pCreateInfo)); |
| 9397 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9398 | if (pAllocator) |
| 9399 | { |
| 9400 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9401 | } |
| 9402 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9403 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 9404 | VkResult vkCreateViSurfaceNN_VkResult_return = (VkResult)0; |
| 9405 | stream->read(&vkCreateViSurfaceNN_VkResult_return, sizeof(VkResult)); |
| 9406 | return vkCreateViSurfaceNN_VkResult_return; |
| 9407 | } |
| 9408 | |
| 9409 | #endif |
| 9410 | #ifdef VK_EXT_shader_subgroup_ballot |
| 9411 | #endif |
| 9412 | #ifdef VK_EXT_shader_subgroup_vote |
| 9413 | #endif |
| 9414 | #ifdef VK_EXT_conditional_rendering |
| 9415 | void VkEncoder::vkCmdBeginConditionalRenderingEXT( |
| 9416 | VkCommandBuffer commandBuffer, |
| 9417 | const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) |
| 9418 | { |
| 9419 | auto stream = mImpl->stream(); |
| 9420 | auto countingStream = mImpl->countingStream(); |
| 9421 | countingStream->rewind(); |
| 9422 | { |
| 9423 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9424 | marshal_VkConditionalRenderingBeginInfoEXT(countingStream, (const VkConditionalRenderingBeginInfoEXT*)(pConditionalRenderingBegin)); |
| 9425 | } |
| 9426 | uint32_t packetSize_vkCmdBeginConditionalRenderingEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9427 | countingStream->rewind(); |
| 9428 | uint32_t opcode_vkCmdBeginConditionalRenderingEXT = OP_vkCmdBeginConditionalRenderingEXT; |
| 9429 | stream->write(&opcode_vkCmdBeginConditionalRenderingEXT, sizeof(uint32_t)); |
| 9430 | stream->write(&packetSize_vkCmdBeginConditionalRenderingEXT, sizeof(uint32_t)); |
| 9431 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9432 | marshal_VkConditionalRenderingBeginInfoEXT(stream, (const VkConditionalRenderingBeginInfoEXT*)(pConditionalRenderingBegin)); |
| 9433 | } |
| 9434 | |
| 9435 | void VkEncoder::vkCmdEndConditionalRenderingEXT( |
| 9436 | VkCommandBuffer commandBuffer) |
| 9437 | { |
| 9438 | auto stream = mImpl->stream(); |
| 9439 | auto countingStream = mImpl->countingStream(); |
| 9440 | countingStream->rewind(); |
| 9441 | { |
| 9442 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9443 | } |
| 9444 | uint32_t packetSize_vkCmdEndConditionalRenderingEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9445 | countingStream->rewind(); |
| 9446 | uint32_t opcode_vkCmdEndConditionalRenderingEXT = OP_vkCmdEndConditionalRenderingEXT; |
| 9447 | stream->write(&opcode_vkCmdEndConditionalRenderingEXT, sizeof(uint32_t)); |
| 9448 | stream->write(&packetSize_vkCmdEndConditionalRenderingEXT, sizeof(uint32_t)); |
| 9449 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9450 | } |
| 9451 | |
| 9452 | #endif |
| 9453 | #ifdef VK_NVX_device_generated_commands |
| 9454 | void VkEncoder::vkCmdProcessCommandsNVX( |
| 9455 | VkCommandBuffer commandBuffer, |
| 9456 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) |
| 9457 | { |
| 9458 | auto stream = mImpl->stream(); |
| 9459 | auto countingStream = mImpl->countingStream(); |
| 9460 | countingStream->rewind(); |
| 9461 | { |
| 9462 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9463 | marshal_VkCmdProcessCommandsInfoNVX(countingStream, (const VkCmdProcessCommandsInfoNVX*)(pProcessCommandsInfo)); |
| 9464 | } |
| 9465 | uint32_t packetSize_vkCmdProcessCommandsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9466 | countingStream->rewind(); |
| 9467 | uint32_t opcode_vkCmdProcessCommandsNVX = OP_vkCmdProcessCommandsNVX; |
| 9468 | stream->write(&opcode_vkCmdProcessCommandsNVX, sizeof(uint32_t)); |
| 9469 | stream->write(&packetSize_vkCmdProcessCommandsNVX, sizeof(uint32_t)); |
| 9470 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9471 | marshal_VkCmdProcessCommandsInfoNVX(stream, (const VkCmdProcessCommandsInfoNVX*)(pProcessCommandsInfo)); |
| 9472 | } |
| 9473 | |
| 9474 | void VkEncoder::vkCmdReserveSpaceForCommandsNVX( |
| 9475 | VkCommandBuffer commandBuffer, |
| 9476 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) |
| 9477 | { |
| 9478 | auto stream = mImpl->stream(); |
| 9479 | auto countingStream = mImpl->countingStream(); |
| 9480 | countingStream->rewind(); |
| 9481 | { |
| 9482 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9483 | marshal_VkCmdReserveSpaceForCommandsInfoNVX(countingStream, (const VkCmdReserveSpaceForCommandsInfoNVX*)(pReserveSpaceInfo)); |
| 9484 | } |
| 9485 | uint32_t packetSize_vkCmdReserveSpaceForCommandsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9486 | countingStream->rewind(); |
| 9487 | uint32_t opcode_vkCmdReserveSpaceForCommandsNVX = OP_vkCmdReserveSpaceForCommandsNVX; |
| 9488 | stream->write(&opcode_vkCmdReserveSpaceForCommandsNVX, sizeof(uint32_t)); |
| 9489 | stream->write(&packetSize_vkCmdReserveSpaceForCommandsNVX, sizeof(uint32_t)); |
| 9490 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9491 | marshal_VkCmdReserveSpaceForCommandsInfoNVX(stream, (const VkCmdReserveSpaceForCommandsInfoNVX*)(pReserveSpaceInfo)); |
| 9492 | } |
| 9493 | |
| 9494 | VkResult VkEncoder::vkCreateIndirectCommandsLayoutNVX( |
| 9495 | VkDevice device, |
| 9496 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 9497 | const VkAllocationCallbacks* pAllocator, |
| 9498 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) |
| 9499 | { |
| 9500 | auto stream = mImpl->stream(); |
| 9501 | auto countingStream = mImpl->countingStream(); |
| 9502 | countingStream->rewind(); |
| 9503 | { |
| 9504 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9505 | marshal_VkIndirectCommandsLayoutCreateInfoNVX(countingStream, (const VkIndirectCommandsLayoutCreateInfoNVX*)(pCreateInfo)); |
| 9506 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9507 | if (pAllocator) |
| 9508 | { |
| 9509 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9510 | } |
| 9511 | countingStream->write((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9512 | } |
| 9513 | uint32_t packetSize_vkCreateIndirectCommandsLayoutNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9514 | countingStream->rewind(); |
| 9515 | uint32_t opcode_vkCreateIndirectCommandsLayoutNVX = OP_vkCreateIndirectCommandsLayoutNVX; |
| 9516 | stream->write(&opcode_vkCreateIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9517 | stream->write(&packetSize_vkCreateIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9518 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9519 | marshal_VkIndirectCommandsLayoutCreateInfoNVX(stream, (const VkIndirectCommandsLayoutCreateInfoNVX*)(pCreateInfo)); |
| 9520 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9521 | if (pAllocator) |
| 9522 | { |
| 9523 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9524 | } |
| 9525 | stream->write((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9526 | stream->read((VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9527 | VkResult vkCreateIndirectCommandsLayoutNVX_VkResult_return = (VkResult)0; |
| 9528 | stream->read(&vkCreateIndirectCommandsLayoutNVX_VkResult_return, sizeof(VkResult)); |
| 9529 | return vkCreateIndirectCommandsLayoutNVX_VkResult_return; |
| 9530 | } |
| 9531 | |
| 9532 | void VkEncoder::vkDestroyIndirectCommandsLayoutNVX( |
| 9533 | VkDevice device, |
| 9534 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 9535 | const VkAllocationCallbacks* pAllocator) |
| 9536 | { |
| 9537 | auto stream = mImpl->stream(); |
| 9538 | auto countingStream = mImpl->countingStream(); |
| 9539 | countingStream->rewind(); |
| 9540 | { |
| 9541 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9542 | countingStream->write((VkIndirectCommandsLayoutNVX*)&indirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9543 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9544 | if (pAllocator) |
| 9545 | { |
| 9546 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9547 | } |
| 9548 | } |
| 9549 | uint32_t packetSize_vkDestroyIndirectCommandsLayoutNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9550 | countingStream->rewind(); |
| 9551 | uint32_t opcode_vkDestroyIndirectCommandsLayoutNVX = OP_vkDestroyIndirectCommandsLayoutNVX; |
| 9552 | stream->write(&opcode_vkDestroyIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9553 | stream->write(&packetSize_vkDestroyIndirectCommandsLayoutNVX, sizeof(uint32_t)); |
| 9554 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9555 | stream->write((VkIndirectCommandsLayoutNVX*)&indirectCommandsLayout, sizeof(VkIndirectCommandsLayoutNVX)); |
| 9556 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9557 | if (pAllocator) |
| 9558 | { |
| 9559 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9560 | } |
| 9561 | } |
| 9562 | |
| 9563 | VkResult VkEncoder::vkCreateObjectTableNVX( |
| 9564 | VkDevice device, |
| 9565 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 9566 | const VkAllocationCallbacks* pAllocator, |
| 9567 | VkObjectTableNVX* pObjectTable) |
| 9568 | { |
| 9569 | auto stream = mImpl->stream(); |
| 9570 | auto countingStream = mImpl->countingStream(); |
| 9571 | countingStream->rewind(); |
| 9572 | { |
| 9573 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9574 | marshal_VkObjectTableCreateInfoNVX(countingStream, (const VkObjectTableCreateInfoNVX*)(pCreateInfo)); |
| 9575 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9576 | if (pAllocator) |
| 9577 | { |
| 9578 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9579 | } |
| 9580 | countingStream->write((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9581 | } |
| 9582 | uint32_t packetSize_vkCreateObjectTableNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9583 | countingStream->rewind(); |
| 9584 | uint32_t opcode_vkCreateObjectTableNVX = OP_vkCreateObjectTableNVX; |
| 9585 | stream->write(&opcode_vkCreateObjectTableNVX, sizeof(uint32_t)); |
| 9586 | stream->write(&packetSize_vkCreateObjectTableNVX, sizeof(uint32_t)); |
| 9587 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9588 | marshal_VkObjectTableCreateInfoNVX(stream, (const VkObjectTableCreateInfoNVX*)(pCreateInfo)); |
| 9589 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9590 | if (pAllocator) |
| 9591 | { |
| 9592 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9593 | } |
| 9594 | stream->write((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9595 | stream->read((VkObjectTableNVX*)pObjectTable, sizeof(VkObjectTableNVX)); |
| 9596 | VkResult vkCreateObjectTableNVX_VkResult_return = (VkResult)0; |
| 9597 | stream->read(&vkCreateObjectTableNVX_VkResult_return, sizeof(VkResult)); |
| 9598 | return vkCreateObjectTableNVX_VkResult_return; |
| 9599 | } |
| 9600 | |
| 9601 | void VkEncoder::vkDestroyObjectTableNVX( |
| 9602 | VkDevice device, |
| 9603 | VkObjectTableNVX objectTable, |
| 9604 | const VkAllocationCallbacks* pAllocator) |
| 9605 | { |
| 9606 | auto stream = mImpl->stream(); |
| 9607 | auto countingStream = mImpl->countingStream(); |
| 9608 | countingStream->rewind(); |
| 9609 | { |
| 9610 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9611 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9612 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9613 | if (pAllocator) |
| 9614 | { |
| 9615 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9616 | } |
| 9617 | } |
| 9618 | uint32_t packetSize_vkDestroyObjectTableNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9619 | countingStream->rewind(); |
| 9620 | uint32_t opcode_vkDestroyObjectTableNVX = OP_vkDestroyObjectTableNVX; |
| 9621 | stream->write(&opcode_vkDestroyObjectTableNVX, sizeof(uint32_t)); |
| 9622 | stream->write(&packetSize_vkDestroyObjectTableNVX, sizeof(uint32_t)); |
| 9623 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9624 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9625 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9626 | if (pAllocator) |
| 9627 | { |
| 9628 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9629 | } |
| 9630 | } |
| 9631 | |
| 9632 | VkResult VkEncoder::vkRegisterObjectsNVX( |
| 9633 | VkDevice device, |
| 9634 | VkObjectTableNVX objectTable, |
| 9635 | uint32_t objectCount, |
| 9636 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 9637 | const uint32_t* pObjectIndices) |
| 9638 | { |
| 9639 | auto stream = mImpl->stream(); |
| 9640 | auto countingStream = mImpl->countingStream(); |
| 9641 | countingStream->rewind(); |
| 9642 | { |
| 9643 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9644 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9645 | countingStream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9646 | countingStream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9647 | } |
| 9648 | uint32_t packetSize_vkRegisterObjectsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9649 | countingStream->rewind(); |
| 9650 | uint32_t opcode_vkRegisterObjectsNVX = OP_vkRegisterObjectsNVX; |
| 9651 | stream->write(&opcode_vkRegisterObjectsNVX, sizeof(uint32_t)); |
| 9652 | stream->write(&packetSize_vkRegisterObjectsNVX, sizeof(uint32_t)); |
| 9653 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9654 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9655 | stream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9656 | stream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9657 | VkResult vkRegisterObjectsNVX_VkResult_return = (VkResult)0; |
| 9658 | stream->read(&vkRegisterObjectsNVX_VkResult_return, sizeof(VkResult)); |
| 9659 | return vkRegisterObjectsNVX_VkResult_return; |
| 9660 | } |
| 9661 | |
| 9662 | VkResult VkEncoder::vkUnregisterObjectsNVX( |
| 9663 | VkDevice device, |
| 9664 | VkObjectTableNVX objectTable, |
| 9665 | uint32_t objectCount, |
| 9666 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 9667 | const uint32_t* pObjectIndices) |
| 9668 | { |
| 9669 | auto stream = mImpl->stream(); |
| 9670 | auto countingStream = mImpl->countingStream(); |
| 9671 | countingStream->rewind(); |
| 9672 | { |
| 9673 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9674 | countingStream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9675 | countingStream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9676 | countingStream->write((const VkObjectEntryTypeNVX*)pObjectEntryTypes, ((objectCount)) * sizeof(const VkObjectEntryTypeNVX)); |
| 9677 | countingStream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9678 | } |
| 9679 | uint32_t packetSize_vkUnregisterObjectsNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9680 | countingStream->rewind(); |
| 9681 | uint32_t opcode_vkUnregisterObjectsNVX = OP_vkUnregisterObjectsNVX; |
| 9682 | stream->write(&opcode_vkUnregisterObjectsNVX, sizeof(uint32_t)); |
| 9683 | stream->write(&packetSize_vkUnregisterObjectsNVX, sizeof(uint32_t)); |
| 9684 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9685 | stream->write((VkObjectTableNVX*)&objectTable, sizeof(VkObjectTableNVX)); |
| 9686 | stream->write((uint32_t*)&objectCount, sizeof(uint32_t)); |
| 9687 | stream->write((const VkObjectEntryTypeNVX*)pObjectEntryTypes, ((objectCount)) * sizeof(const VkObjectEntryTypeNVX)); |
| 9688 | stream->write((const uint32_t*)pObjectIndices, ((objectCount)) * sizeof(const uint32_t)); |
| 9689 | VkResult vkUnregisterObjectsNVX_VkResult_return = (VkResult)0; |
| 9690 | stream->read(&vkUnregisterObjectsNVX_VkResult_return, sizeof(VkResult)); |
| 9691 | return vkUnregisterObjectsNVX_VkResult_return; |
| 9692 | } |
| 9693 | |
| 9694 | void VkEncoder::vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 9695 | VkPhysicalDevice physicalDevice, |
| 9696 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 9697 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) |
| 9698 | { |
| 9699 | auto stream = mImpl->stream(); |
| 9700 | auto countingStream = mImpl->countingStream(); |
| 9701 | countingStream->rewind(); |
| 9702 | { |
| 9703 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9704 | marshal_VkDeviceGeneratedCommandsFeaturesNVX(countingStream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9705 | marshal_VkDeviceGeneratedCommandsLimitsNVX(countingStream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9706 | } |
| 9707 | uint32_t packetSize_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9708 | countingStream->rewind(); |
| 9709 | uint32_t opcode_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = OP_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX; |
| 9710 | stream->write(&opcode_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, sizeof(uint32_t)); |
| 9711 | stream->write(&packetSize_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, sizeof(uint32_t)); |
| 9712 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9713 | marshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9714 | marshal_VkDeviceGeneratedCommandsLimitsNVX(stream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9715 | unmarshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures)); |
| 9716 | unmarshal_VkDeviceGeneratedCommandsLimitsNVX(stream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits)); |
| 9717 | } |
| 9718 | |
| 9719 | #endif |
| 9720 | #ifdef VK_NV_clip_space_w_scaling |
| 9721 | void VkEncoder::vkCmdSetViewportWScalingNV( |
| 9722 | VkCommandBuffer commandBuffer, |
| 9723 | uint32_t firstViewport, |
| 9724 | uint32_t viewportCount, |
| 9725 | const VkViewportWScalingNV* pViewportWScalings) |
| 9726 | { |
| 9727 | auto stream = mImpl->stream(); |
| 9728 | auto countingStream = mImpl->countingStream(); |
| 9729 | countingStream->rewind(); |
| 9730 | { |
| 9731 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9732 | countingStream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 9733 | countingStream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 9734 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 9735 | { |
| 9736 | marshal_VkViewportWScalingNV(countingStream, (const VkViewportWScalingNV*)(pViewportWScalings + i)); |
| 9737 | } |
| 9738 | } |
| 9739 | uint32_t packetSize_vkCmdSetViewportWScalingNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9740 | countingStream->rewind(); |
| 9741 | uint32_t opcode_vkCmdSetViewportWScalingNV = OP_vkCmdSetViewportWScalingNV; |
| 9742 | stream->write(&opcode_vkCmdSetViewportWScalingNV, sizeof(uint32_t)); |
| 9743 | stream->write(&packetSize_vkCmdSetViewportWScalingNV, sizeof(uint32_t)); |
| 9744 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 9745 | stream->write((uint32_t*)&firstViewport, sizeof(uint32_t)); |
| 9746 | stream->write((uint32_t*)&viewportCount, sizeof(uint32_t)); |
| 9747 | for (uint32_t i = 0; i < (uint32_t)((viewportCount)); ++i) |
| 9748 | { |
| 9749 | marshal_VkViewportWScalingNV(stream, (const VkViewportWScalingNV*)(pViewportWScalings + i)); |
| 9750 | } |
| 9751 | } |
| 9752 | |
| 9753 | #endif |
| 9754 | #ifdef VK_EXT_direct_mode_display |
| 9755 | VkResult VkEncoder::vkReleaseDisplayEXT( |
| 9756 | VkPhysicalDevice physicalDevice, |
| 9757 | VkDisplayKHR display) |
| 9758 | { |
| 9759 | auto stream = mImpl->stream(); |
| 9760 | auto countingStream = mImpl->countingStream(); |
| 9761 | countingStream->rewind(); |
| 9762 | { |
| 9763 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9764 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9765 | } |
| 9766 | uint32_t packetSize_vkReleaseDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9767 | countingStream->rewind(); |
| 9768 | uint32_t opcode_vkReleaseDisplayEXT = OP_vkReleaseDisplayEXT; |
| 9769 | stream->write(&opcode_vkReleaseDisplayEXT, sizeof(uint32_t)); |
| 9770 | stream->write(&packetSize_vkReleaseDisplayEXT, sizeof(uint32_t)); |
| 9771 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9772 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9773 | VkResult vkReleaseDisplayEXT_VkResult_return = (VkResult)0; |
| 9774 | stream->read(&vkReleaseDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9775 | return vkReleaseDisplayEXT_VkResult_return; |
| 9776 | } |
| 9777 | |
| 9778 | #endif |
| 9779 | #ifdef VK_EXT_acquire_xlib_display |
| 9780 | VkResult VkEncoder::vkAcquireXlibDisplayEXT( |
| 9781 | VkPhysicalDevice physicalDevice, |
| 9782 | Display* dpy, |
| 9783 | VkDisplayKHR display) |
| 9784 | { |
| 9785 | auto stream = mImpl->stream(); |
| 9786 | auto countingStream = mImpl->countingStream(); |
| 9787 | countingStream->rewind(); |
| 9788 | { |
| 9789 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9790 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 9791 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9792 | } |
| 9793 | uint32_t packetSize_vkAcquireXlibDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9794 | countingStream->rewind(); |
| 9795 | uint32_t opcode_vkAcquireXlibDisplayEXT = OP_vkAcquireXlibDisplayEXT; |
| 9796 | stream->write(&opcode_vkAcquireXlibDisplayEXT, sizeof(uint32_t)); |
| 9797 | stream->write(&packetSize_vkAcquireXlibDisplayEXT, sizeof(uint32_t)); |
| 9798 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9799 | stream->write((Display*)dpy, sizeof(Display)); |
| 9800 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9801 | stream->read((Display*)dpy, sizeof(Display)); |
| 9802 | VkResult vkAcquireXlibDisplayEXT_VkResult_return = (VkResult)0; |
| 9803 | stream->read(&vkAcquireXlibDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9804 | return vkAcquireXlibDisplayEXT_VkResult_return; |
| 9805 | } |
| 9806 | |
| 9807 | VkResult VkEncoder::vkGetRandROutputDisplayEXT( |
| 9808 | VkPhysicalDevice physicalDevice, |
| 9809 | Display* dpy, |
| 9810 | RROutput rrOutput, |
| 9811 | VkDisplayKHR* pDisplay) |
| 9812 | { |
| 9813 | auto stream = mImpl->stream(); |
| 9814 | auto countingStream = mImpl->countingStream(); |
| 9815 | countingStream->rewind(); |
| 9816 | { |
| 9817 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9818 | countingStream->write((Display*)dpy, sizeof(Display)); |
| 9819 | countingStream->write((RROutput*)&rrOutput, sizeof(RROutput)); |
| 9820 | countingStream->write((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9821 | } |
| 9822 | uint32_t packetSize_vkGetRandROutputDisplayEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9823 | countingStream->rewind(); |
| 9824 | uint32_t opcode_vkGetRandROutputDisplayEXT = OP_vkGetRandROutputDisplayEXT; |
| 9825 | stream->write(&opcode_vkGetRandROutputDisplayEXT, sizeof(uint32_t)); |
| 9826 | stream->write(&packetSize_vkGetRandROutputDisplayEXT, sizeof(uint32_t)); |
| 9827 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9828 | stream->write((Display*)dpy, sizeof(Display)); |
| 9829 | stream->write((RROutput*)&rrOutput, sizeof(RROutput)); |
| 9830 | stream->write((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9831 | stream->read((Display*)dpy, sizeof(Display)); |
| 9832 | stream->read((VkDisplayKHR*)pDisplay, sizeof(VkDisplayKHR)); |
| 9833 | VkResult vkGetRandROutputDisplayEXT_VkResult_return = (VkResult)0; |
| 9834 | stream->read(&vkGetRandROutputDisplayEXT_VkResult_return, sizeof(VkResult)); |
| 9835 | return vkGetRandROutputDisplayEXT_VkResult_return; |
| 9836 | } |
| 9837 | |
| 9838 | #endif |
| 9839 | #ifdef VK_EXT_display_surface_counter |
| 9840 | VkResult VkEncoder::vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 9841 | VkPhysicalDevice physicalDevice, |
| 9842 | VkSurfaceKHR surface, |
| 9843 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) |
| 9844 | { |
| 9845 | auto stream = mImpl->stream(); |
| 9846 | auto countingStream = mImpl->countingStream(); |
| 9847 | countingStream->rewind(); |
| 9848 | { |
| 9849 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9850 | countingStream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 9851 | marshal_VkSurfaceCapabilities2EXT(countingStream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9852 | } |
| 9853 | uint32_t packetSize_vkGetPhysicalDeviceSurfaceCapabilities2EXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9854 | countingStream->rewind(); |
| 9855 | uint32_t opcode_vkGetPhysicalDeviceSurfaceCapabilities2EXT = OP_vkGetPhysicalDeviceSurfaceCapabilities2EXT; |
| 9856 | stream->write(&opcode_vkGetPhysicalDeviceSurfaceCapabilities2EXT, sizeof(uint32_t)); |
| 9857 | stream->write(&packetSize_vkGetPhysicalDeviceSurfaceCapabilities2EXT, sizeof(uint32_t)); |
| 9858 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 9859 | stream->write((VkSurfaceKHR*)&surface, sizeof(VkSurfaceKHR)); |
| 9860 | marshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9861 | unmarshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities)); |
| 9862 | VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return = (VkResult)0; |
| 9863 | stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return, sizeof(VkResult)); |
| 9864 | return vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return; |
| 9865 | } |
| 9866 | |
| 9867 | #endif |
| 9868 | #ifdef VK_EXT_display_control |
| 9869 | VkResult VkEncoder::vkDisplayPowerControlEXT( |
| 9870 | VkDevice device, |
| 9871 | VkDisplayKHR display, |
| 9872 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) |
| 9873 | { |
| 9874 | auto stream = mImpl->stream(); |
| 9875 | auto countingStream = mImpl->countingStream(); |
| 9876 | countingStream->rewind(); |
| 9877 | { |
| 9878 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9879 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9880 | marshal_VkDisplayPowerInfoEXT(countingStream, (const VkDisplayPowerInfoEXT*)(pDisplayPowerInfo)); |
| 9881 | } |
| 9882 | uint32_t packetSize_vkDisplayPowerControlEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9883 | countingStream->rewind(); |
| 9884 | uint32_t opcode_vkDisplayPowerControlEXT = OP_vkDisplayPowerControlEXT; |
| 9885 | stream->write(&opcode_vkDisplayPowerControlEXT, sizeof(uint32_t)); |
| 9886 | stream->write(&packetSize_vkDisplayPowerControlEXT, sizeof(uint32_t)); |
| 9887 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9888 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9889 | marshal_VkDisplayPowerInfoEXT(stream, (const VkDisplayPowerInfoEXT*)(pDisplayPowerInfo)); |
| 9890 | VkResult vkDisplayPowerControlEXT_VkResult_return = (VkResult)0; |
| 9891 | stream->read(&vkDisplayPowerControlEXT_VkResult_return, sizeof(VkResult)); |
| 9892 | return vkDisplayPowerControlEXT_VkResult_return; |
| 9893 | } |
| 9894 | |
| 9895 | VkResult VkEncoder::vkRegisterDeviceEventEXT( |
| 9896 | VkDevice device, |
| 9897 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 9898 | const VkAllocationCallbacks* pAllocator, |
| 9899 | VkFence* pFence) |
| 9900 | { |
| 9901 | auto stream = mImpl->stream(); |
| 9902 | auto countingStream = mImpl->countingStream(); |
| 9903 | countingStream->rewind(); |
| 9904 | { |
| 9905 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9906 | marshal_VkDeviceEventInfoEXT(countingStream, (const VkDeviceEventInfoEXT*)(pDeviceEventInfo)); |
| 9907 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9908 | if (pAllocator) |
| 9909 | { |
| 9910 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9911 | } |
| 9912 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9913 | } |
| 9914 | uint32_t packetSize_vkRegisterDeviceEventEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9915 | countingStream->rewind(); |
| 9916 | uint32_t opcode_vkRegisterDeviceEventEXT = OP_vkRegisterDeviceEventEXT; |
| 9917 | stream->write(&opcode_vkRegisterDeviceEventEXT, sizeof(uint32_t)); |
| 9918 | stream->write(&packetSize_vkRegisterDeviceEventEXT, sizeof(uint32_t)); |
| 9919 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9920 | marshal_VkDeviceEventInfoEXT(stream, (const VkDeviceEventInfoEXT*)(pDeviceEventInfo)); |
| 9921 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9922 | if (pAllocator) |
| 9923 | { |
| 9924 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9925 | } |
| 9926 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9927 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 9928 | VkResult vkRegisterDeviceEventEXT_VkResult_return = (VkResult)0; |
| 9929 | stream->read(&vkRegisterDeviceEventEXT_VkResult_return, sizeof(VkResult)); |
| 9930 | return vkRegisterDeviceEventEXT_VkResult_return; |
| 9931 | } |
| 9932 | |
| 9933 | VkResult VkEncoder::vkRegisterDisplayEventEXT( |
| 9934 | VkDevice device, |
| 9935 | VkDisplayKHR display, |
| 9936 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 9937 | const VkAllocationCallbacks* pAllocator, |
| 9938 | VkFence* pFence) |
| 9939 | { |
| 9940 | auto stream = mImpl->stream(); |
| 9941 | auto countingStream = mImpl->countingStream(); |
| 9942 | countingStream->rewind(); |
| 9943 | { |
| 9944 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9945 | countingStream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9946 | marshal_VkDisplayEventInfoEXT(countingStream, (const VkDisplayEventInfoEXT*)(pDisplayEventInfo)); |
| 9947 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9948 | if (pAllocator) |
| 9949 | { |
| 9950 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9951 | } |
| 9952 | countingStream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9953 | } |
| 9954 | uint32_t packetSize_vkRegisterDisplayEventEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9955 | countingStream->rewind(); |
| 9956 | uint32_t opcode_vkRegisterDisplayEventEXT = OP_vkRegisterDisplayEventEXT; |
| 9957 | stream->write(&opcode_vkRegisterDisplayEventEXT, sizeof(uint32_t)); |
| 9958 | stream->write(&packetSize_vkRegisterDisplayEventEXT, sizeof(uint32_t)); |
| 9959 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9960 | stream->write((VkDisplayKHR*)&display, sizeof(VkDisplayKHR)); |
| 9961 | marshal_VkDisplayEventInfoEXT(stream, (const VkDisplayEventInfoEXT*)(pDisplayEventInfo)); |
| 9962 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 9963 | if (pAllocator) |
| 9964 | { |
| 9965 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 9966 | } |
| 9967 | stream->write((VkFence*)pFence, sizeof(VkFence)); |
| 9968 | stream->read((VkFence*)pFence, sizeof(VkFence)); |
| 9969 | VkResult vkRegisterDisplayEventEXT_VkResult_return = (VkResult)0; |
| 9970 | stream->read(&vkRegisterDisplayEventEXT_VkResult_return, sizeof(VkResult)); |
| 9971 | return vkRegisterDisplayEventEXT_VkResult_return; |
| 9972 | } |
| 9973 | |
| 9974 | VkResult VkEncoder::vkGetSwapchainCounterEXT( |
| 9975 | VkDevice device, |
| 9976 | VkSwapchainKHR swapchain, |
| 9977 | VkSurfaceCounterFlagBitsEXT counter, |
| 9978 | uint64_t* pCounterValue) |
| 9979 | { |
| 9980 | auto stream = mImpl->stream(); |
| 9981 | auto countingStream = mImpl->countingStream(); |
| 9982 | countingStream->rewind(); |
| 9983 | { |
| 9984 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9985 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 9986 | countingStream->write((VkSurfaceCounterFlagBitsEXT*)&counter, sizeof(VkSurfaceCounterFlagBitsEXT)); |
| 9987 | countingStream->write((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 9988 | } |
| 9989 | uint32_t packetSize_vkGetSwapchainCounterEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 9990 | countingStream->rewind(); |
| 9991 | uint32_t opcode_vkGetSwapchainCounterEXT = OP_vkGetSwapchainCounterEXT; |
| 9992 | stream->write(&opcode_vkGetSwapchainCounterEXT, sizeof(uint32_t)); |
| 9993 | stream->write(&packetSize_vkGetSwapchainCounterEXT, sizeof(uint32_t)); |
| 9994 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 9995 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 9996 | stream->write((VkSurfaceCounterFlagBitsEXT*)&counter, sizeof(VkSurfaceCounterFlagBitsEXT)); |
| 9997 | stream->write((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 9998 | stream->read((uint64_t*)pCounterValue, sizeof(uint64_t)); |
| 9999 | VkResult vkGetSwapchainCounterEXT_VkResult_return = (VkResult)0; |
| 10000 | stream->read(&vkGetSwapchainCounterEXT_VkResult_return, sizeof(VkResult)); |
| 10001 | return vkGetSwapchainCounterEXT_VkResult_return; |
| 10002 | } |
| 10003 | |
| 10004 | #endif |
| 10005 | #ifdef VK_GOOGLE_display_timing |
| 10006 | VkResult VkEncoder::vkGetRefreshCycleDurationGOOGLE( |
| 10007 | VkDevice device, |
| 10008 | VkSwapchainKHR swapchain, |
| 10009 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) |
| 10010 | { |
| 10011 | auto stream = mImpl->stream(); |
| 10012 | auto countingStream = mImpl->countingStream(); |
| 10013 | countingStream->rewind(); |
| 10014 | { |
| 10015 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10016 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10017 | marshal_VkRefreshCycleDurationGOOGLE(countingStream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10018 | } |
| 10019 | uint32_t packetSize_vkGetRefreshCycleDurationGOOGLE = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10020 | countingStream->rewind(); |
| 10021 | uint32_t opcode_vkGetRefreshCycleDurationGOOGLE = OP_vkGetRefreshCycleDurationGOOGLE; |
| 10022 | stream->write(&opcode_vkGetRefreshCycleDurationGOOGLE, sizeof(uint32_t)); |
| 10023 | stream->write(&packetSize_vkGetRefreshCycleDurationGOOGLE, sizeof(uint32_t)); |
| 10024 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10025 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10026 | marshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10027 | unmarshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties)); |
| 10028 | VkResult vkGetRefreshCycleDurationGOOGLE_VkResult_return = (VkResult)0; |
| 10029 | stream->read(&vkGetRefreshCycleDurationGOOGLE_VkResult_return, sizeof(VkResult)); |
| 10030 | return vkGetRefreshCycleDurationGOOGLE_VkResult_return; |
| 10031 | } |
| 10032 | |
| 10033 | VkResult VkEncoder::vkGetPastPresentationTimingGOOGLE( |
| 10034 | VkDevice device, |
| 10035 | VkSwapchainKHR swapchain, |
| 10036 | uint32_t* pPresentationTimingCount, |
| 10037 | VkPastPresentationTimingGOOGLE* pPresentationTimings) |
| 10038 | { |
| 10039 | auto stream = mImpl->stream(); |
| 10040 | auto countingStream = mImpl->countingStream(); |
| 10041 | countingStream->rewind(); |
| 10042 | { |
| 10043 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10044 | countingStream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10045 | countingStream->write((uint32_t**)&pPresentationTimingCount, sizeof(uint32_t*)); |
| 10046 | if (pPresentationTimingCount) |
| 10047 | { |
| 10048 | countingStream->write((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10049 | } |
| 10050 | countingStream->write((VkPastPresentationTimingGOOGLE**)&pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10051 | if (pPresentationTimings) |
| 10052 | { |
| 10053 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10054 | { |
| 10055 | marshal_VkPastPresentationTimingGOOGLE(countingStream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10056 | } |
| 10057 | } |
| 10058 | } |
| 10059 | uint32_t packetSize_vkGetPastPresentationTimingGOOGLE = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10060 | countingStream->rewind(); |
| 10061 | uint32_t opcode_vkGetPastPresentationTimingGOOGLE = OP_vkGetPastPresentationTimingGOOGLE; |
| 10062 | stream->write(&opcode_vkGetPastPresentationTimingGOOGLE, sizeof(uint32_t)); |
| 10063 | stream->write(&packetSize_vkGetPastPresentationTimingGOOGLE, sizeof(uint32_t)); |
| 10064 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10065 | stream->write((VkSwapchainKHR*)&swapchain, sizeof(VkSwapchainKHR)); |
| 10066 | stream->write((uint32_t**)&pPresentationTimingCount, sizeof(uint32_t*)); |
| 10067 | if (pPresentationTimingCount) |
| 10068 | { |
| 10069 | stream->write((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10070 | } |
| 10071 | stream->write((VkPastPresentationTimingGOOGLE**)&pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10072 | if (pPresentationTimings) |
| 10073 | { |
| 10074 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10075 | { |
| 10076 | marshal_VkPastPresentationTimingGOOGLE(stream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10077 | } |
| 10078 | } |
| 10079 | uint32_t* check_pPresentationTimingCount; |
| 10080 | stream->read((uint32_t**)&check_pPresentationTimingCount, sizeof(uint32_t*)); |
| 10081 | if (pPresentationTimingCount) |
| 10082 | { |
| 10083 | if (!(check_pPresentationTimingCount)) |
| 10084 | { |
| 10085 | fprintf(stderr, "fatal: pPresentationTimingCount inconsistent between guest and host\n"); |
| 10086 | } |
| 10087 | stream->read((uint32_t*)pPresentationTimingCount, sizeof(uint32_t)); |
| 10088 | } |
| 10089 | VkPastPresentationTimingGOOGLE* check_pPresentationTimings; |
| 10090 | stream->read((VkPastPresentationTimingGOOGLE**)&check_pPresentationTimings, sizeof(VkPastPresentationTimingGOOGLE*)); |
| 10091 | if (pPresentationTimings) |
| 10092 | { |
| 10093 | if (!(check_pPresentationTimings)) |
| 10094 | { |
| 10095 | fprintf(stderr, "fatal: pPresentationTimings inconsistent between guest and host\n"); |
| 10096 | } |
| 10097 | for (uint32_t i = 0; i < (uint32_t)(*(pPresentationTimingCount)); ++i) |
| 10098 | { |
| 10099 | unmarshal_VkPastPresentationTimingGOOGLE(stream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i)); |
| 10100 | } |
| 10101 | } |
| 10102 | VkResult vkGetPastPresentationTimingGOOGLE_VkResult_return = (VkResult)0; |
| 10103 | stream->read(&vkGetPastPresentationTimingGOOGLE_VkResult_return, sizeof(VkResult)); |
| 10104 | return vkGetPastPresentationTimingGOOGLE_VkResult_return; |
| 10105 | } |
| 10106 | |
| 10107 | #endif |
| 10108 | #ifdef VK_NV_sample_mask_override_coverage |
| 10109 | #endif |
| 10110 | #ifdef VK_NV_geometry_shader_passthrough |
| 10111 | #endif |
| 10112 | #ifdef VK_NV_viewport_array2 |
| 10113 | #endif |
| 10114 | #ifdef VK_NVX_multiview_per_view_attributes |
| 10115 | #endif |
| 10116 | #ifdef VK_NV_viewport_swizzle |
| 10117 | #endif |
| 10118 | #ifdef VK_EXT_discard_rectangles |
| 10119 | void VkEncoder::vkCmdSetDiscardRectangleEXT( |
| 10120 | VkCommandBuffer commandBuffer, |
| 10121 | uint32_t firstDiscardRectangle, |
| 10122 | uint32_t discardRectangleCount, |
| 10123 | const VkRect2D* pDiscardRectangles) |
| 10124 | { |
| 10125 | auto stream = mImpl->stream(); |
| 10126 | auto countingStream = mImpl->countingStream(); |
| 10127 | countingStream->rewind(); |
| 10128 | { |
| 10129 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10130 | countingStream->write((uint32_t*)&firstDiscardRectangle, sizeof(uint32_t)); |
| 10131 | countingStream->write((uint32_t*)&discardRectangleCount, sizeof(uint32_t)); |
| 10132 | for (uint32_t i = 0; i < (uint32_t)((discardRectangleCount)); ++i) |
| 10133 | { |
| 10134 | marshal_VkRect2D(countingStream, (const VkRect2D*)(pDiscardRectangles + i)); |
| 10135 | } |
| 10136 | } |
| 10137 | uint32_t packetSize_vkCmdSetDiscardRectangleEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10138 | countingStream->rewind(); |
| 10139 | uint32_t opcode_vkCmdSetDiscardRectangleEXT = OP_vkCmdSetDiscardRectangleEXT; |
| 10140 | stream->write(&opcode_vkCmdSetDiscardRectangleEXT, sizeof(uint32_t)); |
| 10141 | stream->write(&packetSize_vkCmdSetDiscardRectangleEXT, sizeof(uint32_t)); |
| 10142 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10143 | stream->write((uint32_t*)&firstDiscardRectangle, sizeof(uint32_t)); |
| 10144 | stream->write((uint32_t*)&discardRectangleCount, sizeof(uint32_t)); |
| 10145 | for (uint32_t i = 0; i < (uint32_t)((discardRectangleCount)); ++i) |
| 10146 | { |
| 10147 | marshal_VkRect2D(stream, (const VkRect2D*)(pDiscardRectangles + i)); |
| 10148 | } |
| 10149 | } |
| 10150 | |
| 10151 | #endif |
| 10152 | #ifdef VK_EXT_conservative_rasterization |
| 10153 | #endif |
| 10154 | #ifdef VK_EXT_swapchain_colorspace |
| 10155 | #endif |
| 10156 | #ifdef VK_EXT_hdr_metadata |
| 10157 | void VkEncoder::vkSetHdrMetadataEXT( |
| 10158 | VkDevice device, |
| 10159 | uint32_t swapchainCount, |
| 10160 | const VkSwapchainKHR* pSwapchains, |
| 10161 | const VkHdrMetadataEXT* pMetadata) |
| 10162 | { |
| 10163 | auto stream = mImpl->stream(); |
| 10164 | auto countingStream = mImpl->countingStream(); |
| 10165 | countingStream->rewind(); |
| 10166 | { |
| 10167 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10168 | countingStream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 10169 | countingStream->write((const VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(const VkSwapchainKHR)); |
| 10170 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 10171 | { |
| 10172 | marshal_VkHdrMetadataEXT(countingStream, (const VkHdrMetadataEXT*)(pMetadata + i)); |
| 10173 | } |
| 10174 | } |
| 10175 | uint32_t packetSize_vkSetHdrMetadataEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10176 | countingStream->rewind(); |
| 10177 | uint32_t opcode_vkSetHdrMetadataEXT = OP_vkSetHdrMetadataEXT; |
| 10178 | stream->write(&opcode_vkSetHdrMetadataEXT, sizeof(uint32_t)); |
| 10179 | stream->write(&packetSize_vkSetHdrMetadataEXT, sizeof(uint32_t)); |
| 10180 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10181 | stream->write((uint32_t*)&swapchainCount, sizeof(uint32_t)); |
| 10182 | stream->write((const VkSwapchainKHR*)pSwapchains, ((swapchainCount)) * sizeof(const VkSwapchainKHR)); |
| 10183 | for (uint32_t i = 0; i < (uint32_t)((swapchainCount)); ++i) |
| 10184 | { |
| 10185 | marshal_VkHdrMetadataEXT(stream, (const VkHdrMetadataEXT*)(pMetadata + i)); |
| 10186 | } |
| 10187 | } |
| 10188 | |
| 10189 | #endif |
| 10190 | #ifdef VK_MVK_ios_surface |
| 10191 | VkResult VkEncoder::vkCreateIOSSurfaceMVK( |
| 10192 | VkInstance instance, |
| 10193 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 10194 | const VkAllocationCallbacks* pAllocator, |
| 10195 | VkSurfaceKHR* pSurface) |
| 10196 | { |
| 10197 | auto stream = mImpl->stream(); |
| 10198 | auto countingStream = mImpl->countingStream(); |
| 10199 | countingStream->rewind(); |
| 10200 | { |
| 10201 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10202 | marshal_VkIOSSurfaceCreateInfoMVK(countingStream, (const VkIOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10203 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10204 | if (pAllocator) |
| 10205 | { |
| 10206 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10207 | } |
| 10208 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10209 | } |
| 10210 | uint32_t packetSize_vkCreateIOSSurfaceMVK = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10211 | countingStream->rewind(); |
| 10212 | uint32_t opcode_vkCreateIOSSurfaceMVK = OP_vkCreateIOSSurfaceMVK; |
| 10213 | stream->write(&opcode_vkCreateIOSSurfaceMVK, sizeof(uint32_t)); |
| 10214 | stream->write(&packetSize_vkCreateIOSSurfaceMVK, sizeof(uint32_t)); |
| 10215 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10216 | marshal_VkIOSSurfaceCreateInfoMVK(stream, (const VkIOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10217 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10218 | if (pAllocator) |
| 10219 | { |
| 10220 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10221 | } |
| 10222 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10223 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10224 | VkResult vkCreateIOSSurfaceMVK_VkResult_return = (VkResult)0; |
| 10225 | stream->read(&vkCreateIOSSurfaceMVK_VkResult_return, sizeof(VkResult)); |
| 10226 | return vkCreateIOSSurfaceMVK_VkResult_return; |
| 10227 | } |
| 10228 | |
| 10229 | #endif |
| 10230 | #ifdef VK_MVK_macos_surface |
| 10231 | VkResult VkEncoder::vkCreateMacOSSurfaceMVK( |
| 10232 | VkInstance instance, |
| 10233 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 10234 | const VkAllocationCallbacks* pAllocator, |
| 10235 | VkSurfaceKHR* pSurface) |
| 10236 | { |
| 10237 | auto stream = mImpl->stream(); |
| 10238 | auto countingStream = mImpl->countingStream(); |
| 10239 | countingStream->rewind(); |
| 10240 | { |
| 10241 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10242 | marshal_VkMacOSSurfaceCreateInfoMVK(countingStream, (const VkMacOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10243 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10244 | if (pAllocator) |
| 10245 | { |
| 10246 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10247 | } |
| 10248 | countingStream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10249 | } |
| 10250 | uint32_t packetSize_vkCreateMacOSSurfaceMVK = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10251 | countingStream->rewind(); |
| 10252 | uint32_t opcode_vkCreateMacOSSurfaceMVK = OP_vkCreateMacOSSurfaceMVK; |
| 10253 | stream->write(&opcode_vkCreateMacOSSurfaceMVK, sizeof(uint32_t)); |
| 10254 | stream->write(&packetSize_vkCreateMacOSSurfaceMVK, sizeof(uint32_t)); |
| 10255 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10256 | marshal_VkMacOSSurfaceCreateInfoMVK(stream, (const VkMacOSSurfaceCreateInfoMVK*)(pCreateInfo)); |
| 10257 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10258 | if (pAllocator) |
| 10259 | { |
| 10260 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10261 | } |
| 10262 | stream->write((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10263 | stream->read((VkSurfaceKHR*)pSurface, sizeof(VkSurfaceKHR)); |
| 10264 | VkResult vkCreateMacOSSurfaceMVK_VkResult_return = (VkResult)0; |
| 10265 | stream->read(&vkCreateMacOSSurfaceMVK_VkResult_return, sizeof(VkResult)); |
| 10266 | return vkCreateMacOSSurfaceMVK_VkResult_return; |
| 10267 | } |
| 10268 | |
| 10269 | #endif |
| 10270 | #ifdef VK_EXT_external_memory_dma_buf |
| 10271 | #endif |
| 10272 | #ifdef VK_EXT_queue_family_foreign |
| 10273 | #endif |
| 10274 | #ifdef VK_EXT_debug_utils |
| 10275 | VkResult VkEncoder::vkSetDebugUtilsObjectNameEXT( |
| 10276 | VkDevice device, |
| 10277 | const VkDebugUtilsObjectNameInfoEXT* pNameInfo) |
| 10278 | { |
| 10279 | auto stream = mImpl->stream(); |
| 10280 | auto countingStream = mImpl->countingStream(); |
| 10281 | countingStream->rewind(); |
| 10282 | { |
| 10283 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10284 | marshal_VkDebugUtilsObjectNameInfoEXT(countingStream, (const VkDebugUtilsObjectNameInfoEXT*)(pNameInfo)); |
| 10285 | } |
| 10286 | uint32_t packetSize_vkSetDebugUtilsObjectNameEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10287 | countingStream->rewind(); |
| 10288 | uint32_t opcode_vkSetDebugUtilsObjectNameEXT = OP_vkSetDebugUtilsObjectNameEXT; |
| 10289 | stream->write(&opcode_vkSetDebugUtilsObjectNameEXT, sizeof(uint32_t)); |
| 10290 | stream->write(&packetSize_vkSetDebugUtilsObjectNameEXT, sizeof(uint32_t)); |
| 10291 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10292 | marshal_VkDebugUtilsObjectNameInfoEXT(stream, (const VkDebugUtilsObjectNameInfoEXT*)(pNameInfo)); |
| 10293 | VkResult vkSetDebugUtilsObjectNameEXT_VkResult_return = (VkResult)0; |
| 10294 | stream->read(&vkSetDebugUtilsObjectNameEXT_VkResult_return, sizeof(VkResult)); |
| 10295 | return vkSetDebugUtilsObjectNameEXT_VkResult_return; |
| 10296 | } |
| 10297 | |
| 10298 | VkResult VkEncoder::vkSetDebugUtilsObjectTagEXT( |
| 10299 | VkDevice device, |
| 10300 | const VkDebugUtilsObjectTagInfoEXT* pTagInfo) |
| 10301 | { |
| 10302 | auto stream = mImpl->stream(); |
| 10303 | auto countingStream = mImpl->countingStream(); |
| 10304 | countingStream->rewind(); |
| 10305 | { |
| 10306 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10307 | marshal_VkDebugUtilsObjectTagInfoEXT(countingStream, (const VkDebugUtilsObjectTagInfoEXT*)(pTagInfo)); |
| 10308 | } |
| 10309 | uint32_t packetSize_vkSetDebugUtilsObjectTagEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10310 | countingStream->rewind(); |
| 10311 | uint32_t opcode_vkSetDebugUtilsObjectTagEXT = OP_vkSetDebugUtilsObjectTagEXT; |
| 10312 | stream->write(&opcode_vkSetDebugUtilsObjectTagEXT, sizeof(uint32_t)); |
| 10313 | stream->write(&packetSize_vkSetDebugUtilsObjectTagEXT, sizeof(uint32_t)); |
| 10314 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10315 | marshal_VkDebugUtilsObjectTagInfoEXT(stream, (const VkDebugUtilsObjectTagInfoEXT*)(pTagInfo)); |
| 10316 | VkResult vkSetDebugUtilsObjectTagEXT_VkResult_return = (VkResult)0; |
| 10317 | stream->read(&vkSetDebugUtilsObjectTagEXT_VkResult_return, sizeof(VkResult)); |
| 10318 | return vkSetDebugUtilsObjectTagEXT_VkResult_return; |
| 10319 | } |
| 10320 | |
| 10321 | void VkEncoder::vkQueueBeginDebugUtilsLabelEXT( |
| 10322 | VkQueue queue, |
| 10323 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10324 | { |
| 10325 | auto stream = mImpl->stream(); |
| 10326 | auto countingStream = mImpl->countingStream(); |
| 10327 | countingStream->rewind(); |
| 10328 | { |
| 10329 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10330 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10331 | } |
| 10332 | uint32_t packetSize_vkQueueBeginDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10333 | countingStream->rewind(); |
| 10334 | uint32_t opcode_vkQueueBeginDebugUtilsLabelEXT = OP_vkQueueBeginDebugUtilsLabelEXT; |
| 10335 | stream->write(&opcode_vkQueueBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10336 | stream->write(&packetSize_vkQueueBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10337 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10338 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10339 | } |
| 10340 | |
| 10341 | void VkEncoder::vkQueueEndDebugUtilsLabelEXT( |
| 10342 | VkQueue queue) |
| 10343 | { |
| 10344 | auto stream = mImpl->stream(); |
| 10345 | auto countingStream = mImpl->countingStream(); |
| 10346 | countingStream->rewind(); |
| 10347 | { |
| 10348 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10349 | } |
| 10350 | uint32_t packetSize_vkQueueEndDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10351 | countingStream->rewind(); |
| 10352 | uint32_t opcode_vkQueueEndDebugUtilsLabelEXT = OP_vkQueueEndDebugUtilsLabelEXT; |
| 10353 | stream->write(&opcode_vkQueueEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10354 | stream->write(&packetSize_vkQueueEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10355 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10356 | } |
| 10357 | |
| 10358 | void VkEncoder::vkQueueInsertDebugUtilsLabelEXT( |
| 10359 | VkQueue queue, |
| 10360 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10361 | { |
| 10362 | auto stream = mImpl->stream(); |
| 10363 | auto countingStream = mImpl->countingStream(); |
| 10364 | countingStream->rewind(); |
| 10365 | { |
| 10366 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10367 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10368 | } |
| 10369 | uint32_t packetSize_vkQueueInsertDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10370 | countingStream->rewind(); |
| 10371 | uint32_t opcode_vkQueueInsertDebugUtilsLabelEXT = OP_vkQueueInsertDebugUtilsLabelEXT; |
| 10372 | stream->write(&opcode_vkQueueInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10373 | stream->write(&packetSize_vkQueueInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10374 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10375 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10376 | } |
| 10377 | |
| 10378 | void VkEncoder::vkCmdBeginDebugUtilsLabelEXT( |
| 10379 | VkCommandBuffer commandBuffer, |
| 10380 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10381 | { |
| 10382 | auto stream = mImpl->stream(); |
| 10383 | auto countingStream = mImpl->countingStream(); |
| 10384 | countingStream->rewind(); |
| 10385 | { |
| 10386 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10387 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10388 | } |
| 10389 | uint32_t packetSize_vkCmdBeginDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10390 | countingStream->rewind(); |
| 10391 | uint32_t opcode_vkCmdBeginDebugUtilsLabelEXT = OP_vkCmdBeginDebugUtilsLabelEXT; |
| 10392 | stream->write(&opcode_vkCmdBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10393 | stream->write(&packetSize_vkCmdBeginDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10394 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10395 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10396 | } |
| 10397 | |
| 10398 | void VkEncoder::vkCmdEndDebugUtilsLabelEXT( |
| 10399 | VkCommandBuffer commandBuffer) |
| 10400 | { |
| 10401 | auto stream = mImpl->stream(); |
| 10402 | auto countingStream = mImpl->countingStream(); |
| 10403 | countingStream->rewind(); |
| 10404 | { |
| 10405 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10406 | } |
| 10407 | uint32_t packetSize_vkCmdEndDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10408 | countingStream->rewind(); |
| 10409 | uint32_t opcode_vkCmdEndDebugUtilsLabelEXT = OP_vkCmdEndDebugUtilsLabelEXT; |
| 10410 | stream->write(&opcode_vkCmdEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10411 | stream->write(&packetSize_vkCmdEndDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10412 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10413 | } |
| 10414 | |
| 10415 | void VkEncoder::vkCmdInsertDebugUtilsLabelEXT( |
| 10416 | VkCommandBuffer commandBuffer, |
| 10417 | const VkDebugUtilsLabelEXT* pLabelInfo) |
| 10418 | { |
| 10419 | auto stream = mImpl->stream(); |
| 10420 | auto countingStream = mImpl->countingStream(); |
| 10421 | countingStream->rewind(); |
| 10422 | { |
| 10423 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10424 | marshal_VkDebugUtilsLabelEXT(countingStream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10425 | } |
| 10426 | uint32_t packetSize_vkCmdInsertDebugUtilsLabelEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10427 | countingStream->rewind(); |
| 10428 | uint32_t opcode_vkCmdInsertDebugUtilsLabelEXT = OP_vkCmdInsertDebugUtilsLabelEXT; |
| 10429 | stream->write(&opcode_vkCmdInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10430 | stream->write(&packetSize_vkCmdInsertDebugUtilsLabelEXT, sizeof(uint32_t)); |
| 10431 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10432 | marshal_VkDebugUtilsLabelEXT(stream, (const VkDebugUtilsLabelEXT*)(pLabelInfo)); |
| 10433 | } |
| 10434 | |
| 10435 | VkResult VkEncoder::vkCreateDebugUtilsMessengerEXT( |
| 10436 | VkInstance instance, |
| 10437 | const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, |
| 10438 | const VkAllocationCallbacks* pAllocator, |
| 10439 | VkDebugUtilsMessengerEXT* pMessenger) |
| 10440 | { |
| 10441 | auto stream = mImpl->stream(); |
| 10442 | auto countingStream = mImpl->countingStream(); |
| 10443 | countingStream->rewind(); |
| 10444 | { |
| 10445 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10446 | marshal_VkDebugUtilsMessengerCreateInfoEXT(countingStream, (const VkDebugUtilsMessengerCreateInfoEXT*)(pCreateInfo)); |
| 10447 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10448 | if (pAllocator) |
| 10449 | { |
| 10450 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10451 | } |
| 10452 | countingStream->write((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10453 | } |
| 10454 | uint32_t packetSize_vkCreateDebugUtilsMessengerEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10455 | countingStream->rewind(); |
| 10456 | uint32_t opcode_vkCreateDebugUtilsMessengerEXT = OP_vkCreateDebugUtilsMessengerEXT; |
| 10457 | stream->write(&opcode_vkCreateDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10458 | stream->write(&packetSize_vkCreateDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10459 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10460 | marshal_VkDebugUtilsMessengerCreateInfoEXT(stream, (const VkDebugUtilsMessengerCreateInfoEXT*)(pCreateInfo)); |
| 10461 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10462 | if (pAllocator) |
| 10463 | { |
| 10464 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10465 | } |
| 10466 | stream->write((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10467 | stream->read((VkDebugUtilsMessengerEXT*)pMessenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10468 | VkResult vkCreateDebugUtilsMessengerEXT_VkResult_return = (VkResult)0; |
| 10469 | stream->read(&vkCreateDebugUtilsMessengerEXT_VkResult_return, sizeof(VkResult)); |
| 10470 | return vkCreateDebugUtilsMessengerEXT_VkResult_return; |
| 10471 | } |
| 10472 | |
| 10473 | void VkEncoder::vkDestroyDebugUtilsMessengerEXT( |
| 10474 | VkInstance instance, |
| 10475 | VkDebugUtilsMessengerEXT messenger, |
| 10476 | const VkAllocationCallbacks* pAllocator) |
| 10477 | { |
| 10478 | auto stream = mImpl->stream(); |
| 10479 | auto countingStream = mImpl->countingStream(); |
| 10480 | countingStream->rewind(); |
| 10481 | { |
| 10482 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10483 | countingStream->write((VkDebugUtilsMessengerEXT*)&messenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10484 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10485 | if (pAllocator) |
| 10486 | { |
| 10487 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10488 | } |
| 10489 | } |
| 10490 | uint32_t packetSize_vkDestroyDebugUtilsMessengerEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10491 | countingStream->rewind(); |
| 10492 | uint32_t opcode_vkDestroyDebugUtilsMessengerEXT = OP_vkDestroyDebugUtilsMessengerEXT; |
| 10493 | stream->write(&opcode_vkDestroyDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10494 | stream->write(&packetSize_vkDestroyDebugUtilsMessengerEXT, sizeof(uint32_t)); |
| 10495 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10496 | stream->write((VkDebugUtilsMessengerEXT*)&messenger, sizeof(VkDebugUtilsMessengerEXT)); |
| 10497 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10498 | if (pAllocator) |
| 10499 | { |
| 10500 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10501 | } |
| 10502 | } |
| 10503 | |
| 10504 | void VkEncoder::vkSubmitDebugUtilsMessageEXT( |
| 10505 | VkInstance instance, |
| 10506 | VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, |
| 10507 | VkDebugUtilsMessageTypeFlagsEXT messageTypes, |
| 10508 | const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) |
| 10509 | { |
| 10510 | auto stream = mImpl->stream(); |
| 10511 | auto countingStream = mImpl->countingStream(); |
| 10512 | countingStream->rewind(); |
| 10513 | { |
| 10514 | countingStream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10515 | countingStream->write((VkDebugUtilsMessageSeverityFlagBitsEXT*)&messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagBitsEXT)); |
| 10516 | countingStream->write((VkDebugUtilsMessageTypeFlagsEXT*)&messageTypes, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); |
| 10517 | marshal_VkDebugUtilsMessengerCallbackDataEXT(countingStream, (const VkDebugUtilsMessengerCallbackDataEXT*)(pCallbackData)); |
| 10518 | } |
| 10519 | uint32_t packetSize_vkSubmitDebugUtilsMessageEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10520 | countingStream->rewind(); |
| 10521 | uint32_t opcode_vkSubmitDebugUtilsMessageEXT = OP_vkSubmitDebugUtilsMessageEXT; |
| 10522 | stream->write(&opcode_vkSubmitDebugUtilsMessageEXT, sizeof(uint32_t)); |
| 10523 | stream->write(&packetSize_vkSubmitDebugUtilsMessageEXT, sizeof(uint32_t)); |
| 10524 | stream->write((VkInstance*)&instance, sizeof(VkInstance)); |
| 10525 | stream->write((VkDebugUtilsMessageSeverityFlagBitsEXT*)&messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagBitsEXT)); |
| 10526 | stream->write((VkDebugUtilsMessageTypeFlagsEXT*)&messageTypes, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); |
| 10527 | marshal_VkDebugUtilsMessengerCallbackDataEXT(stream, (const VkDebugUtilsMessengerCallbackDataEXT*)(pCallbackData)); |
| 10528 | } |
| 10529 | |
| 10530 | #endif |
| 10531 | #ifdef VK_ANDROID_external_memory_android_hardware_buffer |
| 10532 | VkResult VkEncoder::vkGetAndroidHardwareBufferPropertiesANDROID( |
| 10533 | VkDevice device, |
| 10534 | const AHardwareBuffer* buffer, |
| 10535 | VkAndroidHardwareBufferPropertiesANDROID* pProperties) |
| 10536 | { |
| 10537 | auto stream = mImpl->stream(); |
| 10538 | auto countingStream = mImpl->countingStream(); |
| 10539 | countingStream->rewind(); |
| 10540 | { |
| 10541 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10542 | countingStream->write((const AHardwareBuffer*)buffer, sizeof(const AHardwareBuffer)); |
| 10543 | marshal_VkAndroidHardwareBufferPropertiesANDROID(countingStream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10544 | } |
| 10545 | uint32_t packetSize_vkGetAndroidHardwareBufferPropertiesANDROID = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10546 | countingStream->rewind(); |
| 10547 | uint32_t opcode_vkGetAndroidHardwareBufferPropertiesANDROID = OP_vkGetAndroidHardwareBufferPropertiesANDROID; |
| 10548 | stream->write(&opcode_vkGetAndroidHardwareBufferPropertiesANDROID, sizeof(uint32_t)); |
| 10549 | stream->write(&packetSize_vkGetAndroidHardwareBufferPropertiesANDROID, sizeof(uint32_t)); |
| 10550 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10551 | stream->write((const AHardwareBuffer*)buffer, sizeof(const AHardwareBuffer)); |
| 10552 | marshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10553 | unmarshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties)); |
| 10554 | VkResult vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return = (VkResult)0; |
| 10555 | stream->read(&vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return, sizeof(VkResult)); |
| 10556 | return vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return; |
| 10557 | } |
| 10558 | |
| 10559 | VkResult VkEncoder::vkGetMemoryAndroidHardwareBufferANDROID( |
| 10560 | VkDevice device, |
| 10561 | const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, |
| 10562 | AHardwareBuffer** pBuffer) |
| 10563 | { |
| 10564 | auto stream = mImpl->stream(); |
| 10565 | auto countingStream = mImpl->countingStream(); |
| 10566 | countingStream->rewind(); |
| 10567 | { |
| 10568 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10569 | marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(countingStream, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)(pInfo)); |
| 10570 | countingStream->write((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10571 | } |
| 10572 | uint32_t packetSize_vkGetMemoryAndroidHardwareBufferANDROID = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10573 | countingStream->rewind(); |
| 10574 | uint32_t opcode_vkGetMemoryAndroidHardwareBufferANDROID = OP_vkGetMemoryAndroidHardwareBufferANDROID; |
| 10575 | stream->write(&opcode_vkGetMemoryAndroidHardwareBufferANDROID, sizeof(uint32_t)); |
| 10576 | stream->write(&packetSize_vkGetMemoryAndroidHardwareBufferANDROID, sizeof(uint32_t)); |
| 10577 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10578 | marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(stream, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)(pInfo)); |
| 10579 | stream->write((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10580 | stream->read((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*)); |
| 10581 | VkResult vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return = (VkResult)0; |
| 10582 | stream->read(&vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return, sizeof(VkResult)); |
| 10583 | return vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return; |
| 10584 | } |
| 10585 | |
| 10586 | #endif |
| 10587 | #ifdef VK_EXT_sampler_filter_minmax |
| 10588 | #endif |
| 10589 | #ifdef VK_AMD_gpu_shader_int16 |
| 10590 | #endif |
| 10591 | #ifdef VK_AMD_mixed_attachment_samples |
| 10592 | #endif |
| 10593 | #ifdef VK_AMD_shader_fragment_mask |
| 10594 | #endif |
| 10595 | #ifdef VK_EXT_shader_stencil_export |
| 10596 | #endif |
| 10597 | #ifdef VK_EXT_sample_locations |
| 10598 | void VkEncoder::vkCmdSetSampleLocationsEXT( |
| 10599 | VkCommandBuffer commandBuffer, |
| 10600 | const VkSampleLocationsInfoEXT* pSampleLocationsInfo) |
| 10601 | { |
| 10602 | auto stream = mImpl->stream(); |
| 10603 | auto countingStream = mImpl->countingStream(); |
| 10604 | countingStream->rewind(); |
| 10605 | { |
| 10606 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10607 | marshal_VkSampleLocationsInfoEXT(countingStream, (const VkSampleLocationsInfoEXT*)(pSampleLocationsInfo)); |
| 10608 | } |
| 10609 | uint32_t packetSize_vkCmdSetSampleLocationsEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10610 | countingStream->rewind(); |
| 10611 | uint32_t opcode_vkCmdSetSampleLocationsEXT = OP_vkCmdSetSampleLocationsEXT; |
| 10612 | stream->write(&opcode_vkCmdSetSampleLocationsEXT, sizeof(uint32_t)); |
| 10613 | stream->write(&packetSize_vkCmdSetSampleLocationsEXT, sizeof(uint32_t)); |
| 10614 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10615 | marshal_VkSampleLocationsInfoEXT(stream, (const VkSampleLocationsInfoEXT*)(pSampleLocationsInfo)); |
| 10616 | } |
| 10617 | |
| 10618 | void VkEncoder::vkGetPhysicalDeviceMultisamplePropertiesEXT( |
| 10619 | VkPhysicalDevice physicalDevice, |
| 10620 | VkSampleCountFlagBits samples, |
| 10621 | VkMultisamplePropertiesEXT* pMultisampleProperties) |
| 10622 | { |
| 10623 | auto stream = mImpl->stream(); |
| 10624 | auto countingStream = mImpl->countingStream(); |
| 10625 | countingStream->rewind(); |
| 10626 | { |
| 10627 | countingStream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 10628 | countingStream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 10629 | marshal_VkMultisamplePropertiesEXT(countingStream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10630 | } |
| 10631 | uint32_t packetSize_vkGetPhysicalDeviceMultisamplePropertiesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10632 | countingStream->rewind(); |
| 10633 | uint32_t opcode_vkGetPhysicalDeviceMultisamplePropertiesEXT = OP_vkGetPhysicalDeviceMultisamplePropertiesEXT; |
| 10634 | stream->write(&opcode_vkGetPhysicalDeviceMultisamplePropertiesEXT, sizeof(uint32_t)); |
| 10635 | stream->write(&packetSize_vkGetPhysicalDeviceMultisamplePropertiesEXT, sizeof(uint32_t)); |
| 10636 | stream->write((VkPhysicalDevice*)&physicalDevice, sizeof(VkPhysicalDevice)); |
| 10637 | stream->write((VkSampleCountFlagBits*)&samples, sizeof(VkSampleCountFlagBits)); |
| 10638 | marshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10639 | unmarshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties)); |
| 10640 | } |
| 10641 | |
| 10642 | #endif |
| 10643 | #ifdef VK_EXT_blend_operation_advanced |
| 10644 | #endif |
| 10645 | #ifdef VK_NV_fragment_coverage_to_color |
| 10646 | #endif |
| 10647 | #ifdef VK_NV_framebuffer_mixed_samples |
| 10648 | #endif |
| 10649 | #ifdef VK_NV_fill_rectangle |
| 10650 | #endif |
| 10651 | #ifdef VK_EXT_post_depth_coverage |
| 10652 | #endif |
| 10653 | #ifdef VK_EXT_validation_cache |
| 10654 | VkResult VkEncoder::vkCreateValidationCacheEXT( |
| 10655 | VkDevice device, |
| 10656 | const VkValidationCacheCreateInfoEXT* pCreateInfo, |
| 10657 | const VkAllocationCallbacks* pAllocator, |
| 10658 | VkValidationCacheEXT* pValidationCache) |
| 10659 | { |
| 10660 | auto stream = mImpl->stream(); |
| 10661 | auto countingStream = mImpl->countingStream(); |
| 10662 | countingStream->rewind(); |
| 10663 | { |
| 10664 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10665 | marshal_VkValidationCacheCreateInfoEXT(countingStream, (const VkValidationCacheCreateInfoEXT*)(pCreateInfo)); |
| 10666 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10667 | if (pAllocator) |
| 10668 | { |
| 10669 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10670 | } |
| 10671 | countingStream->write((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10672 | } |
| 10673 | uint32_t packetSize_vkCreateValidationCacheEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10674 | countingStream->rewind(); |
| 10675 | uint32_t opcode_vkCreateValidationCacheEXT = OP_vkCreateValidationCacheEXT; |
| 10676 | stream->write(&opcode_vkCreateValidationCacheEXT, sizeof(uint32_t)); |
| 10677 | stream->write(&packetSize_vkCreateValidationCacheEXT, sizeof(uint32_t)); |
| 10678 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10679 | marshal_VkValidationCacheCreateInfoEXT(stream, (const VkValidationCacheCreateInfoEXT*)(pCreateInfo)); |
| 10680 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10681 | if (pAllocator) |
| 10682 | { |
| 10683 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10684 | } |
| 10685 | stream->write((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10686 | stream->read((VkValidationCacheEXT*)pValidationCache, sizeof(VkValidationCacheEXT)); |
| 10687 | VkResult vkCreateValidationCacheEXT_VkResult_return = (VkResult)0; |
| 10688 | stream->read(&vkCreateValidationCacheEXT_VkResult_return, sizeof(VkResult)); |
| 10689 | return vkCreateValidationCacheEXT_VkResult_return; |
| 10690 | } |
| 10691 | |
| 10692 | void VkEncoder::vkDestroyValidationCacheEXT( |
| 10693 | VkDevice device, |
| 10694 | VkValidationCacheEXT validationCache, |
| 10695 | const VkAllocationCallbacks* pAllocator) |
| 10696 | { |
| 10697 | auto stream = mImpl->stream(); |
| 10698 | auto countingStream = mImpl->countingStream(); |
| 10699 | countingStream->rewind(); |
| 10700 | { |
| 10701 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10702 | countingStream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10703 | countingStream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10704 | if (pAllocator) |
| 10705 | { |
| 10706 | marshal_VkAllocationCallbacks(countingStream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10707 | } |
| 10708 | } |
| 10709 | uint32_t packetSize_vkDestroyValidationCacheEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10710 | countingStream->rewind(); |
| 10711 | uint32_t opcode_vkDestroyValidationCacheEXT = OP_vkDestroyValidationCacheEXT; |
| 10712 | stream->write(&opcode_vkDestroyValidationCacheEXT, sizeof(uint32_t)); |
| 10713 | stream->write(&packetSize_vkDestroyValidationCacheEXT, sizeof(uint32_t)); |
| 10714 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10715 | stream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10716 | stream->write((const VkAllocationCallbacks**)&pAllocator, sizeof(const VkAllocationCallbacks*)); |
| 10717 | if (pAllocator) |
| 10718 | { |
| 10719 | marshal_VkAllocationCallbacks(stream, (const VkAllocationCallbacks*)(pAllocator)); |
| 10720 | } |
| 10721 | } |
| 10722 | |
| 10723 | VkResult VkEncoder::vkMergeValidationCachesEXT( |
| 10724 | VkDevice device, |
| 10725 | VkValidationCacheEXT dstCache, |
| 10726 | uint32_t srcCacheCount, |
| 10727 | const VkValidationCacheEXT* pSrcCaches) |
| 10728 | { |
| 10729 | auto stream = mImpl->stream(); |
| 10730 | auto countingStream = mImpl->countingStream(); |
| 10731 | countingStream->rewind(); |
| 10732 | { |
| 10733 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10734 | countingStream->write((VkValidationCacheEXT*)&dstCache, sizeof(VkValidationCacheEXT)); |
| 10735 | countingStream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 10736 | countingStream->write((const VkValidationCacheEXT*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkValidationCacheEXT)); |
| 10737 | } |
| 10738 | uint32_t packetSize_vkMergeValidationCachesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10739 | countingStream->rewind(); |
| 10740 | uint32_t opcode_vkMergeValidationCachesEXT = OP_vkMergeValidationCachesEXT; |
| 10741 | stream->write(&opcode_vkMergeValidationCachesEXT, sizeof(uint32_t)); |
| 10742 | stream->write(&packetSize_vkMergeValidationCachesEXT, sizeof(uint32_t)); |
| 10743 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10744 | stream->write((VkValidationCacheEXT*)&dstCache, sizeof(VkValidationCacheEXT)); |
| 10745 | stream->write((uint32_t*)&srcCacheCount, sizeof(uint32_t)); |
| 10746 | stream->write((const VkValidationCacheEXT*)pSrcCaches, ((srcCacheCount)) * sizeof(const VkValidationCacheEXT)); |
| 10747 | VkResult vkMergeValidationCachesEXT_VkResult_return = (VkResult)0; |
| 10748 | stream->read(&vkMergeValidationCachesEXT_VkResult_return, sizeof(VkResult)); |
| 10749 | return vkMergeValidationCachesEXT_VkResult_return; |
| 10750 | } |
| 10751 | |
| 10752 | VkResult VkEncoder::vkGetValidationCacheDataEXT( |
| 10753 | VkDevice device, |
| 10754 | VkValidationCacheEXT validationCache, |
| 10755 | size_t* pDataSize, |
| 10756 | void* pData) |
| 10757 | { |
| 10758 | auto stream = mImpl->stream(); |
| 10759 | auto countingStream = mImpl->countingStream(); |
| 10760 | countingStream->rewind(); |
| 10761 | { |
| 10762 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10763 | countingStream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10764 | countingStream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 10765 | if (pDataSize) |
| 10766 | { |
| 10767 | countingStream->write((size_t*)pDataSize, sizeof(size_t)); |
| 10768 | } |
| 10769 | countingStream->write((void**)&pData, sizeof(void*)); |
| 10770 | if (pData) |
| 10771 | { |
| 10772 | countingStream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10773 | } |
| 10774 | } |
| 10775 | uint32_t packetSize_vkGetValidationCacheDataEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10776 | countingStream->rewind(); |
| 10777 | uint32_t opcode_vkGetValidationCacheDataEXT = OP_vkGetValidationCacheDataEXT; |
| 10778 | stream->write(&opcode_vkGetValidationCacheDataEXT, sizeof(uint32_t)); |
| 10779 | stream->write(&packetSize_vkGetValidationCacheDataEXT, sizeof(uint32_t)); |
| 10780 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10781 | stream->write((VkValidationCacheEXT*)&validationCache, sizeof(VkValidationCacheEXT)); |
| 10782 | stream->write((size_t**)&pDataSize, sizeof(size_t*)); |
| 10783 | if (pDataSize) |
| 10784 | { |
| 10785 | stream->write((size_t*)pDataSize, sizeof(size_t)); |
| 10786 | } |
| 10787 | stream->write((void**)&pData, sizeof(void*)); |
| 10788 | if (pData) |
| 10789 | { |
| 10790 | stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10791 | } |
| 10792 | size_t* check_pDataSize; |
| 10793 | stream->read((size_t**)&check_pDataSize, sizeof(size_t*)); |
| 10794 | if (pDataSize) |
| 10795 | { |
| 10796 | if (!(check_pDataSize)) |
| 10797 | { |
| 10798 | fprintf(stderr, "fatal: pDataSize inconsistent between guest and host\n"); |
| 10799 | } |
| 10800 | stream->read((size_t*)pDataSize, sizeof(size_t)); |
| 10801 | } |
| 10802 | void* check_pData; |
| 10803 | stream->read((void**)&check_pData, sizeof(void*)); |
| 10804 | if (pData) |
| 10805 | { |
| 10806 | if (!(check_pData)) |
| 10807 | { |
| 10808 | fprintf(stderr, "fatal: pData inconsistent between guest and host\n"); |
| 10809 | } |
| 10810 | stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t)); |
| 10811 | } |
| 10812 | VkResult vkGetValidationCacheDataEXT_VkResult_return = (VkResult)0; |
| 10813 | stream->read(&vkGetValidationCacheDataEXT_VkResult_return, sizeof(VkResult)); |
| 10814 | return vkGetValidationCacheDataEXT_VkResult_return; |
| 10815 | } |
| 10816 | |
| 10817 | #endif |
| 10818 | #ifdef VK_EXT_descriptor_indexing |
| 10819 | #endif |
| 10820 | #ifdef VK_EXT_shader_viewport_index_layer |
| 10821 | #endif |
| 10822 | #ifdef VK_EXT_global_priority |
| 10823 | #endif |
| 10824 | #ifdef VK_EXT_external_memory_host |
| 10825 | VkResult VkEncoder::vkGetMemoryHostPointerPropertiesEXT( |
| 10826 | VkDevice device, |
| 10827 | VkExternalMemoryHandleTypeFlagBits handleType, |
| 10828 | const void* pHostPointer, |
| 10829 | VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) |
| 10830 | { |
| 10831 | auto stream = mImpl->stream(); |
| 10832 | auto countingStream = mImpl->countingStream(); |
| 10833 | countingStream->rewind(); |
| 10834 | { |
| 10835 | countingStream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10836 | countingStream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 10837 | countingStream->write((const void**)&pHostPointer, sizeof(const void*)); |
| 10838 | if (pHostPointer) |
| 10839 | { |
| 10840 | countingStream->write((const void*)pHostPointer, sizeof(const uint8_t)); |
| 10841 | } |
| 10842 | marshal_VkMemoryHostPointerPropertiesEXT(countingStream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10843 | } |
| 10844 | uint32_t packetSize_vkGetMemoryHostPointerPropertiesEXT = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10845 | countingStream->rewind(); |
| 10846 | uint32_t opcode_vkGetMemoryHostPointerPropertiesEXT = OP_vkGetMemoryHostPointerPropertiesEXT; |
| 10847 | stream->write(&opcode_vkGetMemoryHostPointerPropertiesEXT, sizeof(uint32_t)); |
| 10848 | stream->write(&packetSize_vkGetMemoryHostPointerPropertiesEXT, sizeof(uint32_t)); |
| 10849 | stream->write((VkDevice*)&device, sizeof(VkDevice)); |
| 10850 | stream->write((VkExternalMemoryHandleTypeFlagBits*)&handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); |
| 10851 | stream->write((const void**)&pHostPointer, sizeof(const void*)); |
| 10852 | if (pHostPointer) |
| 10853 | { |
| 10854 | stream->write((const void*)pHostPointer, sizeof(const uint8_t)); |
| 10855 | } |
| 10856 | marshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10857 | unmarshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties)); |
| 10858 | VkResult vkGetMemoryHostPointerPropertiesEXT_VkResult_return = (VkResult)0; |
| 10859 | stream->read(&vkGetMemoryHostPointerPropertiesEXT_VkResult_return, sizeof(VkResult)); |
| 10860 | return vkGetMemoryHostPointerPropertiesEXT_VkResult_return; |
| 10861 | } |
| 10862 | |
| 10863 | #endif |
| 10864 | #ifdef VK_AMD_buffer_marker |
| 10865 | void VkEncoder::vkCmdWriteBufferMarkerAMD( |
| 10866 | VkCommandBuffer commandBuffer, |
| 10867 | VkPipelineStageFlagBits pipelineStage, |
| 10868 | VkBuffer dstBuffer, |
| 10869 | VkDeviceSize dstOffset, |
| 10870 | uint32_t marker) |
| 10871 | { |
| 10872 | auto stream = mImpl->stream(); |
| 10873 | auto countingStream = mImpl->countingStream(); |
| 10874 | countingStream->rewind(); |
| 10875 | { |
| 10876 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10877 | countingStream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 10878 | countingStream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 10879 | countingStream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 10880 | countingStream->write((uint32_t*)&marker, sizeof(uint32_t)); |
| 10881 | } |
| 10882 | uint32_t packetSize_vkCmdWriteBufferMarkerAMD = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10883 | countingStream->rewind(); |
| 10884 | uint32_t opcode_vkCmdWriteBufferMarkerAMD = OP_vkCmdWriteBufferMarkerAMD; |
| 10885 | stream->write(&opcode_vkCmdWriteBufferMarkerAMD, sizeof(uint32_t)); |
| 10886 | stream->write(&packetSize_vkCmdWriteBufferMarkerAMD, sizeof(uint32_t)); |
| 10887 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10888 | stream->write((VkPipelineStageFlagBits*)&pipelineStage, sizeof(VkPipelineStageFlagBits)); |
| 10889 | stream->write((VkBuffer*)&dstBuffer, sizeof(VkBuffer)); |
| 10890 | stream->write((VkDeviceSize*)&dstOffset, sizeof(VkDeviceSize)); |
| 10891 | stream->write((uint32_t*)&marker, sizeof(uint32_t)); |
| 10892 | } |
| 10893 | |
| 10894 | #endif |
| 10895 | #ifdef VK_AMD_shader_core_properties |
| 10896 | #endif |
| 10897 | #ifdef VK_EXT_vertex_attribute_divisor |
| 10898 | #endif |
| 10899 | #ifdef VK_NV_shader_subgroup_partitioned |
| 10900 | #endif |
| 10901 | #ifdef VK_NV_device_diagnostic_checkpoints |
| 10902 | void VkEncoder::vkCmdSetCheckpointNV( |
| 10903 | VkCommandBuffer commandBuffer, |
| 10904 | const void* pCheckpointMarker) |
| 10905 | { |
| 10906 | auto stream = mImpl->stream(); |
| 10907 | auto countingStream = mImpl->countingStream(); |
| 10908 | countingStream->rewind(); |
| 10909 | { |
| 10910 | countingStream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10911 | countingStream->write((const void**)&pCheckpointMarker, sizeof(const void*)); |
| 10912 | if (pCheckpointMarker) |
| 10913 | { |
| 10914 | countingStream->write((const void*)pCheckpointMarker, sizeof(const uint8_t)); |
| 10915 | } |
| 10916 | } |
| 10917 | uint32_t packetSize_vkCmdSetCheckpointNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10918 | countingStream->rewind(); |
| 10919 | uint32_t opcode_vkCmdSetCheckpointNV = OP_vkCmdSetCheckpointNV; |
| 10920 | stream->write(&opcode_vkCmdSetCheckpointNV, sizeof(uint32_t)); |
| 10921 | stream->write(&packetSize_vkCmdSetCheckpointNV, sizeof(uint32_t)); |
| 10922 | stream->write((VkCommandBuffer*)&commandBuffer, sizeof(VkCommandBuffer)); |
| 10923 | stream->write((const void**)&pCheckpointMarker, sizeof(const void*)); |
| 10924 | if (pCheckpointMarker) |
| 10925 | { |
| 10926 | stream->write((const void*)pCheckpointMarker, sizeof(const uint8_t)); |
| 10927 | } |
| 10928 | } |
| 10929 | |
| 10930 | void VkEncoder::vkGetQueueCheckpointDataNV( |
| 10931 | VkQueue queue, |
| 10932 | uint32_t* pCheckpointDataCount, |
| 10933 | VkCheckpointDataNV* pCheckpointData) |
| 10934 | { |
| 10935 | auto stream = mImpl->stream(); |
| 10936 | auto countingStream = mImpl->countingStream(); |
| 10937 | countingStream->rewind(); |
| 10938 | { |
| 10939 | countingStream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10940 | countingStream->write((uint32_t**)&pCheckpointDataCount, sizeof(uint32_t*)); |
| 10941 | if (pCheckpointDataCount) |
| 10942 | { |
| 10943 | countingStream->write((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10944 | } |
| 10945 | countingStream->write((VkCheckpointDataNV**)&pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10946 | if (pCheckpointData) |
| 10947 | { |
| 10948 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10949 | { |
| 10950 | marshal_VkCheckpointDataNV(countingStream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10951 | } |
| 10952 | } |
| 10953 | } |
| 10954 | uint32_t packetSize_vkGetQueueCheckpointDataNV = 4 + 4 + (uint32_t)countingStream->bytesWritten(); |
| 10955 | countingStream->rewind(); |
| 10956 | uint32_t opcode_vkGetQueueCheckpointDataNV = OP_vkGetQueueCheckpointDataNV; |
| 10957 | stream->write(&opcode_vkGetQueueCheckpointDataNV, sizeof(uint32_t)); |
| 10958 | stream->write(&packetSize_vkGetQueueCheckpointDataNV, sizeof(uint32_t)); |
| 10959 | stream->write((VkQueue*)&queue, sizeof(VkQueue)); |
| 10960 | stream->write((uint32_t**)&pCheckpointDataCount, sizeof(uint32_t*)); |
| 10961 | if (pCheckpointDataCount) |
| 10962 | { |
| 10963 | stream->write((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10964 | } |
| 10965 | stream->write((VkCheckpointDataNV**)&pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10966 | if (pCheckpointData) |
| 10967 | { |
| 10968 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10969 | { |
| 10970 | marshal_VkCheckpointDataNV(stream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10971 | } |
| 10972 | } |
| 10973 | uint32_t* check_pCheckpointDataCount; |
| 10974 | stream->read((uint32_t**)&check_pCheckpointDataCount, sizeof(uint32_t*)); |
| 10975 | if (pCheckpointDataCount) |
| 10976 | { |
| 10977 | if (!(check_pCheckpointDataCount)) |
| 10978 | { |
| 10979 | fprintf(stderr, "fatal: pCheckpointDataCount inconsistent between guest and host\n"); |
| 10980 | } |
| 10981 | stream->read((uint32_t*)pCheckpointDataCount, sizeof(uint32_t)); |
| 10982 | } |
| 10983 | VkCheckpointDataNV* check_pCheckpointData; |
| 10984 | stream->read((VkCheckpointDataNV**)&check_pCheckpointData, sizeof(VkCheckpointDataNV*)); |
| 10985 | if (pCheckpointData) |
| 10986 | { |
| 10987 | if (!(check_pCheckpointData)) |
| 10988 | { |
| 10989 | fprintf(stderr, "fatal: pCheckpointData inconsistent between guest and host\n"); |
| 10990 | } |
| 10991 | for (uint32_t i = 0; i < (uint32_t)(*(pCheckpointDataCount)); ++i) |
| 10992 | { |
| 10993 | unmarshal_VkCheckpointDataNV(stream, (VkCheckpointDataNV*)(pCheckpointData + i)); |
| 10994 | } |
| 10995 | } |
| 10996 | } |
| 10997 | |
| 10998 | #endif |
| 10999 | |
| 11000 | |