<div dir="ltr">rb<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 14, 2019 at 12:49 PM Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We were dropping negations/abs while trying to optimize.<br>
<br>
Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>><br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=109601" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=109601</a><br>
---<br>
tests/shaders/glsl-bug-109601.shader_test | 28 +++++++++++++++++++++++<br>
1 file changed, 28 insertions(+)<br>
create mode 100644 tests/shaders/glsl-bug-109601.shader_test<br>
<br>
diff --git a/tests/shaders/glsl-bug-109601.shader_test b/tests/shaders/glsl-bug-109601.shader_test<br>
new file mode 100644<br>
index 000000000..c060233e9<br>
--- /dev/null<br>
+++ b/tests/shaders/glsl-bug-109601.shader_test<br>
@@ -0,0 +1,28 @@<br>
+[require]<br>
+GL >= 3.0<br>
+GLSL >= 3.30<br>
+<br>
+[vertex shader passthrough]<br>
+<br>
+[fragment shader]<br>
+#version 330<br>
+#extension GL_ARB_shader_storage_buffer_object: require<br>
+<br>
+uniform int v1;<br>
+uniform float v2;<br>
+<br>
+void main()<br>
+{<br>
+ float a = -(v1 >> 16);<br>
+ gl_FragColor = vec4(a * v2,0.0f,0.0f,1.0f);<br>
+}<br>
+<br>
+[test]<br>
+clear color 0.0 0.0 0.0 0.0<br>
+clear<br>
+<br>
+uniform int v1 0x10000<br>
+uniform float v2 -1<br>
+<br>
+draw rect -1 -1 2 2<br>
+probe all rgba 1.0 0.0 0.0 1.0<br>
-- <br>
2.20.1<br>
<br>
</blockquote></div>