[Piglit] [PATCH 3/4] glsl-1.50: fix sample count in interface-block-centroid.c
Brian Paul
brianp at vmware.com
Fri Oct 13 16:07:50 UTC 2017
Use GL_MAX_SAMPLES as sample count for glRenderbufferStorageMultisample().
Allows the test to pass on llvmpipe.
---
tests/spec/glsl-1.50/execution/interface-block-centroid.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/spec/glsl-1.50/execution/interface-block-centroid.c b/tests/spec/glsl-1.50/execution/interface-block-centroid.c
index 138f48b..c1279a5 100644
--- a/tests/spec/glsl-1.50/execution/interface-block-centroid.c
+++ b/tests/spec/glsl-1.50/execution/interface-block-centroid.c
@@ -199,6 +199,9 @@ piglit_init(int argc, char **argv)
GLuint rb;
GLuint vao;
GLuint array_buf;
+ GLint samples;
+
+ glGetIntegerv(GL_MAX_SAMPLES, &samples);
/* Parse params */
if (argc != 2)
@@ -222,7 +225,7 @@ piglit_init(int argc, char **argv)
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
glBindRenderbuffer(GL_RENDERBUFFER, rb);
glRenderbufferStorageMultisample(GL_RENDERBUFFER,
- 4 /* samples */,
+ samples,
GL_RGBA8 /* internalformat */,
piglit_width, piglit_height);
glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
--
1.9.1
More information about the Piglit
mailing list