[Piglit] [PATCH] arb_sample_shading: ensure number of samples is at least one
Ilia Mirkin
imirkin at alum.mit.edu
Thu Feb 18 07:13:23 UTC 2016
>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
More information about the Piglit
mailing list