mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 16:24:29 +01:00
[dxvk] Fix incorrect buffer view range for views with non-zero offset
This commit is contained in:
parent
7e975bbdfc
commit
9dbe352c51
@ -143,7 +143,7 @@ namespace dxvk {
|
|||||||
const Rc<DxvkBuffer>& buffer,
|
const Rc<DxvkBuffer>& buffer,
|
||||||
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 (m_buffer->getSliceHandle()),
|
m_bufferSlice (getSliceHandle()),
|
||||||
m_bufferView (createBufferView(m_bufferSlice)) {
|
m_bufferView (createBufferView(m_bufferSlice)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -188,13 +188,14 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DxvkBufferView::updateBufferView() {
|
void DxvkBufferView::updateBufferView(
|
||||||
|
const DxvkBufferSliceHandle& slice) {
|
||||||
if (m_views.empty())
|
if (m_views.empty())
|
||||||
m_views.insert({ m_bufferSlice, m_bufferView });
|
m_views.insert({ m_bufferSlice, m_bufferView });
|
||||||
|
|
||||||
m_bufferSlice = m_buffer->getSliceHandle();
|
m_bufferSlice = slice;
|
||||||
auto entry = m_views.find(m_bufferSlice);
|
|
||||||
|
auto entry = m_views.find(slice);
|
||||||
if (entry != m_views.end()) {
|
if (entry != m_views.end()) {
|
||||||
m_bufferView = entry->second;
|
m_bufferView = entry->second;
|
||||||
} else {
|
} else {
|
||||||
|
@ -515,8 +515,10 @@ namespace dxvk {
|
|||||||
* prior to using the buffer view handle.
|
* prior to using the buffer view handle.
|
||||||
*/
|
*/
|
||||||
void updateView() {
|
void updateView() {
|
||||||
if (!m_bufferSlice.eq(m_buffer->getSliceHandle()))
|
DxvkBufferSliceHandle slice = getSliceHandle();
|
||||||
this->updateBufferView();
|
|
||||||
|
if (!m_bufferSlice.eq(slice))
|
||||||
|
this->updateBufferView(slice);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -536,7 +538,8 @@ namespace dxvk {
|
|||||||
VkBufferView createBufferView(
|
VkBufferView createBufferView(
|
||||||
const DxvkBufferSliceHandle& slice);
|
const DxvkBufferSliceHandle& slice);
|
||||||
|
|
||||||
void updateBufferView();
|
void updateBufferView(
|
||||||
|
const DxvkBufferSliceHandle& slice);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user