[Piglit] [PATCH] built-in-constants: don't try to create GS with version < 150.
Paul Berry
stereotype441 at gmail.com
Mon Oct 14 23:05:56 CEST 2013
On 14 October 2013 12:44, Ian Romanick <idr at freedesktop.org> wrote:
> On 10/12/2013 10:11 AM, Paul Berry wrote:
> > Previously, built-in-constants looked at required_glsl_version to
> > determine what to include in the "#version" directive, but it looked
> > at glsl_version (the maximum version supported by the implementation)
> > to decide whether to test geometry shaders. As a result, it when
> > testing a built-in constant whose required_glsl_version was less than
> > 150, it would try to create a geometry shader using a "#version"
> > directive less than 150, leading to GL errors.
> >
> > This patch prevents the problem by only testing geometry shaders when
> > required_glsl_version >= 150.
>
> It's actually even more broken than that. :( Sorry about that.
>
> If required_glsl_version or glsl_version is 300 (for OpenGL ES 3.0), it
> will also try to create a geometry shader.
>
> How about
>
> if (required_glsl_version >= 150 && required_glsl_version != 300)
>
> instead?
>
Oops, good call. With that fixed, do I have your r-b?
>
> > ---
> > tests/shaders/built-in-constants.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/shaders/built-in-constants.c
> b/tests/shaders/built-in-constants.c
> > index 06850b5..3a2a784 100644
> > --- a/tests/shaders/built-in-constants.c
> > +++ b/tests/shaders/built-in-constants.c
> > @@ -350,7 +350,7 @@ piglit_init(int argc, char **argv)
> > test_vs = glCreateShader(GL_VERTEX_SHADER);
> > test_fs = glCreateShader(GL_FRAGMENT_SHADER);
> >
> > - if (glsl_version >= 150)
> > + if (required_glsl_version >= 150)
> > test_gs = glCreateShader(GL_GEOMETRY_SHADER);
> >
> > for (i = 0; i < num_tests; i++) {
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20131014/2881da95/attachment-0001.html>
More information about the Piglit
mailing list