Bug 103837

Summary: [OpenGL CTS] [BDW] KHR-GL45.tessellation_shader.tessellation_shader_tessellation.gl_InvocationID_PatchVerticesIn_PrimitiveID occasionally fails
Product: Mesa Reporter: Neil Roberts <nroberts>
Component: Drivers/DRI/i965Assignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED MOVED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: agoldmints, agomez
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 102590    
Attachments: Piglit test

Description Neil Roberts 2017-11-21 11:37:17 UTC
The CTS test KHR-GL45.tessellation_shader.tessellation_shader_tessellation.gl_InvocationID_PatchVerticesIn_PrimitiveID seems to occasionally fail at a rate of about 1.4%.

The test emits a bunch of tessellation patches with varying sizes, including the maximum of 32 and does an instanced draw call. There are no vertex buffers bound and all of the vertices have the same position. The tessellation shaders write to 5 integer output varyings which are captured to a transform feedback buffer. The test then scans the buffer to verify that it has the expected values. When it fails, there are one or two vertices in this buffer that get written with all zeroes instead of the expected values. These failed slots are small and in the middle of the buffer so it doesn’t seem likely that this could be a buffer configuration issue. I suspect it might be some hardware quirk but I haven’t been able to find anything relevant in the workarounds in the hardware docs.

The hardware where I can replicate it is a NUC with Intel(R) Iris Pro 6200 (Broadwell GT3e). However I am unable to replicate it on my laptop which has Intel(R) HD Graphics 5500 (Broadwell GT2).
Comment 1 Neil Roberts 2017-11-22 09:51:09 UTC
Created attachment 135663 [details] [review]
Piglit test

Here is a test for Piglit which does something similar to the CTS test and runs it 3000 times. Sadly it still doesn’t seem to fail every time so the failure rate is even lower than the CTS test, but I’m posting it anyway in case the code is a bit easier to follow.
Comment 2 Antia Puentes 2017-12-14 17:39:53 UTC
I am still experiencing this failure. Adding the error output:

Invalid gl_InvocationID value (0) was found for result coordinate at index 0 instead of expected value (31).
Fail (Invalid gl_InvocationID value used in TC stage at esextcTessellationShaderTessellation.cpp:1440)
Comment 3 Andrés Gómez García 2018-05-04 08:27:24 UTC
I'm still able to reproduce with current mesa master:

9a21c96126d ("egl/x11: Send invalidate to driver on copy_region path in swap_buffer")


Tested with BDW GT3 in Debian. System specs:

linux-image-4.9.0-3-amd64 4.9.30-2+deb9u2
libdrm-intel1:amd64 2.4.91-2
xserver-xorg 1:7.7+19
xserver-xorg-core 2:1.19.5-1
xserver-xorg-video-intel 2:2.99.917+git20161206-1
Comment 4 Andrés Gómez García 2018-08-24 13:29:12 UTC
Maybe related to bug 107675 ?
Comment 5 Paul 2019-04-26 10:31:09 UTC
Hi guys
I've run both tests on my BDW (Intel® HD Graphics 5500) machine on Ubuntu 18.04, 4.18.0 and 5.0.0 version of the Kernel, with Xorg 1.20.1 version and the latest master version of mesa.
I've run each test around 100 000 times (I've been running them for 4 nights, 25 000 times per night) - none of them failed.
Also, as I saw, the VK-CTS test successfully passed on the CI - https://mesa-ci.01.org/mesa_master_daily/builds/4946/group/2137555ccb43fc785550447fe4246772.
I think we can close this issue.
Comment 6 Mark Janes 2019-04-26 18:11:36 UTC
Paul: thanks for the additional testing!  The test is disabled in CI on BDW for the i965 driver.  You are right that it seems to be passing reliably on the BDW iris driver.

I've submitted an MR to re-enable the test on BDW.  We should verify that it is reliable in our environment (running parallel tests on each core).

https://gitlab.freedesktop.org/Mesa_CI/mesa_jenkins/merge_requests/766
Comment 7 Clayton Craft 2019-07-31 16:57:29 UTC
I just tried to run this test through CI on BDW/i965 and saw it fail.


stdout from test (matches what was reported previously):

    Invalid gl_InvocationID value (0) was found for result coordinate at index 5 instead of expected value (31).
    Invalid gl_InvocationID value used in TC stage at esextcTessellationShaderTessellation.cpp:1440
Comment 8 Paul 2019-08-02 12:07:30 UTC
Hello guys
As I already said, I have Intel® HD Graphics 5500
But Neil has said, that he couldn't replicate the issue on this GPU.
Clayton, could you clarify please, what bdw-GPU on the CI?
Comment 9 Clayton Craft 2019-08-02 16:00:25 UTC
I saw it fail intermittently on an Iris Pro Graphics 6200.
Comment 10 GitLab Migration User 2019-09-25 19:05:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1656.

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.