@@ -5311,7 +5311,6 @@ static VkResult d3d12_pipeline_state_link_pipeline_variant(struct d3d12_pipeline
5311
5311
5312
5312
memset (& create_info , 0 , sizeof (create_info ));
5313
5313
create_info .sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO ;
5314
- create_info .pNext = & library_info ;
5315
5314
create_info .flags = graphics -> library_create_flags ;
5316
5315
create_info .layout = graphics -> pipeline_layout ;
5317
5316
create_info .basePipelineIndex = -1 ;
@@ -5325,6 +5324,8 @@ static VkResult d3d12_pipeline_state_link_pipeline_variant(struct d3d12_pipeline
5325
5324
if (!key )
5326
5325
create_info .flags |= VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT ;
5327
5326
5327
+ vk_prepend_struct (& create_info , & library_info );
5328
+
5328
5329
vr = VK_CALL (vkCreateGraphicsPipelines (state -> device -> vk_device ,
5329
5330
vk_cache , 1 , & create_info , NULL , vk_pipeline ));
5330
5331
@@ -5404,7 +5405,7 @@ VkPipeline d3d12_pipeline_state_create_pipeline_variant(struct d3d12_pipeline_st
5404
5405
5405
5406
memset (& pipeline_desc , 0 , sizeof (pipeline_desc ));
5406
5407
pipeline_desc .sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO ;
5407
- pipeline_desc . pNext = & fragment_output_desc .rt_info ;
5408
+ vk_prepend_struct ( & pipeline_desc , & fragment_output_desc .rt_info ) ;
5408
5409
pipeline_desc .stageCount = graphics -> stage_count ;
5409
5410
pipeline_desc .pStages = graphics -> stages ;
5410
5411
pipeline_desc .pViewportState = & vp_desc ;
@@ -5437,15 +5438,13 @@ VkPipeline d3d12_pipeline_state_create_pipeline_variant(struct d3d12_pipeline_st
5437
5438
TRACE ("Compiling pipeline library for %p with flags %#x.\n" , state , library_flags );
5438
5439
5439
5440
library_create_info .sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT ;
5440
- /* Explicit cast to silence a constness warning, this seems to be a Vulkan header bug */
5441
- library_create_info .pNext = (void * )pipeline_desc .pNext ;
5442
5441
library_create_info .flags = library_flags ;
5443
5442
5444
- pipeline_desc .pNext = & library_create_info ;
5445
5443
pipeline_desc .flags |= VK_PIPELINE_CREATE_LIBRARY_BIT_KHR |
5446
5444
VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT ;
5447
5445
5448
5446
graphics -> library_flags = library_flags ;
5447
+ vk_prepend_struct (& pipeline_desc , & library_create_info );
5449
5448
}
5450
5449
5451
5450
/* A workaround for SottR, which creates pipelines with DSV_UNKNOWN, but still insists on using a depth buffer.
@@ -5504,11 +5503,11 @@ VkPipeline d3d12_pipeline_state_create_pipeline_variant(struct d3d12_pipeline_st
5504
5503
if (vkd3d_config_flags & VKD3D_CONFIG_FLAG_PIPELINE_LIBRARY_LOG )
5505
5504
{
5506
5505
feedback_info .sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT ;
5507
- feedback_info .pNext = pipeline_desc .pNext ;
5508
5506
feedback_info .pPipelineStageCreationFeedbacks = feedbacks ;
5509
5507
feedback_info .pipelineStageCreationFeedbackCount = pipeline_desc .stageCount ;
5510
5508
feedback_info .pPipelineCreationFeedback = & feedback ;
5511
- pipeline_desc .pNext = & feedback_info ;
5509
+
5510
+ vk_prepend_struct (& pipeline_desc , & feedback_info );
5512
5511
}
5513
5512
else
5514
5513
feedback_info .pipelineStageCreationFeedbackCount = 0 ;
0 commit comments