[Piglit] [PATCH] texwrap: skip if integers or offset used with non-2D

Brian Paul brianp at vmware.com
Thu Jul 9 08:03:37 PDT 2015


On 07/08/2015 05:22 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> The test doesn't support these cases yet, since the shaders
> are hardcoded to use 2D samplers.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>   tests/texturing/texwrap.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c
> index 76b6382..3736231 100644
> --- a/tests/texturing/texwrap.c
> +++ b/tests/texturing/texwrap.c
> @@ -1839,6 +1839,10 @@ outer_continue:;
>   	glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE);
>
>   	if (texture_offset) {
> +		if (texture_target != GL_TEXTURE_2D) {
> +			printf("Offset tests only work with 2D textures.\n");
> +			piglit_report_result(PIGLIT_SKIP);
> +		}
>   		piglit_require_GLSL_version(130);
>   		fp = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fp_offset);
>   		assert(fp);
> @@ -1851,6 +1855,11 @@ outer_continue:;
>   	switch (test->format[0].type) {
>   	case INT_TYPE:
>   	case UINT_TYPE:
> +
> +		if (texture_target != GL_TEXTURE_2D) {
> +			printf("Integer tests only work with 2D textures.\n");
> +			piglit_report_result(PIGLIT_SKIP);
> +		}

The whitespace line seems unnecessary.

Reviewed-by: Brian Paul <brianp at vmware.com>


>   		piglit_require_GLSL_version(130);
>   		fp = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fp_int);
>   		assert(fp);
>



More information about the Piglit mailing list