From d0cdd79dd2e96d720c72fd5ae6937a55c708a407 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 20 Nov 2020 17:14:41 +0100 Subject: [PATCH] [dxgi] Allow creating R16_SFLOAT views for D16_UNORM images Just use R16_UNORM. For some reason, D3D11 actually allows this, and Trine 4 wants the corresponding calls to succeed, although we're going to interpret the data as UNORM rather than FLOAT. --- src/dxgi/dxgi_format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dxgi/dxgi_format.cpp b/src/dxgi/dxgi_format.cpp index d2df3cae..8015ea8c 100644 --- a/src/dxgi/dxgi_format.cpp +++ b/src/dxgi/dxgi_format.cpp @@ -263,7 +263,7 @@ namespace dxvk { VK_FORMAT_R16_UINT }, // DXGI_FORMAT_R16_FLOAT { VK_FORMAT_R16_SFLOAT, - VK_FORMAT_UNDEFINED, + VK_FORMAT_D16_UNORM, VK_FORMAT_R16_UINT, VK_IMAGE_ASPECT_COLOR_BIT }, // DXGI_FORMAT_D16_UNORM