mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[d3d11] Fix texture view compatibility check
This commit is contained in:
parent
f85be773aa
commit
2291484696
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -37,9 +37,6 @@ namespace dxvk {
|
||||
VkBufferUsageFlags GetBufferUsageFlags(
|
||||
UINT BindFlags);
|
||||
|
||||
VkImageUsageFlags GetImageUsageFlags(
|
||||
UINT BindFlags);
|
||||
|
||||
VkFormatFeatureFlags GetBufferFormatFeatures(
|
||||
UINT BindFlags);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user