[Piglit] [PATCH] glsl-algebraic-logic*: Fix two tests in case the optimizer is more successful.
kenneth at whitecape.org
Mon Feb 13 22:34:25 PST 2012
On 02/13/2012 05:59 PM, Eric Anholt wrote:
> 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)"
Fair. This is a weird change, but I understand why you're doing it.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the Piglit