Skip to content

DXVK ignores VRAM limits #3867

Description

@talkingerbil

DXVK ignores device VRAM limits set by either override_vram_size (RADV) or dxgi.maxDeviceMemory (dxvk.conf). Is this intentional?

It appears to be caused by the VRAM budget value in DxvkMemoryAllocator::tryAllocDeviceMemory being 0 before the check for allocation limits/status at the start of that function.

if (type->heap->budget && type->heap->stats.memoryAllocated + size > type->heap->budget)

This is a problem when the code/game in question doesn't respect the DXGI VRAM limits/suggestions mentioned above. Admittedly, I've only tested 3-4 games so far but I'm sure plenty more misbehave just as much as these.

If I hard-code a value in place of type->heap->budget in that IF check, everything seems to be fine for both VRAM limits and game stability. Note that in doing that, I'm currently also ignoring heap type, but initial testing has been positive.

If budget==0, that IF statement is a moot check, no?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions