Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan renderer trying to use non-host visible memory giving VK_ERROR_OUT_OF_DEVICE_MEMORY despite memory available #317

Open
streetpea opened this issue Mar 5, 2025 · 0 comments

Comments

@streetpea
Copy link

Getting VK_ERROR_OUT_OF_DEVICE_MEMORY despite having memory available.

Here is a picture of the memory during one such run:
Image

Here are the logs from libplacebo

23172] chiaki.gui: [libplacebo] Allocation of size 252K failed: VK_ERROR_OUT_OF_DEVICE_MEMORY!
[23172] chiaki.gui: [libplacebo] Memory heaps supported by device:
[23172] chiaki.gui: [libplacebo] 0: flags 0x1 size 7987M
[23172] chiaki.gui: [libplacebo] 1: flags 0x0 size 15G
[23172] chiaki.gui: [libplacebo] 2: flags 0x1 size 214M
[23172] chiaki.gui: [libplacebo] Memory pool 0:
[23172] chiaki.gui: [libplacebo] Compatible types: 0xffffffff
[23172] chiaki.gui: [libplacebo] Required flags: 0x1
[23172] chiaki.gui: [libplacebo] Optimal flags: 0x2
[23172] chiaki.gui: [libplacebo] Buffer flags: 0xc3
[23172] chiaki.gui: [libplacebo] Pool summary: 0 used 0 res 0 alloc, efficiency 100.00%, utilization 100.00%
[23172] chiaki.gui: [libplacebo] Memory summary: 0 used 0 res 0 alloc, efficiency 100.00%, utilization 100.00%, max page: 499M

Looking into this it appears that heap 0 (the one it's trying to allocate the memory from) isn't host visible). It's a 2080 card (doesn't support rebar).

VkPhysicalDeviceMemoryProperties:
=================================
memoryHeaps: count = 3
        memoryHeaps[0]:
                size   = 8374976512 (0x1f3300000) (7.80 GiB)
                budget = 7569670144 (0x1c3300000) (7.05 GiB)
                usage  = 0 (0x00000000) (0.00 B)
                flags: count = 1
                        MEMORY_HEAP_DEVICE_LOCAL_BIT
        memoryHeaps[1]:
                size   = 17138831360 (0x3fd8dd000) (15.96 GiB)
                budget = 16333527040 (0x3cd8dd800) (15.21 GiB)
                usage  = 278528 (0x00044000) (272.00 KiB)
                flags:
                        None
        memoryHeaps[2]:
                size   = 224395264 (0x0d600000) (214.00 MiB)
                budget = 0 (0x00000000) (0.00 B)
                usage  = 224395264 (0x0d600000) (214.00 MiB)
                flags: count = 1
                        MEMORY_HEAP_DEVICE_LOCAL_BIT
memoryTypes: count = 6
        memoryTypes[0]:
                heapIndex     = 1
                propertyFlags = 0x0000:
                        None
                usable for:
                        IMAGE_TILING_OPTIMAL:
                                color images
                                FORMAT_D16_UNORM
                                FORMAT_X8_D24_UNORM_PACK32
                                FORMAT_D32_SFLOAT
                                FORMAT_S8_UINT
                                FORMAT_D24_UNORM_S8_UINT
                                FORMAT_D32_SFLOAT_S8_UINT
                        IMAGE_TILING_LINEAR:
                                color images
                                (non-sparse, non-transient)
        memoryTypes[1]:
                heapIndex     = 0
                propertyFlags = 0x0001: count = 1
                        MEMORY_PROPERTY_DEVICE_LOCAL_BIT
                usable for:
                        IMAGE_TILING_OPTIMAL:
                                color images
                                FORMAT_D16_UNORM
                                FORMAT_X8_D24_UNORM_PACK32
                                FORMAT_D32_SFLOAT
                                FORMAT_S8_UINT
                                FORMAT_D24_UNORM_S8_UINT
                                FORMAT_D32_SFLOAT_S8_UINT
                        IMAGE_TILING_LINEAR:
                                color images
                                (non-sparse, non-transient)
        memoryTypes[2]:
                heapIndex     = 0
                propertyFlags = 0x0001: count = 1
                        MEMORY_PROPERTY_DEVICE_LOCAL_BIT
                usable for:
                        IMAGE_TILING_OPTIMAL:
                                None
                        IMAGE_TILING_LINEAR:
                                None
        memoryTypes[3]:
                heapIndex     = 1
                propertyFlags = 0x0006: count = 2
                        MEMORY_PROPERTY_HOST_VISIBLE_BIT
                        MEMORY_PROPERTY_HOST_COHERENT_BIT
                usable for:
                        IMAGE_TILING_OPTIMAL:
                                None
                        IMAGE_TILING_LINEAR:
                                color images
                                (non-sparse, non-transient)
        memoryTypes[4]:
                heapIndex     = 1
                propertyFlags = 0x000e: count = 3
                        MEMORY_PROPERTY_HOST_VISIBLE_BIT
                        MEMORY_PROPERTY_HOST_COHERENT_BIT
                        MEMORY_PROPERTY_HOST_CACHED_BIT
                usable for:
                        IMAGE_TILING_OPTIMAL:
                                None
                        IMAGE_TILING_LINEAR:
                                color images
                                (non-sparse, non-transient)
        memoryTypes[5]:
                heapIndex     = 2
                propertyFlags = 0x0007: count = 3
                        MEMORY_PROPERTY_DEVICE_LOCAL_BIT
                        MEMORY_PROPERTY_HOST_VISIBLE_BIT
                        MEMORY_PROPERTY_HOST_COHERENT_BIT
                usable for:
                        IMAGE_TILING_OPTIMAL:
                                None
                        IMAGE_TILING_LINEAR:
                                color images
                                (non-sparse, non-transient)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant