OSDN Git Service

i965/fs: Don't use backend_visitor::instructions after creating the CFG.
authorMatt Turner <mattst88@gmail.com>
Tue, 13 Jan 2015 23:35:57 +0000 (15:35 -0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 7 Mar 2015 17:21:41 +0000 (17:21 +0000)
commit73efd2891f9e044c89e9d24ac4b93931c02ea2fc
tree68ef9800aaa1bb210c8a66e87988ff8beda0a13e
parent73f8e342a7d33e296eb7a92b3dffae55a66f8f9f
i965/fs: Don't use backend_visitor::instructions after creating the CFG.

This is a fix for a regression introduced in commit a9f8296d ("i965/fs:
Preserve the CFG in a few more places.").

The errata this code works around is described in a comment before the function:

   "[DevBW, DevCL] Errata: A destination register from a send can not be
    used as a destination register until after it has been sourced by an
    instruction with a different destination register.

The framebuffer write's sources must be in message registers, which SEND
instructions cannot have as a destination. There's no way for this
errata to affect anything at the end of the program. Just remove the
code.

Cc: 10.4, 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84613
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit e214000f258ae564e64d839cccee9418526f226b)
src/mesa/drivers/dri/i965/brw_fs.cpp