Skip to content

32-bit games crash on AMD APUs with radv #640

Description

@BNieuwenhuizen

It seems like DXVK by default maps every buffer which can be mapped. On an APU all buffers are going to be able to be mapped, resulting in running out of address space in 32-bit applications.

RADV patch to get an APU like memory configuration:

From cb7415972bbd39b96f17da252a141ba9ae469508 Mon Sep 17 00:00:00 2001
From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Date: Sat, 15 Sep 2018 17:54:02 +0200
Subject: [PATCH] radv: Fake APU memory

---
 src/amd/vulkan/radv_device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 8989ec3553f..f2736b78dd3 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -118,9 +118,13 @@ static void
 radv_physical_device_init_mem_types(struct radv_physical_device *device)
 {
        STATIC_ASSERT(RADV_MEM_HEAP_COUNT <= VK_MAX_MEMORY_HEAPS);
+       device->rad_info.vram_size = (device->rad_info.vram_vis_size / 2 + 4095) & ~4095ull;
+       device->rad_info.has_dedicated_vram = false;
+       
        uint64_t visible_vram_size = MIN2(device->rad_info.vram_size,
                                          device->rad_info.vram_vis_size);

        int vram_index = -1, visible_vram_index = -1, gart_index = -1;
        device->memory_properties.memoryHeapCount = 0;
        if (device->rad_info.vram_size - visible_vram_size > 0) {
-- 
2.19.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions