Material Preview mode does not free up GPU memory when returning to Solid View mode

When in Solid View mode, if I change to Render Preview mode I get the expected bump in memory usage on the GPU. When I return to SV from RP the memory usage returns to the previous Solid View level.

If I change to Material Preview mode I get the expected bump in memory usage on the GPU BUT, when I return to SV from MP the memory used appears to be retained.

I noticed this because I have file that is close to the max memory of my GPU.

I can open it in SV, change to RP and it renders fine, if however I go to MP first and then onto RP it fails with a CUDA out of memory errror.

Returning to SV does not appear to free up the memory used by MP. RP does not work from then on until I do a full render, which appears to free up the GPU memory before doing anything else. RP mode then works again until I go into MP mode, after that it fails again.
I’ve attched a graph of the GPU memory showing the pattern, which is reproducable every time.

Blender Error - S-F12-S-MP-RP-S

I have used a separate file and the memory retention behavior is the same.

Ubuntu 20.04 64 Bit 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Blender 2.90.1
RTX2060 driver 450.66

Welcome to Blender Artists Pete!

Try the following:

Go into Preferences and click on System. Try setting the Texture and VBO to something short, like 4 seconds. Set each garbage collector to something short, like 2 seconds. See if that decreases the GPU allotted memory shortly after switching from MP to SV. If it does, you can then set those time limits to a length that suits your taste.

By default, Blender keeps that memory allotted on the GPU for 2 minutes.


Thanks for the quick response. As a test I set the Texture and VBO to 20 seconds and the garbage collectors to 10 seconds.

These settings do not appear to have any effect on what I’m observing -

A big chunk of memory is being latched. What doesn’t make sense to me is that surely MP and RP are working off the same data. Why would RP have to load the same amount of data on top after MP as before it MP if both are working from the same data? It implies some sort of r duplication is happening.



EEVEE appears to behave as you would expect. S-MP-RP ends up at the same memory usage as going direct from S-RP, and going back to S brings memory usage back to the initial S levels. Plus I can see the timers taking effect.

It’s in Cycles where RP after MP uses more memory than RP after S. And going MP to S does not return the memory usage to previous S levels, even after all the timers have timed out.