vkd3d: Require extension VK_KHR_maintenance2.

We're already implicitly using it for image layouts in which
either depth or stencil is writeable and the other is not.
Correspondingly, add the _KHR suffix in those cases, so the
extension usage is more evident.

According to the Vulkan Hardware Database, only four reports
without this extension were filed since 2023, and all of them
for configurations we likely don't target.
This commit is contained in:
Giovanni Mascellani
2025-02-10 10:18:27 +01:00
committed by Henri Verbeet
parent 604fe3ccee
commit a7337bc999
Notes: Henri Verbeet 2025-02-19 18:02:37 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Giovanni Mascellani (@giomasce)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1372
4 changed files with 9 additions and 12 deletions

View File

@@ -2222,7 +2222,7 @@ static bool vk_barrier_parameters_from_d3d12_resource_state(unsigned int state,
if (!stencil_state || (stencil_state & D3D12_RESOURCE_STATE_DEPTH_WRITE))
*image_layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
else
*image_layout = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL;
*image_layout = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR;
}
return true;
@@ -2256,7 +2256,7 @@ static bool vk_barrier_parameters_from_d3d12_resource_state(unsigned int state,
{
if (stencil_state & D3D12_RESOURCE_STATE_DEPTH_WRITE)
{
*image_layout = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL;
*image_layout = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR;
*access_mask |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
}
else