Bug 98249

Summary: dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.copy_image_sub_data failed on SKL
Product: Mesa Reporter: Randy <randy.xu>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 94448    

Description Randy 2016-10-14 08:14:27 UTC
The case dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.copy_image_sub_data failed on SKL GT2, but can pass on HSW w/ the same dEQP test app and GL driver.

The log shows 

  <Text>glCopyImageSubData(1, 0x00000de1, -1, 0, 0, 0, 2, 0x00000de1, -1, 0, 0, 0, 0, 0, 1);</Text>
  <Text>GL_INVALID_VALUE was expected but got GL_INVALID_OPERATION</Text>


  <Text>glCopyImageSubData(1, 0x00000de1, 0, 0, 0, 0, 4, 0x0000806f, 0, 0, 0, 0, 0, 0, 1);</Text>
  <Text>GL_INVALID_OPERATION was expected but got GL_NO_ERROR</Text>

Mesa git top commit: 389d6dedbe75defe07216ad761569a9b94f44e58
dEQP git top commit: ca988480be945772473f9256b6ae91fa6aa62bd1
Comment 1 Kenneth Graunke 2016-10-15 22:25:35 UTC
The test does additional testing if ES 3.2 is supported.  That's why Skylake fails but earlier platforms pass - the earlier platforms don't hit the failing part of the test.
Comment 2 Kenneth Graunke 2016-10-15 22:42:12 UTC
It looks like we skip the mipmap completeness check if level == 0.  The test appears to expect us to enforce this...
Comment 3 Tapani Pälli 2017-04-27 10:28:46 UTC
Fixed by following commit
--- 8< ---
commit c5bf7cb52942cb7df9f5d73746ffbf3c102d12cc
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Feb 23 15:04:52 2017 -0800

    mesa: Require mipmap completeness for glCopyImageSubData(), sometimes.
    
    This patch makes glCopyImageSubData require mipmap completeness when the
    texture object's built-in sampler object has a mipmapping MinFilter.
    
    Fixes (on i965):
    dEQP-GLES31.functional.debug.negative_coverage.*.buffer.copy_image_sub_data
    
    Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Comment 4 Kenneth Graunke 2017-05-09 07:09:55 UTC
Patch got reverted due to https://bugs.freedesktop.org/show_bug.cgi?id=100690 - reopening.
Comment 5 Kenneth Graunke 2017-10-13 02:46:11 UTC
Oh, I fixed this back in June and forgot to close the bug report.  Fixed by:

commit 40f842ab5711672a5aec7ae973998ee3a07a91d8
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Feb 23 15:04:52 2017 -0800

    mesa: Require mipmap completeness for glCopyImageSubData() at times.
    
    This patch makes glCopyImageSubData require mipmap completeness when the
    texture object's built-in sampler object has a mipmapping MinFilter.
    This is apparently the de facto behavior and mandated by Android's CTS.
    
    One exception is that we ignore format based completeness rules
    (specifically integer formats with linear filtering), as this is
    also the de facto behavior that until recently was mandated by the
    OpenGL 4.5 CTS.
    
    This was discussed with both the OpenGL and OpenGL ES working groups,
    and while everyone agrees this behavior is unfortunate and complicated,
    it is what it is at this point.  There was little appetite for relaxing
    restrictions given that all conformant Android drivers followed the
    mipmapping rule, and all conformant GL 4.5 implementations ignored the
    integer/linear rule.
    
    Fixes (on i965):
    dEQP-GLES31.functional.debug.negative_coverage.*.buffer.copy_image_sub_data
    
    Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224
    Reviewed-by: Roland Scheidegger <sroland@vmware.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.