vkd3d: Add support for VK_EXT_depth_clip_enable.

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:
Józef Kucia
2019-04-04 13:01:31 +02:00
committed by Alexandre Julliard
parent 32aa45a86d
commit a95c9f8ad8
6 changed files with 74 additions and 14 deletions

View File

@@ -16823,7 +16823,7 @@ static void test_depth_clip(void)
transition_resource_state(command_list, ds.texture,
D3D12_RESOURCE_STATE_DEPTH_WRITE, D3D12_RESOURCE_STATE_COPY_SOURCE);
todo_if(!is_mesa_intel_device(context.device))
bug_if(!is_depth_clip_enable_supported(context.device))
check_sub_resource_float(ds.texture, 0, queue, command_list, 1.0f, 2);
reset_command_list(command_list, context.allocator);

View File

@@ -364,6 +364,11 @@ static inline bool is_radv_device(ID3D12Device *device)
return false;
}
static inline bool is_depth_clip_enable_supported(ID3D12Device *device)
{
return true;
}
#else
static bool check_device_extension(VkPhysicalDevice vk_physical_device, const char *name)
@@ -585,6 +590,12 @@ static inline bool is_radv_device(ID3D12Device *device)
get_driver_properties(device, &properties);
return properties.driverID == VK_DRIVER_ID_MESA_RADV_KHR;
}
static inline bool is_depth_clip_enable_supported(ID3D12Device *device)
{
VkPhysicalDevice vk_physical_device = vkd3d_get_vk_physical_device(device);
return check_device_extension(vk_physical_device, VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME);
}
#endif
static void parse_args(int argc, char **argv)