[Bug 101648] Adding a single-iteration do-while loop in a GLSL shader leads to a different image
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Jun 29 18:58:47 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=101648
--- Comment #2 from Ilia Mirkin <imirkin at alum.mit.edu> ---
[Just some musings, figured I'd take a closer look... feel free to ignore.]
GLSL seems fine (note use of return_flag):
(loop (
(if (expression bool >= (expression float i2f (var_ref i at 2) ) (swiz x
(var_ref gl_FragCoord) )) (
(assign (x) (var_ref return_value) (var_ref s) )
(assign (x) (var_ref return_flag) (constant bool (1)) )
break
)
())
(if (expression bool >= (swiz x (var_ref gl_FragCoord) )(constant
float (0.000000)) ) (
break
)
())
))
(if (var_ref return_flag) (
break
)
And the NIR seems OK:
(return_flag)
vec1 32 ssa_39 = phi block_9: ssa_7, block_12: ssa_19
/* succs: block_16 block_17 */
if ssa_39 {
block block_16:
/* preds: block_15 */
break
And ssa_7 is 0xffffffff as expected (from block_9 which is the one where
return_flag is set to 1)
ssa_19 is defined in the outer loop:
vec1 32 ssa_19 = phi block_0: ssa_1, block_18: ssa_39
Where ssa_1 == 0, and ssa_39 is defined above.
And the register-ized NIR seems fine too at first glance, at least as far as
this return business is concerned.
However looking at the SIMD8 shader, the control flow seems off. This is where
I get a lot weaker, but I believe that I've found the register for the
return_flag, but I don't see any control flow that depends on it. There's also
only 1 while loop, rather than nested (it seems).
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170629/0d9cb83c/attachment.html>
More information about the intel-3d-bugs
mailing list