Created attachment 78841 [details] fix epic citadel (unreal engine web gl demo) Environment details: Linux vedran-ThinkPad-X230 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 13.04 Xorg edgers X userland, Mesa from GIT I'm using Firefox 23 nightly to run Epic Citadel, the WebGL demo of Unreal Engine http://www.unrealengine.com/html5/ Latest Mesa has a major performance regression (arround 1 FPS compared to a quite smooth framerate from Mesa 9.1.1) I did a bisect and it turns out that this is the bad commit: http://cgit.freedesktop.org/mesa/mesa/commit/?id=55ecc448b9d05e9f1e5ceb88ab35606e80e3adee Attached is a patch for current GIT. The commit can't be directly reverted, so this is probably incorrect, but fixes the issue for me.
Created attachment 78842 [details] better version of patch that shows the crux of the matter (as suggested by Alexander Monakov on #intel-gfx)
Now that we're using Y-tiling, MapTextureImage can't use the BLT path, so it falls back to GTT mapping, which is really slow. It makes ReadPixels eat 65% of the CPU when it used to use hardly any. I see a couple of solutions to this: 1. Implement map/unmap via BLORP 2. Implement Y-tiling support for BLTs on Gen7+ 3. Only Y-tile compressed formats for now? #1 requires hooking into blorp at a lower level than is done currently, so it's non-trivial but looks doable. #2 means MI_LOAD_REGISTER_IMM'ing a register, with all the known issues there. #3 is easy, but I'd have to measure the performance cost. Eric, thoughts? Other ideas?
Patch series on the list that gets things back to where they probably were before. Note that for actual decent performance you need to go to about:config and set"layers.acceleration.force-enabled". I've been chatting with the moz folks and they seem pretty open to whitelisting us pending a bit of perf testing, so hopefully this will get better soon.
Confirmed fixed. layers.acceleration.force-enabled helps a lot 43.6 FPS compared to 18.9 before. And Y tiling definitely helps, I tried mesa git with X tiling forced (modified intel_mipmap_tree) just to test, and I got 41.8 FPS. Thanks
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.