OSDN Git Service

Don't continue looping when having returned from shader function.
authorNicolas Capens <capn@google.com>
Thu, 28 Apr 2016 19:28:02 +0000 (15:28 -0400)
committerNicolas Capens <capn@google.com>
Fri, 29 Apr 2016 13:54:02 +0000 (13:54 +0000)
commit2ff2948b730812543a6d0702377084c472e3404d
tree8e44e1357bc31bd291e626628db51ad1d86bd794
parent26ea8f5e6569c5569caaefffb88da3867440a3c0
Don't continue looping when having returned from shader function.

Previously we would mask instruction execution after hitting a LEAVE,
but still jump back on every loop iteration (even if infinite). This
change applies the enableLeave mask to the loop test condition so we
break out of the loop when all strands have hit LEAVE.

Change-Id: Ia331a91fb363d20743d5b87a468c3cfcaa7b481e
Reviewed-on: https://swiftshader-review.googlesource.com/5250
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/Shader/PixelProgram.cpp
src/Shader/VertexProgram.cpp