summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>2014-09-17 10:58:44 +0200
committerIago Toral Quiroga <itoral@igalia.com>2014-09-19 14:56:20 +0200
commitf43d2550178ddf75aa70983df73adb26c5ef5352 (patch)
treeed39dbd8bbc376b9ab6e628fd3b51e937d9ef769
parent67ca94f6bf31c83327c38fbc1c6263cc924e4e30 (diff)
glsl-1.50-geometry-primitive-id-restart: Add workaround for Intel SandyBrige
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 <siglesias@igalia.com>
-rw-r--r--tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c19
1 files 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 9f1a8efbd..1e748c390 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;
}