summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-10-20 11:32:01 -0700
committerMatt Turner <[email protected]>2013-10-30 19:49:27 -0700
commit20d0297ff2d507aab42e59ebfde375d5205642cb (patch)
tree26bdb811634a0c8c8e5f42283c528a8d455af351 /src
parentf768f998e0e5885c36af1efee6ca70fdf90deb96 (diff)
i965/fs: Add reads_flag() and writes_flag() to fs_inst.
Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp13
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 69340f0bc9f..236e86c7cc2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -732,6 +732,19 @@ fs_inst::regs_read(fs_visitor *v, int arg)
return 1;
}
+bool
+fs_inst::reads_flag()
+{
+ return predicate;
+}
+
+bool
+fs_inst::writes_flag()
+{
+ return (conditional_mod && opcode != BRW_OPCODE_SEL) ||
+ opcode == FS_OPCODE_MOV_DISPATCH_TO_FLAGS;
+}
+
/**
* Returns how many MRFs an FS opcode will write over.
*
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index c9b0aa1773c..43e47617c17 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -151,6 +151,9 @@ public:
bool is_partial_write();
int regs_read(fs_visitor *v, int arg);
+ bool reads_flag();
+ bool writes_flag();
+
fs_reg dst;
fs_reg src[3];
bool saturate;