diff options
author | Jason Ekstrand <[email protected]> | 2018-05-17 20:51:24 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-28 13:19:38 -0700 |
commit | 74b477039dbd144a3b31933a2326c32593f3ef12 (patch) | |
tree | a9c3ab926ee6d944cd68dd83f1b468d7fa654a04 /src/intel/compiler/brw_fs_generator.cpp | |
parent | 2aefa5e19fc09b95affa7e61d162a6b95bfacd92 (diff) |
intel/fs: Add the group to the flag subreg number on SNB and older
We want consistent behavior in the meaning of the flag_subreg field
between SNB and IVB+.
v2 (Jason Ekstrand):
- Add some extra commentary
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs_generator.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs_generator.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp index b06cd0f576c..a01d32000b2 100644 --- a/src/intel/compiler/brw_fs_generator.cpp +++ b/src/intel/compiler/brw_fs_generator.cpp @@ -1815,7 +1815,13 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width) brw_set_default_access_mode(p, BRW_ALIGN_1); brw_set_default_predicate_control(p, inst->predicate); brw_set_default_predicate_inverse(p, inst->predicate_inverse); - brw_set_default_flag_reg(p, inst->flag_subreg / 2, inst->flag_subreg % 2); + /* On gen7 and above, hardware automatically adds the group onto the + * flag subregister number. On Sandy Bridge and older, we have to do it + * ourselves. + */ + const unsigned flag_subreg = inst->flag_subreg + + (devinfo->gen >= 7 ? 0 : inst->group / 16); + brw_set_default_flag_reg(p, flag_subreg / 2, flag_subreg % 2); brw_set_default_saturate(p, inst->saturate); brw_set_default_mask_control(p, inst->force_writemask_all); brw_set_default_acc_write_control(p, inst->writes_accumulator); |