vkd3d: Require VK_KHR_copy_commands2

This extension is trivial to implement for vendors and should be
widely supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
Samuel Pitoiset 2022-01-10 10:29:38 +01:00 committed by Hans-Kristian Arntzen
parent 870dda927d
commit f6fe3e0183
4 changed files with 17 additions and 0 deletions

View File

@ -27,6 +27,7 @@ There are some hard requirements on drivers to be able to implement D3D12 in a r
- `VK_EXT_robustness2`
- `VK_KHR_separate_depth_stencil_layouts`
- `VK_KHR_bind_memory2`
- `VK_KHR_copy_commands2`
Some notable extensions that **should** be supported for optimal or correct behavior.
These extensions will likely become mandatory later.

View File

@ -79,6 +79,7 @@ static const struct vkd3d_optional_extension_info optional_device_extensions[] =
VK_EXTENSION(KHR_FORMAT_FEATURE_FLAGS_2, KHR_format_feature_flags2),
VK_EXTENSION(KHR_SHADER_ATOMIC_INT64, KHR_shader_atomic_int64),
VK_EXTENSION(KHR_BIND_MEMORY_2, KHR_bind_memory2),
VK_EXTENSION(KHR_COPY_COMMANDS_2, KHR_copy_commands2),
/* EXT extensions */
VK_EXTENSION(EXT_CALIBRATED_TIMESTAMPS, EXT_calibrated_timestamps),
VK_EXTENSION(EXT_CONDITIONAL_RENDERING, EXT_conditional_rendering),
@ -1908,6 +1909,12 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device,
return E_INVALIDARG;
}
if (!vulkan_info->KHR_copy_commands2)
{
ERR("KHR_copy_commands2 is not supported by this implementation. This is required for correct operation.\n");
return E_INVALIDARG;
}
return S_OK;
}

View File

@ -127,6 +127,7 @@ struct vkd3d_vulkan_info
bool KHR_format_feature_flags2;
bool KHR_shader_atomic_int64;
bool KHR_bind_memory2;
bool KHR_copy_commands2;
/* EXT device extensions */
bool EXT_calibrated_timestamps;
bool EXT_conditional_rendering;

View File

@ -227,6 +227,14 @@ VK_DEVICE_EXT_PFN(vkCreateRenderPass2KHR)
VK_DEVICE_EXT_PFN(vkBindBufferMemory2KHR);
VK_DEVICE_EXT_PFN(vkBindImageMemory2KHR);
/* VK_KHR_copy_commands2 */
VK_DEVICE_EXT_PFN(vkCmdBlitImage2KHR);
VK_DEVICE_EXT_PFN(vkCmdCopyBuffer2KHR);
VK_DEVICE_EXT_PFN(vkCmdCopyBufferToImage2KHR);
VK_DEVICE_EXT_PFN(vkCmdCopyImage2KHR);
VK_DEVICE_EXT_PFN(vkCmdCopyImageToBuffer2KHR);
VK_DEVICE_EXT_PFN(vkCmdResolveImage2KHR);
/* VK_EXT_calibrated_timestamps */
VK_DEVICE_EXT_PFN(vkGetCalibratedTimestampsEXT)
VK_INSTANCE_EXT_PFN(vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)