mirror of
https://github.com/stenzek/duckstation.git
synced 2024-11-26 23:50:31 +00:00
GPU: Page align VRAM storage on Apple Silicon
Some checks are pending
Create rolling release / Windows x64 Build (push) Waiting to run
Create rolling release / Windows x64 SSE2 Build (push) Waiting to run
Create rolling release / Windows ARM64 Build (push) Waiting to run
Create rolling release / Linux x64 AppImage (push) Waiting to run
Create rolling release / Linux x64 SSE2 AppImage (push) Waiting to run
Create rolling release / Linux Flatpak Build (push) Waiting to run
Create rolling release / MacOS Universal Build (push) Waiting to run
Create rolling release / Create Release (push) Blocked by required conditions
Some checks are pending
Create rolling release / Windows x64 Build (push) Waiting to run
Create rolling release / Windows x64 SSE2 Build (push) Waiting to run
Create rolling release / Windows ARM64 Build (push) Waiting to run
Create rolling release / Linux x64 AppImage (push) Waiting to run
Create rolling release / Linux x64 SSE2 AppImage (push) Waiting to run
Create rolling release / Linux Flatpak Build (push) Waiting to run
Create rolling release / MacOS Universal Build (push) Waiting to run
Create rolling release / Create Release (push) Blocked by required conditions
This commit is contained in:
parent
2bf0838634
commit
5b600789d6
@ -45,8 +45,13 @@ LOG_CHANNEL(GPU);
|
|||||||
std::unique_ptr<GPU> g_gpu;
|
std::unique_ptr<GPU> g_gpu;
|
||||||
|
|
||||||
// aligning VRAM to 4K is fine, since the ARM64 instructions compute 4K page aligned addresses
|
// aligning VRAM to 4K is fine, since the ARM64 instructions compute 4K page aligned addresses
|
||||||
// TOOD: REMOVE ME
|
// or it would be, except we want to import the memory for readbacks on metal..
|
||||||
alignas(4096) u16 g_vram[VRAM_SIZE / sizeof(u16)];
|
#ifdef DYNAMIC_HOST_PAGE_SIZE
|
||||||
|
#define VRAM_STORAGE_ALIGNMENT MIN_HOST_PAGE_SIZE
|
||||||
|
#else
|
||||||
|
#define VRAM_STORAGE_ALIGNMENT HOST_PAGE_SIZE
|
||||||
|
#endif
|
||||||
|
alignas(VRAM_STORAGE_ALIGNMENT) u16 g_vram[VRAM_SIZE / sizeof(u16)];
|
||||||
u16 g_gpu_clut[GPU_CLUT_SIZE];
|
u16 g_gpu_clut[GPU_CLUT_SIZE];
|
||||||
|
|
||||||
const GPU::GP0CommandHandlerTable GPU::s_GP0_command_handler_table = GPU::GenerateGP0CommandHandlerTable();
|
const GPU::GP0CommandHandlerTable GPU::s_GP0_command_handler_table = GPU::GenerateGP0CommandHandlerTable();
|
||||||
|
Loading…
Reference in New Issue
Block a user