The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

comp: Don't initialize unused fields in Vulkan structs.

In order to save redundancy with initializing empty fields with NULL / 0
values and improve readability of the Vulkan code.

This patch also uses struct initializers where possible.

This essentially reverts 1eae45212e2630ba096f6860c6b8392b88f5c254.

+8 -151
-31
src/xrt/auxiliary/vk/vk_helpers.c
··· 278 278 279 279 VkExternalMemoryImageCreateInfoKHR external_memory_image_create_info = { 280 280 .sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR, 281 - .pNext = NULL, 282 281 .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, 283 282 }; 284 283 ··· 304 303 VkImageCreateInfo info = { 305 304 .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, 306 305 .pNext = &external_memory_image_create_info, 307 - .flags = 0, 308 306 .imageType = VK_IMAGE_TYPE_2D, 309 307 .format = (VkFormat)format, 310 308 .extent = {.width = width, .height = height, .depth = 1}, ··· 314 312 .tiling = VK_IMAGE_TILING_OPTIMAL, 315 313 .usage = image_usage, 316 314 .sharingMode = VK_SHARING_MODE_EXCLUSIVE, 317 - .queueFamilyIndexCount = 0, 318 - .pQueueFamilyIndices = NULL, 319 315 .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, 320 316 }; 321 317 ··· 399 395 400 396 VkImageViewCreateInfo imageView = { 401 397 .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, 402 - .pNext = NULL, 403 - .flags = 0, 404 398 .image = image, 405 399 .viewType = VK_IMAGE_VIEW_TYPE_2D, 406 400 .format = format, ··· 441 435 // Allocate the command buffer. 442 436 VkCommandBufferAllocateInfo cmd_buffer_info = { 443 437 .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, 444 - .pNext = NULL, 445 438 .commandPool = vk->cmd_pool, 446 439 .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY, 447 440 .commandBufferCount = 1, ··· 459 452 // Start the command buffer as well. 460 453 VkCommandBufferBeginInfo begin_info = { 461 454 .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, 462 - .pNext = NULL, 463 - .flags = 0, 464 - .pInheritanceInfo = NULL, 465 455 }; 466 456 ret = vk->vkBeginCommandBuffer(cmd_buffer, &begin_info); 467 457 if (ret != VK_SUCCESS) { ··· 492 482 { 493 483 VkImageMemoryBarrier barrier = { 494 484 .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, 495 - .pNext = 0, 496 485 .srcAccessMask = src_access_mask, 497 486 .dstAccessMask = dst_access_mask, 498 487 .oldLayout = old_layout, ··· 518 507 VkFence fence; 519 508 VkFenceCreateInfo fence_info = { 520 509 .sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, 521 - .pNext = NULL, 522 - .flags = 0, 523 510 }; 524 511 VkSubmitInfo submitInfo = { 525 512 .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, 526 - .pNext = NULL, 527 - .waitSemaphoreCount = 0, 528 - .pWaitSemaphores = NULL, 529 - .pWaitDstStageMask = NULL, 530 513 .commandBufferCount = 1, 531 514 .pCommandBuffers = &cmd_buffer, 532 - .signalSemaphoreCount = 0, 533 - .pSignalSemaphores = NULL, 534 515 }; 535 516 536 517 // Finish the command buffer first. ··· 551 532 } 552 533 553 534 // Do the actual submitting. 554 - 555 535 ret = vk->vkQueueSubmit(queue, 1, &submitInfo, fence); 556 536 if (ret != VK_SUCCESS) { 557 537 VK_ERROR(vk, "Error: Could not submit queue.\n"); ··· 580 560 { 581 561 VkCommandPoolCreateInfo cmd_pool_info = { 582 562 .sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, 583 - .pNext = NULL, 584 563 .flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, 585 564 .queueFamilyIndex = vk->queue_family_index, 586 565 }; ··· 651 630 652 631 VkDebugReportCallbackCreateInfoEXT info = { 653 632 .sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT, 654 - .pNext = NULL, 655 633 .flags = flags, 656 634 .pfnCallback = _validation_cb, 657 - .pUserData = NULL, 658 635 }; 659 636 660 637 vk->vkCreateDebugReportCallbackEXT(vk->instance, &info, NULL, ··· 959 936 float queue_priority = 0.0f; 960 937 VkDeviceQueueCreateInfo queue_create_info = { 961 938 .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, 962 - .pNext = NULL, 963 - .flags = 0, 964 - .queueFamilyIndex = 0, // assigned valid value later 965 939 .queueCount = 1, 966 940 .pQueuePriorities = &queue_priority, 967 941 }; 968 942 969 - //! @todo why not vk->queue_family_index ? 970 943 ret = vk_find_graphics_queue(vk, &queue_create_info.queueFamilyIndex); 971 944 if (ret != VK_SUCCESS) { 972 945 return ret; ··· 987 960 988 961 VkDeviceCreateInfo device_create_info = { 989 962 .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, 990 - .pNext = NULL, 991 - .flags = 0, 992 963 .queueCreateInfoCount = 1, 993 964 .pQueueCreateInfos = &queue_create_info, 994 - .enabledLayerCount = 0, 995 - .ppEnabledLayerNames = NULL, 996 965 .enabledExtensionCount = ARRAY_SIZE(device_extensions), 997 966 .ppEnabledExtensionNames = device_extensions, 998 967 .pEnabledFeatures = enabled_features,
-11
src/xrt/compositor/main/comp_compositor.c
··· 414 414 415 415 VkApplicationInfo app_info = { 416 416 .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, 417 - .pNext = NULL, 418 417 .pApplicationName = "Collabora Compositor", 419 - .applicationVersion = 0, 420 418 .pEngineName = "Monado", 421 - .engineVersion = 0, 422 419 .apiVersion = VK_MAKE_VERSION(1, 0, 2), 423 420 }; 424 421 ··· 432 429 433 430 VkInstanceCreateInfo instance_info = { 434 431 .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, 435 - .pNext = NULL, 436 - .flags = 0, 437 432 .pApplicationInfo = &app_info, 438 - .enabledLayerCount = 0, 439 - .ppEnabledLayerNames = NULL, 440 433 .enabledExtensionCount = num_extensions, 441 434 .ppEnabledExtensionNames = instance_extensions, 442 435 }; ··· 555 548 VkInstanceCreateInfo instance_create_info = { 556 549 .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, 557 550 .pNext = NULL, 558 - .flags = 0, 559 - .pApplicationInfo = NULL, 560 - .enabledLayerCount = 0, 561 - .ppEnabledLayerNames = NULL, 562 551 .enabledExtensionCount = ARRAY_SIZE(extension_names), 563 552 .ppEnabledExtensionNames = extension_names, 564 553 };
+8 -99
src/xrt/compositor/main/comp_distortion.c
··· 147 147 148 148 VkShaderModuleCreateInfo info = { 149 149 .sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, 150 - .pNext = NULL, 151 - .flags = 0, 152 150 .codeSize = size, 153 151 .pCode = code, 154 152 }; ··· 161 159 162 160 return (VkPipelineShaderStageCreateInfo){ 163 161 .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, 164 - .pNext = NULL, 165 - .flags = 0, 166 162 .stage = flags, 167 163 .module = module, 168 164 .pName = "main", 169 - .pSpecializationInfo = NULL, 170 165 }; 171 166 } 172 167 ··· 265 260 VkPipelineInputAssemblyStateCreateInfo input_assembly_state = { 266 261 .sType = 267 262 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, 268 - .pNext = NULL, 269 - .flags = 0, 270 263 .topology = topology, 271 264 .primitiveRestartEnable = VK_FALSE, 272 265 }; 273 266 274 267 VkPipelineRasterizationStateCreateInfo rasterization_state = { 275 268 .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, 276 - .pNext = NULL, 277 - .flags = 0, 278 269 .depthClampEnable = VK_FALSE, 279 270 .rasterizerDiscardEnable = VK_FALSE, 280 271 .polygonMode = polygonMode, 281 272 .cullMode = VK_CULL_MODE_BACK_BIT, 282 273 .frontFace = VK_FRONT_FACE_CLOCKWISE, 283 - .depthBiasEnable = VK_FALSE, 284 - .depthBiasConstantFactor = 0.f, 285 - .depthBiasClamp = 0.f, 286 - .depthBiasSlopeFactor = 0.f, 287 274 .lineWidth = 1.0f, 288 275 }; 289 276 290 - VkPipelineColorBlendAttachmentState blend_attachment_state = {0}; 291 - blend_attachment_state.blendEnable = VK_FALSE; 292 - blend_attachment_state.colorWriteMask = 0xf; 277 + VkPipelineColorBlendAttachmentState blend_attachment_state = { 278 + .blendEnable = VK_FALSE, 279 + .colorWriteMask = 0xf, 280 + }; 293 281 294 282 VkPipelineColorBlendStateCreateInfo color_blend_state = { 295 283 .sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, 296 - .pNext = NULL, 297 - .flags = 0, 298 - .logicOpEnable = VK_FALSE, 299 - .logicOp = VK_LOGIC_OP_CLEAR, 300 284 .attachmentCount = 1, 301 285 .pAttachments = &blend_attachment_state, 302 - //! @todo what's the right value for blendConstants? 303 - .blendConstants = {1.f, 1.f, 1.f, 1.f}, 304 286 }; 305 287 306 288 VkPipelineDepthStencilStateCreateInfo depth_stencil_state = { 307 289 .sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, 308 - .pNext = NULL, 309 - .flags = 0, 310 290 .depthTestEnable = VK_TRUE, 311 291 .depthWriteEnable = VK_TRUE, 312 292 .depthCompareOp = VK_COMPARE_OP_LESS_OR_EQUAL, 313 - .depthBoundsTestEnable = VK_FALSE, 314 - .stencilTestEnable = VK_FALSE, 315 293 .front = 316 294 { 317 - .failOp = VK_STENCIL_OP_KEEP, 318 - .passOp = VK_STENCIL_OP_KEEP, 319 - .depthFailOp = VK_STENCIL_OP_KEEP, 320 - .compareOp = VK_COMPARE_OP_ALWAYS, // this is the only 321 - // meaningful value here. 322 - .compareMask = 0, 323 - .writeMask = 0, 324 - .reference = 0, 295 + .compareOp = VK_COMPARE_OP_ALWAYS, 325 296 }, 326 297 .back = 327 298 { 328 - .failOp = VK_STENCIL_OP_KEEP, 329 - .passOp = VK_STENCIL_OP_KEEP, 330 - .depthFailOp = VK_STENCIL_OP_KEEP, 331 - .compareOp = VK_COMPARE_OP_ALWAYS, // this is the only 332 - // meaningful value here. 333 - .compareMask = 0, 334 - .writeMask = 0, 335 - .reference = 0, 299 + .compareOp = VK_COMPARE_OP_ALWAYS, 336 300 }, 337 - .minDepthBounds = 0.f, 338 - .maxDepthBounds = 0.f, 339 301 }; 340 302 341 303 VkPipelineViewportStateCreateInfo viewport_state = { 342 304 .sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, 343 - .pNext = NULL, 344 - .flags = 0, 345 305 .viewportCount = 1, 346 - .pViewports = NULL, // assigned valid value later 347 306 .scissorCount = 1, 348 - .pScissors = NULL, // assigned valid value later 349 307 }; 350 308 351 309 VkPipelineMultisampleStateCreateInfo multisample_state = { 352 310 .sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, 353 - .pNext = NULL, 354 - .flags = 0, 355 - .rasterizationSamples = VK_SAMPLE_COUNT_1_BIT, 356 - .sampleShadingEnable = VK_FALSE, 357 - .minSampleShading = 0, 358 - .pSampleMask = NULL, 359 - .alphaToCoverageEnable = VK_FALSE, 360 - .alphaToOneEnable = VK_FALSE, 361 - 362 - }; 311 + .rasterizationSamples = VK_SAMPLE_COUNT_1_BIT}; 363 312 364 313 VkDynamicState dynamic_states[] = { 365 314 VK_DYNAMIC_STATE_VIEWPORT, ··· 368 317 369 318 VkPipelineDynamicStateCreateInfo dynamic_state = { 370 319 .sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, 371 - .pNext = NULL, 372 - .flags = 0, 373 320 .dynamicStateCount = 2, 374 321 .pDynamicStates = dynamic_states, 375 322 }; ··· 388 335 */ 389 336 VkPipelineVertexInputStateCreateInfo vertex_input_state = { 390 337 .sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, 391 - .pNext = NULL, 392 - .flags = 0, 393 - .vertexBindingDescriptionCount = 0, 394 - .pVertexBindingDescriptions = NULL, 395 - .vertexAttributeDescriptionCount = 0, 396 - .pVertexAttributeDescriptions = NULL, 397 338 }; 398 339 const uint32_t *vertex_shader_code = shaders_distortion_vert; 399 340 size_t vertex_shader_size = sizeof(shaders_distortion_vert); ··· 451 392 VK_SHADER_STAGE_FRAGMENT_BIT), 452 393 }; 453 394 454 - 455 - 456 395 VkGraphicsPipelineCreateInfo pipeline_info = { 457 396 .sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, 458 - .pNext = NULL, 459 397 .flags = 0, 460 398 .stageCount = ARRAY_SIZE(shader_stages), 461 399 .pStages = shader_stages, 462 400 .pVertexInputState = &vertex_input_state, 463 401 .pInputAssemblyState = &input_assembly_state, 464 - .pTessellationState = NULL, 465 402 .pViewportState = &viewport_state, 466 403 .pRasterizationState = &rasterization_state, 467 404 .pMultisampleState = &multisample_state, ··· 470 407 .pDynamicState = &dynamic_state, 471 408 .layout = d->pipeline_layout, 472 409 .renderPass = render_pass, 473 - .subpass = 0, //! @todo 474 410 .basePipelineHandle = VK_NULL_HANDLE, 475 411 .basePipelineIndex = -1, 476 412 }; ··· 492 428 { 493 429 return (VkWriteDescriptorSet){ 494 430 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, 495 - .pNext = NULL, 496 431 .dstSet = d->descriptor_sets[eye], 497 432 .dstBinding = binding, 498 - .dstArrayElement = 0, //! @todo 499 433 .descriptorCount = 1, 500 434 .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 501 - .pImageInfo = NULL, 502 435 .pBufferInfo = &d->ubo_handle.descriptor, 503 - .pTexelBufferView = NULL, 504 436 }; 505 437 } 506 438 ··· 511 443 { 512 444 return (VkWriteDescriptorSet){ 513 445 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, 514 - .pNext = NULL, 515 446 .dstSet = d->descriptor_sets[eye], 516 447 .dstBinding = binding, 517 - .dstArrayElement = 0, //! @todo 518 448 .descriptorCount = 1, 519 449 .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 520 - .pImageInfo = NULL, 521 450 .pBufferInfo = &d->ubo_viewport_handles[eye].descriptor, 522 - .pTexelBufferView = NULL, 523 451 }; 524 452 } 525 453 ··· 531 459 { 532 460 return (VkWriteDescriptorSet){ 533 461 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, 534 - .pNext = NULL, 535 462 .dstSet = descriptor_set, 536 463 .dstBinding = binding, 537 - .dstArrayElement = 0, //! @todo 538 464 .descriptorCount = 1, 539 465 .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 540 466 .pImageInfo = descriptor_position, 541 - .pBufferInfo = NULL, 542 - .pTexelBufferView = NULL, 543 467 }; 544 468 } 545 469 ··· 552 476 553 477 VkDescriptorSetAllocateInfo alloc_info = { 554 478 .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, 555 - .pNext = NULL, 556 479 .descriptorPool = descriptor_pool, 557 480 .descriptorSetCount = 1, 558 481 .pSetLayouts = &d->descriptor_set_layout, ··· 621 544 .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 622 545 .descriptorCount = 1, 623 546 .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT, 624 - .pImmutableSamplers = NULL, 625 547 }, 626 548 // Binding 1 : Fragment shader uniform buffer 627 549 { ··· 629 551 .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 630 552 .descriptorCount = 1, 631 553 .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT, 632 - .pImmutableSamplers = NULL, 633 554 }, 634 555 // binding 2: viewport index 635 556 { ··· 637 558 .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 638 559 .descriptorCount = 1, 639 560 .stageFlags = VK_SHADER_STAGE_VERTEX_BIT, 640 - .pImmutableSamplers = NULL, 641 561 }, 642 562 }; 643 563 644 564 VkDescriptorSetLayoutCreateInfo set_layout_info = { 645 565 .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, 646 - .pNext = NULL, 647 - .flags = 0, 648 566 .bindingCount = ARRAY_SIZE(set_layout_bindings), 649 567 .pBindings = set_layout_bindings, 650 568 }; ··· 664 582 665 583 VkPipelineLayoutCreateInfo pipeline_layout_info = { 666 584 .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, 667 - .pNext = NULL, 668 - .flags = 0, 669 585 .setLayoutCount = 1, 670 586 .pSetLayouts = &d->descriptor_set_layout, 671 - .pushConstantRangeCount = 0, 672 - .pPushConstantRanges = NULL}; 587 + }; 673 588 674 589 ret = vk->vkCreatePipelineLayout(d->vk->device, &pipeline_layout_info, 675 590 NULL, &d->pipeline_layout); ··· 811 726 // Create the buffer handle. 812 727 VkBufferCreateInfo buffer_info = { 813 728 .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, 814 - .pNext = NULL, 815 - .flags = 0, 816 729 .size = size, 817 730 .usage = usage_flags, 818 - .sharingMode = VK_SHARING_MODE_EXCLUSIVE, 819 - .queueFamilyIndexCount = 0, 820 - .pQueueFamilyIndices = NULL, 821 731 }; 822 732 ret = 823 733 vk->vkCreateBuffer(vk->device, &buffer_info, NULL, &buffer->buffer); ··· 838 748 839 749 VkMemoryAllocateInfo mem_alloc = { 840 750 .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, 841 - .pNext = NULL, 842 751 .allocationSize = mem_reqs.size, 843 752 .memoryTypeIndex = memory_type_index, 844 753 };
-5
src/xrt/compositor/main/comp_swapchain.c
··· 70 70 // vkGetMemoryFdKHR parameter 71 71 VkMemoryGetFdInfoKHR fd_info = { 72 72 .sType = VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR, 73 - .pNext = NULL, 74 73 .memory = device_memory, 75 74 .handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, 76 75 }; ··· 114 113 115 114 VkExternalMemoryImageCreateInfoKHR external_memory_image_create_info = { 116 115 .sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR, 117 - .pNext = NULL, 118 116 .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, 119 117 }; 120 118 ··· 140 138 VkImageCreateInfo info = { 141 139 .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, 142 140 .pNext = &external_memory_image_create_info, 143 - .flags = 0, 144 141 .imageType = VK_IMAGE_TYPE_2D, 145 142 .format = (VkFormat)format, 146 143 .extent = {.width = width, .height = height, .depth = 1}, ··· 150 147 .tiling = VK_IMAGE_TILING_OPTIMAL, 151 148 .usage = image_usage, 152 149 .sharingMode = VK_SHARING_MODE_EXCLUSIVE, 153 - .queueFamilyIndexCount = 0, 154 - .pQueueFamilyIndices = NULL, 155 150 .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, 156 151 }; 157 152
-5
src/xrt/compositor/main/comp_vk_swapchain.c
··· 154 154 155 155 VkSwapchainCreateInfoKHR swap_chain_info = { 156 156 .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, 157 - .pNext = NULL, 158 - .flags = 0, 159 157 .surface = sc->surface, 160 158 .minImageCount = surface_caps.minImageCount, 161 159 .imageFormat = sc->surface_format.format, ··· 169 167 .imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, 170 168 .imageSharingMode = VK_SHARING_MODE_EXCLUSIVE, 171 169 .queueFamilyIndexCount = 0, 172 - .pQueueFamilyIndices = NULL, 173 170 .preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, 174 171 .compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR, 175 172 .presentMode = sc->present_mode, ··· 249 246 { 250 247 VkPresentInfoKHR presentInfo = { 251 248 .sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, 252 - .pNext = NULL, 253 249 .waitSemaphoreCount = 1, 254 250 .pWaitSemaphores = &semaphore, 255 251 .swapchainCount = 1, 256 252 .pSwapchains = &sc->swap_chain, 257 253 .pImageIndices = &index, 258 - .pResults = NULL, 259 254 }; 260 255 261 256 return sc->vk->vkQueuePresentKHR(queue, &presentInfo);