Bug 74263 - Always enabling GL2 support for i915 makes wine apps suffer from SW fallbacks
Summary: Always enabling GL2 support for i915 makes wine apps suffer from SW fallbacks
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: 9.2
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-31 08:35 UTC by Ruslan Kabatsayev
Modified: 2017-09-16 13:03 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan Kabatsayev 2014-01-31 08:35:33 UTC
After updating Mesa from stock Ubuntu 12.04 LTS version 9.0 to 9.2, running some games, e.g. GTA VC in Wine starting with 1.5.17 leads to software fallbacks on i915.

I've bisected this problem to find this commit:

97217a40f97cdeae0304798b607f704deb0c3558 is the first bad commit
commit 97217a40f97cdeae0304798b607f704deb0c3558
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Apr 17 13:55:08 2013 -0700

    i915: Always enable GL 2.0 support.

    There's no point in shipping a non-GL2 driver today.

:040000 040000 d039f68bbc5a5e610adbeb3d310350a844911fea
efac289465401566fec6063b544c0a844e302559 M      src

AFAIU, i915 doesn't fully support GLSL, so this seems to be not a good idea to advertise GL 2.0 support.

There's a discussion of this problem on wine-devel mailing list [1], and a wined3d developer expresses the opinion [2] that 
> There's a point in shipping a < GL 2.0 driver for hardware that just
> doesn't support GL 2.0. But there is no point in requiring the
> application to magically know if the driver's GL 2.0 is really 2.0 or
> just something rigged with software fallback mines.


[1]: http://www.winehq.org/pipermail/wine-devel/2014-January/102602.html
[2]: http://www.winehq.org/pipermail/wine-devel/2014-January/102661.html
Comment 1 Ruslan Kabatsayev 2014-01-31 08:55:56 UTC
Running with INTEL_DEBUG=perf reveals the following messages:

intel_copy_texsubimage mismatched formats MESA_FORMAT_ARGB8888,
MESA_FORMAT_RGB565
intelCopyTexSubImage - fallback to swrast
intelReadPixels: fallback to swrast
intel_copy_texsubimage mismatched formats MESA_FORMAT_ARGB8888,
MESA_FORMAT_RGB565
intelCopyTexSubImage - fallback to swrast
intelReadPixels: fallback to swrast
intel_copy_texsubimage mismatched formats MESA_FORMAT_ARGB8888,
MESA_FORMAT_ARGB1555
intelCopyTexSubImage - fallback to swrast
intelReadPixels: fallback to swrast
intel_copy_texsubimage mismatched formats MESA_FORMAT_ARGB8888,
MESA_FORMAT_ARGB4444
intelCopyTexSubImage - fallback to swrast
[skipped repeats]
ENTER FALLBACK 100000: point sprite coord origin
Mapping a busy BO, causing a stall on the GPU.
ENTER FALLBACK 100000: point sprite coord origin
Mapping a busy BO, causing a stall on the GPU.
Mapping a busy BO, causing a stall on the GPU.

The ones leading to slowdown are "point sprite coord origin" ones. If I disable glPointParameteri* calls as suggested by Henri Verbeet [1], such serious slowdown isn't observed.

[1]: http://www.winehq.org/pipermail/wine-devel/2014-January/102662.html
Comment 2 Henri Verbeet 2014-01-31 09:53:28 UTC
Specifically, it looks like this is I915_FALLBACK_POINT_SPRITE_COORD_ORIGIN in i915PointParameterfv().
Comment 3 Ruslan Kabatsayev 2014-02-25 18:56:26 UTC
Adding the commit author to CC, otherwise this seems to be going nowhere.
Comment 4 Ruslan Kabatsayev 2016-08-29 21:12:15 UTC
This bug seems to appear and disappear... in Mesa 11.0.2 it wasn't present: i915 returned OpenGL 1.4 version. Now with Mesa git I have 2.1 Mesa 12.1.0-devel (git-c2f2252). So this is valid again.
I have to use MESA_GL_VERSION_OVERRIDE=1.4 to get Wine games work normally without software fallbacks.
BTW, i915 doesn't report GL>1.4 in Windows, so shouldn't (at least by default) do so in Linux.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.