[Piglit] [PATCH] glsl-algebraic-logic*: Fix two tests in case the optimizer is more successful.

Eric Anholt eric at anholt.net
Mon Feb 13 17:59:38 PST 2012


On Mon, 13 Feb 2012 00:21:57 -0800, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 02/08/2012 02:11 PM, Eric Anholt wrote:
> > These were failing due to the uniforms being unavailable after a new
> > optimization in Mesa.
> > ---
> >   .../glsl-algebraic-logicand-false-2.shader_test    |    5 ++---
> >   .../glsl-algebraic-logicor-true.shader_test        |    5 ++---
> >   2 files changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/tests/shaders/glsl-algebraic-logicand-false-2.shader_test b/tests/shaders/glsl-algebraic-logicand-false-2.shader_test
> > index e0d2fbb..1477ec3 100644
> > --- a/tests/shaders/glsl-algebraic-logicand-false-2.shader_test
> > +++ b/tests/shaders/glsl-algebraic-logicand-false-2.shader_test
> > @@ -8,19 +8,18 @@ void main()
> >   }
> >
> >   [fragment shader]
> > -uniform vec4 color;
> > +uniform bool some_bool; /* defaults to false */
> 
> Why does it default to false?  Is that actually guaranteed by the GL, or 
> does our implementation just happen to make it false?
> 
> I would expect undefined results.

"When a program is successfully linked, all active uniforms belonging to
the program object are initialized to zero (FALSE for booleans)"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120213/ad57b302/attachment.pgp>


More information about the Piglit mailing list