[Piglit] [PATCH] glsl-1.50-geometry-primitive-id-restart: Add workaround for Intel SandyBrige

Iago Toral Quiroga itoral at igalia.com
Fri Sep 19 00:54:49 PDT 2014


Jordan has completed the review of the SandyBridge Geometry Shader
implementation and I would like to push the series to Mesa, but we need
this patch in piglit too so that people running piglit tests on
SandyBridge do not run into the GPU hang.

If nobody has objections I'll push this patch later today.

On mié, 2014-09-17 at 10:58 +0200, Samuel Iglesias Gonsalvez wrote:
> 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 at igalia.com>
> ---
> 
> 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;
>  	}




More information about the Piglit mailing list