[Piglit] [PATCH] gl-3.2/layered-rendering/framebuffertexture: check for MSAA support

Roland Scheidegger sroland at vmware.com
Wed Aug 16 12:56:00 UTC 2017


Thanks for fixing this.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>


Am 16.08.2017 um 05:30 schrieb Brian Paul:
> Skip testing MSAA textures if GL_MAX_SAMPLES = 0.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102123
> ---
>  tests/spec/gl-3.2/layered-rendering/framebuffertexture.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c b/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c
> index 6d11d7e..70ad350 100644
> --- a/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c
> +++ b/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c
> @@ -205,6 +205,18 @@ test_framebuffertexture(GLenum textureType)
>  
>  	float expected[] = { 0, 1, 0 };
>  
> +	if (textureType == GL_TEXTURE_2D_MULTISAMPLE ||
> +	    textureType == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) {
> +		GLint maxSamples;
> +		glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
> +		if (maxSamples == 0) {
> +			/* skip */
> +			printf("Skipping %s because GL_MAX_SAMPLES=0\n",
> +			       piglit_get_gl_enum_name(textureType));
> +			return true;
> +		}
> +	}
> +
>  	glGenFramebuffers(1, &fbo);
>  	glBindFramebuffer(GL_FRAMEBUFFER, fbo);
>  
> 



More information about the Piglit mailing list