Bug 51600 - Psychonauts from HIB 5 slow on Linux GM45
Summary: Psychonauts from HIB 5 slow on Linux GM45
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 8.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-30 10:14 UTC by Md Imam Hossain
Modified: 2014-02-13 10:31 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Md Imam Hossain 2012-06-30 10:14:40 UTC
the Psychonauts slow performance with GMA 4500 on Linux (even with all details low) but works good with Windows.

Tested on:

Ubuntu 12.04
Mesa 7.11.2 and Mesa 8.0.3
Linux kernel 3.2
Comment 1 Md Imam Hossain 2012-07-02 01:41:59 UTC
The following patch
http://cgit.freedesktop.org/mesa/mesa/commit/?id=75f409d75cacf90df2d6f1d718251a5d5cd92f7f

for the following bug

https://bugs.freedesktop.org/show_bug.cgi?id=51328

fixed the problem for gen 6 and above but gen 4 still suffering from this bug.

Cheers
Emam
Comment 2 Kenneth Graunke 2012-08-01 17:28:40 UTC
Yeah, the problem here is that it's trying to blit a Y-tiled buffer (depth or depth/stencil), and the Gen4-5 blitters can't do that.  Paul's "blorp" code for doing blits on the render ring (without the hardware blitter) doesn't exist for Gen4-5.  So we hit _meta_BlitFramebuffer.  Which I think hits swrast.

Paul's blorp code could be backported.  However, it's probably overkill: gen4-5 doesn't have/use HiZ and its crazy W-tiled buffer format, so all that code is unnecessary.  It also doesn't have MSAA.  There's no need for "resolves".  Just blits.  So it's probably possible to write a simpler blit path.  I don't honestly know which would be more work.
Comment 3 Paul Berry 2012-08-01 18:47:23 UTC
(In reply to comment #2)
> Paul's blorp code could be backported.  However, it's probably overkill: gen4-5
> doesn't have/use HiZ and its crazy W-tiled buffer format, so all that code is
> unnecessary.  It also doesn't have MSAA.  There's no need for "resolves".  Just
> blits.  So it's probably possible to write a simpler blit path.  I don't
> honestly know which would be more work.

My intuition is that backporting blorp to gen4-5 would be less work.  Blorp is divided between a hardware-specific part (that sets up the 3D pipeline correctly for the blit) and a hardware-agnostic part (that generates the shader code and sets up the parameters for the blit).  Almost all of the code that's unnecessary for gen4-5 is in the hardware-agnostic part, and that code is already smart enough to skip the stuff that's unnecessary (e.g. the MSAA-specific code is only activated when doing MSAA blits).

So I think that the vast majority of the work involved in backporting blorp to gen4-5 would be to write the code to set up the 3D pipeline, and that would have to be done whether we re-use blorp or not.  Given that, I would vastly prefer to re-use blorp.

Incidentally, Ben Widawsky and I are planning to do some investigation into how difficult it would be to use the media pipeline for blorp rather than the 3D pipeline.  Supposedly, the media pipeline is a lot easier to set up than the 3D pipeline, and has fewer differences between hardware generations.  So if we wind up doing this, backporting blorp to gen4-5 might turn out to be fairly straightforward.
Comment 4 Kenneth Graunke 2013-06-23 13:58:02 UTC
Reassigning to Chris, as he's working on BLORP for pre-Sandybridge.
Comment 5 Md Imam Hossain 2014-01-05 10:08:36 UTC
any new on BLORP for pre-Sandybridge
Comment 6 Eric Anholt 2014-02-05 18:30:19 UTC
My meta series should fix this (putting steam on the gm45 now)
Comment 7 Md Imam Hossain 2014-02-08 22:02:48 UTC
is BLORP implemented for GM45?
Comment 8 Eric Anholt 2014-02-13 00:21:10 UTC
Fixed by the series ending with:

commit 255bd9c0b83e3cb3914ee5a1386c8d5acdbc046a
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Feb 4 23:57:29 2014 -0800

    meta: Add acceleration for depth glBlitFramebuffer().
Comment 9 Md Imam Hossain 2014-02-13 10:31:30 UTC
great!, confirming fixed


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.