Add more alternatives to reflect() precision tests
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 5 May 2017 06:30:15 +0000 (08:30 +0200)
committerPyry Haulos <phaulos@google.com>
Fri, 12 May 2017 17:30:35 +0000 (13:30 -0400)
Intel/Mesa started to generate these in some scenarios recently.

Components: Vulkan
Vk-GL-CTS Issue: 392

Affects:
dEQP-VK.glsl.builtin.precision.reflect.*

Change-Id: Ic943cf14d531e392c03adf18605e6330267be4a1

external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp

index 18a89ad..b73ef14 100644 (file)
@@ -3077,7 +3077,9 @@ protected:
                const ExprP<float>      dotNI   = bindExpression("dotNI", ctx, dot(n, i));
 
                return i - alternatives((n * dotNI) * constant(2.0f),
-                                                               n * (dotNI * constant(2.0f)));
+                                                               alternatives(n * (dotNI * constant(2.0f)),
+                                                                                        alternatives(n * dot(i * constant(2.0f), n),
+                                                                                                                 n * dot(i, n * constant(2.0f)))));
        }
 };