From ea090a34cd2ed16ce345098209977b33304bc27b Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Sun, 5 May 2024 15:10:56 +0200 Subject: [PATCH] vkd3d: Init physical device information after checking available extensions. --- libs/vkd3d/device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 865eba76..9fe4f08d 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -1596,6 +1596,12 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device, static const VkSubgroupFeatureFlags required_stages = VK_SHADER_STAGE_COMPUTE_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + if (FAILED(hr = vkd3d_check_device_extensions(device, create_info, &vk_extensions, &vk_extension_count, + device_extension_count, user_extension_supported))) + return hr; + + vkd3d_physical_device_info_init(physical_device_info, device); + vkd3d_trace_physical_device(physical_device, physical_device_info, vk_procs); vkd3d_trace_physical_device_features(physical_device_info); vkd3d_trace_physical_device_limits(physical_device_info); @@ -1686,10 +1692,6 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device, device->feature_options5.RenderPassesTier = D3D12_RENDER_PASS_TIER_0; device->feature_options5.RaytracingTier = D3D12_RAYTRACING_TIER_NOT_SUPPORTED; - if (FAILED(hr = vkd3d_check_device_extensions(device, create_info, &vk_extensions, &vk_extension_count, - device_extension_count, user_extension_supported))) - return hr; - fragment_shader_interlock = &physical_device_info->fragment_shader_interlock_features; if (!fragment_shader_interlock->fragmentShaderSampleInterlock || !fragment_shader_interlock->fragmentShaderPixelInterlock) @@ -2112,8 +2114,6 @@ static HRESULT vkd3d_create_vk_device(struct d3d12_device *device, VK_CALL(vkGetPhysicalDeviceMemoryProperties(physical_device, &device->memory_properties)); - vkd3d_physical_device_info_init(&physical_device_info, device); - if (FAILED(hr = vkd3d_init_device_caps(device, create_info, &physical_device_info, &extension_count, &user_extension_supported))) return hr;