Bug 98326 - [dEQP, EGL] pbuffer depth/stencil tests fail
Summary: [dEQP, EGL] pbuffer depth/stencil 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: Tapani Pälli
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
: 98341 (view as bug list)
Depends on:
Blocks: 98315
  Show dependency treegraph
 
Reported: 2016-10-19 17:52 UTC by Mark Janes
Modified: 2016-10-27 05:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fix (1.71 KB, patch)
2016-10-20 08:06 UTC, Tapani Pälli
Details | Splinter Review

Description Mark Janes 2016-10-19 17:52:14 UTC
The same failure pattern is observable in several pbuffer depth/stencil tests:

dEQP-EGL.functional.create_surface.pbuffer.rgb888_depth_stencil.sklm64 

Compatible configs: { 7, 23 }
Creating pbuffer surface with config ID 7
  Fail, maximum pbuffer size of 0x0 reported
Creating pbuffer surface with config ID 23
  Fail, maximum pbuffer size of 0x0 reported
Comment 1 Tapani Pälli 2016-10-20 07:38:09 UTC
fix on it's way to CI testing
Comment 2 Tapani Pälli 2016-10-20 08:06:50 UTC
Created attachment 127417 [details] [review]
fix
Comment 3 Tapani Pälli 2016-10-20 08:07:59 UTC
*** Bug 98341 has been marked as a duplicate of this bug. ***
Comment 4 Tapani Pälli 2016-10-25 04:58:46 UTC
commit b91e1e38e87b372d409469dfe00ace76c8febd34
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Thu Oct 20 10:33:33 2016 +0300

    egl/dri2: set max values for pbuffer width and height
    
    While these max values were previously fixed for pbuffer creation, this
    change makes also eglGetConfigAttrib() return correct values.
    
    Fixes following dEQP tests:
    
       dEQP-EGL.functional.create_surface.pbuffer.rgb888_no_depth_no_stencil
       dEQP-EGL.functional.create_surface.pbuffer.rgb888_depth_stencil
       dEQP-EGL.functional.create_surface.pbuffer.rgba8888_no_depth_no_stencil
       dEQP-EGL.functional.create_surface.pbuffer.rgba8888_depth_stencil
    
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98326
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Comment 5 Mark Janes 2016-10-26 04:48:34 UTC
For some reason, these tests continue to fail on about half of the hsw systems that I've tested:

Compatible configs: { 5, 17 }
Creating pbuffer surface with config ID 5
  EGL_CONFIG_ID: 5
  EGL_WIDTH: 64
  EGL_HEIGHT: 64
  EGL_HORIZONTAL_RESOLUTION: -1
  EGL_VERTICAL_RESOLUTION: -1
  EGL_MULTISAMPLE_RESOLVE: EGL_MULTISAMPLE_RESOLVE_DEFAULT
  EGL_PIXEL_ASPECT_RATIO: -1
  EGL_RENDER_BUFFER: EGL_BACK_BUFFER
  EGL_SWAP_BEHAVIOR: EGL_BUFFER_PRESERVED
  EGL_ALPHA_FORMAT: EGL_ALPHA_FORMAT_NONPRE
  EGL_COLORSPACE: EGL_COLORSPACE_sRGB
  EGL_LARGEST_PBUFFER: EGL_FALSE
  EGL_TEXTURE_FORMAT: EGL_NO_TEXTURE
  EGL_TEXTURE_TARGET: EGL_NO_TEXTURE
  EGL_MIPMAP_TEXTURE: EGL_FALSE
  EGL_MIPMAP_LEVEL: 0x00000000
    Fail, swap behavior is reported as preserve but configuration does not support it.

I get the same result intermittently on SNB.

Tapani, can you shed some light on why this is happening?  I've disabled the tests in CI until this understood.
Comment 6 Tapani Pälli 2016-10-26 04:53:19 UTC
(In reply to Mark Janes from comment #5)
> For some reason, these tests continue to fail on about half of the hsw
> systems that I've tested:
> 
> Compatible configs: { 5, 17 }
> Creating pbuffer surface with config ID 5
>   EGL_CONFIG_ID: 5
>   EGL_WIDTH: 64
>   EGL_HEIGHT: 64
>   EGL_HORIZONTAL_RESOLUTION: -1
>   EGL_VERTICAL_RESOLUTION: -1
>   EGL_MULTISAMPLE_RESOLVE: EGL_MULTISAMPLE_RESOLVE_DEFAULT
>   EGL_PIXEL_ASPECT_RATIO: -1
>   EGL_RENDER_BUFFER: EGL_BACK_BUFFER
>   EGL_SWAP_BEHAVIOR: EGL_BUFFER_PRESERVED
>   EGL_ALPHA_FORMAT: EGL_ALPHA_FORMAT_NONPRE
>   EGL_COLORSPACE: EGL_COLORSPACE_sRGB
>   EGL_LARGEST_PBUFFER: EGL_FALSE
>   EGL_TEXTURE_FORMAT: EGL_NO_TEXTURE
>   EGL_TEXTURE_TARGET: EGL_NO_TEXTURE
>   EGL_MIPMAP_TEXTURE: EGL_FALSE
>   EGL_MIPMAP_LEVEL: 0x00000000
>     Fail, swap behavior is reported as preserve but configuration does not
> support it.
> 
> I get the same result intermittently on SNB.
> 
> Tapani, can you shed some light on why this is happening?  I've disabled the
> tests in CI until this understood.

Huh ok .. that is mismatch between selected config and surface type .. so there's actually 2 issues here where I've fixed just the first one. Thanks, for some reason I did not see this happen on my configuration.
Comment 7 Tapani Pälli 2016-10-26 06:13:04 UTC
Mark, is it possible that some of your machines use DRI3 and some DRI2? These have different behaviour for the preserved bit, if I've understood correctly DRI3 does not support preserved at all, this could be why some machines fail and some pass?
Comment 8 Tapani Pälli 2016-10-26 06:55:31 UTC
This build might have a fix to the issue:

http://otc-mesa-ci.jf.intel.com/job/tpalli/201/

the fix is available in this tree for testing:

https://cgit.freedesktop.org/~tpalli/mesa/log/?h=fix_swap_behavior
Comment 9 Mark Janes 2016-10-26 21:17:07 UTC
I'll test it.
Comment 10 Mark Janes 2016-10-26 22:02:42 UTC
That patch fixes the test on one of the machines that was previously failing.
Comment 11 Tapani Pälli 2016-10-27 04:17:24 UTC
(In reply to Mark Janes from comment #10)
> That patch fixes the test on one of the machines that was previously failing.

So some machines still failing? I'll push all related patches today so let's see if something's still left. I was a bit stupid and did not include everything in that tested branch :/ I'm running a CI right now with all patches, job 205.
Comment 12 Mark Janes 2016-10-27 04:30:23 UTC
Sorry, I wasn't clear.  I tested on one of the machines that was known to fail reliably, and all tests passed.

So there are no remaining failures that I know of.
Comment 13 Tapani Pälli 2016-10-27 05:47:20 UTC
(In reply to Mark Janes from comment #12)
> Sorry, I wasn't clear.  I tested on one of the machines that was known to
> fail reliably, and all tests passed.
> 
> So there are no remaining failures that I know of.

\o/ superb, I'll push fixes in!
Comment 14 Tapani Pälli 2016-10-27 05:49:57 UTC
commit 2035930966b05a7c4dd1f6559d66b5a3b41e01a5
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Wed Oct 26 13:54:51 2016 +0300

    egl: set preserved behavior for surface only if config supports it
    
    Otherwise we can end up with mismatching behavior between config and
    surface when client queries surface attributes. As example, configs
    for DRI3 do not support preserved behavior but here we were setting
    preserved behavior for pixmap and pbuffer.
    
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98326
    Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Chad Versace <chadversary@chromium.org>
    Tested-by: Mark Janes <mark.a.janes@intel.com>


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.