From 82c891b1fb9b748742c5a3379132f4f33fe5886d Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 10 Aug 2018 02:39:35 +0200 Subject: [PATCH] [d3d11] Fix structured buffer view validation --- src/d3d11/d3d11_buffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/d3d11/d3d11_buffer.cpp b/src/d3d11/d3d11_buffer.cpp index b741d9401..004452d06 100644 --- a/src/d3d11/d3d11_buffer.cpp +++ b/src/d3d11/d3d11_buffer.cpp @@ -74,6 +74,10 @@ namespace dxvk { if ((m_buffer->info().usage & usage) != usage) return false; + // Structured buffer views use no format + if (Format == DXGI_FORMAT_UNKNOWN) + return (m_desc.MiscFlags & D3D11_RESOURCE_MISC_BUFFER_STRUCTURED) != 0; + // Check whether the given combination of buffer view // type and view format is supported by the device DXGI_VK_FORMAT_INFO viewFormat = m_device->LookupFormat(Format, DXGI_VK_FORMAT_MODE_ANY);