[Piglit] [PATCH] arb_sample_shading: ensure number of samples is at least one
Neil Roberts
neil at linux.intel.com
Thu Feb 18 17:25:51 UTC 2016
Oh I didn't notice you'd written this test when I replied to your
message on mesa-dev. Looks good to me.
Reviewed-by: Neil Roberts <neil at linux.intel.com>
- Neil
Ilia Mirkin <imirkin at alum.mit.edu> writes:
> From the ARB_sample_shading spec:
>
> "gl_NumSamples is the total
> number of samples in the framebuffer, or one if rendering to a
> non-multisample framebuffer"
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp b/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
> index 08bbea9..0124f67 100644
> --- a/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
> +++ b/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
> @@ -127,7 +127,7 @@ bool test_builtin_num_samples(const Fbo& ms_fbo)
> glUseProgram(prog);
> glBindFramebuffer(GL_DRAW_FRAMEBUFFER, ms_fbo.handle);
> glGetIntegerv(GL_SAMPLES, &samples);
> - glUniform1i(glGetUniformLocation(prog, "samples"), samples);
> + glUniform1i(glGetUniformLocation(prog, "samples"), MAX2(1, samples));
>
> glClear(GL_COLOR_BUFFER_BIT);
> piglit_draw_rect(-1, -1, 2, 2);
> --
> 2.4.10
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list