diff options
author | Francisco Jerez <currojerez@riseup.net> | 2016-05-18 21:54:35 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2016-05-27 23:29:04 -0700 |
commit | df1aec763eb972c69bc5127be102a9f281ce94f6 (patch) | |
tree | dd3ece131a76bd47a34d6b70f229f881bcd767a4 /src/mesa/drivers/dri/i965/brw_ir_fs.h | |
parent | ece41df247af247fb573ae8ec208d50e895b7aef (diff) | |
download | external_mesa3d-df1aec763eb972c69bc5127be102a9f281ce94f6.zip external_mesa3d-df1aec763eb972c69bc5127be102a9f281ce94f6.tar.gz external_mesa3d-df1aec763eb972c69bc5127be102a9f281ce94f6.tar.bz2 |
i965/fs: Define methods to calculate the flag subset read or written by an fs_inst.
v2: Codestyle fixes (Jason).
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_ir_fs.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_ir_fs.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h index 13f4e15..ca4b40a 100644 --- a/src/mesa/drivers/dri/i965/brw_ir_fs.h +++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h @@ -276,8 +276,29 @@ public: bool has_side_effects() const; bool has_source_and_destination_hazard() const; - bool reads_flag() const; - bool writes_flag() const; + /** + * Return the subset of flag registers read by the instruction as a bitset + * with byte granularity. + */ + unsigned flags_read(const brw_device_info *devinfo) const; + + /** + * Return the subset of flag registers updated by the instruction (either + * partially or fully) as a bitset with byte granularity. + */ + unsigned flags_written() const; + + bool reads_flag() const + { + /* XXX - Will get rid of this hack shortly. */ + const brw_device_info devinfo = {}; + return flags_read(&devinfo); + } + + bool writes_flag() const + { + return flags_written(); + } fs_reg dst; fs_reg *src; |