mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 05:38:50 +00:00
Common: namespace MemoryUtil
This commit is contained in:
parent
1ab99ee22c
commit
e01c143379
15 changed files with 50 additions and 40 deletions
|
@ -261,8 +261,8 @@ public:
|
|||
PinnedMemory(u32 type, u32 size) : StreamBuffer(type, size)
|
||||
{
|
||||
CreateFences();
|
||||
m_pointer =
|
||||
(u8*)AllocateAlignedMemory(ROUND_UP(m_size, ALIGN_PINNED_MEMORY), ALIGN_PINNED_MEMORY);
|
||||
m_pointer = static_cast<u8*>(
|
||||
Common::AllocateAlignedMemory(ROUND_UP(m_size, ALIGN_PINNED_MEMORY), ALIGN_PINNED_MEMORY));
|
||||
glBindBuffer(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, m_buffer);
|
||||
glBufferData(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, ROUND_UP(m_size, ALIGN_PINNED_MEMORY),
|
||||
m_pointer, GL_STREAM_COPY);
|
||||
|
@ -275,7 +275,7 @@ public:
|
|||
DeleteFences();
|
||||
glBindBuffer(m_buffertype, 0);
|
||||
glFinish(); // ogl pipeline must be flushed, else this buffer can be in use
|
||||
FreeAlignedMemory(m_pointer);
|
||||
Common::FreeAlignedMemory(m_pointer);
|
||||
m_pointer = nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue