Bug 89760 - [HSW Bisected]WebGL Google Auqarium/Google Dynamic Cubemap/Earthscreen/Google Toon-Shading cases performance value dropped by 20%
Summary: [HSW Bisected]WebGL Google Auqarium/Google Dynamic Cubemap/Earthscreen/Google...
Status: CLOSED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 10:49 UTC by wendy.wang
Modified: 2015-05-13 07:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg log (17.28 KB, text/plain)
2015-03-25 10:49 UTC, wendy.wang
no flags Details
Xorg.0_commit_2f047c.log (14.64 KB, text/plain)
2015-04-07 07:09 UTC, wendy.wang
no flags Details

Description wendy.wang 2015-03-25 10:49:15 UTC
Created attachment 114616 [details]
Xorg log

Regression: yes
It's xorg driver regression, this issue can be more obvious on HSW Platforms.
From bisect result, below commit is the first bad commit:

commit 72d208a7f2f0e8f2d93483e535154f34a8a26d81
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Mar 5 12:26:15 2015 +0000

sna/dri2: Perform swap elision on windows for swap-interval==0


Run WebGL cases: Google  Auqarium/Google Dynamic Cubemap/Earthscreen/Google Toon-Shading cases on HSW, these cases performance fps dropped by 20%.

Reproduce tool-shading case steps:
1. Download http://webglsamples.googlecode.com/hg/toon-shading/toon-shading.html to local
2. Execute: http://tinderbox.sh.intel.com/webglsamples.googlecode.com/hg/toon-shading/toon-shading.html


Earth screen download address: http://pnp.sh.intel.com/benchmarks/WRTBench_Packages/WRTBench_latest_project/WebGL-EarthScreen/earth4Video.html

dynamic-cubemap download address:
http://webglsamples.googlecode.com/hg/dynamic-cubemap/dynamic-cubemap.html

aquarium download address:
http://webglsamples.googlecode.com/hg/aquarium/aquarium.html

xorg.log file has been attached.
Comment 1 Chris Wilson 2015-03-25 17:34:14 UTC
That's not a full description of the software stack. What browser, what desktop environment, what window manager? Is it running fullscreen or in an window?
Comment 2 wendy.wang 2015-03-26 01:54:53 UTC
Used gfx sw stack:
2015-03-25 Kernel:(drm-intel-nightly)877605d94cb0260cb05a110b8a1ec3871a8477ea 
Others used 2015 Q1 release package driver: 
Mesa = 10.5.1
libdrm = 2.4.59
Cairo = 1.14.2
Xserver = 1.17.1

Browser: Google Chrome 33.0.1750.152
Desktop environment: gnome-session
Run the case with this command, not special set to full screen or windows mode:  ./google-chrome --enable-webgl --ignore-gpu-blacklist --user-data-dir "http://tinderbox.sh.intel.com/webglsamples.googlecode.com/hg/toon-shading/toon-shading.html"
Comment 3 Eero Tamminen 2015-04-01 09:32:07 UTC
Wendy, I think you need to list also versions of X libraries, e.g. ones for xcb dri & present extensions.  driproto version used to build things can also be important.


Chris, from looking at the performance numbers, the issue isn't performance drop, but WebGL tests getting Vsynched.

This change seems to have affected only HSW, but it could also affect BYT (FullHD tests on that go below 60 FPS, so Vsync changes don't show on it).  IVB and BDW seem to have *already* earlier been running tests as Vsynched.
Comment 4 Chris Wilson 2015-04-01 09:42:41 UTC
Eero, thanks a lot! The existing DRI2 swap-interval=0 code is not vsynced, and a quick review of the code (and glxgears) confirms that.

So I wonder if there is some other effect at play?

Wendy, what I could do with is an xtrace of both good/bad behaviour - could you extract such a debug log from your test setup?
Comment 5 Eero Tamminen 2015-04-01 11:16:51 UTC
On ChromeOS, Chrome is limiting WebGL to 60 FPS regardless of vblank_mode=0 setting, so it could be even browser.  What's the best way to debug what Mesa and X think is the Vsync value?
Comment 6 Chris Wilson 2015-04-01 11:57:20 UTC
Under GL, the swap-interval is exposed b glXGetSwapIntervalMesa (and glXSetSwapIntervalMesa) that corresponds to the vblank_mode. The vrefresh rate is glXGetMscRateOML (though at the moment that is bugged and doesn't track mode changes).

I've also updated xf86-video-intel/tools/dri3info to print the refresh rate:
commit 2f047c62783a187067921e1aaf5572fb8647bd84
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 1 12:39:48 2015 +0100

    tools/dri3info: Query refresh rate on Primary monitor
Comment 7 wendy.wang 2015-04-07 06:53:38 UTC
(In reply to Chris Wilson from comment #6)
> Under GL, the swap-interval is exposed b glXGetSwapIntervalMesa (and
> glXSetSwapIntervalMesa) that corresponds to the vblank_mode. The vrefresh
> rate is glXGetMscRateOML (though at the moment that is bugged and doesn't
> track mode changes).
> 
> I've also updated xf86-video-intel/tools/dri3info to print the refresh rate:
> commit 2f047c62783a187067921e1aaf5572fb8647bd84
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Wed Apr 1 12:39:48 2015 +0100
> 
>     tools/dri3info: Query refresh rate on Primary monitor

Tested this xf86-video-intel commit based on 2015-04-06 GFX SW stack with HSW HW:
commit 2f047c62783a187067921e1aaf5572fb8647bd84
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 1 12:39:48 2015 +0100

  tools/dri3info: Query refresh rate on Primary monitor

Four WebGL cases:
 Google Auqarium/Google Dynamic Cubemap/Earthscreen/Google Toon-Shading cases performance value all recovered to good values: 75 FPS around.
Comment 8 wendy.wang 2015-04-07 07:09:10 UTC
Created attachment 114908 [details]
Xorg.0_commit_2f047c.log
Comment 9 Chris Wilson 2015-04-07 08:44:38 UTC
Hmm, nothing obviously changed, so worksforme.


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.