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