mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxvk] Inline DxvkBufferView::updateView method
Most of the time the condition is false, so we should help the compiler where we can to optimize for the common case.
This commit is contained in:
parent
bd03225c14
commit
504de3994b
@ -92,14 +92,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void DxvkBufferView::updateView() {
|
||||
if (m_revision != m_buffer->m_revision) {
|
||||
m_physView = this->createView();
|
||||
m_revision = m_buffer->m_revision;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkPhysicalBufferView> DxvkBufferView::createView() {
|
||||
return new DxvkPhysicalBufferView(
|
||||
m_vkd, m_buffer->slice(), m_info);
|
||||
|
@ -467,7 +467,12 @@ namespace dxvk {
|
||||
* well and needs to be re-created. Call this
|
||||
* prior to using the buffer view handle.
|
||||
*/
|
||||
void updateView();
|
||||
void updateView() {
|
||||
if (m_revision != m_buffer->m_revision) {
|
||||
m_physView = this->createView();
|
||||
m_revision = m_buffer->m_revision;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user