Bug 57338 - Regression: some games runs extremally slow 2
Summary: Regression: some games runs extremally slow 2
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 19:17 UTC by Deve
Modified: 2017-02-10 22:38 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Handle MESA_FORMAT_RGBA_16 in _mesa_format_matches_format_and_type(). (665 bytes, patch)
2013-01-27 10:00 UTC, Henri Verbeet
Details | Splinter Review
sysprof (665 bytes, application/octet-stream)
2013-01-27 10:42 UTC, Deve
Details
sysprof (720.58 KB, text/plain)
2013-02-06 07:39 UTC, Deve
Details

Description Deve 2012-11-20 19:17:19 UTC
I created other bug, because it's caused by other commit. First was there:
https://bugs.freedesktop.org/show_bug.cgi?id=55396

This bug, caused by commit below, I see in Star Wars Jedi Academy, multiplayer mode, under Wine. Game runs VERY slow and it's unplayable.


git bisect good mesa-7.11.2
git bisect bad mesa-8.0-rc1


b0a0f4bf14fbaa7df02db1d2057b287bfbea3347 is the first bad commit
commit b0a0f4bf14fbaa7df02db1d2057b287bfbea3347
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Nov 15 16:50:59 2011 -0800

    i965: Add support for RGBA_16 unorm rendering.
    
    GL 3.0 specifies GL_RGBA16 as a required sized format for rendering
    and texturing.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

:040000 040000 69ebcff59f4e43483f590702af2c4447fd8e466e dd67352fb03c8464ed166a0472d98c7060e7d3af M      src



Sysprof shows about 80% CPU usage in unpack_ARGB8888 and anything other.


Configuration:
Intel 965GM
xserver-xorg-video-intel 2.20.9
linux-image 3.6.7
mesa 9.0.1
libdrm 2.4.39
Comment 1 Henri Verbeet 2013-01-27 10:00:54 UTC
Created attachment 73722 [details] [review]
Handle MESA_FORMAT_RGBA_16 in _mesa_format_matches_format_and_type().

The profile in the winehq bug does look somewhat similar to the one for bug 55396. Does this patch make it any better?
Comment 2 Deve 2013-01-27 10:42:54 UTC
Created attachment 73723 [details]
sysprof

I have the same like without patches. Anything better.

Also I added sysprof from wine bugzilla to make it more clear.
Comment 3 Eric Anholt 2013-02-06 01:54:17 UTC
That was just the patch you attached, not the sysprof.
Comment 4 Deve 2013-02-06 07:39:12 UTC
Created attachment 74273 [details]
sysprof

My mistake, sorry.
Comment 5 Deve 2013-02-23 23:13:58 UTC
That's short messages, so I'm not adding attachments.

After this debug patch:

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 7299a4b..679646d 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -664,6 +664,8 @@ _mesa_get_teximage(struct gl_context *ctx,
       get_tex_ycbcr(ctx, dimensions, format, type, pixels, texImage);
    }
    else {
+      fprintf(stderr, "Using slow texture readback for format %#x, type %#x, and internal format %#x.\n",
+            format, type, texImage->TexFormat);
       get_tex_rgba(ctx, dimensions, format, type, pixels, texImage);
    }



I got this messages in Star Wars JK Jedi Academy MP intro:

Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x4a.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x4c.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x3e.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x4a.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x4c.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x3e.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x7.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x30.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0xb.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x10.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x10.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0xb.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x18.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0xb.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x26.
Using slow texture readback for format 0x80e1, type 0x8367, and internal format 0x7.
Comment 6 Deve 2013-03-12 18:00:57 UTC
Wine shows logs under terminal:

err:ole:CoInitializeEx Attempt to change threading model of this apartment from multi-threaded to apartment threaded
fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16_UNORM with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16B16A16_UNORM with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:win:EnumDisplayDevicesW ((null),0,0x32e958,0x00000000), stub!
err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception.


Where I noticed lines:

fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16_UNORM with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16B16A16_UNORM with rendertarget flag is not supported as FBO color attachment, and no fallback specified.

I don't see this lines using old mesa 7.11 (where everything is OK). Maybe there is a problem?
Comment 7 Eric Anholt 2013-06-08 00:36:34 UTC
Same note about INTEL_DEBUG=perf environment variable here.
Comment 8 Annie 2017-02-10 22:38:38 UTC
Dear Reporter,

This Mesa bug has been in the "NEEDINFO" status for over 60 days. I am closing this bug based on lack of response but feel free to reopen if resolution is still needed. Please ensure you're supplying the correct information as requested.

Thank you.


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.