mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Always align texel buffers to at least 16 bytes
Since we don't know the view format in advance, and some drivers require single-texel alignment.
This commit is contained in:
parent
73a5b33375
commit
cee7db1c57
@ -126,8 +126,10 @@ namespace dxvk {
|
|||||||
if (m_info.usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT)
|
if (m_info.usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT)
|
||||||
result = std::max(result, devInfo.limits.minStorageBufferOffsetAlignment);
|
result = std::max(result, devInfo.limits.minStorageBufferOffsetAlignment);
|
||||||
|
|
||||||
if (m_info.usage & (VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT))
|
if (m_info.usage & (VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT)) {
|
||||||
result = std::max(result, devInfo.limits.minTexelBufferOffsetAlignment);
|
result = std::max(result, devInfo.limits.minTexelBufferOffsetAlignment);
|
||||||
|
result = std::max(result, VkDeviceSize(16));
|
||||||
|
}
|
||||||
|
|
||||||
if (m_info.usage & (VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT)
|
if (m_info.usage & (VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT)
|
||||||
&& m_info.size > (devInfo.limits.optimalBufferCopyOffsetAlignment / 2))
|
&& m_info.size > (devInfo.limits.optimalBufferCopyOffsetAlignment / 2))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user