X Tutup
Skip to content

VK: massive vram usage from MSAA + SSR #9786

@emezeske

Description

@emezeske

Describe the bug
My Filament app can easily run out of VRAM on my NVIDIA 5070ti card with 16 GB of ram, even with an extremely simple scene, with certain view settings.

To Reproduce
Steps to reproduce the behavior:

  1. Enable MSAA 4x
  2. Enable SSR with default settings
  3. Make the window fullscreen on a 4k monitor
  4. Load a simple scene

Look at VRAM usage. It easily goes up to 10-14 GB for me with only these options enabled.

I am testing against the current Filament main HEAD.

Expected behavior
I would expect a few hundred MB of VRAM used for these options with such a large window, not 10+ GB. On the Metal backend, with the exact same application code, the RAM usage only goes up by ~400 MB when I enable MSAA 4x and SSR together, which seems more reasonable.

It seems like there's some kind of multiplicative thing going on?

Screenshots
In the following diagram, I annotated the VRAM usage on my machine:

  1. Enable SSR alone
  2. Enable MSAA 4x alone
  3. Enable SSR + MSAA 4x together
Image

I don't think it's a leak, because when I later disable MSAA or SSR, the memory usage goes down again to normal levels. Also it is stable at the (extremely high) level, it doesn't keep growing or anything.

Logs

FEngine (64 bits) created at 0000021F892317E0 (threading is enabled)
Vulkan device driver: NVIDIA 591.74
Selected physical device 'NVIDIA GeForce RTX 5070 Ti' from 2 physical devices. (vendor 0x10de, device 0x2c05, driver 0x93d28000, api 1.4)
Backend feature level: 3
FEngine feature level: 1
vkCreateSwapchain: 3340x1885, 44, 0, swapchain-size=3, identity-transform=true, depth=126, protected=false

Desktop (please complete the following information):

  • OS: Windows 11
  • GPU: NVIDIA RTX 5070 ti
  • Backend: Vulkan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup