[d3d11] Fix texture view compatibility check

This commit is contained in:
Philip Rebohle 2020-03-08 01:26:25 +01:00
parent f85be773aa
commit 2291484696
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 1 additions and 22 deletions

View File

@ -219,9 +219,7 @@ namespace dxvk {
const DxvkImageCreateInfo& imageInfo = m_image->info();
// Check whether the given bind flags are supported
VkImageUsageFlags usage = GetImageUsageFlags(BindFlags);
if ((imageInfo.usage & usage) != usage)
if ((m_desc.BindFlags & BindFlags) != BindFlags)
return false;
// Check whether the view format is compatible

View File

@ -89,22 +89,6 @@ namespace dxvk {
}
VkImageUsageFlags GetImageUsageFlags(UINT BindFlags) {
VkImageUsageFlags usage = 0;
if (BindFlags & D3D11_BIND_DEPTH_STENCIL)
usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
if (BindFlags & D3D11_BIND_RENDER_TARGET)
usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
if (BindFlags & D3D11_BIND_SHADER_RESOURCE)
usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
if (BindFlags & D3D11_BIND_UNORDERED_ACCESS)
usage |= VK_IMAGE_USAGE_STORAGE_BIT;
return usage;
}
VkFormatFeatureFlags GetBufferFormatFeatures(UINT BindFlags) {
VkFormatFeatureFlags features = 0;

View File

@ -37,9 +37,6 @@ namespace dxvk {
VkBufferUsageFlags GetBufferUsageFlags(
UINT BindFlags);
VkImageUsageFlags GetImageUsageFlags(
UINT BindFlags);
VkFormatFeatureFlags GetBufferFormatFeatures(
UINT BindFlags);