[Mesa-dev] i915: policy for enabling texture tiling
arthur.huillet at free.fr
Thu Dec 23 10:05:07 PST 2010
I recently found a problem with the i915 driver. An OpenGL application using lots of small textures gets OOM-killed after
about 1000 textures, depending on the amount of system memory.
The ticket is here: https://bugs.freedesktop.org/show_bug.cgi?id=32579
Even though I have not confirmed it yet, Chris Wilson indicates that linux-next has a patch that makes the problem disappear.
All current systems (Ubuntu 10.10 and anything including a recent Mesa) have the problem.
The i915 driver enables texture tiling by default, which the kernel handles by making 1024x1024 allocations even for small
As it stands, any combination of Linux < 2.6.38 and Mesa 7.9 will be doing crazy memory allocations.
Given that the currently released versions of the Linux kernel behave in a manner that is not reasonable, I believe a fix of some
sort should be taken to users.
One possibility is to disable texture tiling by default on i915 in Mesa 7.9, by
It will be slower, but at least it won't get the application OOM-killed.
Another would be to backport the modifications of the DRM that enable tiled textures to eat up less than 1MB of system memory,
from linux-next to the stable 2.6 branches (and upcoming 2.6.37), but according to Chris this is difficult to do because the
modifications are non trivial.
A third option seems to be the use of I915_PARAM_HAS_RELAXED_FENCING that would allow a smarter behavior, but I am not sure I
would be able to write the patch myself.
What are your thoughts on the matter?
More information about the mesa-dev