From 7b760800b407ee5cc1a62b1906bcdcd2781807ab Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 8 Mar 2020 01:27:33 +0100 Subject: [PATCH] [d3d11] Fix buffer view compatibility check --- src/d3d11/d3d11_buffer.cpp | 4 +--- src/d3d11/d3d11_util.cpp | 12 ------------ src/d3d11/d3d11_util.h | 3 --- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/d3d11/d3d11_buffer.cpp b/src/d3d11/d3d11_buffer.cpp index 8ce1efc5..f870f3e6 100644 --- a/src/d3d11/d3d11_buffer.cpp +++ b/src/d3d11/d3d11_buffer.cpp @@ -155,9 +155,7 @@ namespace dxvk { UINT BindFlags, DXGI_FORMAT Format) const { // Check whether the given bind flags are supported - VkBufferUsageFlags usage = GetBufferUsageFlags(BindFlags); - - if ((m_buffer->info().usage & usage) != usage) + if ((m_desc.BindFlags & BindFlags) != BindFlags) return false; // Structured buffer views use no format diff --git a/src/d3d11/d3d11_util.cpp b/src/d3d11/d3d11_util.cpp index ded97e9d..153046ed 100644 --- a/src/d3d11/d3d11_util.cpp +++ b/src/d3d11/d3d11_util.cpp @@ -77,18 +77,6 @@ namespace dxvk { } - VkBufferUsageFlags GetBufferUsageFlags(UINT BindFlags) { - VkBufferUsageFlags usage = 0; - - if (BindFlags & D3D11_BIND_SHADER_RESOURCE) - usage |= VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT; - if (BindFlags & D3D11_BIND_UNORDERED_ACCESS) - usage |= VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT; - - return 0; - } - - VkFormatFeatureFlags GetBufferFormatFeatures(UINT BindFlags) { VkFormatFeatureFlags features = 0; diff --git a/src/d3d11/d3d11_util.h b/src/d3d11/d3d11_util.h index ecd11079..5cef1aac 100644 --- a/src/d3d11/d3d11_util.h +++ b/src/d3d11/d3d11_util.h @@ -34,9 +34,6 @@ namespace dxvk { VkShaderStageFlagBits GetShaderStage( DxbcProgramType ProgramType); - VkBufferUsageFlags GetBufferUsageFlags( - UINT BindFlags); - VkFormatFeatureFlags GetBufferFormatFeatures( UINT BindFlags);