Bug 69078 - Modern Warfare (1, 2 and 3) broken in Wine on SNB
Modern Warfare (1, 2 and 3) broken in Wine on SNB
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
git
x86-64 (AMD64) Linux (All)
: medium major
Assigned To: Anuj Phogat
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-07 22:43 UTC by Armin K
Modified: 2013-11-08 16:48 UTC (History)
3 users (show)

See Also:


Attachments
with the patch (259.68 KB, image/png)
2013-09-07 22:44 UTC, Armin K
Details
without the patch (1.00 MB, image/png)
2013-09-07 22:46 UTC, Armin K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Armin K 2013-09-07 22:43:33 UTC
Commit

079bdba... i965/blorp: Add support for single sample scaled blit with bilinear filter

breaks Modern Warfare games in wine. See screenshots.

Reverthing this commit fixes the issue.
Comment 1 Armin K 2013-09-07 22:44:23 UTC
Created attachment 85406 [details]
with the patch
Comment 2 Armin K 2013-09-07 22:46:18 UTC
Created attachment 85407 [details]
without the patch
Comment 3 Ian Romanick 2013-09-11 15:49:38 UTC
Anuj, can you look at this?  The break bisects to your commit.
Comment 4 Anuj Phogat 2013-09-24 18:14:44 UTC
Yes, I'll investigate it soon.
Comment 5 Anuj Phogat 2013-10-11 21:54:27 UTC
Armin, Can you take an apitrace of the attached frame? This will help me reproduce it on SNB.
Comment 6 Armin K 2013-10-12 14:14:44 UTC
apitrace output is about 282 MB uncompressed, 66 MB compressed with xz -9. I don't think I can post such a large file here.

I can upload it somewhere else if you desire.

In Qt gui program, running retrace I noticed this

Medium severity API unknown issue 1, FBO incomplete: Unsupported HW texture/renderbuffer format attached: MESA_FORMAT_AL88
Medium severity API unknown issue 2, FBO incomplete: driver marked FBO as incomplete [-1]
Medium severity API unknown issue 1, FBO incomplete: Unsupported HW texture/renderbuffer format attached: MESA_FORMAT_SL8
Medium severity API unknown issue 2, FBO incomplete: driver marked FBO as incomplete [-1]
Medium severity API unknown issue 1, FBO incomplete: Unsupported HW texture/renderbuffer format attached: MESA_FORMAT_SLA8
Medium severity API unknown issue 2, FBO incomplete: driver marked FBO as incomplete [-1]

etc ...
Comment 7 Anuj Phogat 2013-10-14 21:39:50 UTC
(In reply to comment #6)

> I can upload it somewhere else if you desire.
I'm okay if you can share the file somewhere else (google drive etc.).
 
> In Qt gui program, running retrace I noticed this
> 
> Medium severity API unknown issue 1, FBO incomplete: Unsupported HW
> texture/renderbuffer format attached: MESA_FORMAT_AL88
I looked at these error messages. They are coming from _mesa_CheckFramebufferStatus() => _mesa_test_framebuffer_completeness() => intel_validate_framebuffer() in i965/intel_fbo.c.
Few questions for you:
- Do you see these errors only during retrace or even with normal game playing?
- Do you see these errors with and without mesa commit 079bdba...?

Above two questions will help me figure out if these error messages have anything to do with mesa commit 079bdba or an apitrace retracing issue.
Comment 8 Armin K 2013-10-15 08:35:31 UTC
http://www.sendspace.com/file/iicja3

Here's the compressed data file from apitrace.

I see the warnings/errors only when running retrace ... Even with LIBGL_DEBUG=verbose it's silent at runtime (minus wine direct3d warnings).

I'll rebuild mesa without the mentioned commit later and report again.
Comment 9 Armin K 2013-10-16 19:19:41 UTC
I've built

commit dbc1f3677c1deb32358a6a53f0ad3638a78c7c4f
Author: José Fonseca <jfonseca@vmware.com>
Date:   Mon Oct 7 17:09:46 2013 -0700

    util/u_math: Fix C++ include of u_math.h on MSVC.
    
    GNU C++ compiler declares the C99 lrint, etc. when _GNU_SOURCE is
    defined, but MSVC does not.
    
    Trivial.

And reverted the commit mentioned in the first comment. Couldn't revert it in any later revision because first revision after this one changes the same files as the mentioned commit did.

However, the warnings mentioned in Comment 6 still exist when doing retrace of the now correctly working game.
Comment 10 Anuj Phogat 2013-10-18 00:12:11 UTC
Thanks for the trace file. Warnings produced by apitrace look unrelated to this issue on SNB. I was able to reproduce it on SNB as well as on IVB. I'm working on it.
Comment 11 Anuj Phogat 2013-10-19 00:27:24 UTC
I've posted a patch to fix the issue on mesa-dev mailing list: "i965: Do not set bilinear_filter flag in case of multisample blits". Could you please test the patch?
Comment 12 Armin K 2013-10-20 18:13:38 UTC
Issue is gone after applying the patch. Thanks!
Comment 13 Anuj Phogat 2013-10-28 16:43:49 UTC
mesa master commit logs:

commit f278d49c4bcfedbda10cb224cb251e3755e88288
Author: Anuj Phogat <anuj.phogat@gmail.com>
Date:   Fri Oct 18 16:07:42 2013 -0700

    i965: Do not set bilinear_filter flag in case of multisample blits

    Setting bilinear_filter flag in case of multisample blits with
    GL_LINEAR filter causes incorrect behavior in translate_dst_to_src()
    function. This broke Modern Warfare (1, 2 and 3) on SNB, IVB and HSW.
    
    Tested on SNB and IVB, no Piglit regressions. Trace file of the game
    (taken with apitrace) works fine with this patch.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69078
    Cc: mesa-stable@lists.freedesktop.org
    Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
    Reported-by: Armin K <krejzi@email.com>
    Tested-by: Armin K <krejzi@email.com>
    Reviewed-by: Paul Berry <stereotype441@gmail.com>