mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d: Always return render pass from d3d12_pipeline_state_get_or_create_pipeline().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
725c4eb809
commit
3e99853297
@@ -2431,9 +2431,6 @@ static bool d3d12_command_list_update_current_pipeline(struct d3d12_command_list
|
|||||||
list->primitive_topology, list->strides, list->dsv_format, &vk_render_pass)))
|
list->primitive_topology, list->strides, list->dsv_format, &vk_render_pass)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!vk_render_pass)
|
|
||||||
vk_render_pass = list->state->u.graphics.render_pass;
|
|
||||||
|
|
||||||
/* The render pass cache ensures that we use the same Vulkan render pass
|
/* The render pass cache ensures that we use the same Vulkan render pass
|
||||||
* object for compatible render passes. */
|
* object for compatible render passes. */
|
||||||
if (list->pso_render_pass != vk_render_pass)
|
if (list->pso_render_pass != vk_render_pass)
|
||||||
|
|||||||
@@ -2761,8 +2761,6 @@ VkPipeline d3d12_pipeline_state_get_or_create_pipeline(struct d3d12_pipeline_sta
|
|||||||
|
|
||||||
assert(d3d12_pipeline_state_is_graphics(state));
|
assert(d3d12_pipeline_state_is_graphics(state));
|
||||||
|
|
||||||
*vk_render_pass = VK_NULL_HANDLE;
|
|
||||||
|
|
||||||
memset(&pipeline_key, 0, sizeof(pipeline_key));
|
memset(&pipeline_key, 0, sizeof(pipeline_key));
|
||||||
pipeline_key.topology = topology;
|
pipeline_key.topology = topology;
|
||||||
|
|
||||||
@@ -2853,21 +2851,22 @@ VkPipeline d3d12_pipeline_state_get_or_create_pipeline(struct d3d12_pipeline_sta
|
|||||||
pipeline_desc.pColorBlendState = &blend_desc;
|
pipeline_desc.pColorBlendState = &blend_desc;
|
||||||
pipeline_desc.pDynamicState = &dynamic_desc;
|
pipeline_desc.pDynamicState = &dynamic_desc;
|
||||||
pipeline_desc.layout = graphics->root_signature->vk_pipeline_layout;
|
pipeline_desc.layout = graphics->root_signature->vk_pipeline_layout;
|
||||||
pipeline_desc.renderPass = graphics->render_pass;
|
|
||||||
pipeline_desc.subpass = 0;
|
pipeline_desc.subpass = 0;
|
||||||
pipeline_desc.basePipelineHandle = VK_NULL_HANDLE;
|
pipeline_desc.basePipelineHandle = VK_NULL_HANDLE;
|
||||||
pipeline_desc.basePipelineIndex = -1;
|
pipeline_desc.basePipelineIndex = -1;
|
||||||
|
|
||||||
/* Create a render pass for pipelines with DXGI_FORMAT_UNKNOWN. */
|
/* Create a render pass for pipelines with DXGI_FORMAT_UNKNOWN. */
|
||||||
if (!pipeline_desc.renderPass)
|
if (!(pipeline_desc.renderPass = graphics->render_pass))
|
||||||
{
|
{
|
||||||
|
if (graphics->null_attachment_mask & (1u << graphics->rt_count))
|
||||||
TRACE("Compiling %p with DSV format %#x.\n", state, dsv_format);
|
TRACE("Compiling %p with DSV format %#x.\n", state, dsv_format);
|
||||||
|
|
||||||
if (FAILED(hr = d3d12_graphics_pipeline_state_create_render_pass(graphics, device, dsv_format,
|
if (FAILED(hr = d3d12_graphics_pipeline_state_create_render_pass(graphics, device, dsv_format,
|
||||||
&pipeline_desc.renderPass)))
|
&pipeline_desc.renderPass)))
|
||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
*vk_render_pass = pipeline_desc.renderPass;
|
*vk_render_pass = pipeline_desc.renderPass;
|
||||||
}
|
|
||||||
|
|
||||||
if ((vr = VK_CALL(vkCreateGraphicsPipelines(device->vk_device, device->vk_pipeline_cache,
|
if ((vr = VK_CALL(vkCreateGraphicsPipelines(device->vk_device, device->vk_pipeline_cache,
|
||||||
1, &pipeline_desc, NULL, &vk_pipeline))) < 0)
|
1, &pipeline_desc, NULL, &vk_pipeline))) < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user