vkd3d: Use D32_SFLOAT_S8_UINT when D24_UNORM_S8_UINT is not supported.

Fixes rendering in UE4 Infiltrator Demo on AMD.

Adjustments for depth bias aren't implemented yet.

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-05-07 15:37:03 +02:00
committed by Alexandre Julliard
parent 9536f10383
commit e01eae5b8a
5 changed files with 75 additions and 10 deletions

View File

@@ -1897,6 +1897,7 @@ static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device *iface)
vkd3d_private_store_destroy(&device->private_store);
vkd3d_cleanup_depth_stencil_formats(device);
vkd3d_destroy_null_resources(&device->null_resources, device);
vkd3d_gpu_va_allocator_cleanup(&device->gpu_va_allocator);
vkd3d_render_pass_cache_cleanup(&device->render_pass_cache, device);
@@ -3090,9 +3091,12 @@ static HRESULT d3d12_device_init(struct d3d12_device *device,
if (FAILED(hr = vkd3d_fence_worker_start(&device->fence_worker, device)))
goto out_free_private_store;
if (FAILED(hr = vkd3d_init_null_resources(&device->null_resources, device)))
if (FAILED(hr = vkd3d_init_depth_stencil_formats(device)))
goto out_stop_fence_worker;
if (FAILED(hr = vkd3d_init_null_resources(&device->null_resources, device)))
goto out_cleanup_depth_stencil_formats;
vkd3d_render_pass_cache_init(&device->render_pass_cache);
vkd3d_gpu_va_allocator_init(&device->gpu_va_allocator);
@@ -3101,6 +3105,8 @@ static HRESULT d3d12_device_init(struct d3d12_device *device,
return S_OK;
out_cleanup_depth_stencil_formats:
vkd3d_cleanup_depth_stencil_formats(device);
out_stop_fence_worker:
vkd3d_fence_worker_stop(&device->fence_worker, device);
out_free_private_store: