Bug 102856 - [bdw hsw] many intermittent dEQP regressions
Summary: [bdw hsw] many intermittent dEQP regressions
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Jason Ekstrand
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-19 09:49 UTC by Mark Janes
Modified: 2017-09-19 14:59 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mark Janes 2017-09-19 09:49:51 UTC
Beginning with 0699319bb0c3fb247e748e26a8158a0397c80632, thousands of intermittent assertions occur in Intel's mesa CI, with the following assertion:

mesa/drivers/dri/i965/intel_mipmap_tree.c:2079: get_ccs_d_resolve_op: Assertion `!"Invalid aux state for CCS_D"' failed.


The problematic series ends with:
Author:     Jason Ekstrand <jason@jlekstrand.net>

i965: Use prepare_external instead of make_shareable in setTexBuffer2

The setTexBuffer2 hook from GLX is used to implement glxBindTexImageEXT
which has tighter restrictions than just "it's shared".  In particular,
it says that any rendering to the image while it is bound causes the
contents to become undefined.  This means that we can do whatever aux
tracking we want between glxBindTexImageEXT and glxReleaseTexImageEXT so
long as we always transition from external in Bind and to external in
Release.

The fact that we were using make_shareable before was a problem because
it would resolve away 100% of the aux data and then throw away our
reference to the aux buffer.  If the aux data was shared with some other
application (i.e. if we're using I915_FORMAT_MOD_Y_TILED_CCS) then we
would forget that the aux data even existed for the rest of eternity.
This is fine for the first frame but any subsequent calls to
glxBindTexImageEXT would bind the texture as if it has no aux
whatsoever and no resolves would happen and texturing would happen as if
there is no aux.  This was causing rendering corruption in mutter when
running on top of X11 with modifiers.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>

Mesa's CI is unusable due to this issue, because the large number of intermittent tests cannot be disabled or attributed to a commit, creating noise in all CI results.

The issue has been mostly fixed by a patch awaiting review:
https://patchwork.freedesktop.org/patch/177582/
Comment 1 Mark Janes 2017-09-19 10:28:14 UTC
Correction: the regressions are *fully* fixed by Jason's patch.
Comment 2 Jason Ekstrand 2017-09-19 14:59:17 UTC
Fixed by the following commit:

commit 1746671a76f7310d397347ab7c5db0b01706b5c2
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Tue Sep 19 06:55:32 2017 -0700

    Revert "i965: Reset miptree aux state on update_image_buffer"
    
    This reverts commit e97f4b748094466567c7f3bad1a02ecee13db9c8.

I still need to come up with a proper fix but this stuff is way more subtle than it looks and I'm hitting some unexpected corners.


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.