i965/fs: Create a has_side_effects for fs_inst
authorBen Widawsky <benjamin.widawsky@intel.com>
Tue, 31 Mar 2015 22:49:42 +0000 (15:49 -0700)
committerBen Widawsky <benjamin.widawsky@intel.com>
Tue, 14 Apr 2015 22:22:47 +0000 (15:22 -0700)
commit38707e1478a4b6f4687c583d06fbd68e22900735
treeddd62abb9144b5c6119dd7adedc925ce5a74aa20
parent28d9e90428282a5e0a6aa31ad858a5cf514d1264
i965/fs: Create a has_side_effects for fs_inst

When an instruction has a side effect, it impacts the available options when
reordering an instruction. As the EOT flag is an implied write to the render
target in the FS, it can be considered a side effect.

This patch shouldn't actually have any impact on the current code since the EOT
flag implies that the opcode is already one with side effects,
FS_OPCODE_FB_WRITE. The next patch however will introduce an optimization
whereby the EOT flag can occur with an opcode SHADER_OPCODE_TEX, and as that
instruction will perform the same implied write to the render target, it cannot
be reordered.

v2: Remove extra whitespace (Matt)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_ir_fs.h