|Summary:||Incorrect rendering using glDrawArraysInstancedBaseInstance and first != 0 on Skylake|
|Product:||Mesa||Reporter:||Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer>|
|Component:||Drivers/DRI/i965||Assignee:||Kenneth Graunke <kenneth>|
|Status:||RESOLVED FIXED||QA Contact:||Intel 3D Bugs Mailing List <intel-3d-bugs>|
|i915 platform:||i915 features:|
simple test case
result on skylake
Description Pierre-Eric Pelloux-Prayer 2016-12-19 14:29:42 UTC
Created attachment 128549 [details] simple test case The attached program produces different incorrect result on Intel Skylake (using Mesa 13.0.2 or master). Modifying the vertex shader to use: "3 + gl_VertexID" is enough to get the expected behavior.
Comment 1 Pierre-Eric Pelloux-Prayer 2016-12-19 14:30:33 UTC
Created attachment 128550 [details] expected result Output using: nouveau, r600 and intel haswell
Comment 2 Pierre-Eric Pelloux-Prayer 2016-12-19 14:32:13 UTC
Created attachment 128551 [details] result on skylake lspci: 00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 07)
Comment 3 Ilia Mirkin 2016-12-19 14:47:57 UTC
In case it's not obvious, the issue is that gl_VertexID does not appear to get the proper base offset. There are tests for this in piglit, which presumably don't fail on SKL. So it means that this test is doing something odd -- one thing is that it doesn't have a VBO. Although I thought there were piglit tests for that too.
Comment 4 Ilia Mirkin 2016-12-19 17:48:12 UTC
Created attachment 128562 [details] [review] hackpatch The attached hack-patch "fixes" it. I guess the condition in question needs to look at the nr_buffers as set a few lines below, not the vb.nr_enabled ones. As I don't have full visibility of the programming model, I'll let someone else sort out the precise way this needs to be resolved.
Comment 5 Kenneth Graunke 2016-12-19 19:30:27 UTC
Thanks for the report and simple test! Here's a patch to fix the issue: https://lists.freedesktop.org/archives/mesa-dev/2016-December/138593.html Would you be willing to contribute a Piglit test which reproduces this bug? It should be pretty straightforward to port your existing sample code from SDL to the Piglit framework. Doing that means that we'll regression test this on all drivers in the future, meaning it's more likely to not break in the future. Thanks again!