[Bug 110953] Adding a redundant single-iteration do-while loop causes different image to be rendered

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 20 19:53:13 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110953

--- Comment #2 from Ian Romanick <idr at freedesktop.org> ---
The difference in the output of "./glsl_compiler --version 300 --dump-lir" for
both shaders is below.  It looks like the loop in the second shader is
(incorrectly) unrolled twice.

--- /tmp/before.txt     2019-06-20 12:48:58.425392405 -0700
+++ /tmp/after.txt      2019-06-20 12:49:05.983437986 -0700
@@ -72,6 +72,14 @@
           )
           ())

+          (if (var_ref checkSwap_retval) (
+            (declare (temporary ) float assignment_tmp at 2)
+            (assign  (x) (var_ref assignment_tmp at 2)  (array_ref (var_ref data)
(var_ref i) ) ) 
+            (assign  (x) (array_ref (var_ref data) (var_ref i) )  (array_ref
(var_ref data) (var_ref j) ) ) 
+            (assign  (x) (array_ref (var_ref data) (var_ref j) )  (var_ref
assignment_tmp at 2) ) 
+          )
+          ())
+
           (assign  (x) (var_ref j)  (expression int + (var_ref j) (constant
int (1)) ) ) 
         ))

@@ -87,12 +95,12 @@
         (assign  (xyzw) (var_ref _GLF_color)  (var_ref vec_ctor) ) 
       )
       (
-        (declare (temporary ) vec4 vec_ctor at 2)
-        (assign  (w) (var_ref vec_ctor at 2)  (constant float (1.000000)) ) 
-        (assign  (x) (var_ref vec_ctor at 2)  (expression float / (array_ref
(var_ref data) (constant int (5)) ) (constant float (10.000000)) ) ) 
-        (assign  (y) (var_ref vec_ctor at 2)  (expression float / (array_ref
(var_ref data) (constant int (9)) ) (constant float (10.000000)) ) ) 
-        (assign  (z) (var_ref vec_ctor at 2)  (expression float / (array_ref
(var_ref data) (constant int (0)) ) (constant float (10.000000)) ) ) 
-        (assign  (xyzw) (var_ref _GLF_color)  (var_ref vec_ctor at 2) ) 
+        (declare (temporary ) vec4 vec_ctor at 3)
+        (assign  (w) (var_ref vec_ctor at 3)  (constant float (1.000000)) ) 
+        (assign  (x) (var_ref vec_ctor at 3)  (expression float / (array_ref
(var_ref data) (constant int (5)) ) (constant float (10.000000)) ) ) 
+        (assign  (y) (var_ref vec_ctor at 3)  (expression float / (array_ref
(var_ref data) (constant int (9)) ) (constant float (10.000000)) ) ) 
+        (assign  (z) (var_ref vec_ctor at 3)  (expression float / (array_ref
(var_ref data) (constant int (0)) ) (constant float (10.000000)) ) ) 
+        (assign  (xyzw) (var_ref _GLF_color)  (var_ref vec_ctor at 3) ) 
       ))

     ))

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20190620/98f727b5/attachment-0001.html>


More information about the intel-3d-bugs mailing list