mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Centralize allocation of vertex decode buffers
This commit is contained in:
1 parent
321a112eff
commit
16b243b007
6 files changed
+7
-37
No files matched your search
@@ -75,11 +75,6 @@ DrawEngineVulkan::DrawEngineVulkan(Draw::DrawContext *draw)
|
||||
decOptions_.alignOutputToWord = true;
|
||||
#endif
|
||||
|
||||
// Allocate nicely aligned memory. Maybe graphics drivers will appreciate it.
|
||||
// All this is a LOT of memory, need to see if we can cut down somehow.
|
||||
decoded = (u8 *)AllocateMemoryPages(DECODED_VERTEX_BUFFER_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);
|
||||
decIndex = (u16 *)AllocateMemoryPages(DECODED_INDEX_BUFFER_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);
|
||||
|
||||
indexGen.Setup(decIndex);
|
||||
}
|
||||
|
||||
@@ -214,9 +209,6 @@ void DrawEngineVulkan::InitDeviceObjects() {
|
||||
}
|
||||
|
||||
DrawEngineVulkan::~DrawEngineVulkan() {
|
||||
FreeMemoryPages(decoded, DECODED_VERTEX_BUFFER_SIZE);
|
||||
FreeMemoryPages(decIndex, DECODED_INDEX_BUFFER_SIZE);
|
||||
|
||||
DestroyDeviceObjects();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user