mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
[dxvk] Allow creating buffer views with undefined format
This commit is contained in:
parent
92de3f3f5f
commit
c347bd4d8b
@ -204,8 +204,9 @@ namespace dxvk {
|
|||||||
const DxvkBufferViewCreateInfo& info)
|
const DxvkBufferViewCreateInfo& info)
|
||||||
: m_vkd(vkd), m_info(info), m_buffer(buffer),
|
: m_vkd(vkd), m_info(info), m_buffer(buffer),
|
||||||
m_bufferSlice (getSliceHandle()),
|
m_bufferSlice (getSliceHandle()),
|
||||||
m_bufferView (createBufferView(m_bufferSlice)) {
|
m_bufferView (VK_NULL_HANDLE) {
|
||||||
|
if (m_info.format != VK_FORMAT_UNDEFINED)
|
||||||
|
m_bufferView = createBufferView(m_bufferSlice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -247,6 +248,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
void DxvkBufferView::updateBufferView(
|
void DxvkBufferView::updateBufferView(
|
||||||
const DxvkBufferSliceHandle& slice) {
|
const DxvkBufferSliceHandle& slice) {
|
||||||
|
if (m_info.format != VK_FORMAT_UNDEFINED) {
|
||||||
if (m_views.empty())
|
if (m_views.empty())
|
||||||
m_views.insert({ m_bufferSlice, m_bufferView });
|
m_views.insert({ m_bufferSlice, m_bufferView });
|
||||||
|
|
||||||
@ -259,6 +261,9 @@ namespace dxvk {
|
|||||||
m_bufferView = createBufferView(m_bufferSlice);
|
m_bufferView = createBufferView(m_bufferSlice);
|
||||||
m_views.insert({ m_bufferSlice, m_bufferView });
|
m_views.insert({ m_bufferSlice, m_bufferView });
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
m_bufferSlice = slice;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user