Bug 90422 - [SKL] Many Piglit multisample tests fail
Summary: [SKL] Many Piglit multisample tests fail
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-12 16:01 UTC by Neil Roberts
Modified: 2015-06-05 13:58 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Screenshot of results from ext_framebuffer_multisample-formats (16.39 KB, image/png)
2015-05-12 16:01 UTC, Neil Roberts
Details

Description Neil Roberts 2015-05-12 16:01:46 UTC
Created attachment 115720 [details]
Screenshot of results from ext_framebuffer_multisample-formats

Lots of Piglit tests for multisampling fail on Skylake. In particular all of the tests involving ext_framebuffer_multisample-formats and ext_framebuffer_multisample-accuracy seem to fail.

ext_framebuffer_multisample-formats is interesting because it tests a range of different formats in a single instance and it's always only the first one that fails. It doesn't matter what the first format is, ie, if I swap the first two formats in fbo-formats.h then the new first fails. Even if I duplicate the first format it still fails on the first one but the second one succeeds.

It sounds like we are missing some cache flush somewhere that maybe just works itself out after the first format is tested. Indeed if I enable the always_flush_cache option in .drirc then it is magically fixed.

I think it is related to the MCS buffer because if I force the renderbuffer format to INTEL_MSAA_LAYOUT_UMS instead of INTEL_MSAA_LAYOUT_CMS then the bug is also fixed.

The image is the result of the failing test in ext_framebuffer_multisample-formats. You can see there are artefacts in the result.
Comment 1 Tapani Pälli 2015-05-13 08:53:12 UTC
For me the test consistently passes, my system looks like:

Linux skylake-box 4.1.0-040100rc2-generic #201505032335 SMP Mon May 4 03:36:35 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.6.0-devel (git-71fc520)

xserver-xorg-video-intel 2:2.99.917+git1505041932.5054e2~gd~u
libdrm-intel1 2.4.61+git1505070630.b23606~gd~u

Or is it so that test passes but content looks bad?
Comment 2 Neil Roberts 2015-05-13 11:39:14 UTC
Hrm, that's interesting. The tests consistently fail for me.

What Skylake revision are you using? My chip ID is 0x191e (Skylake ULX GT2) and the revision number is 2.

I've just updated my kernel to the nightly from 2015-05-13 and it still happens. I'm using git master of Mesa (58715b7239). I was using GBM instead of X but I tried it there as well and it still doesn't work.

An example of a command that fails is:

piglit/bin/ext_framebuffer_multisample-formats 2 -auto -fbo
Comment 3 Tapani Pälli 2015-05-13 12:34:46 UTC
(In reply to Neil Roberts from comment #2)
> Hrm, that's interesting. The tests consistently fail for me.
> 
> What Skylake revision are you using? My chip ID is 0x191e (Skylake ULX GT2)
> and the revision number is 2.
> 
> I've just updated my kernel to the nightly from 2015-05-13 and it still
> happens. I'm using git master of Mesa (58715b7239). I was using GBM instead
> of X but I tried it there as well and it still doesn't work.
> 
> An example of a command that fails is:
> 
> piglit/bin/ext_framebuffer_multisample-formats 2 -auto -fbo


It seems I have the same machine pci-id 8086:191e and revision 2 as well. I have Ubuntu 14.10 as base. I could try to get drm-nightly, I installed my kernel from ubuntu packages here:

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.1-rc2-vivid/
Comment 4 Neil Roberts 2015-05-13 15:59:05 UTC
I can make the test pass by causing a flush in PatternRender::draw in between where it renders to the texture and then calls glBlitFramebuffer to sample from it with some gdb commands like this:

 b formats.cpp:326
 commands 1
 call intel_batchbuffer_emit_mi_flush(_glapi_Context)
 c
 end

This is mysterious because Mesa does seem to do its own flush when a buffer is switched from rendering to sampling in brw_render_cache_set_check_flush and this does seem to successfully call intel_batchbuffer_emit_mi_flush. I thought maybe it's something about needing to flush twice but I tried duplicating the call to intel_batchbuffer_emit_mi_flush in that function and that doesn't solve it.
Comment 5 Tapani Pälli 2015-05-18 07:05:47 UTC
FYI now this test started to fail for me as well
Comment 6 Neil Roberts 2015-06-05 13:58:50 UTC
This seems to be fixed with Ben's multisampling patch.

http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2d84d99f5a66738e8f584bdf


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.