Created attachment 143227 [details] apitrace of example program Originally reported as a Blender bug: https://developer.blender.org/T60762 (which it is not) Using desktop GL 3.3+. Steps to reproduce: * prepare a vertex and index buffer * enable GL_PRIMITIVE_RESTART * draw a GL_TRIANGLE_FAN using those buffers * draw any number of GL_LINE_STRIPs with those same buffers Drawing a GL_TRIANGLE_FAN prior to GL_LINE_STRIPs makes the strip draw calls fail to use restart markers (here, 0xFF), resulting in the line strips' supposedly unconnected strips being connected through a point of invalid coordinates (observed to consistently be (0, 0, 0)). IOW, restart markers seems to be (re-)considered as normal indices. Interfering with GL calls that read or write to the index buffer makes the problem go away, hinting at a GL state tracking or cache issue.
Created attachment 143228 [details] test program source code
Hi Dorian. Thanks for the report. I reproduced issue using provided app. Results: Ivi bridge - reproduced on 11.0.0, 17.0.0, 18.3.0, 18.3.2, 19.0.0 git latest But didn't reproduce on KBL with 18.1.5 Investigating
I managed to reproduce this issue on SNB using the latest git mesa. I am going to continue my investigation)
I found out the root cause of the issue. Unfortunately the issue is in mesa. I have been working on a mesa patch and a piglit test for this issue.
Created attachment 143256 [details] [review] Mesa patch v1 Could you please check this mesa patch with this issue if it is possible and confirm if it helps you. Thanks, Andrii
I reproduce this issue on KBL using the following test: https://gitlab.freedesktop.org/asimiklit/piglit/commit/118f0999918f67230ab79780186a1c15febafb3b The solution was suggested: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/176
Fixed with : commit f4f4ec941e1427142656e588244f378e469e996e (HEAD -> master, origin/master) Author: Andrii Simiklit <andrii.simiklit@globallogic.com> Date: Fri Jan 25 15:03:07 2019 +0200 i965: re-emit index buffer state on a reset option change. Seems like we forget to update the index buffer (ib) status and IndexedDrawCutIndexEnable or CutIndexEnable flag is left unchanged it leads to ignoring of glEnable/glDisable functions for GL_PRIMITIVE_RESTART in some cases. The index buffer (ib) status should be re-emmited after the reset option change to avoid some unexpected behavior. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109451 Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> Signed-off-by: Andrii Simiklit <asimiklit.work@gmail.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.