Intel SandyBridge is not handling GL_TRIANGLE_STRIP_ADJACENCY with repeating vertex indices correctly, so there is a GPU hang when running:
bin/glsl-1.50-geometry-primitive-id-restart \ GL_TRIANGLE_STRIP_ADJACENCY ffs This patch provides a workaround for this issue as it seems to be a HW bug in SandyBrigde. More information: http://lists.freedesktop.org/archives/mesa-dev/2014-July/064221.html Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> --- If there is no objections, we plan to push this patch next week because it is needed to avoid GPU hangs when testing GS support patches for SNB. Before pushing it, we will send a reminder to the mailing list, just in case. .../execution/geometry/primitive-id-restart.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c b/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c index 9f1a8ef..1e748c3 100644 --- a/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c +++ b/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c @@ -218,11 +218,22 @@ piglit_init(int argc, char **argv) num_elements = 0; for (i = 1; i <= LONGEST_INPUT_SEQUENCE; i++) { for (j = 0; j < i; j++) { - /* Every element that isn't the primitive - * restart index can just be element 0, since - * we don't care about the actual vertex data. + /* Every element that isn't the primitive restart index + * can have any value as far as it is not the primitive + * restart index since we don't care about the actual + * vertex data. + * + * NOTE: repeating the indices for all elements but the + * primitive restart index causes a GPU hang in Intel's + * Sandy Bridge platform, likely due to a hardware bug, + * so make sure that we do not repeat the indices. + * + * More information: + * + * http://lists.freedesktop.org/archives/mesa-dev/2014-July/064221.html */ - elements[num_elements++] = 0; + elements[num_elements++] = + j != prim_restart_index ? j : j + 1; } elements[num_elements++] = prim_restart_index; } -- 2.1.0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
